-
Notifications
You must be signed in to change notification settings - Fork 8.3k
feat: add app with Tdesign #6836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jinmao88
wants to merge
14
commits into
main
Choose a base branch
from
tdesign
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
2264eaa
feat: 新增集成tdesign组件的apps
jinmao88 33b7a60
chore: 一些调整和兼容性更新
jinmao88 04321b1
fix: replace ant-design-vue with tdesign components in web-tdesign ap…
Copilot b472fbb
Merge branch 'main' into tdesign
likui628 57620dc
chore: apply coderabbitai suggestions
likui628 bd8ff73
fix: fix build error
likui628 a38d081
chore: enable VITE_NITRO_MOCK
likui628 dc77721
chore: demo i18n
likui628 be84330
chore: update demo routes
likui628 3e8e869
chore: Merge branch 'main' into tdesign
likui628 1af1124
chore: add tdesign logo
likui628 99d663a
fix: fix typecheck
likui628 b7bfd69
fix: fix lint
likui628 83ea27a
fix: fix lint
likui628 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # 应用标题 | ||
| VITE_APP_TITLE=Vben Admin Tdesign | ||
|
|
||
| # 应用命名空间,用于缓存、store等功能的前缀,确保隔离 | ||
| VITE_APP_NAMESPACE=vben-web-tdesign | ||
|
|
||
| # 对store进行加密的密钥,在将store持久化到localStorage时会使用该密钥进行加密 | ||
| VITE_APP_STORE_SECURE_KEY=please-replace-me-with-your-own-key | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # public path | ||
| VITE_BASE=/ | ||
|
|
||
| # Basic interface address SPA | ||
| VITE_GLOB_API_URL=/api | ||
|
|
||
| VITE_VISUALIZER=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # 端口号 | ||
| VITE_PORT=5999 | ||
|
|
||
| VITE_BASE=/ | ||
|
|
||
| # 接口地址 | ||
| VITE_GLOB_API_URL=/api | ||
|
|
||
| # 是否开启 Nitro Mock服务,true 为开启,false 为关闭 | ||
| VITE_NITRO_MOCK=true | ||
|
|
||
| # 是否打开 devtools,true 为打开,false 为关闭 | ||
| VITE_DEVTOOLS=false | ||
|
|
||
| # 是否注入全局loading | ||
| VITE_INJECT_APP_LOADING=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| VITE_BASE=/ | ||
|
|
||
| # 接口地址 | ||
| VITE_GLOB_API_URL=https://mock-napi.vben.pro/api | ||
|
|
||
| # 是否开启压缩,可以设置为 none, brotli, gzip | ||
| VITE_COMPRESS=none | ||
|
|
||
| # 是否开启 PWA | ||
| VITE_PWA=false | ||
|
|
||
| # vue-router 的模式 | ||
| VITE_ROUTER_HISTORY=hash | ||
|
|
||
| # 是否注入全局loading | ||
| VITE_INJECT_APP_LOADING=true | ||
|
|
||
| # 打包后是否生成dist.zip | ||
| VITE_ARCHIVER=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| <!doctype html> | ||
| <html lang="zh"> | ||
likui628 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | ||
| <meta name="renderer" content="webkit" /> | ||
| <meta name="description" content="A Modern Back-end Management System" /> | ||
| <meta name="keywords" content="Vben Admin Vue3 Vite" /> | ||
| <meta name="author" content="Vben" /> | ||
| <meta | ||
| name="viewport" | ||
| content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" | ||
| /> | ||
| <!-- 由 vite 注入 VITE_APP_TITLE 变量,在 .env 文件内配置 --> | ||
| <title><%= VITE_APP_TITLE %></title> | ||
| <link rel="icon" href="/favicon.ico" /> | ||
| <script> | ||
| // 生产环境下注入百度统计 | ||
| if (window._VBEN_ADMIN_PRO_APP_CONF_) { | ||
| var _hmt = _hmt || []; | ||
| (function () { | ||
| var hm = document.createElement('script'); | ||
| hm.src = | ||
| 'https://hm.baidu.com/hm.js?b38e689f40558f20a9a686d7f6f33edf'; | ||
| var s = document.getElementsByTagName('script')[0]; | ||
| s.parentNode.insertBefore(hm, s); | ||
| })(); | ||
| } | ||
| </script> | ||
| </head> | ||
| <body> | ||
| <div id="app"></div> | ||
| <script type="module" src="/src/main.ts"></script> | ||
| </body> | ||
| </html> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| { | ||
| "name": "@vben/web-tdesign", | ||
| "version": "5.5.9", | ||
| "homepage": "https://vben.pro", | ||
| "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/vbenjs/vue-vben-admin.git", | ||
| "directory": "apps/web-tdesign" | ||
| }, | ||
| "license": "MIT", | ||
| "author": { | ||
| "name": "vben", | ||
| "email": "[email protected]", | ||
| "url": "https://github.com/anncwb" | ||
| }, | ||
| "type": "module", | ||
| "scripts": { | ||
| "build": "pnpm vite build --mode production", | ||
| "build:analyze": "pnpm vite build --mode analyze", | ||
| "dev": "pnpm vite --mode development", | ||
| "preview": "vite preview", | ||
| "typecheck": "vue-tsc --noEmit --skipLibCheck" | ||
| }, | ||
| "imports": { | ||
| "#/*": "./src/*" | ||
| }, | ||
| "dependencies": { | ||
| "@vben/access": "workspace:*", | ||
| "@vben/common-ui": "workspace:*", | ||
| "@vben/constants": "workspace:*", | ||
| "@vben/hooks": "workspace:*", | ||
| "@vben/icons": "workspace:*", | ||
| "@vben/layouts": "workspace:*", | ||
| "@vben/locales": "workspace:*", | ||
| "@vben/plugins": "workspace:*", | ||
| "@vben/preferences": "workspace:*", | ||
| "@vben/request": "workspace:*", | ||
| "@vben/stores": "workspace:*", | ||
| "@vben/styles": "workspace:*", | ||
| "@vben/types": "workspace:*", | ||
| "@vben/utils": "workspace:*", | ||
| "@vueuse/core": "catalog:", | ||
| "dayjs": "catalog:", | ||
| "lodash-es": "^4.17.21", | ||
| "pinia": "catalog:", | ||
| "tdesign-vue-next": "^1.17.1", | ||
| "vue": "catalog:", | ||
| "vue-router": "catalog:" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/lodash-es": "^4.17.12" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { default } from '@vben/tailwind-config/postcss'; |
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Critical security issue: Replace the placeholder encryption key before deployment.
The placeholder value
please-replace-me-with-your-own-keyremains unresolved. Per prior analysis, this key is actively used for AES encryption of localStorage data. Deploying with this placeholder would compromise the security of encrypted store data.Before any production deployment, generate and inject a strong, randomly generated encryption key via GitHub Actions secrets or
.env.localoverride to replace this placeholder.I'll verify the security concern in the review comment by examining the codebase.
🏁 Script executed:
Length of output: 809
I need to correct my search syntax and locate where this key is actually used.
🏁 Script executed:
Length of output: 5136
🏁 Script executed:
Length of output: 5119
I need to check for deployment safeguards and build-time configurations.
🏁 Script executed:
Length of output: 776
I need to verify if this is a template project or actual production deployment, and check for environment-specific configurations.
🏁 Script executed:
Length of output: 1273
Let me check the environment-specific configuration files to see if production has a proper value or also uses the placeholder.
🏁 Script executed:
Length of output: 1437
Address the placeholder encryption key before production deployment.
The review comment is verified as accurate. The placeholder
VITE_APP_STORE_SECURE_KEY=please-replace-me-with-your-own-keyinapps/web-tdesign/.envwill be used for AES encryption of localStorage data (configured inpackages/stores/src/setup.ts:26) unless explicitly overridden. Since.env.productioncontains no override for this key and no build-time validation exists, production builds will be compiled with the placeholder unless you:.env.localwith a strong encryption key (development only; not suitable for production builds)VITE_APP_STORE_SECURE_KEYas an environment variable before runningpnpm vite build --mode production.env.productionwith a generated encryption keyWithout one of these steps, encrypted store data in production remains vulnerable.
🤖 Prompt for AI Agents