create-weapp-vite 2.3.14 → 2.3.16

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 (80) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/index.js +1 -1
  3. package/dist/{src-JolaD7Ia.js → src-C8kzMXK7.js} +11 -7
  4. package/package.json +1 -1
  5. package/templates/default/.vscode/extensions.json +2 -1
  6. package/templates/default/package.json +3 -0
  7. package/templates/lib/.vscode/extensions.json +2 -1
  8. package/templates/lib/package.json +4 -1
  9. package/templates/plugin/.vscode/extensions.json +7 -0
  10. package/templates/plugin/package.json +3 -0
  11. package/templates/tailwindcss/.vscode/extensions.json +2 -1
  12. package/templates/tailwindcss/package.json +3 -0
  13. package/templates/tdesign/.vscode/extensions.json +2 -1
  14. package/templates/tdesign/package.json +3 -0
  15. package/templates/vant/.vscode/extensions.json +2 -1
  16. package/templates/vant/package.json +3 -0
  17. package/templates/wevu/.vscode/extensions.json +2 -1
  18. package/templates/wevu/README.md +3 -3
  19. package/templates/wevu/package.json +4 -1
  20. package/templates/wevu/src/app.vue +1 -60
  21. package/templates/wevu/src/pages/index/index.vue +26 -194
  22. package/templates/wevu/src/pages/layouts/index.vue +0 -18
  23. package/templates/wevu/weapp-vite.config.ts +0 -7
  24. package/templates/wevu-tdesign/.vscode/extensions.json +2 -1
  25. package/templates/wevu-tdesign/README.md +3 -6
  26. package/templates/wevu-tdesign/package.json +4 -1
  27. package/templates/wevu-tdesign/project.private.config.json +0 -66
  28. package/templates/wevu-tdesign/src/app.vue +1 -73
  29. package/templates/wevu-tdesign/src/pages/index/index.vue +19 -362
  30. package/templates/wevu/src/components/InfoPanel/index.vue +0 -52
  31. package/templates/wevu/src/components/StatusPill/index.vue +0 -42
  32. package/templates/wevu/src/packageA/pages/workspace/index.vue +0 -137
  33. package/templates/wevu/src/packageB/pages/settings/index.vue +0 -131
  34. package/templates/wevu/src/pages/overview/index.vue +0 -149
  35. package/templates/wevu-tdesign/public/tabbar/ability-active.png +0 -0
  36. package/templates/wevu-tdesign/public/tabbar/ability.png +0 -0
  37. package/templates/wevu-tdesign/public/tabbar/data-active.png +0 -0
  38. package/templates/wevu-tdesign/public/tabbar/data.png +0 -0
  39. package/templates/wevu-tdesign/public/tabbar/form-active.png +0 -0
  40. package/templates/wevu-tdesign/public/tabbar/form.png +0 -0
  41. package/templates/wevu-tdesign/public/tabbar/home-active.png +0 -0
  42. package/templates/wevu-tdesign/public/tabbar/home.png +0 -0
  43. package/templates/wevu-tdesign/public/tabbar/list-active.png +0 -0
  44. package/templates/wevu-tdesign/public/tabbar/list.png +0 -0
  45. package/templates/wevu-tdesign/src/components/EmptyState/index.vue +0 -36
  46. package/templates/wevu-tdesign/src/components/FilterBar/index.vue +0 -64
  47. package/templates/wevu-tdesign/src/components/FormRow/index.vue +0 -43
  48. package/templates/wevu-tdesign/src/components/FormStep/index.vue +0 -48
  49. package/templates/wevu-tdesign/src/components/KpiBoard/index.vue +0 -145
  50. package/templates/wevu-tdesign/src/components/QuickActionGrid/index.vue +0 -79
  51. package/templates/wevu-tdesign/src/components/ResultCard/index.vue +0 -51
  52. package/templates/wevu-tdesign/src/components/SectionTitle/index.vue +0 -34
  53. package/templates/wevu-tdesign/src/components/TrendCard/index.vue +0 -101
  54. package/templates/wevu-tdesign/src/components/VirtualHostClassDemo/BrokenCard.vue +0 -46
  55. package/templates/wevu-tdesign/src/components/VirtualHostClassDemo/FixedExternalClassCard.vue +0 -50
  56. package/templates/wevu-tdesign/src/components/VirtualHostClassDemo/RecommendedCard.vue +0 -53
  57. package/templates/wevu-tdesign/src/hooks/useDialog.ts +0 -205
  58. package/templates/wevu-tdesign/src/hooks/useFormBinder.ts +0 -17
  59. package/templates/wevu-tdesign/src/hooks/useLayoutFeedbackBridge.ts +0 -17
  60. package/templates/wevu-tdesign/src/hooks/usePullDownRefresh.ts +0 -12
  61. package/templates/wevu-tdesign/src/hooks/useToast.ts +0 -100
  62. package/templates/wevu-tdesign/src/layouts/admin.vue +0 -41
  63. package/templates/wevu-tdesign/src/layouts/default.vue +0 -23
  64. package/templates/wevu-tdesign/src/pages/ability/index.vue +0 -164
  65. package/templates/wevu-tdesign/src/pages/data/index.vue +0 -189
  66. package/templates/wevu-tdesign/src/pages/form/index.vue +0 -271
  67. package/templates/wevu-tdesign/src/pages/layout-feedback/components/FeedbackCallerCard.vue +0 -79
  68. package/templates/wevu-tdesign/src/pages/layout-feedback/index.vue +0 -211
  69. package/templates/wevu-tdesign/src/pages/layout-store/index.vue +0 -127
  70. package/templates/wevu-tdesign/src/pages/layouts/index.vue +0 -120
  71. package/templates/wevu-tdesign/src/pages/list/index.vue +0 -146
  72. package/templates/wevu-tdesign/src/stores/layoutInteractionDemo.ts +0 -129
  73. package/templates/wevu-tdesign/src/subpackages/ability/index.vue +0 -103
  74. package/templates/wevu-tdesign/src/subpackages/lab/class-binding/index.vue +0 -440
  75. package/templates/wevu-tdesign/src/subpackages/lab/index.vue +0 -169
  76. package/templates/wevu-tdesign/src/subpackages/lab/virtual-host-class/index.vue +0 -94
  77. package/templates/wevu-tdesign/src/types/action.ts +0 -14
  78. package/templates/wevu-tdesign/src/types/list.ts +0 -17
  79. package/templates/wevu-tdesign/src/utils/changeEvent.ts +0 -53
  80. package/templates/wevu-tdesign/src/utils/listFilters.ts +0 -34
package/dist/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as RECOMMENDED_SKILLS_INSTALL_COMMAND, t as createProject } from "./src-JolaD7Ia.js";
1
+ import { n as RECOMMENDED_SKILLS_INSTALL_COMMAND, t as createProject } from "./src-C8kzMXK7.js";
2
2
  import logger from "@weapp-core/logger";
3
3
  import { fs } from "@weapp-core/shared/fs";
4
4
  import process from "node:process";
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { r as TemplateName, t as createProject } from "./src-JolaD7Ia.js";
1
+ import { r as TemplateName, t as createProject } from "./src-C8kzMXK7.js";
2
2
  export { TemplateName, createProject };
@@ -6,10 +6,13 @@ import https from "node:https";
6
6
  import { spawn } from "node:child_process";
7
7
  import process from "node:process";
8
8
  //#region ../../packages-runtime/wevu/package.json
9
- var version$1 = "6.16.1";
9
+ var version$2 = "6.16.2";
10
+ //#endregion
11
+ //#region ../dashboard/package.json
12
+ var version$1 = "6.16.2";
10
13
  //#endregion
11
14
  //#region ../weapp-vite/package.json
12
- var version = "6.16.1";
15
+ var version = "6.16.2";
13
16
  //#endregion
14
17
  //#region src/enums.ts
15
18
  let TemplateName = /* @__PURE__ */ function(TemplateName) {
@@ -97,7 +100,7 @@ function createAgentsGuidelines(templateName) {
97
100
  const TEMPLATE_CATALOG = {
98
101
  "@babel/core": "^7.29.0",
99
102
  "@babel/generator": "^7.29.1",
100
- "@babel/parser": "^7.29.2",
103
+ "@babel/parser": "^7.29.3",
101
104
  "@babel/traverse": "^7.29.0",
102
105
  "@babel/types": "^7.29.0",
103
106
  "@douyin-microapp/typings": "^1.3.1",
@@ -141,13 +144,13 @@ const TEMPLATE_CATALOG = {
141
144
  debug: "^4.4.3",
142
145
  echarts: "^6.0.0",
143
146
  esbuild: "^0.28.0",
144
- eslint: "^10.2.1",
147
+ eslint: "^10.3.0",
145
148
  fdir: "^6.5.0",
146
149
  htmlparser2: "^12.0.0",
147
150
  lodash: "^4.18.1",
148
151
  merge: "^2.1.1",
149
152
  pathe: "^2.0.3",
150
- postcss: "^8.5.12",
153
+ postcss: "^8.5.13",
151
154
  rolldown: "1.0.0-rc.17",
152
155
  sass: "^1.99.0",
153
156
  stylelint: "^17.9.1",
@@ -156,7 +159,7 @@ const TEMPLATE_CATALOG = {
156
159
  typescript: "^6.0.3",
157
160
  vite: "8.0.10",
158
161
  vue: "^3.5.33",
159
- zod: "^4.3.6"
162
+ zod: "^4.4.2"
160
163
  };
161
164
  const TEMPLATE_NAMED_CATALOG = {
162
165
  "tdesign-miniprogram-fixed": { "tdesign-miniprogram": "1.14.0" },
@@ -552,7 +555,8 @@ async function createProject(targetDir = "", templateName = "default", options =
552
555
  ensureManagedTypeScriptDevDependencies(pkgJson);
553
556
  if (!pkgJson.devDependencies) pkgJson.devDependencies = {};
554
557
  upsertExistingDependencyVersion(pkgJson, "weapp-vite", toCaretVersion(version));
555
- upsertExistingDependencyVersion(pkgJson, "wevu", toCaretVersion(version$1));
558
+ upsertExistingDependencyVersion(pkgJson, "wevu", toCaretVersion(version$2));
559
+ upsertExistingDependencyVersion(pkgJson, "@weapp-vite/dashboard", toCaretVersion(version$1));
556
560
  await upsertTailwindcssVersion(pkgJson);
557
561
  await writeJsonFile(packageJsonPath, pkgJson);
558
562
  await fs.writeFile(path.resolve(targetDir, "AGENTS.md"), createAgentsGuidelines(templateName));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-weapp-vite",
3
3
  "type": "module",
4
- "version": "2.3.14",
4
+ "version": "2.3.16",
5
5
  "description": "create-weapp-vite",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "recommendations": [
3
3
  "dbaeumer.vscode-eslint",
4
- "stylelint.vscode-stylelint"
4
+ "stylelint.vscode-stylelint",
5
+ "weapp-vite.weapp-vite"
5
6
  ]
6
7
  }
@@ -18,6 +18,8 @@
18
18
  "scripts": {
19
19
  "dev": "wv dev",
20
20
  "dev:open": "wv dev -o",
21
+ "dev:ui": "wv dev --ui",
22
+ "dev:open:ui": "wv dev --ui -o",
21
23
  "build": "wv build",
22
24
  "lint": "eslint .",
23
25
  "lint:fix": "eslint . --fix",
@@ -31,6 +33,7 @@
31
33
  "@icebreakers/eslint-config": "catalog:",
32
34
  "@icebreakers/stylelint-config": "catalog:",
33
35
  "@types/node": "catalog:",
36
+ "@weapp-vite/dashboard": "workspace:*",
34
37
  "eslint": "catalog:",
35
38
  "miniprogram-api-typings": "catalog:",
36
39
  "sass": "catalog:",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "recommendations": [
3
3
  "dbaeumer.vscode-eslint",
4
- "stylelint.vscode-stylelint"
4
+ "stylelint.vscode-stylelint",
5
+ "weapp-vite.weapp-vite"
5
6
  ]
6
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "weapp-vite-lib-template",
3
3
  "type": "module",
4
- "version": "7.0.1",
4
+ "version": "7.0.2",
5
5
  "private": true,
6
6
  "description": "weapp-vite 组件库(lib 模式)模板",
7
7
  "author": "ice breaker <1324318532@qq.com>",
@@ -18,6 +18,8 @@
18
18
  "scripts": {
19
19
  "dev": "wv dev",
20
20
  "dev:open": "wv dev -o",
21
+ "dev:ui": "wv dev --ui",
22
+ "dev:open:ui": "wv dev --ui -o",
21
23
  "build": "wv build",
22
24
  "build:lib": "wv build --config weapp-vite.lib.config.ts",
23
25
  "lint": "eslint .",
@@ -35,6 +37,7 @@
35
37
  "@icebreakers/eslint-config": "catalog:",
36
38
  "@icebreakers/stylelint-config": "catalog:",
37
39
  "@types/node": "catalog:",
40
+ "@weapp-vite/dashboard": "workspace:*",
38
41
  "eslint": "catalog:",
39
42
  "miniprogram-api-typings": "catalog:",
40
43
  "sass": "catalog:",
@@ -0,0 +1,7 @@
1
+ {
2
+ "recommendations": [
3
+ "dbaeumer.vscode-eslint",
4
+ "stylelint.vscode-stylelint",
5
+ "weapp-vite.weapp-vite"
6
+ ]
7
+ }
@@ -18,6 +18,8 @@
18
18
  "scripts": {
19
19
  "dev": "wv dev",
20
20
  "dev:open": "wv dev -o",
21
+ "dev:ui": "wv dev --ui",
22
+ "dev:open:ui": "wv dev --ui -o",
21
23
  "build": "wv build",
22
24
  "lint": "eslint .",
23
25
  "lint:fix": "eslint . --fix",
@@ -34,6 +36,7 @@
34
36
  "@icebreakers/eslint-config": "catalog:",
35
37
  "@icebreakers/stylelint-config": "catalog:",
36
38
  "@types/node": "catalog:",
39
+ "@weapp-vite/dashboard": "workspace:*",
37
40
  "eslint": "catalog:",
38
41
  "miniprogram-api-typings": "catalog:",
39
42
  "sass": "catalog:",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "recommendations": [
3
3
  "dbaeumer.vscode-eslint",
4
- "stylelint.vscode-stylelint"
4
+ "stylelint.vscode-stylelint",
5
+ "weapp-vite.weapp-vite"
5
6
  ]
6
7
  }
@@ -18,6 +18,8 @@
18
18
  "scripts": {
19
19
  "dev": "wv dev",
20
20
  "dev:open": "wv dev -o",
21
+ "dev:ui": "wv dev --ui",
22
+ "dev:open:ui": "wv dev --ui -o",
21
23
  "build": "wv build",
22
24
  "lint": "eslint .",
23
25
  "lint:fix": "eslint . --fix",
@@ -34,6 +36,7 @@
34
36
  "@iconify-json/mdi": "catalog:",
35
37
  "@tailwindcss/postcss": "catalog:",
36
38
  "@types/node": "catalog:",
39
+ "@weapp-vite/dashboard": "workspace:*",
37
40
  "autoprefixer": "catalog:",
38
41
  "eslint": "catalog:",
39
42
  "miniprogram-api-typings": "catalog:",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "recommendations": [
3
3
  "dbaeumer.vscode-eslint",
4
- "stylelint.vscode-stylelint"
4
+ "stylelint.vscode-stylelint",
5
+ "weapp-vite.weapp-vite"
5
6
  ]
6
7
  }
@@ -18,6 +18,8 @@
18
18
  "scripts": {
19
19
  "dev": "wv dev",
20
20
  "dev:open": "wv dev -o",
21
+ "dev:ui": "wv dev --ui",
22
+ "dev:open:ui": "wv dev --ui -o",
21
23
  "build": "wv build",
22
24
  "lint": "eslint .",
23
25
  "lint:fix": "eslint . --fix",
@@ -37,6 +39,7 @@
37
39
  "@iconify-json/mdi": "catalog:",
38
40
  "@tailwindcss/postcss": "catalog:",
39
41
  "@types/node": "catalog:",
42
+ "@weapp-vite/dashboard": "workspace:*",
40
43
  "autoprefixer": "catalog:",
41
44
  "eslint": "catalog:",
42
45
  "miniprogram-api-typings": "catalog:",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "recommendations": [
3
3
  "dbaeumer.vscode-eslint",
4
- "stylelint.vscode-stylelint"
4
+ "stylelint.vscode-stylelint",
5
+ "weapp-vite.weapp-vite"
5
6
  ]
6
7
  }
@@ -18,6 +18,8 @@
18
18
  "scripts": {
19
19
  "dev": "wv dev",
20
20
  "dev:open": "wv dev -o",
21
+ "dev:ui": "wv dev --ui",
22
+ "dev:open:ui": "wv dev --ui -o",
21
23
  "build": "wv build",
22
24
  "lint": "eslint .",
23
25
  "lint:fix": "eslint . --fix",
@@ -37,6 +39,7 @@
37
39
  "@iconify-json/mdi": "catalog:",
38
40
  "@tailwindcss/postcss": "catalog:",
39
41
  "@types/node": "catalog:",
42
+ "@weapp-vite/dashboard": "workspace:*",
40
43
  "autoprefixer": "catalog:",
41
44
  "eslint": "catalog:",
42
45
  "miniprogram-api-typings": "catalog:",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "recommendations": [
3
3
  "dbaeumer.vscode-eslint",
4
- "stylelint.vscode-stylelint"
4
+ "stylelint.vscode-stylelint",
5
+ "weapp-vite.weapp-vite"
5
6
  ]
6
7
  }
@@ -1,6 +1,6 @@
1
1
  # weapp-vite-wevu-template
2
2
 
3
- `weapp-vite` + `wevu`(Vue SFC)模板
3
+ `weapp-vite` + `wevu`(Vue SFC)最小模板。
4
4
 
5
5
  ## 使用方式
6
6
 
@@ -14,8 +14,8 @@
14
14
 
15
15
  - 页面/组件优先使用 Vue `<script setup>`(编译宏)写法
16
16
  - 配置使用 `<json>` 自定义块
17
- - `src/components` 下的 Vue SFC(`*.vue`)与原生组件(`*.wxml`)默认开启自动导入,页面中可直接使用组件标签
18
- - `app.json` 里的 `pages` 与 `subPackages` 通过 `weapp-vite/auto-routes` 自动生成,普通分包页面也会自动收集
17
+ - `app.json` 里的 `pages` 通过 `weapp-vite/auto-routes` 自动生成
18
+ - layout、分包、router 等验证性示例在 `e2e-apps/template-wevu-regression`
19
19
 
20
20
  ### 构建
21
21
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "weapp-vite-wevu-template",
3
3
  "type": "module",
4
- "version": "1.0.4",
4
+ "version": "1.0.5",
5
5
  "private": true,
6
6
  "description": "weapp-vite + wevu (Vue SFC) 模板",
7
7
  "author": "ice breaker <1324318532@qq.com>",
@@ -18,6 +18,8 @@
18
18
  "scripts": {
19
19
  "dev": "wv dev",
20
20
  "dev:open": "wv dev -o",
21
+ "dev:ui": "wv dev --ui",
22
+ "dev:open:ui": "wv dev --ui -o",
21
23
  "build": "wv build",
22
24
  "lint": "eslint .",
23
25
  "lint:fix": "eslint . --fix",
@@ -31,6 +33,7 @@
31
33
  "@icebreakers/eslint-config": "catalog:",
32
34
  "@icebreakers/stylelint-config": "catalog:",
33
35
  "@types/node": "catalog:",
36
+ "@weapp-vite/dashboard": "workspace:*",
34
37
  "eslint": "catalog:",
35
38
  "miniprogram-api-typings": "catalog:",
36
39
  "stylelint": "catalog:",
@@ -1,14 +1,10 @@
1
1
  <script setup lang="ts">
2
2
  import autoRoutes from 'weapp-vite/auto-routes'
3
- import { onHide, onLaunch, onShow } from 'wevu'
4
- import { wpi } from 'wevu/api'
5
- import { createRouter } from 'wevu/router'
6
3
 
7
4
  defineAppJson({
8
5
  pages: autoRoutes.pages,
9
- subPackages: autoRoutes.subPackages,
10
6
  window: {
11
- navigationBarTitleText: '业务模板',
7
+ navigationBarTitleText: 'Wevu 模板',
12
8
  navigationBarBackgroundColor: '#0f172a',
13
9
  navigationBarTextStyle: 'white',
14
10
  },
@@ -16,61 +12,6 @@ defineAppJson({
16
12
  componentFramework: 'glass-easel',
17
13
  sitemapLocation: 'sitemap.json',
18
14
  })
19
-
20
- const logger = wpi.getLogManager({ level: 1 })
21
-
22
- const router = createRouter({
23
- routes: autoRoutes.entries.map(path => ({
24
- name: path,
25
- path: `/${path}`,
26
- })),
27
- })
28
-
29
- router.beforeEach((to, from) => {
30
- logger.info('[wevu-template-router] beforeEach', {
31
- to: to?.fullPath,
32
- from: from.fullPath,
33
- })
34
- return true
35
- })
36
-
37
- router.beforeResolve((to, from) => {
38
- logger.info('[wevu-template-router] beforeResolve', {
39
- to: to?.fullPath,
40
- from: from.fullPath,
41
- })
42
- return true
43
- })
44
-
45
- router.afterEach((to, from, failure) => {
46
- logger.info('[wevu-template-router] afterEach', {
47
- to: to?.fullPath,
48
- from: from.fullPath,
49
- failureType: failure?.type,
50
- })
51
- })
52
-
53
- router.onError((error, context) => {
54
- logger.info('[wevu-template-router] onError', {
55
- error: error instanceof Error ? error.message : String(error),
56
- mode: context.mode,
57
- to: context.to?.fullPath,
58
- from: context.from.fullPath,
59
- failureType: context.failure.type,
60
- })
61
- })
62
-
63
- onShow(() => {
64
- logger.info('[weapp-vite-wevu-template] app show')
65
- })
66
-
67
- onHide(() => {
68
- logger.info('[weapp-vite-wevu-template] app hide')
69
- })
70
-
71
- onLaunch(() => {
72
- logger.info('[weapp-vite-wevu-template] app launch')
73
- })
74
15
  </script>
75
16
 
76
17
  <style>
@@ -1,136 +1,29 @@
1
1
  <script setup lang="ts">
2
- import { computed } from 'wevu'
3
- import { useRoute, useRouter } from 'wevu/router'
2
+ import { computed, ref } from 'wevu'
4
3
 
5
4
  definePageJson({
6
- navigationBarTitleText: '业务门户',
5
+ navigationBarTitleText: 'Wevu 模板',
7
6
  })
8
7
 
9
- const HOME_PATH = '/pages/index/index'
10
- const OVERVIEW_PATH = '/pages/overview/index'
11
- const WORKSPACE_PATH = '/packageA/pages/workspace/index'
12
- const SETTINGS_PATH = '/packageB/pages/settings/index'
13
- const LAYOUTS_PATH = '/pages/layouts/index'
14
-
15
- const route = useRoute()
16
- const router = useRouter()
17
- const routeSummary = computed(() => route.fullPath || `/${route.path}`)
18
-
19
- const metrics = [
20
- { label: '本周跟进事项', value: '12', detail: '含 3 项需今日确认' },
21
- { label: '交付进度', value: '86%', detail: '版本提测准备完成' },
22
- { label: '服务可用率', value: '99.95%', detail: '核心链路运行稳定' },
23
- ]
24
-
25
- const quickLinks = [
26
- {
27
- title: '运营概览',
28
- description: '查看阶段目标、团队协同与项目节奏。',
29
- action: '进入概览',
30
- path: OVERVIEW_PATH,
31
- },
32
- {
33
- title: '项目工作台',
34
- description: '集中处理待办任务、优先级与排期。',
35
- action: '打开工作台',
36
- path: WORKSPACE_PATH,
37
- },
38
- {
39
- title: '系统设置',
40
- description: '统一管理通知、权限与环境配置。',
41
- action: '前往设置',
42
- path: SETTINGS_PATH,
43
- },
44
- {
45
- title: '页面布局',
46
- description: '体验 default/admin/false 三种页面壳切换方式。',
47
- action: '打开布局页',
48
- path: LAYOUTS_PATH,
49
- },
50
- ]
51
-
52
- async function pushTo(path: string) {
53
- await router.push(path)
54
- }
55
-
56
- async function relaunchToHome() {
57
- await router.nativeRouter.reLaunch({
58
- url: HOME_PATH,
59
- })
60
- }
8
+ const count = ref(0)
9
+ const doubled = computed(() => count.value * 2)
61
10
  </script>
62
11
 
63
12
  <template>
64
13
  <view class="page">
65
- <view class="hero">
66
- <view class="hero__eyebrow">
67
- 企业业务模板
68
- </view>
14
+ <view class="card">
69
15
  <view class="hero__title">
70
- 适合作为正式项目起点的首页框架
16
+ Weapp-vite + Wevu
71
17
  </view>
72
18
  <view class="hero__desc">
73
- 内置主包与分包页面结构、统一导航入口与简洁信息模块,默认呈现正式、克制且便于继续扩展的业务模板风格。
74
- </view>
75
- <view class="hero__pills">
76
- <StatusPill label="主包首页" tone="accent" />
77
- <StatusPill label="可扩展分包" tone="neutral" />
78
- <StatusPill label="适合二次开发" tone="success" />
79
- </view>
80
- </view>
81
-
82
- <view class="section">
83
- <view class="section__title">
84
- 核心指标
85
- </view>
86
- <view
87
- v-for="item in metrics"
88
- :key="item.label"
89
- class="metric-card"
90
- >
91
- <view class="metric-card__label">
92
- {{ item.label }}
93
- </view>
94
- <view class="metric-card__value">
95
- {{ item.value }}
96
- </view>
97
- <view class="metric-card__detail">
98
- {{ item.detail }}
99
- </view>
19
+ 一个尽量小的 Vue SFC 小程序起点,复杂能力示例请看 e2e-apps。
100
20
  </view>
101
- </view>
102
-
103
- <view class="section">
104
- <view class="section__title">
105
- 常用入口
21
+ <view class="counter">
22
+ <text>count: {{ count }}</text>
23
+ <text>double: {{ doubled }}</text>
106
24
  </view>
107
- <view
108
- v-for="link in quickLinks"
109
- :key="link.path"
110
- class="entry-card"
111
- >
112
- <InfoPanel
113
- eyebrow="PAGE"
114
- :title="link.title"
115
- :description="link.description"
116
- />
117
- <button class="action-btn" @tap="pushTo(link.path)">
118
- {{ link.action }}
119
- </button>
120
- </view>
121
- </view>
122
-
123
- <view class="section">
124
- <InfoPanel
125
- eyebrow="ROUTER"
126
- title="导航状态"
127
- description="模板保留路由能力作为底层基础,但将其放在辅助信息层,避免首页呈现为技术功能演示页。"
128
- />
129
- <view class="route-note">
130
- 当前路由:{{ routeSummary }}
131
- </view>
132
- <button class="action-btn action-btn--light" @tap="relaunchToHome">
133
- reLaunch 当前首页
25
+ <button class="action-btn" @tap="count += 1">
26
+ +1
134
27
  </button>
135
28
  </view>
136
29
  </view>
@@ -140,103 +33,42 @@ async function relaunchToHome() {
140
33
  .page {
141
34
  box-sizing: border-box;
142
35
  min-height: 100vh;
143
- padding: 28rpx 28rpx 40rpx;
144
- background:
145
- radial-gradient(circle at top right, rgb(59 130 246 / 12%), transparent 30%),
146
- linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
36
+ padding: 32rpx;
37
+ background: #f3f6fb;
147
38
  }
148
39
 
149
- .hero {
150
- padding: 36rpx 30rpx;
151
- background: linear-gradient(160deg, #0f172a, #1e293b 72%, #334155);
152
- border-radius: 32rpx;
153
- box-shadow: 0 24rpx 60rpx rgb(15 23 42 / 18%);
154
- }
155
-
156
- .hero__eyebrow {
157
- font-size: 22rpx;
158
- font-weight: 600;
159
- color: rgb(226 232 240 / 88%);
160
- letter-spacing: 2rpx;
40
+ .card {
41
+ padding: 32rpx;
42
+ background: #fff;
43
+ border: 2rpx solid #e2e8f0;
44
+ border-radius: 24rpx;
161
45
  }
162
46
 
163
47
  .hero__title {
164
- margin-top: 16rpx;
165
- font-size: 42rpx;
48
+ font-size: 36rpx;
166
49
  font-weight: 700;
167
- line-height: 1.35;
168
- color: #fff;
50
+ color: #0f172a;
169
51
  }
170
52
 
171
53
  .hero__desc {
172
54
  margin-top: 16rpx;
173
55
  font-size: 24rpx;
174
56
  line-height: 1.6;
175
- color: rgb(226 232 240 / 88%);
57
+ color: #475569;
176
58
  }
177
59
 
178
- .hero__pills {
60
+ .counter {
179
61
  display: flex;
180
- flex-wrap: wrap;
181
- gap: 14rpx;
182
- margin-top: 24rpx;
183
- }
184
-
185
- .section {
62
+ gap: 24rpx;
186
63
  margin-top: 24rpx;
187
- }
188
-
189
- .section__title {
190
- margin-bottom: 16rpx;
191
- font-size: 28rpx;
192
- font-weight: 700;
193
- color: #0f172a;
194
- }
195
-
196
- .metric-card,
197
- .entry-card {
198
- padding: 24rpx;
199
- margin-top: 16rpx;
200
- background: rgb(255 255 255 / 92%);
201
- border: 2rpx solid rgb(226 232 240 / 88%);
202
- border-radius: 28rpx;
203
- box-shadow: 0 12rpx 32rpx rgb(15 23 42 / 4%);
204
- }
205
-
206
- .metric-card__label {
207
- font-size: 22rpx;
208
- color: #64748b;
209
- }
210
-
211
- .metric-card__value {
212
- margin-top: 12rpx;
213
- font-size: 44rpx;
214
- font-weight: 700;
64
+ font-size: 26rpx;
215
65
  color: #0f172a;
216
66
  }
217
67
 
218
- .metric-card__detail {
219
- margin-top: 8rpx;
220
- font-size: 24rpx;
221
- line-height: 1.6;
222
- color: #475569;
223
- }
224
-
225
- .route-note {
226
- margin-top: 16rpx;
227
- font-size: 22rpx;
228
- color: #64748b;
229
- }
230
-
231
68
  .action-btn {
232
- margin-top: 18rpx;
69
+ margin-top: 24rpx;
233
70
  color: #fff;
234
71
  background: #0f172a;
235
72
  border-radius: 999rpx;
236
73
  }
237
-
238
- .action-btn--light {
239
- color: #0f172a;
240
- background: #e2e8f0;
241
- }
242
74
  </style>