├── public ├── robots.txt ├── favicon.ico ├── img │ └── icons │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── mstile-150x150.png │ │ ├── apple-touch-icon.png │ │ ├── android-chrome-192x192.png │ │ ├── apple-touch-icon-120x120.png │ │ ├── apple-touch-icon-152x152.png │ │ ├── apple-touch-icon-180x180.png │ │ ├── apple-touch-icon-60x60.png │ │ ├── apple-touch-icon-76x76.png │ │ └── msapplication-icon-144x144.png ├── index.html └── manifest.json ├── .browserslistrc ├── .env ├── screenshot.png ├── src ├── favicon.ico ├── assets │ ├── font │ │ ├── Seto.eot │ │ ├── Seto.ttf │ │ ├── Seto.woff │ │ └── Seto.svg │ ├── images │ │ ├── O.png │ │ ├── Ob.png │ │ ├── R.png │ │ ├── oreo.png │ │ ├── tip.svg │ │ └── random.svg │ └── style │ │ └── style.scss ├── main.js ├── locales │ ├── zh_cn.json │ ├── ja_jp.json │ ├── en_us.json │ └── de_de.json ├── App.vue ├── i18n.js ├── registerServiceWorker.js ├── store.js └── components │ ├── Footer.vue │ ├── Loading.vue │ └── Container.vue ├── babel.config.js ├── postcss.config.js ├── .editorconfig ├── vue.config.js ├── .gitignore ├── package.json ├── LICENSE ├── README.md └── .eslintrc.js /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not ie <= 8 4 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | VUE_APP_I18N_LOCALE=zh_cn 2 | VUE_APP_I18N_FALLBACK_LOCALE=zh_cn 3 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/screenshot.png -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/src/favicon.ico -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/app' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | autoprefixer: {} 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/assets/font/Seto.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/src/assets/font/Seto.eot -------------------------------------------------------------------------------- /src/assets/font/Seto.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/src/assets/font/Seto.ttf -------------------------------------------------------------------------------- /src/assets/font/Seto.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/src/assets/font/Seto.woff -------------------------------------------------------------------------------- /src/assets/images/O.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/src/assets/images/O.png -------------------------------------------------------------------------------- /src/assets/images/Ob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/src/assets/images/Ob.png -------------------------------------------------------------------------------- /src/assets/images/R.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/src/assets/images/R.png -------------------------------------------------------------------------------- /src/assets/images/oreo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/src/assets/images/oreo.png -------------------------------------------------------------------------------- /public/img/icons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/public/img/icons/favicon-16x16.png -------------------------------------------------------------------------------- /public/img/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/public/img/icons/favicon-32x32.png -------------------------------------------------------------------------------- /public/img/icons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/public/img/icons/mstile-150x150.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/public/img/icons/apple-touch-icon.png -------------------------------------------------------------------------------- /public/img/icons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/public/img/icons/android-chrome-192x192.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/public/img/icons/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/public/img/icons/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/public/img/icons/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/public/img/icons/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/public/img/icons/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /public/img/icons/msapplication-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/journey-ad/oreooo/HEAD/public/img/icons/msapplication-icon-144x144.png -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{js,jsx,ts,tsx,vue}] 2 | indent_style = space 3 | indent_size = 2 4 | trim_trailing_whitespace = true 5 | insert_final_newline = true 6 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | publicPath: process.env.NODE_ENV === 'production' 3 | ? './.' 4 | : '/', 5 | pluginOptions: { 6 | i18n: { 7 | locale: 'zh_cn', 8 | fallbackLocale: 'zh_cn', 9 | localeDir: 'locales', 10 | enableInSFC: false 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import store from './store' 4 | import i18n from './i18n' 5 | import './registerServiceWorker' 6 | 7 | Vue.config.productionTip = false 8 | 9 | i18n.locale = store.state.lang 10 | i18n.fallbackLocale = 'zh_cn' 11 | 12 | new Vue({ 13 | store, 14 | i18n, 15 | render: h => h(App) 16 | }).$mount('#app') 17 | -------------------------------------------------------------------------------- /src/locales/zh_cn.json: -------------------------------------------------------------------------------- 1 | { 2 | "basic": { 3 | "o": "奥", 4 | "r": "利", 5 | "and": "与" 6 | }, 7 | "tooltip": "键盘快捷键:
o/r : 输入奥/利
-/空格 : 输入与
回车 : 生成
退格 : 返回", 8 | "input": { 9 | "meta": "我想要:", 10 | "placeholder": "奥利奥...", 11 | "generate": "生成", 12 | "btn": { 13 | "o": "+奥", 14 | "r": "+利", 15 | "and": "+与" 16 | } 17 | }, 18 | "output": { 19 | "meta": "這是你的", 20 | "save": "保存图片", 21 | "show": "查看图片", 22 | "back": "返回" 23 | } 24 | } -------------------------------------------------------------------------------- /src/locales/ja_jp.json: -------------------------------------------------------------------------------- 1 | { 2 | "basic": { 3 | "o": "オ", 4 | "r": "レ", 5 | "and": "と" 6 | }, 7 | "tooltip": "キーボード・ショートカット:
o/r/-/Space : 編集する
Enter : 実行
Backspace : 元に戻す", 8 | "input": { 9 | "meta": "私は...したい", 10 | "placeholder": "オレオ...", 11 | "generate": "実行", 12 | "btn": { 13 | "o": "+オ", 14 | "r": "+レ", 15 | "and": "+と" 16 | } 17 | }, 18 | "output": { 19 | "meta": "結果", 20 | "save": "画像を保存する", 21 | "show": "写真を表示", 22 | "back": "元に戻す" 23 | } 24 | } -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 23 | 24 | 27 | -------------------------------------------------------------------------------- /src/locales/en_us.json: -------------------------------------------------------------------------------- 1 | { 2 | "basic": { 3 | "o": "O | o", 4 | "r": "Re | re", 5 | "and": "-" 6 | }, 7 | "tooltip": "Keyboard shortcuts:
o/r : Input 'O' or 'RE'
-/Space : Input Space
Enter : Generate
Backspace : Back", 8 | "input": { 9 | "meta": "I'd like:", 10 | "placeholder": "Oreo...", 11 | "generate": "Generate", 12 | "btn": { 13 | "o": "O", 14 | "r": "R", 15 | "and": "and" 16 | } 17 | }, 18 | "output": { 19 | "meta": "Here's your", 20 | "save": "Save Image", 21 | "show": "Show Image", 22 | "back": "Back" 23 | } 24 | } -------------------------------------------------------------------------------- /src/locales/de_de.json: -------------------------------------------------------------------------------- 1 | { 2 | "basic": { 3 | "o": "O | o", 4 | "r": "Re | re", 5 | "and": "-" 6 | }, 7 | "tooltip": "Tastaturkürzel:
o/r : 'O' oder 'RE'
-/Leerzeichen : Leerzeichen
Enter : Generieren
Rücktaste : Zurück", 8 | "input": { 9 | "meta": "Ich möchte ein:", 10 | "placeholder": "Oreo...", 11 | "generate": "Generieren", 12 | "btn": { 13 | "o": "O", 14 | "r": "R", 15 | "and": "und" 16 | } 17 | }, 18 | "output": { 19 | "meta": "Hier ist dein", 20 | "save": "Bild sichern", 21 | "show": "Bild anzeigen", 22 | "back": "Zurück" 23 | } 24 | } -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | OREOOO 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/i18n.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueI18n from 'vue-i18n' 3 | 4 | Vue.use(VueI18n) 5 | 6 | function loadLocaleMessages () { 7 | const locales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.json$/i) 8 | const messages = {} 9 | locales.keys().forEach(key => { 10 | const matched = key.match(/([A-Za-z0-9-_]+)\./i) 11 | if (matched && matched.length > 1) { 12 | const locale = matched[1] 13 | messages[locale] = locales(key) 14 | } 15 | }) 16 | return messages 17 | } 18 | 19 | export default new VueI18n({ 20 | locale: process.env.VUE_APP_I18N_LOCALE || 'en', 21 | fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en', 22 | messages: loadLocaleMessages() 23 | }) 24 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "oreooo", 3 | "short_name": "oreooo", 4 | "icons": [ 5 | { 6 | "src": "./img/icons/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "./img/icons/apple-touch-icon.png", 12 | "sizes": "180x180", 13 | "type": "image/png" 14 | }, 15 | { 16 | "src": "./img/icons/msapplication-icon-144x144.png", 17 | "sizes": "144x144", 18 | "type": "image/png" 19 | }, 20 | { 21 | "src": "./img/icons/apple-touch-icon-120x120.png", 22 | "sizes": "120x120", 23 | "type": "image/png" 24 | } 25 | ], 26 | "start_url": "./index.html", 27 | "display": "standalone", 28 | "background_color": "#000000", 29 | "theme_color": "#4DBA87" 30 | } 31 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "oreooo", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint", 9 | "i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/locales/**/*.json'" 10 | }, 11 | "dependencies": { 12 | "core-js": "^2.6.5", 13 | "register-service-worker": "^1.6.2", 14 | "vue": "^2.6.10", 15 | "vue-i18n": "^8.0.0", 16 | "vuex": "^3.1.0" 17 | }, 18 | "devDependencies": { 19 | "@vue/cli-plugin-babel": "^3.6.0", 20 | "@vue/cli-plugin-eslint": "^3.6.0", 21 | "@vue/cli-plugin-pwa": "^3.6.0", 22 | "@vue/cli-service": "^3.6.0", 23 | "@vue/eslint-config-standard": "^4.0.0", 24 | "babel-eslint": "^10.0.1", 25 | "eslint": "^5.16.0", 26 | "eslint-plugin-vue": "^5.0.0", 27 | "sass": "^1.18.0", 28 | "sass-loader": "^7.1.0", 29 | "vue-cli-plugin-i18n": "^0.6.0", 30 | "vue-template-compiler": "^2.5.21" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/registerServiceWorker.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | 3 | import { register } from 'register-service-worker' 4 | 5 | if (process.env.NODE_ENV === 'production') { 6 | register(`${process.env.BASE_URL}service-worker.js`, { 7 | ready () { 8 | console.log( 9 | 'App is being served from cache by a service worker.\n' + 10 | 'For more details, visit https://goo.gl/AFskqB' 11 | ) 12 | }, 13 | registered () { 14 | console.log('Service worker has been registered.') 15 | }, 16 | cached () { 17 | console.log('Content has been cached for offline use.') 18 | }, 19 | updatefound () { 20 | console.log('New content is downloading.') 21 | }, 22 | updated () { 23 | console.log('New content is available; please refresh.') 24 | }, 25 | offline () { 26 | console.log('No internet connection found. App is running in offline mode.') 27 | }, 28 | error (error) { 29 | console.error('Error during service worker registration:', error) 30 | } 31 | }) 32 | } 33 | -------------------------------------------------------------------------------- /src/assets/images/tip.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/store.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | 4 | Vue.use(Vuex) 5 | 6 | const store = new Vuex.Store({ 7 | strict: process.env.NODE_ENV !== 'production', 8 | state: { 9 | lang: localStorage['lang'] ? localStorage['lang'] : 'zh_cn', 10 | show: { loading: true, output: false }, 11 | images: {}, 12 | languages: { 13 | 中: 'zh_cn', 14 | En: 'en_us', 15 | 日: 'ja_jp', 16 | De: 'de_de' 17 | }, 18 | bgColorArr: [ 19 | '#caad9f', 20 | '#f0c869', 21 | '#6abce0', 22 | '#9ac4bd', 23 | '#fad0c4', 24 | '#9ec6cd' 25 | ], 26 | sources: { 27 | O: require('@/assets/images/O.png'), 28 | R: require('@/assets/images/R.png'), 29 | Ob: require('@/assets/images/Ob.png') 30 | } 31 | }, 32 | mutations: { 33 | setImageCache (state, images) { 34 | state.images = images 35 | }, 36 | setShow (state, obj) { 37 | state.show = obj 38 | }, 39 | changeLang (state, lang) { 40 | state.lang = lang 41 | localStorage.lang = state.lang; 42 | } 43 | } 44 | }) 45 | 46 | export default store 47 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Diu 4 | Copyright (c) 2019 journey-ad 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OREOOO! 2 | 3 | Hey! it's your Oreooo. 4 | 5 | 嘿!你的奥利奥利奥 6 | 7 | ![ScreenShot](screenshot.png) 8 | 9 | 10 | 11 | [Demo](https://journey-ad.github.io/oreooo/) 12 | 13 | [Blog](https://imjad.cn/archives/code/oreooo) 14 | 15 | 16 | 17 | ## Keyboard shortcuts 18 | 19 | | Key | Description | 20 | | --------- | ---------------------------------- | 21 | | o / r | Input 'O' or 'RE' | 22 | | - / Space | Input space | 23 | | Enter | Generate 24 | | Backspace | Back | 25 | 26 | ## Usage 27 | 28 | ### Install 29 | 30 | ```shell 31 | $ git clone https://github.com/journey-ad/oreooo.git 32 | $ cd oreooo 33 | $ yarn install 34 | ``` 35 | 36 | ### Run with dev 37 | 38 | ```shell 39 | $ yarn serve 40 | ``` 41 | 42 | ### Build 43 | 44 | ```shell 45 | $ yarn build 46 | ``` 47 | 48 | ## Contributing a translation 49 | 50 | The text in Oreooo is in Chinese by default. And you can translate it in your language. 51 | 52 | Just edit your language json file in `src/locales` and **pull requests** to me. 53 | 54 | ## License 55 | 56 | MIT 57 | 58 | ## Other Site 59 | 60 | [ddiu8081/oreooo](https://github.com/ddiu8081/oreooo) 61 | 62 | [firedom/oreo-lang](https://github.com/firedom/oreo-lang) 63 | 64 | [syt123450/oreo-3d](https://github.com/syt123450/oreo-3d) 65 | 66 | -------------------------------------------------------------------------------- /src/assets/style/style.scss: -------------------------------------------------------------------------------- 1 | :root { 2 | font-size: 10px; 3 | --bg-color: #ccc; 4 | --white: #ffffff; 5 | --black: #515151; 6 | --black-hover: #303030; 7 | --black-opacity: rgba(81, 81, 81, 0.4); 8 | --border: #eee; 9 | --gray: #ccc; 10 | --gray-f6: #f6f6f6; 11 | --shadow-opacity: rgba(0, 0, 0, 0.125); 12 | } 13 | 14 | * { 15 | -webkit-touch-callout: none; 16 | -webkit-user-select: none; 17 | -khtml-user-select: none; 18 | -moz-user-select: none; 19 | -ms-user-select: none; 20 | user-select: none; 21 | } 22 | 23 | @font-face { 24 | font-family: "Seto"; 25 | src: url("../font/Seto.eot"); 26 | /* IE9 */ 27 | src: url("../font/Seto.eot?#iefix") format("embedded-opentype"), 28 | /* IE6-IE8 */ 29 | 30 | url("../font/Seto.woff") format("woff"), 31 | /* chrome、firefox */ 32 | url("../font/Seto.ttf") format("truetype"), 33 | /* chrome、firefox、opera、Safari, Android, iOS 4.2+ */ 34 | 35 | url("../font/Seto.svg#Seto") format("svg"); 36 | /* iOS 4.1- */ 37 | font-style: normal; 38 | font-weight: normal; 39 | } 40 | 41 | body { 42 | font-family: "Seto"; 43 | padding: 0; 44 | margin: 0; 45 | color: var(--black); 46 | background-color: var(--bg-color); 47 | transition: background-color 2s; 48 | } 49 | 50 | a { 51 | text-decoration: none; 52 | color: var(--black); 53 | margin: 0 .4rem; 54 | } 55 | 56 | a:hover { 57 | color: var(--black-hover); 58 | } 59 | 60 | #app { 61 | outline: none; 62 | overflow: hidden; 63 | } -------------------------------------------------------------------------------- /src/components/Footer.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 38 | 39 | 65 | -------------------------------------------------------------------------------- /src/assets/images/random.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | es6: true, 5 | browser: true, 6 | node: true 7 | }, 8 | 'extends': [ 9 | 'plugin:vue/essential', 10 | '@vue/standard' 11 | ], 12 | rules: { 13 | // 代码中console/debugger处理 14 | 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', 15 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', 16 | // 句尾分号可以省略 17 | 'semi': 'off', 18 | // 代码使用2个空格的缩进风格 19 | 'indent': ['error', 2], 20 | // 关闭命名function表达式规则 21 | 'func-names': 'off', 22 | // 可以行尾空白 23 | 'no-trailing-spaces': 'off', 24 | // 关闭拖尾逗号 25 | 'comma-dangle': 'off', 26 | // 关闭换行符转换 27 | 'linebreak-style': 'off', 28 | // 禁止使用指定语法 29 | 'no-restricted-syntax': ['error', 'WithStatement'], 30 | // 关闭语句块之前的空格保持一致 31 | 'space-before-blocks': 'off', 32 | // 可以使用++/-- 33 | 'no-plusplus': 'off', 34 | // 禁止未使用过的变量包括全局变量和函数中的最后一个参数必须使用 35 | 'no-unused-vars': [ 36 | 'error', { 37 | 'vars': 'all', 38 | 'args': 'after-used' 39 | } 40 | ], 41 | // 使用单引号 42 | 'quotes': [ 43 | 'error', 'single' 44 | ], 45 | // 强制最大可嵌深度 46 | 'max-depth': 1, 47 | // 强制函数块中的语句最大50行 48 | 'max-statements': [ 49 | 'error', 50 50 | ], 51 | // 强制行的最大长度150,注释200 52 | 'max-len': [ 53 | 'error', { 54 | 'code': 150, 55 | 'comments': 200 56 | } 57 | ], 58 | 59 | // NodeJs rules, 9.0之后全部使用import 60 | // 关闭require()强制在模块顶部调用 61 | 'global-require': 'off', 62 | 63 | // ES6 rules 64 | // 箭头函数的箭头前后都要有空格 65 | 'arrow-spacing': 'error', 66 | // 接收const被修改的通知 67 | 'no-const-assign': 'error', 68 | // 要求使用let或const而不是var 69 | 'no-var': 'error', 70 | // 如果一个变量不会被重新赋值,则使用const声明 71 | 'prefer-const': 'error', 72 | // 关闭强制在花括号内使用一致的换行符 73 | 'object-curly-newline': 'off', 74 | 75 | // 链接地址中可以使用 javascript: 76 | 'no-script-url': 'off', 77 | // 关闭点击元素上强制增加onKey**事件 78 | 'click-events-have-key-events': 'off', 79 | // 关闭引用依赖检查 80 | 'import/no-extraneous-dependencies': 'off', 81 | // 关闭路径处理依赖 82 | 'import/no-cycle': 'off', 83 | 'no-param-reassign': 0, // 禁止给参数重新赋值 84 | 'no-use-before-define': 0, 85 | 'no-underscore-dangle': 0, 86 | 'brace-style': 0, 87 | // 扩展名处理 88 | 'import/extensions': ['error', { 89 | 'js': 'never', 90 | 'jsx': 'never' 91 | }] 92 | }, 93 | parserOptions: { 94 | ecmaVersion: 2018, 95 | parser: 'babel-eslint' 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /src/components/Loading.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 52 | 53 | 106 | -------------------------------------------------------------------------------- /src/components/Container.vue: -------------------------------------------------------------------------------- 1 | 43 | 44 | 238 | 239 | 404 | -------------------------------------------------------------------------------- /src/assets/font/Seto.svg: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------------------