Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
google-group committed Aug 10, 2021
1 parent 94dbc04 commit 8eeca8a
Show file tree
Hide file tree
Showing 10 changed files with 149 additions and 70 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Notepad-for-Phone
# Notepad
简单、免费、开源的手机端的记事本,基于uni-app开发。

## Issues
使用的时候遇到任何问题或有好的建议,请点击进入[issue](https://github.com/hai2007/Notepad-for-Phone/issues),欢迎参与维护!
使用的时候遇到任何问题或有好的建议,请点击进入[issue](https://github.com/hai2007/Notepad/issues),欢迎参与维护!

开源协议
---------------------------------------
[MIT](https://github.com/hai2007/Notepad-for-Phone/blob/master/LICENSE)
[MIT](https://github.com/hai2007/Notepad/blob/master/LICENSE)

Copyright (c) 2021 [hai2007](https://hai2007.gitee.io/sweethome/) 走一步,再走一步。
15 changes: 15 additions & 0 deletions hybrid/html/js/open-web-editor.min.js

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions hybrid/html/local.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="zh-cn">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>备忘录</title>
<script src="./js/open-web-editor.min.js"></script>
<style>
#root {
width: 100vw;
height: 100vh;
}

body {
margin: 0;
}
</style>
</head>

<body>
<div id="root"></div>
<script>

// https://www.npmjs.com/package/open-web-editor
new OpenWebEditor({
el: document.getElementById('root'),
color: {
background: "white", /*编辑器背景*/
text: "#000000", /*文本颜色*/
number: "#888484", /*行号颜色*/
edit: "#eaeaf1", /*编辑行背景色*/
cursor: "#ff0000", /*光标颜色*/
select: "#6c6cf1", /*选择背景*/
}
});

</script>
</body>

</html>
31 changes: 25 additions & 6 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
import Vue from 'vue'
import App from './App'
import Vue from 'vue';
import App from './App';

Vue.config.productionTip = false
Vue.config.productionTip = false;

App.mpType = 'app'
App.mpType = 'app';

const app = new Vue({
...App
})
app.$mount()
});
app.$mount();

// #ifdef APP-PLUS
let main = plus.android.runtimeMainActivity();
//为了防止快速点按返回键导致程序退出重写quit方法改为隐藏至后台
plus.runtime.quit = function() {
main.moveTaskToBack(false);
};
//重写toast方法如果内容为 ‘再次返回退出应用’ 就隐藏应用,其他正常toast
plus.nativeUI.toast = (function(str) {
if (str == '再次返回退出应用') {
plus.runtime.quit();
} else {
uni.showToast({
title: '再次返回退出应用', //可以自定义其他弹出显示的内容
icon: 'none'
})
}
});
// #endif
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name" : "备忘录",
"appid" : "__UNI__EB8A165",
"description" : "简单、免费、开源的手机端的记事本,基于uni-app开发。 ",
"versionName" : "0.1.0-alpha.1",
"versionName" : "0.1.0-alpha.2",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
Expand Down
20 changes: 20 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "notepad",
"description": "单、免费、开源的手机端的记事本,基于uni-app开发。",
"repository": {
"type": "git",
"url": "git+https://github.com/hai2007/Notepad.git"
},
"keywords": [
"notepad"
],
"author": "你好2007",
"license": "MIT",
"bugs": {
"url": "https://github.com/hai2007/Notepad/issues"
},
"homepage": "https://github.com/hai2007/Notepad#readme",
"dependencies": {
"open-web-editor": "^0.3.2"
}
}
30 changes: 9 additions & 21 deletions pages.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "uni-app"
}
}
,{
"path" : "pages/notepad/notepad",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}

"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index"
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "备忘录",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
}
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "备忘录",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
}
}
28 changes: 14 additions & 14 deletions pages/index/index.vue
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<template>
<view class="menu-view">
打包测试
</view>
<view class="menu-view">
<web-view src="/hybrid/html/local.html"></web-view>
</view>
</template>

<script>
export default {
data() {
return {
}
},
onLoad() {
export default {
data() {
return {
},
methods: {
}
},
onLoad() {
}
}
},
methods: {
}
}
</script>

<style>
Expand Down
25 changes: 0 additions & 25 deletions pages/notepad/notepad.vue

This file was deleted.

0 comments on commit 8eeca8a

Please sign in to comment.