diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..3454886 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# https://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +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 b/.env new file mode 100644 index 0000000..0c24103 --- /dev/null +++ b/.env @@ -0,0 +1,6 @@ +# EleAdminPlus授权码, 自带的只能用于演示, 正式项目请更换为自己的授权码 +VITE_LICENSE=dk9mcwJyetRWQlxWRiojIiwiIzVHbQ5Wa6ICdjVmaiV3culWYt9GZiwSMl5yc1xGciojIj5ibp1GZhVGb6ICZpJCLi02brJUbhVlY58kIvl2cyVmdiwiIgISMuEjI6IibQf0NW== +# 项目名 +VITE_APP_NAME=Ele Admin Plus +# 接口地址 +VITE_API_URL=https://v2.eleadmin.com/api diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..eabc1a3 --- /dev/null +++ b/.env.development @@ -0,0 +1,3 @@ +# 开发环境接口地址 +VITE_API_URL=https://v2.eleadmin.com/api +#VITE_API_URL=http://localhost:8081/api diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..e25fb9d --- /dev/null +++ b/.env.production @@ -0,0 +1,2 @@ +# 生产环境接口地址 +VITE_API_URL=https://v2.eleadmin.com/api diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..46b1426 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,4 @@ +public +src/assets +dist +node_modules diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..f14748d --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,76 @@ +{ + "root": true, + "env": { + "browser": true, + "node": true, + "es6": true + }, + "parser": "vue-eslint-parser", + "extends": [ + "plugin:@typescript-eslint/recommended", + "plugin:vue/vue3-recommended", + "plugin:prettier/recommended" + ], + "parserOptions": { + "parser": "@typescript-eslint/parser", + "ecmaVersion": "latest", + "sourceType": "module", + "jsxPragma": "React", + "ecmaFeatures": { + "jsx": true + } + }, + "rules": { + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/ban-ts-ignore": "off", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_" + } + ], + "vue/attributes-order": "off", + "vue/attribute-hyphenation": "off", + "vue/v-on-event-hyphenation": "off", + "vue/custom-event-name-casing": "off", + "vue/multi-word-component-names": "off", + "vue/no-setup-props-destructure": "off", + "vue/script-setup-uses-vars": "error", + "vue/one-component-per-file": "off", + "vue/max-attributes-per-line": "off", + "vue/html-closing-bracket-newline": "off", + "vue/multiline-html-element-content-newline": "off", + "vue/singleline-html-element-content-newline": "off", + "vue/require-default-prop": "off", + "vue/html-self-closing": [ + "error", + { + "html": { + "void": "always", + "normal": "never", + "component": "always" + }, + "svg": "always", + "math": "always" + } + ], + "no-use-before-define": "off", + "space-before-function-paren": "off", + "no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_" + } + ] + } +} diff --git a/.gitignore b/.gitignore index a0dddc6..acea6cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .DS_Store node_modules /dist +/dist-ssr # local env files .env.local @@ -10,6 +11,9 @@ node_modules npm-debug.log* yarn-debug.log* yarn-error.log* +pnpm-debug.log* +.pnpm-debug.log +.eslintcache # Editor directories and files .idea diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..f7e39e6 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,9 @@ +/dist/* +.local +.output.js +/node_modules/** + +**/*.svg +**/*.sh + +/public/* diff --git a/README.md b/README.md new file mode 100644 index 0000000..a797a27 --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# Vue 3 + Typescript + Vite + +This template should help get you started developing with Vue 3 and Typescript in Vite. + +## Recommended IDE Setup + +[VSCode](https://code.visualstudio.com/) + [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur). Make sure to enable `vetur.experimental.templateInterpolationService` in settings! + +### If Using ` +