diff --git a/.gitignore b/.gitignore index 06934e6..2dde5ab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,16 @@ -.vscode +dist +node_modules + +*.sublime-project +*.sublime-workspace package-lock.json ._* -test.js .Spotlight-V100 .Trashes .DS_Store .AppleDouble -.LSOverride \ No newline at end of file +.LSOverride + diff --git a/.prettierrc.yaml b/.prettierrc.yaml index c0e277f..6734234 100644 --- a/.prettierrc.yaml +++ b/.prettierrc.yaml @@ -1,10 +1,11 @@ + jsxBracketSameLine: true jsxSingleQuote: true semi: false singleQuote: true -printWidth: 100 +printWidth: 80 useTabs: false tabWidth: 2 trailingComma: none bracketSpacing: true -arrowParens: avoid \ No newline at end of file +arrowParens: avoid diff --git a/css/index.css b/css/index.css deleted file mode 100644 index 312572e..0000000 --- a/css/index.css +++ /dev/null @@ -1 +0,0 @@ -body{line-height:1.5;font-size:14px;color:var(--color-dark-1)}a{color:inherit;text-decoration:none}wc-switch{cursor:pointer}.app{width:100%;height:100vh}.flex{display:flex}.flex.wrap{flex-wrap:wrap}.flex.column{flex-direction:column}.flex.ac{justify-content:center}.flex.alc{align-items:center}.flex.acc{justify-content:center;align-items:center}.flex.asc{justify-content:space-between;align-items:center}.wrapper{width:1024px}.topbar{width:100%;height:64px;background:#fff;box-shadow:0 6px 12px rgba(0,0,0,.05)}.topbar .logo{font-size:24px;color:var(--color-red-1)}.topbar .logo span{font-size:14px}.topbar .navs{font-size:16px}.topbar .navs .nav{margin-left:32px;cursor:pointer;transition:color .2s linear}.topbar .navs .nav.active,.topbar .navs .nav:hover{text-decoration:underline;color:var(--color-red-1)}.footer{width:100%;height:64px;border-top:1px solid var(--color-plain-2)}.main{overflow:hidden;flex:1}.main .wrapper{height:100%}.main .table-info{width:100%;height:64px}.main .table-info b{color:var(--color-red-1)}.main .table-info .download{margin-left:32px}.main .search{width:100%}.main .search .field{margin-top:16px}.main .search .field.result{line-height:2;font-family:Menlo;word-wrap:break-word;white-space:pre-wrap}.main .search .field.result b{letter-spacing:2px;color:var(--color-blue-1)}.main .search .field wc-input{flex:1}.main .panel{overflow:hidden;flex:1;margin-top:32px}.main .panel .custom-file{position:relative;width:160px}.main .panel .custom-file input{position:absolute;width:100%;height:100%;opacity:0}.main .panel .tips{color:var(--color-orange-3)}.main .panel .scroll-view{overflow:hidden;flex:1}.main .panel .preview{margin-top:16px;font-family:Menlo;word-break:keep-all;white-space:pre-wrap}.main .about{padding:32px 16px}.main .about h2{font-size:24px}.main .about .logs .version{margin-top:32px;line-height:2;font-weight:bold;font-size:18px}.main .about .logs dd{color:var(--color-grey-3)}.main .about .logs ol{padding-left:2em;list-style:decimal}.github{position:fixed;right:-30px;top:20px;z-index:9;width:120px;height:22px;line-height:22px;text-align:center;color:#fff;background:var(--color-dark-1);transform:rotate(45deg)}.download-layer{width:640px;padding-bottom:64px;background:#fff}.download-layer .field{margin-top:16px;padding:0 16px}.download-layer .field .label{min-width:120px;padding-right:16px;line-height:32px;text-align:right;font-weight:bold;color:var(--color-grey-3)}.download-layer .field .label::after{content:" : "}.download-layer .field .value{line-height:32px}.download-layer .field .tips{margin-left:16px;line-height:32px;color:var(--color-orange-3)}.download-layer .field.ctrol{padding:0 128px;margin-top:64px}@media screen and (max-width: 1024px){.topbar,.main{padding:0 16px}.wrapper{width:100%}.footer .wrapper{flex-direction:column;align-items:center;justify-content:center}} \ No newline at end of file diff --git a/index.html b/index.html index 02be73c..94daac9 100644 --- a/index.html +++ b/index.html @@ -1,146 +1,18 @@ - - - -五笔输入法86版 - - - - + + + + {{title}} + + + + + - -
-
- -
- -
- -
-
- 现有单字GB2312({{gb2312}})个 + GBK({{gbk}})个、异形字{{dy}}个、词组{{words}}个、网络热词{{nethot}}个、计算机术语{{code}}个、emoji{{emoji}}个! - 下载词库 -
- - - -
-
- - - 上传个人词库 - - (仅需要中文即可, 程序会自动生成五笔编码, 词组一行一个) -
- - -
-
-
- - -
- -
- - - - GitHub - - - -
- -
- 编码版本 - - 86版 - 86修正版 - -
- -
- 词库选择 - - GB2312 - GBK - 词组库 - 异形字库 - emoji - 网络热词 - 计算机术语 - 个人词库(自主上传的) - -
- -
- 词库编码位置 - - 编码前置 - 编码后置 - - (编码前置时, 自动聚合词组) -
- -
- 生成反查字库 - - (输入法支持拼音反查五笔编码时, 请勾选) -
- -
- 是否生成拼音 - - (输入法支持临时拼音时, 请勾选)(功能暂未支持, 多单字词库生成中...) -
- -
- 总计 - {{total | number(0)}} 个 -
- -
- 取消 - 确认下载 -
-
-
- - -
- - - +
+ - \ No newline at end of file + diff --git a/package.json b/package.json index 3dbc1ca..9c2b39a 100644 --- a/package.json +++ b/package.json @@ -1,3 +1,11 @@ { - "type": "module" -} + "name": "vue-live-app", + "type": "module", + "scripts": { + "start": "vue-live dev", + "build": "vue-live build" + }, + "devDependencies": { + "@bytedo/vue-live": "^0.1.9" + } +} \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..df36fcf Binary files /dev/null and b/public/favicon.ico differ diff --git a/src/app.vue b/src/app.vue new file mode 100644 index 0000000..5902604 --- /dev/null +++ b/src/app.vue @@ -0,0 +1,63 @@ + + + + + + + + diff --git a/css/common.scss b/src/assets/common.scss similarity index 100% rename from css/common.scss rename to src/assets/common.scss diff --git a/css/index.scss b/src/assets/index.scss similarity index 100% rename from css/index.scss rename to src/assets/index.scss diff --git a/src/assets/logo.svg b/src/assets/logo.svg new file mode 100644 index 0000000..e2a9ebf --- /dev/null +++ b/src/assets/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/hello.vue b/src/components/hello.vue new file mode 100644 index 0000000..db00953 --- /dev/null +++ b/src/components/hello.vue @@ -0,0 +1,40 @@ + + + + + + + diff --git a/data/code.txt b/src/data/code.txt similarity index 100% rename from data/code.txt rename to src/data/code.txt diff --git a/data/dy.txt b/src/data/dy.txt similarity index 100% rename from data/dy.txt rename to src/data/dy.txt diff --git a/data/emoji.txt b/src/data/emoji.txt similarity index 100% rename from data/emoji.txt rename to src/data/emoji.txt diff --git a/data/gb2312.txt b/src/data/gb2312.txt similarity index 100% rename from data/gb2312.txt rename to src/data/gb2312.txt diff --git a/data/gbk.txt b/src/data/gbk.txt similarity index 100% rename from data/gbk.txt rename to src/data/gbk.txt diff --git a/data/nethot.txt b/src/data/nethot.txt similarity index 100% rename from data/nethot.txt rename to src/data/nethot.txt diff --git a/data/words.txt b/src/data/words.txt similarity index 100% rename from data/words.txt rename to src/data/words.txt diff --git a/js/lib/86_fixed.js b/src/lib/86_fixed.js similarity index 100% rename from js/lib/86_fixed.js rename to src/lib/86_fixed.js diff --git a/js/lib/core.js b/src/lib/core.js similarity index 100% rename from js/lib/core.js rename to src/lib/core.js diff --git a/js/index.js b/src/lib/index.js similarity index 100% rename from js/index.js rename to src/lib/index.js diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..e926443 --- /dev/null +++ b/src/main.js @@ -0,0 +1,11 @@ + +import { createApp } from 'vue' +import App from './app.vue' + +import router from './router' +import store from './store' + +const app = createApp(App) + +app.use(router).use(store).mount('.app') + diff --git a/src/router.js b/src/router.js new file mode 100644 index 0000000..ea669d0 --- /dev/null +++ b/src/router.js @@ -0,0 +1,23 @@ + +import { createRouter, createWebHistory } from 'vue-router' +import Home from './views/home.vue' + +const router = createRouter({ + history: createWebHistory(), + routes: [ + { + path: '/', + name: 'home', + component: Home + }, + { + path: '/about', + name: 'about', + component: () => import('./views/about.vue') + } + ] +}) + +export default router + + diff --git a/src/store.js b/src/store.js new file mode 100644 index 0000000..1308ff0 --- /dev/null +++ b/src/store.js @@ -0,0 +1,11 @@ + +import { reactive } from 'vue' + +const store = reactive({ + foo: 'bar', + version: '0.1.9' +}) + +export default function (app) { + app.config.globalProperties.$store = store +} diff --git a/js/table/level.1.js b/src/table/level.1.js similarity index 100% rename from js/table/level.1.js rename to src/table/level.1.js diff --git a/src/views/about.vue b/src/views/about.vue new file mode 100644 index 0000000..24aa159 --- /dev/null +++ b/src/views/about.vue @@ -0,0 +1,18 @@ + + + + + diff --git a/src/views/home.vue b/src/views/home.vue new file mode 100644 index 0000000..987c694 --- /dev/null +++ b/src/views/home.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/vue.live.js b/vue.live.js new file mode 100644 index 0000000..e7417e1 --- /dev/null +++ b/vue.live.js @@ -0,0 +1,36 @@ +import { resolve } from 'path' + +export default { + devServer: { + port: 8080, + domain: '', + https: false, + ssl: { + key: '', + cert: '' + // ca: '' + } + }, + pages: { + // 如果多页应用, 则这里写传入多个值即可(注意不是数组格式) + // 这里的key值, 将是最终的页面的名称 + index: { + // 这里的resolve可将相对路径转为绝对路径 + // 如果传入的路径已经是绝对路径的, 可不需要resolve + entry: resolve('./src/main.js'), + title: 'vue-live 应用示例' + } + }, + // 以下cdn地址, 可自行修改为适合的 + // 有用到其他的库, 可以手动添加, + // 也可以在页面中直接引入完整的路径, 而不必须在这里声明 + imports: { + vue: '//jscdn.ink/vue/3.2.47/vue.esm-browser.prod.js', + // 这个vue-router库, 移除了 @vue/devtools-api 相关的代码。 以达到减少不必须的体积的效果 + // 如需要支持devtools的, 请修改为原版vue-router地址即可。 + 'vue-router': '//jscdn.ink/@bytedo/vue-router/4.1.6/vue-router.js', + // 'vue-router': '//jscdn.ink/vue-router/4.1.6/vue-router.esm-browser.js', + // '@vue/devtools-api': '//jscdn.ink/@vue/devtools-api/6.5.0/esm/index.js', + fetch: '//jscdn.ink/@bytedo/fetch/2.1.5/next.js' + } +}