Skip to content

Commit 92be663

Browse files
committed
✨ feat(frontend): 初始化 TDesign Vue Next 前端项目
- 添加项目基础配置文件,包括 .editorconfig, .env, .eslintrc 等 - 集成 TDesign Vue Next 组件库和相关依赖 - 配置路由、状态管理、国际化等基础功能 - 添加常用页面模板,如登录、仪表盘、列表、详情等 - 引入通用组件和工具函数 - 配置开发环境和生产构建脚本
1 parent 04e71a8 commit 92be663

File tree

207 files changed

+25588
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

207 files changed

+25588
-0
lines changed

td_fronted/.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
end_of_line = lf
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[*.md]
11+
trim_trailing_whitespace = false
12+
13+
[*.{ts,js,vue,css}]
14+
indent_size = 2

td_fronted/.env

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# 打包路径 根据项目不同按需配置
2+
VITE_BASE_URL = /
3+
VITE_IS_REQUEST_PROXY = true
4+
VITE_API_URL = https://service-bv448zsw-1257786608.gz.apigw.tencentcs.com
5+
VITE_API_URL_PREFIX = /api

td_fronted/.env.development

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# 打包路径
2+
VITE_BASE_URL = /
3+
VITE_IS_REQUEST_PROXY = true
4+
VITE_API_URL = https://service-exndqyuk-1257786608.gz.apigw.tencentcs.com
5+
VITE_API_URL_PREFIX = /api

td_fronted/.env.site

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# 打包路径 根据项目不同按需配置
2+
VITE_BASE_URL = https://static.tdesign.tencent.com/starter/vue-next/
3+
VITE_IS_REQUEST_PROXY = true
4+
VITE_API_URL = https://service-bv448zsw-1257786608.gz.apigw.tencentcs.com
5+
VITE_API_URL_PREFIX = /api

td_fronted/.env.test

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# 打包路径 根据项目不同按需配置
2+
VITE_BASE_URL = /
3+
VITE_IS_REQUEST_PROXY = true
4+
VITE_API_URL = https://service-exndqyuk-1257786608.gz.apigw.tencentcs.com
5+
VITE_API_URL_PREFIX = /api

td_fronted/.eslintignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
snapshot*
2+
dist
3+
lib
4+
es
5+
esm
6+
node_modules
7+
src/_common
8+
static
9+
cypress
10+
script/test/cypress
11+
_site
12+
temp*
13+
static/
14+
!.prettierrc.js

td_fronted/.eslintrc

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
{
2+
"extends": [
3+
"plugin:@typescript-eslint/recommended",
4+
"eslint-config-airbnb-base",
5+
"@vue/typescript/recommended",
6+
"plugin:vue/vue3-recommended",
7+
"plugin:vue-scoped-css/base",
8+
"plugin:prettier/recommended"
9+
],
10+
"env": {
11+
"browser": true,
12+
"node": true,
13+
"jest": true,
14+
"es6": true
15+
},
16+
"globals": {
17+
"defineProps": "readonly",
18+
"defineEmits": "readonly"
19+
},
20+
"plugins": ["vue", "@typescript-eslint", "simple-import-sort"],
21+
"parserOptions": {
22+
"parser": "@typescript-eslint/parser",
23+
"sourceType": "module",
24+
"allowImportExportEverywhere": true,
25+
"ecmaFeatures": {
26+
"jsx": true
27+
}
28+
},
29+
"settings": {
30+
"import/extensions": [".js", ".jsx", ".ts", ".tsx"]
31+
},
32+
"rules": {
33+
"no-console": "off",
34+
"no-continue": "off",
35+
"no-restricted-syntax": "off",
36+
"no-plusplus": "off",
37+
"no-param-reassign": "off",
38+
"no-shadow": "off",
39+
"guard-for-in": "off",
40+
41+
"import/extensions": "off",
42+
"import/no-unresolved": "off",
43+
"import/no-extraneous-dependencies": "off",
44+
"import/prefer-default-export": "off",
45+
"import/first": "off", // https://github.com/vuejs/vue-eslint-parser/issues/58
46+
"@typescript-eslint/no-explicit-any": "off",
47+
"@typescript-eslint/explicit-module-boundary-types": "off",
48+
"vue/first-attribute-linebreak": 0,
49+
50+
51+
"@typescript-eslint/no-unused-vars": [
52+
"error",
53+
{
54+
"argsIgnorePattern": "^_",
55+
"varsIgnorePattern": "^_"
56+
}
57+
],
58+
"no-unused-vars": [
59+
"error",
60+
{
61+
"argsIgnorePattern": "^_",
62+
"varsIgnorePattern": "^_"
63+
}
64+
],
65+
"no-use-before-define": "off",
66+
"@typescript-eslint/no-use-before-define": "off",
67+
"@typescript-eslint/ban-ts-comment": "off",
68+
"@typescript-eslint/ban-types": "off",
69+
"class-methods-use-this": "off", // 因为AxiosCancel必须实例化而能静态化所以加的规则,如果有办法解决可以取消
70+
"simple-import-sort/imports": "error",
71+
"simple-import-sort/exports": "error"
72+
},
73+
"overrides": [
74+
{
75+
"files": ["*.vue"],
76+
"rules": {
77+
"vue/component-name-in-template-casing": [2, "kebab-case"],
78+
"vue/require-default-prop": 0,
79+
"vue/multi-word-component-names": 0,
80+
"vue/no-reserved-props": 0,
81+
"vue/no-v-html": 0,
82+
"vue-scoped-css/enforce-style-type": ["error", { "allows": ["scoped"] }]
83+
}
84+
},
85+
{
86+
"files": ["*.ts", "*.tsx"], // https://github.com/typescript-eslint eslint-recommended
87+
"rules": {
88+
"constructor-super": "off", // ts(2335) & ts(2377)
89+
"getter-return": "off", // ts(2378)
90+
"no-const-assign": "off", // ts(2588)
91+
"no-dupe-args": "off", // ts(2300)
92+
"no-dupe-class-members": "off", // ts(2393) & ts(2300)
93+
"no-dupe-keys": "off", // ts(1117)
94+
"no-func-assign": "off", // ts(2539)
95+
"no-import-assign": "off", // ts(2539) & ts(2540)
96+
"no-new-symbol": "off", // ts(2588)
97+
"no-obj-calls": "off", // ts(2349)
98+
"no-redeclare": "off", // ts(2451)
99+
"no-setter-return": "off", // ts(2408)
100+
"no-this-before-super": "off", // ts(2376)
101+
"no-undef": "off", // ts(2304)
102+
"no-unreachable": "off", // ts(7027)
103+
"no-unsafe-negation": "off", // ts(2365) & ts(2360) & ts(2358)
104+
"no-var": "error", // ts transpiles let/const to var, so no need for vars any more
105+
"prefer-const": "error", // ts provides better types with const
106+
"prefer-rest-params": "error", // ts provides better types with rest args over arguments
107+
"prefer-spread": "error", // ts transpiles spread to apply, so no need for manual apply
108+
"valid-typeof": "off" // ts(2367)
109+
}
110+
}
111+
]
112+
}

td_fronted/.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*.ts text eol=lf
2+
*.vue text eol=lf
3+
*.tsx text eol=lf
4+
*.jsx text eol=lf
5+
*.html text eol=lf
6+
*.json text eol=lf

td_fronted/.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# OS specific files
2+
.DS_Store
3+
4+
# dependencies manager
5+
node_modules/
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/sdks
12+
!.yarn/versions
13+
14+
# build files
15+
es/
16+
lib/
17+
dist/
18+
typings/
19+
20+
_site
21+
package
22+
tmp*
23+
temp*
24+
coverage
25+
test-report.html
26+
.idea/
27+
yarn-error.log
28+
*.zip
29+
.history
30+
.stylelintcache
31+
32+
.env.local
33+
.env.*.local
34+
35+
# lock文件 请根据自身项目或团队需求选择具体的包管理工具 并移除具体的ignore的lock文件
36+
yarn.lock
37+
pnpm-lock.yaml

td_fronted/.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
shamefully-hoist = true
2+
hoist = true
3+
engine-strict =true

0 commit comments

Comments
 (0)