create-bubbles 0.0.19 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/index.mjs +24 -24
  2. package/package.json +1 -1
  3. package/template-react-rsbuild/biome.json +33 -53
  4. package/template-react-rsbuild/package.json +21 -21
  5. package/template-vue-rolldown-oxlint/.env +6 -0
  6. package/template-vue-rolldown-oxlint/.gitignore +24 -0
  7. package/template-vue-rolldown-oxlint/.gitlab-ci.yml +76 -0
  8. package/template-vue-rolldown-oxlint/.npmrc +5 -0
  9. package/template-vue-rolldown-oxlint/.oxlintrc.json +17 -0
  10. package/template-vue-rolldown-oxlint/.prettierrc +18 -0
  11. package/template-vue-rolldown-oxlint/README.md +31 -0
  12. package/template-vue-rolldown-oxlint/commitlint.config.js +1 -0
  13. package/template-vue-rolldown-oxlint/components.d.ts +18 -0
  14. package/template-vue-rolldown-oxlint/index.html +13 -0
  15. package/template-vue-rolldown-oxlint/lefthook.yml +11 -0
  16. package/template-vue-rolldown-oxlint/package.json +51 -0
  17. package/template-vue-rolldown-oxlint/postcss.config.js +5 -0
  18. package/template-vue-rolldown-oxlint/public/vite.svg +1 -0
  19. package/template-vue-rolldown-oxlint/src/App.vue +7 -0
  20. package/template-vue-rolldown-oxlint/src/assets/icon/vue.svg +1 -0
  21. package/template-vue-rolldown-oxlint/src/components/Icon/svg-icon.vue +29 -0
  22. package/template-vue-rolldown-oxlint/src/layout/default/index.vue +3 -0
  23. package/template-vue-rolldown-oxlint/src/main.ts +15 -0
  24. package/template-vue-rolldown-oxlint/src/router/guard/index.tsx +7 -0
  25. package/template-vue-rolldown-oxlint/src/router/guard/permissionGuard.ts +8 -0
  26. package/template-vue-rolldown-oxlint/src/router/index.tsx +15 -0
  27. package/template-vue-rolldown-oxlint/src/router/modules/index.tsx +31 -0
  28. package/template-vue-rolldown-oxlint/src/store/index.ts +10 -0
  29. package/template-vue-rolldown-oxlint/src/styles/element-plus-variables.css +4 -0
  30. package/template-vue-rolldown-oxlint/src/styles/font.scss +0 -0
  31. package/template-vue-rolldown-oxlint/src/styles/index.scss +31 -0
  32. package/template-vue-rolldown-oxlint/src/styles/variables.scss +3 -0
  33. package/template-vue-rolldown-oxlint/src/types/auto-import.d.ts +76 -0
  34. package/template-vue-rolldown-oxlint/src/types/components.d.ts +16 -0
  35. package/template-vue-rolldown-oxlint/src/utils/env.ts +5 -0
  36. package/template-vue-rolldown-oxlint/src/views/home/index.vue +15 -0
  37. package/template-vue-rolldown-oxlint/src/views/model/index.vue +7 -0
  38. package/template-vue-rolldown-oxlint/src/vite-env.d.ts +13 -0
  39. package/template-vue-rolldown-oxlint/tsconfig.app.json +25 -0
  40. package/template-vue-rolldown-oxlint/tsconfig.json +4 -0
  41. package/template-vue-rolldown-oxlint/tsconfig.node.json +25 -0
  42. package/template-vue-rolldown-oxlint/uno.config.ts +13 -0
  43. package/template-vue-rolldown-oxlint/vite.config.ts +48 -0
  44. package/template-vue-rsbuild/biome.json +33 -53
  45. package/template-vue-rsbuild/package.json +15 -14
  46. package/template-vue-rsbuild/rsbuild.config.ts +7 -0
  47. package/template-vue-rsbuild/src/types/auto-import.d.ts +3 -18
  48. package/template-vue-rsbuild/src/types/components.d.ts +15 -0
  49. package/template-vue-rsbuild/src/utils/request/axios.ts +1 -1
  50. package/template-vue-rsbuild/src/views/home/index.vue +4 -1
@@ -1,7 +1,7 @@
1
1
  {
2
+ "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
2
3
  "files": {
3
- "ignoreUnknown": true,
4
- "ignore": ["dist/*", "node_modules", "package.json", "auto-import.d.ts", "*.js"]
4
+ "ignoreUnknown": true
5
5
  },
6
6
  "formatter": {
7
7
  "enabled": true,
@@ -9,15 +9,6 @@
9
9
  "lineWidth": 100,
10
10
  "indentWidth": 2
11
11
  },
12
- "javascript": {
13
- "formatter": {
14
- "quoteStyle": "single",
15
- "semicolons": "asNeeded"
16
- }
17
- },
18
- "organizeImports": {
19
- "enabled": false
20
- },
21
12
  "linter": {
22
13
  "rules": {
23
14
  "style": {
@@ -29,10 +20,14 @@
29
20
  },
30
21
  "complexity": {
31
22
  "noUselessTypeConstraint": "off",
32
- "noForEach": "off"
23
+ "noForEach": "off",
24
+ "useDateNow": "off"
33
25
  },
34
26
  "correctness": {
35
- "useExhaustiveDependencies": "off"
27
+ "useExhaustiveDependencies": "off",
28
+ "useHookAtTopLevel": "off",
29
+ "noUnusedFunctionParameters": "off",
30
+ "noUnusedVariables": "off"
36
31
  },
37
32
  "suspicious": {
38
33
  "noGlobalIsNan": "off",
@@ -40,18 +35,27 @@
40
35
  "noExplicitAny": "off",
41
36
  "noArrayIndexKey": "off",
42
37
  "noConfusingVoidType": "off",
43
- "noThenProperty": "off"
38
+ "noThenProperty": "off",
39
+ "noTemplateCurlyInString": "off"
44
40
  },
45
41
  "performance": {
46
42
  "noDelete": "off",
47
- "noAccumulatingSpread": "off"
43
+ "noAccumulatingSpread": "off",
44
+ "noDynamicNamespaceImportAccess": "off"
48
45
  },
49
46
  "a11y": {
50
47
  "noAriaHiddenOnFocusable": "off",
51
48
  "noLabelWithoutControl": "off",
52
49
  "useFocusableInteractive": "off",
53
50
  "useKeyWithClickEvents": "off",
54
- "useSemanticElements": "off"
51
+ "useSemanticElements": "off",
52
+ "noStaticElementInteractions": "off",
53
+ "useAriaPropsSupportedByRole": "off",
54
+ "useAriaPropsForRole": "off",
55
+ "useValidAnchor": "off"
56
+ },
57
+ "nursery": {
58
+ "useUniqueElementIds": "off"
55
59
  }
56
60
  }
57
61
  },
@@ -60,43 +64,19 @@
60
64
  "quoteStyle": "single"
61
65
  }
62
66
  },
63
- "overrides": [
64
- {
65
- "include": ["**/*.test.ts", "**/*.test.tsx", "tests/**/*", "scripts/**/*"],
66
- "linter": {
67
- "rules": {
68
- "style": {
69
- "noParameterAssign": "off"
70
- },
71
- "suspicious": {
72
- "noThenProperty": "off",
73
- "noImplicitAnyLet": "off"
74
- },
75
- "complexity": {
76
- "noUselessFragments": "off"
77
- },
78
- "a11y": {
79
- "useValidAnchor": "off",
80
- "useAnchorContent": "off",
81
- "useKeyWithClickEvents": "off"
82
- }
83
- }
84
- }
85
- },
86
- {
87
- "include": ["components/*/demo/*"],
88
- "linter": {
89
- "rules": {
90
- "correctness": {
91
- "noVoidTypeReturn": "off"
92
- },
93
- "a11y": {
94
- "useValidAnchor": "off",
95
- "useAnchorContent": "off",
96
- "useKeyWithClickEvents": "off"
97
- }
98
- }
67
+ "javascript": {
68
+ "jsxRuntime": "reactClassic",
69
+ "formatter": {
70
+ "quoteStyle": "single",
71
+ "semicolons": "asNeeded"
72
+ }
73
+ },
74
+ "assist": {
75
+ "enabled": true,
76
+ "actions": {
77
+ "source": {
78
+ "organizeImports": "off"
99
79
  }
100
80
  }
101
- ]
81
+ }
102
82
  }
@@ -13,30 +13,30 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "@ant-design/icons-vue": "^7.0.1",
16
- "ahooks": "^3.8.4",
17
- "antd": "^5.25.1",
18
- "axios": "^1.9.0",
16
+ "ahooks": "^3.9.0",
17
+ "antd": "^5.26.7",
18
+ "axios": "^1.11.0",
19
19
  "dayjs": "^1.11.13",
20
- "react": "^19.1.0",
21
- "react-dom": "^19.1.0",
22
- "react-router": "^7.6.0",
23
- "zustand": "^5.0.3"
20
+ "react": "^19.1.1",
21
+ "react-dom": "^19.1.1",
22
+ "react-router": "^7.8.0",
23
+ "zustand": "^5.0.7"
24
24
  },
25
25
  "devDependencies": {
26
- "@biomejs/biome": "^1.9.4",
26
+ "@biomejs/biome": "^2.1.4",
27
27
  "@commitlint/config-conventional": "^19.8.1",
28
- "@ianvs/prettier-plugin-sort-imports": "^4.4.1",
29
- "@rsbuild/core": "^1.3.20",
30
- "@rsbuild/plugin-react": "^1.3.1",
31
- "@rsbuild/plugin-sass": "^1.3.1",
32
- "@rsbuild/plugin-svgr": "^1.2.0",
33
- "@types/react": "^19.1.4",
34
- "@types/react-dom": "^19.1.5",
35
- "@unocss/postcss": "66.1.2",
36
- "lefthook": "^1.11.10",
37
- "prettier": "^3.5.3",
38
- "typescript": "^5.8.3",
39
- "unocss": "66.1.2",
40
- "unplugin-auto-import": "^19.1.2"
28
+ "@ianvs/prettier-plugin-sort-imports": "^4.6.1",
29
+ "@rsbuild/core": "^1.4.15",
30
+ "@rsbuild/plugin-react": "^1.3.5",
31
+ "@rsbuild/plugin-sass": "^1.3.5",
32
+ "@rsbuild/plugin-svgr": "^1.2.2",
33
+ "@types/react": "^19.1.9",
34
+ "@types/react-dom": "^19.1.7",
35
+ "@unocss/postcss": "66.4.2",
36
+ "lefthook": "^1.12.2",
37
+ "prettier": "^3.6.2",
38
+ "typescript": "^5.9.2",
39
+ "unocss": "66.4.2",
40
+ "unplugin-auto-import": "^20.0.0"
41
41
  }
42
42
  }
@@ -0,0 +1,6 @@
1
+ VITE_PORT = 9405
2
+ VITE_PATH = '/'
3
+ VITE_APP_NAME = "xxx"
4
+
5
+
6
+ VITE_API_AFFIX = 'pipe-network-api'
@@ -0,0 +1,24 @@
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ pnpm-debug.log*
8
+ lerna-debug.log*
9
+
10
+ node_modules
11
+ dist
12
+ dist-ssr
13
+ *.local
14
+
15
+ # Editor directories and files
16
+ .vscode/*
17
+ !.vscode/extensions.json
18
+ .idea
19
+ .DS_Store
20
+ *.suo
21
+ *.ntvs*
22
+ *.njsproj
23
+ *.sln
24
+ *.sw?
@@ -0,0 +1,76 @@
1
+ .send_dingtalk_notification: &send_dingtalk_notification |
2
+ case "$CI_JOB_STAGE" in
3
+ "build")
4
+ stage_name="构建"
5
+ ;;
6
+ "deploy")
7
+ stage_name="部署"
8
+ ;;
9
+ esac
10
+
11
+ if [ "$CI_JOB_STATUS" == "success" ]; then
12
+ title="==✅ ${stage_name}成功=="
13
+ else
14
+ title="==❌ ${stage_name}失败=="
15
+ fi
16
+
17
+ curl -s -X POST ${DINGTALK_WEBHOOK} \
18
+ -H "Content-Type: application/json" \
19
+ -d "{
20
+ \"msgtype\": \"markdown\",
21
+ \"markdown\": {
22
+ \"title\": \"GitLab CI/CD 通知\",
23
+ \"text\": \"### ${title}\n\n- **阶段**: ${stage_name}\n- **任务**: [查看详情](${CI_JOB_URL})\n- **分支**: ${CI_COMMIT_REF_NAME}\n- **提交人**: ${CI_COMMIT_AUTHOR}\n- **提交信息**: ${CI_COMMIT_MESSAGE}\n- **时间**: $(date '+%Y-%m-%d %H:%M:%S')\"
24
+ }
25
+ }"
26
+
27
+ stages:
28
+ - build
29
+ - deploy
30
+
31
+ variables:
32
+ DEPLOY_PATH: '/usr/local/bee/web/pipe-network/pipe-network-model'
33
+ DINGTALK_WEBHOOK: 'https://oapi.dingtalk.com/robot/send?access_token=${DING_TALK_ACCESS_TOKEN}'
34
+
35
+ cache:
36
+ paths:
37
+ - node_modules/
38
+
39
+ # 打包
40
+ build:
41
+ stage: build
42
+ script:
43
+ - cd ${CI_PROJECT_DIR}
44
+ - whoami
45
+ - echo "===== 开始构建 ====="
46
+ - pnpm install
47
+ - pnpm build
48
+ - echo "===== 构建完成 ====="
49
+ only:
50
+ - dev
51
+ artifacts:
52
+ paths:
53
+ - dist/
54
+ after_script:
55
+ #钉钉通知
56
+ - *send_dingtalk_notification
57
+
58
+ # 部署
59
+ deploy:
60
+ stage: deploy
61
+ needs: ['build']
62
+ script:
63
+ - echo "-----------------开始部署------------------"
64
+ - |
65
+ if [ "$CI_COMMIT_BRANCH" == "dev" ]; then
66
+ ssh root@192.168.2.245 "rm -rf $DEPLOY_PATH/*" || { echo "❌ 清理245失败"; exit 1; }
67
+ scp -r dist/* root@192.168.2.245:$DEPLOY_PATH || { echo "❌ 传输到245失败"; exit 1; }
68
+ ssh root@192.168.2.57 "rm -rf $DEPLOY_PATH/*" || { echo "❌ 清理57失败"; exit 1; }
69
+ scp -r dist/* root@192.168.2.57:$DEPLOY_PATH || { echo "❌ 传输到57失败"; exit 1; }
70
+ else
71
+ echo "没有匹配到需要部署的分支或标签,跳过部署"
72
+ exit 0
73
+ fi
74
+ after_script:
75
+ #钉钉通知
76
+ - *send_dingtalk_notification
@@ -0,0 +1,5 @@
1
+ registry=https://registry.npmmirror.com
2
+
3
+
4
+ # registry=http://192.168.2.68:8085/nexus/repository/npm-group/
5
+ # //192.168.2.68:8085/nexus/repository/npm-group/:_authToken cae0c186-b50e-30c3-a2c8-f5a530ceea4d
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
3
+ "plugins": ["typescript", "import", "unicorn"],
4
+ "env": {
5
+ "browser": true,
6
+ "es2022": true,
7
+ "node": true
8
+ },
9
+ "parserOptions": {
10
+ "ecmaVersion": "latest",
11
+ "sourceType": "module"
12
+ },
13
+ "rules": {
14
+ "@typescript-eslint/no-unused-vars": "warn"
15
+ },
16
+ "ignorePatterns": ["node_modules", "dist", "public", "*.d.ts"]
17
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "singleQuote": true,
3
+ "jsxSingleQuote": false,
4
+ "trailingComma": "all",
5
+ "printWidth": 100,
6
+ "proseWrap": "never",
7
+ "semi": false,
8
+ "importOrder": ["^(vue|vue-router)$", "^([a-z]|@[a-z])", "", ".*"],
9
+ "plugins": ["@ianvs/prettier-plugin-sort-imports", "@prettier/plugin-oxc"],
10
+ "overrides": [
11
+ {
12
+ "files": ".prettierrc",
13
+ "options": {
14
+ "parser": "json"
15
+ }
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,31 @@
1
+ ### 安装依赖
2
+
3
+ > pnpm install
4
+
5
+ ### 启动
6
+
7
+ > pnpm dev
8
+
9
+ ### css 全局变量
10
+
11
+ @/styles/variables.scss
12
+
13
+ ### 字体 引入
14
+
15
+ @/styles/font/\*
16
+
17
+ ### css 方案
18
+
19
+ unocss
20
+
21
+ ### 时间方案
22
+
23
+ dayjs
24
+
25
+ ### 工具库
26
+
27
+ radash
28
+
29
+ ### 发布
30
+
31
+ 待补充
@@ -0,0 +1 @@
1
+ export default { extends: ['@commitlint/config-conventional'] }
@@ -0,0 +1,18 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ // Generated by unplugin-vue-components
4
+ // Read more: https://github.com/vuejs/core/pull/3399
5
+ // biome-ignore lint: disable
6
+ export {}
7
+
8
+ /* prettier-ignore */
9
+ declare module 'vue' {
10
+ export interface GlobalComponents {
11
+ ElButton: typeof import('element-plus/es')['ElButton']
12
+ ElDrawer: typeof import('element-plus/es')['ElDrawer']
13
+ ElTable: typeof import('element-plus/es')['ElTable']
14
+ RouterLink: typeof import('vue-router')['RouterLink']
15
+ RouterView: typeof import('vue-router')['RouterView']
16
+ SvgIcon: typeof import('./src/components/Icon/svg-icon.vue')['default']
17
+ }
18
+ }
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Vite + Vue + TS</title>
8
+ </head>
9
+ <body>
10
+ <div id="app"></div>
11
+ <script type="module" src="/src/main.ts"></script>
12
+ </body>
13
+ </html>
@@ -0,0 +1,11 @@
1
+ pre-commit:
2
+ commands:
3
+ check:
4
+ glob: '*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc,vue}'
5
+ run: npx oxlint --fix --fix-suggestions {staged_files}
6
+ stage_fixed: true
7
+
8
+ commit-msg:
9
+ commands:
10
+ 'lint commit message':
11
+ run: npx commitlint --edit {1}
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "template-vue-rolldown-oxlint",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vue-tsc -b && vite build",
9
+ "preview": "vite preview",
10
+ "lint": "pnpm lint:oxlint",
11
+ "lint:oxlint": "oxlint --fix",
12
+ "format": "prettier --write ."
13
+ },
14
+ "lint-staged": {
15
+ "**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,vue,astro,svelte}": "oxlint"
16
+ },
17
+ "dependencies": {
18
+ "@element-plus/icons-vue": "^2.3.2",
19
+ "@vueuse/core": "^13.6.0",
20
+ "dayjs": "^1.11.13",
21
+ "echarts": "^6.0.0",
22
+ "element-plus": "^2.10.6",
23
+ "pinia": "^3.0.3",
24
+ "pinia-plugin-persistedstate": "^4.4.1",
25
+ "radash": "^12.1.1",
26
+ "vue": "^3.5.18",
27
+ "vue-router": "^4.5.1"
28
+ },
29
+ "devDependencies": {
30
+ "@commitlint/cli": "^19.8.1",
31
+ "@commitlint/config-conventional": "^19.8.1",
32
+ "@ianvs/prettier-plugin-sort-imports": "^4.6.1",
33
+ "@prettier/plugin-oxc": "^0.0.4",
34
+ "@unocss/postcss": "^66.4.2",
35
+ "@vitejs/plugin-vue": "^6.0.1",
36
+ "@vue/tsconfig": "^0.7.0",
37
+ "fast-glob": "^3.3.3",
38
+ "lefthook": "^1.12.2",
39
+ "oxlint": "^1.11.1",
40
+ "prettier": "^3.6.2",
41
+ "sass": "^1.90.0",
42
+ "typescript": "~5.9.2",
43
+ "unocss": "^66.4.2",
44
+ "unplugin-auto-import": "^20.0.0",
45
+ "unplugin-vue-components": "^29.0.0",
46
+ "vite": "npm:rolldown-vite@latest",
47
+ "vite-plugin-inspect": "^11.3.2",
48
+ "vite-plugin-svg-icons": "^2.0.1",
49
+ "vue-tsc": "^3.0.5"
50
+ }
51
+ }
@@ -0,0 +1,5 @@
1
+ import UnoCSS from '@unocss/postcss'
2
+
3
+ export default {
4
+ plugins: [UnoCSS()],
5
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -0,0 +1,7 @@
1
+ <script setup lang="ts"></script>
2
+
3
+ <template>
4
+ <RouterView />
5
+ </template>
6
+
7
+ <style scoped></style>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="currentColor" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="currentColor" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
@@ -0,0 +1,29 @@
1
+ <template>
2
+ <svg class="svg-icon" aria-hidden="true" v-bind="attrs">
3
+ <use :href="`#icon-${name}`" />
4
+ </svg>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ const attrs = useAttrs()
9
+ defineProps<{
10
+ name: string
11
+ }>()
12
+ </script>
13
+
14
+ <style lang="scss" scoped>
15
+ .svg-icon {
16
+ display: flex;
17
+ justify-content: center;
18
+ align-items: center;
19
+ width: 1em;
20
+ height: 1em;
21
+ fill: currentColor;
22
+ overflow: hidden;
23
+ }
24
+
25
+ .svg-external-icon {
26
+ background-color: currentColor;
27
+ mask-size: cover !important;
28
+ }
29
+ </style>
@@ -0,0 +1,3 @@
1
+ <template>
2
+ <router-view />
3
+ </template>
@@ -0,0 +1,15 @@
1
+ import { createApp } from 'vue'
2
+
3
+ import '@/styles/index.scss'
4
+ import '@/styles/element-plus-variables.css'
5
+
6
+ import App from './App.vue'
7
+ import { setupRouter } from './router'
8
+ import { setupStore } from './store'
9
+
10
+ import 'virtual:svg-icons-register'
11
+
12
+ const app = createApp(App)
13
+ setupRouter(app)
14
+ setupStore(app)
15
+ app.mount('#app')
@@ -0,0 +1,7 @@
1
+ import type { Router } from 'vue-router'
2
+
3
+ import { createPermissionGuard } from './permissionGuard'
4
+
5
+ export const setupGuard = (router: Router) => {
6
+ createPermissionGuard(router)
7
+ }
@@ -0,0 +1,8 @@
1
+ import type { Router } from 'vue-router'
2
+
3
+ export const createPermissionGuard = (router: Router) => {
4
+ router.beforeEach((to, from, next) => {
5
+ next()
6
+ })
7
+ router.afterEach((to, from) => {})
8
+ }
@@ -0,0 +1,15 @@
1
+ import type { App } from 'vue'
2
+ import { createRouter, createWebHistory } from 'vue-router'
3
+
4
+ import { routes } from './modules'
5
+
6
+ export const router = createRouter({
7
+ history: createWebHistory(import.meta.env.PUBLIC_PATH),
8
+ routes: routes,
9
+ strict: true,
10
+ scrollBehavior: () => ({ left: 0, top: 0 }),
11
+ })
12
+
13
+ export const setupRouter = (app: App) => {
14
+ app.use(router)
15
+ }
@@ -0,0 +1,31 @@
1
+ import type { RouteRecordRaw } from 'vue-router'
2
+
3
+ /**
4
+ * IsMaskAll 代表 是不是要和模型交互 为true 全部遮罩
5
+ */
6
+
7
+ export const routes: RouteRecordRaw[] = [
8
+ {
9
+ path: '/',
10
+ name: 'layout',
11
+ component: () => import('@/layout/default/index.vue'),
12
+ children: [
13
+ {
14
+ path: '/',
15
+ redirect: '/home',
16
+ },
17
+ {
18
+ path: '/home',
19
+ name: 'Home',
20
+ meta: { title: '研发A区数字孪生可视化大屏', isHideBack: true },
21
+ component: () => import('@/views/home/index.vue'),
22
+ },
23
+ ],
24
+ },
25
+ {
26
+ path: '/model',
27
+ name: 'model',
28
+ meta: {},
29
+ component: () => import('@/views/model/index.vue'),
30
+ },
31
+ ]
@@ -0,0 +1,10 @@
1
+ import type { App } from 'vue'
2
+ import { createPinia } from 'pinia'
3
+ import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
4
+
5
+ export const store = createPinia()
6
+ store.use(piniaPluginPersistedstate)
7
+
8
+ export const setupStore = (app: App) => {
9
+ app.use(store)
10
+ }
@@ -0,0 +1,4 @@
1
+ :root:has(#app) {
2
+ --el-color-primary: #284471;
3
+ --el-color-primary-light-3: rgb(40, 68, 113, 0.8);
4
+ }
@@ -0,0 +1,31 @@
1
+ @use './font.scss';
2
+ @use './variables.scss';
3
+ @use './element-plus-variables.css';
4
+ @unocss;
5
+
6
+ html,
7
+ body,
8
+ #root {
9
+ width: 100%;
10
+ height: 100%;
11
+ font-family: 'SourceHanSansCN';
12
+ }
13
+
14
+ *,
15
+ *::before,
16
+ *::after {
17
+ margin: 0;
18
+ padding: 0;
19
+ box-sizing: border-box;
20
+ }
21
+
22
+ //弹窗的标题样式
23
+ .dialog-title {
24
+ border-left: 3px solid #22b5ffff;
25
+ padding-left: 10px;
26
+ height: 16px;
27
+ color: #ffffffb8;
28
+ font: 700;
29
+ font-size: 16px;
30
+ line-height: 16px;
31
+ }