diff --git a/web/.prettierrc b/web/.prettierrc new file mode 100644 index 0000000000..bc61a53e1b --- /dev/null +++ b/web/.prettierrc @@ -0,0 +1,12 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "semi": false, + "singleQuote": true, + "trailingComma": "none", + "bracketSpacing": true, + "arrowParens": "always", + "vueIndentScriptAndStyle": true, + "endOfLine": "lf" +} diff --git a/web/README.md b/web/README.md index 2e882ae9b1..06f1a8cce0 100644 --- a/web/README.md +++ b/web/README.md @@ -1,33 +1,38 @@ -# gin-vue-admin web +# gin-vue-admin web ## Project setup + ``` npm install ``` ### Compiles and hot-reloads for development + ``` npm run serve ``` ### Compiles and minifies for production + ``` npm run build ``` ### Run your tests + ``` npm run test ``` ### Lints and fixes files + ``` npm run lint ``` - 整理代码结构 -``` lua + +```lua web ├── babel.config.js ├── Dockerfile @@ -67,7 +72,7 @@ web │ │ ├── asyncRouter.js -- 动态路由相关 │ │ ├── bus.js -- 全局mitt声明文件 │ │ ├── date.js -- 日期相关 - │ │ ├── dictionary.js -- 获取字典方法 + │ │ ├── dictionary.js -- 获取字典方法 │ │ ├── downloadImg.js -- 下载图片方法 │ │ ├── format.js -- 格式整理相关 │ │ ├── image.js -- 图片相关方法 @@ -80,21 +85,21 @@ web | | ├── error -- 错误 | | ├── example --上传案例 | | ├── iconList -- icon列表 - | | ├── init -- 初始化数据 + | | ├── init -- 初始化数据 | | | ├── index -- 新版本 | | | ├── init -- 旧版本 - | | ├── layout -- layout约束页面 - | | | ├── aside + | | ├── layout -- layout约束页面 + | | | ├── aside | | | ├── bottomInfo -- bottomInfo | | | ├── screenfull -- 全屏设置 | | | ├── setting -- 系统设置 | | | └── index.vue -- base 约束 - | | ├── login --登录 - | | ├── person --个人中心 + | | ├── login --登录 + | | ├── person --个人中心 | | ├── superAdmin -- 超级管理员操作 | | ├── system -- 系统检测页面 | | ├── systemTools -- 系统配置相关页面 - | | └── routerHolder.vue -- page 入口页面 + | | └── routerHolder.vue -- page 入口页面 ├── vite.config.js -- vite 配置文件 └── yarn.lock diff --git a/web/babel.config.js b/web/babel.config.js index 88029f0872..b1becff1a0 100644 --- a/web/babel.config.js +++ b/web/babel.config.js @@ -1,8 +1,4 @@ module.exports = { - presets: [ - - ], - 'plugins': [ - - ] + presets: [], + plugins: [] } diff --git a/web/eslint.config.mjs b/web/eslint.config.mjs index eb1fb72981..3b443c5916 100644 --- a/web/eslint.config.mjs +++ b/web/eslint.config.mjs @@ -1,6 +1,6 @@ import js from '@eslint/js' import pluginVue from 'eslint-plugin-vue' -import globals from "globals" +import globals from 'globals' export default [ js.configs.recommended, @@ -10,20 +10,20 @@ export default [ files: ['**/*.{js,mjs,jsx,vue}'], languageOptions: { ecmaVersion: 'latest', - sourceType: "module", + sourceType: 'module', globals: globals.node }, rules: { - "vue/max-attributes-per-line" : 0, - "vue/no-v-model-argument" : 0, - "vue/multi-word-component-names": "off", + 'vue/max-attributes-per-line': 0, + 'vue/no-v-model-argument': 0, + 'vue/multi-word-component-names': 'off', 'no-lone-blocks': 'off', 'no-extend-native': 'off', - 'no-unused-vars': ['error', { "argsIgnorePattern": '^_' }], - }, + 'no-unused-vars': ['error', { argsIgnorePattern: '^_' }] + } }, { name: 'app/files-to-ignore', - ignores: ['**/dist/**', '**/build/*.js', '**/src/assets/**', '**/public/**'], - }, + ignores: ['**/dist/**', '**/build/*.js', '**/src/assets/**', '**/public/**'] + } ] diff --git a/web/index.html b/web/index.html index 4dd71e5a31..1d8d87a24a 100644 --- a/web/index.html +++ b/web/index.html @@ -1,102 +1,115 @@ - + - -
- - - - - + + + + + +