commit 4d84d3107dd456f8c887680d404471e11136c1c7 Author: weixl Date: Thu Sep 3 11:06:07 2026 +0800 111 diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f669cf1 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +insert_final_newline = false +trim_trailing_whitespace = false diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..2491283 --- /dev/null +++ b/.env.development @@ -0,0 +1,14 @@ +# 页面标题 +VITE_APP_TITLE = 宁媒集团 + +# 开发环境配置 +VITE_APP_ENV = 'development' + +# just a flag +VITE_APP_BASE_API='/dev-api' +VITE_APP_BASE_REPORT_API='/dev-rp-api' +VITE_APP_BASE_FILE='/public' +VITE_APP_BASE_HOST='http://192.168.1.104:3000/' +VITE_APP_BASE_FILEHOST='http://127.0.0.1:3000/public/' +VITE_APP_BASE_SHARE='http://127.0.0.1:3000/docshare' + diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..9f5a314 --- /dev/null +++ b/.env.production @@ -0,0 +1,14 @@ +# 页面标题 +VITE_APP_TITLE = 宁媒集团 + +# 生产环境配置 +VITE_APP_ENV = 'production' + +VITE_APP_BASE_API='/api' +VITE_APP_BASE_REPORT_API='/rp-api' +VITE_APP_BASE_FILEAPI='/public' +VITE_APP_BASE_HOST='http://192.168.124.14:8088/' +VITE_APP_BASE_SHARE='https://doc.weixl.xyz/docshare' + +# 是否在打包时开启压缩,支持 gzip 和 brotli +VITE_BUILD_COMPRESS = gzip \ No newline at end of file diff --git a/.env.staging b/.env.staging new file mode 100644 index 0000000..b11336d --- /dev/null +++ b/.env.staging @@ -0,0 +1,11 @@ +# 页面标题 +VITE_APP_TITLE = 若依管理系统 + +# 生产环境配置 +VITE_APP_ENV = 'staging' + +# 若依管理系统/生产环境 +VITE_APP_BASE_API = '/stage-api' + +# 是否在打包时开启压缩,支持 gzip 和 brotli +VITE_BUILD_COMPRESS = gzip \ No newline at end of file diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..e6529fc --- /dev/null +++ b/.eslintignore @@ -0,0 +1,4 @@ +build/*.js +src/assets +public +dist diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..8cd2525 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,66 @@ +module.exports = { + root: true, + globals: { + defineProps: 'readonly', + defineEmits: 'readonly', + }, + parserOptions: { + parser: '@typescript-eslint/parser', + ecmaVersion: 'latest', + sourceType: 'module', + ecmaFeatures: { + jsx: true, + }, + }, + env: { + browser: true, + node: true, + es6: true, + }, + // https://eslint.vuejs.org/ + extends: [ + 'plugin:@typescript-eslint/recommended', + 'plugin:vue/base', + 'plugin:vue/vue3-essential', + 'plugin:vue/vue3-strongly-recommended', + 'plugin:vue/vue3-recommended', + 'prettier', + ], + + // add your custom rules here + rules: { + // override/add rules settings here, such as: + // 'vue/no-unused-vars': 'error' + eqeqeq: ['error', 'always', { null: 'ignore' }], + 'no-var': 2, + 'no-console': 0, + 'no-debugger': 0, + 'no-new-wrappers': 2, // 禁止new String() 等等 + 'no-duplicate-imports': 1, // 禁止重复imports + 'no-multiple-empty-lines': [ + 1, + { + max: 2, + }, + ], + 'no-eval': 2, + semi: 1, + indent: [ + 2, + 4, + { + SwitchCase: 1, + }, + ], + camelcase: 2, + 'vue/no-empty-component-block': 2, // 禁止