create-weapp-vite 2.0.47 → 2.0.49
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.
- package/dist/cli.d.ts +3 -2
- package/dist/cli.js +66 -69
- package/dist/index.d.ts +12 -10
- package/dist/index.js +2 -8
- package/dist/src-CSQ3j3_f.js +366 -0
- package/package.json +18 -9
- package/templates/default/gitignore +1 -0
- package/templates/default/package.json +1 -1
- package/templates/default/tsconfig.app.json +1 -9
- package/templates/lib/gitignore +1 -0
- package/templates/lib/package.json +1 -1
- package/templates/lib/tsconfig.app.json +1 -9
- package/templates/tailwindcss/gitignore +1 -0
- package/templates/tailwindcss/package.json +1 -1
- package/templates/tailwindcss/tsconfig.app.json +1 -9
- package/templates/tdesign/gitignore +1 -0
- package/templates/tdesign/package.json +1 -1
- package/templates/tdesign/tsconfig.app.json +1 -9
- package/templates/vant/gitignore +1 -0
- package/templates/vant/package.json +1 -1
- package/templates/vant/tsconfig.app.json +1 -9
- package/templates/wevu/README.md +1 -0
- package/templates/wevu/auto-import-components.json +2 -2
- package/templates/wevu/gitignore +1 -0
- package/templates/wevu/package.json +1 -1
- package/templates/wevu/src/app.vue +49 -7
- package/templates/wevu/src/components/InfoPanel/index.vue +52 -0
- package/templates/wevu/src/components/StatusPill/index.vue +42 -0
- package/templates/wevu/{components.d.ts → src/components.d.ts} +4 -4
- package/templates/wevu/src/packageA/pages/workspace/index.vue +137 -0
- package/templates/wevu/src/packageB/pages/settings/index.vue +131 -0
- package/templates/wevu/src/pages/index/index.vue +169 -304
- package/templates/wevu/src/pages/overview/index.vue +149 -0
- package/templates/wevu/{typed-components.d.ts → src/typed-components.d.ts} +6 -9
- package/templates/wevu/src/typed-router.d.ts +67 -0
- package/templates/wevu/tsconfig.app.json +2 -14
- package/templates/wevu/vite.config.ts +7 -5
- package/templates/wevu-tdesign/gitignore +1 -0
- package/templates/wevu-tdesign/package.json +1 -1
- package/templates/wevu-tdesign/src/typed-router.d.ts +75 -0
- package/templates/wevu-tdesign/src/vite-env.d.ts +0 -2
- package/templates/wevu-tdesign/tsconfig.app.json +2 -14
- package/templates/wevu-tdesign/vite.config.ts +7 -0
- package/dist/chunk-UECMRNKY.js +0 -411
- package/templates/wevu/src/components/HelloWorld/index.vue +0 -473
- package/templates/wevu/src/components/InfoBanner/index.vue +0 -79
- /package/templates/wevu-tdesign/{components.d.ts → src/components.d.ts} +0 -0
- /package/templates/wevu-tdesign/{typed-components.d.ts → src/typed-components.d.ts} +0 -0
|
@@ -1,268 +1,130 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed
|
|
3
|
-
|
|
4
|
-
interface HelloActionPayload {
|
|
5
|
-
type: 'toggle' | 'copy' | 'select' | 'stats'
|
|
6
|
-
value?: string
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
type HighlightTone = 'up' | 'down' | 'flat'
|
|
10
|
-
|
|
11
|
-
interface HighlightItem {
|
|
12
|
-
key: string
|
|
13
|
-
label: string
|
|
14
|
-
value: string | number
|
|
15
|
-
tone?: HighlightTone
|
|
16
|
-
note?: string
|
|
17
|
-
}
|
|
2
|
+
import { computed } from 'wevu'
|
|
3
|
+
import { useRoute, useRouter } from 'wevu/router'
|
|
18
4
|
|
|
19
5
|
definePageJson({
|
|
20
|
-
navigationBarTitleText: '
|
|
6
|
+
navigationBarTitleText: '业务门户',
|
|
21
7
|
})
|
|
22
8
|
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
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'
|
|
26
13
|
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
group: 'template' as const,
|
|
39
|
-
done: true,
|
|
40
|
-
level: 'base' as const,
|
|
41
|
-
},
|
|
14
|
+
const route = useRoute()
|
|
15
|
+
const router = useRouter()
|
|
16
|
+
const routeSummary = computed(() => route.fullPath || `/${route.path}`)
|
|
17
|
+
|
|
18
|
+
const metrics = [
|
|
19
|
+
{ label: '本周跟进事项', value: '12', detail: '含 3 项需今日确认' },
|
|
20
|
+
{ label: '交付进度', value: '86%', detail: '版本提测准备完成' },
|
|
21
|
+
{ label: '服务可用率', value: '99.95%', detail: '核心链路运行稳定' },
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
const quickLinks = [
|
|
42
25
|
{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
level: 'advanced' as const,
|
|
26
|
+
title: '运营概览',
|
|
27
|
+
description: '查看阶段目标、团队协同与项目节奏。',
|
|
28
|
+
action: '进入概览',
|
|
29
|
+
path: OVERVIEW_PATH,
|
|
48
30
|
},
|
|
49
31
|
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
level: 'base' as const,
|
|
32
|
+
title: '项目工作台',
|
|
33
|
+
description: '集中处理待办任务、优先级与排期。',
|
|
34
|
+
action: '打开工作台',
|
|
35
|
+
path: WORKSPACE_PATH,
|
|
55
36
|
},
|
|
56
37
|
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
level: 'advanced' as const,
|
|
38
|
+
title: '系统设置',
|
|
39
|
+
description: '统一管理通知、权限与环境配置。',
|
|
40
|
+
action: '前往设置',
|
|
41
|
+
path: SETTINGS_PATH,
|
|
62
42
|
},
|
|
63
|
-
]
|
|
64
|
-
|
|
65
|
-
const doubled = computed(() => count.value * 2)
|
|
66
|
-
|
|
67
|
-
const pageClass = computed(() => {
|
|
68
|
-
return {
|
|
69
|
-
'page-empty': count.value === 0,
|
|
70
|
-
'page-energetic': count.value > 0,
|
|
71
|
-
}
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
const pageStyle = computed(() => {
|
|
75
|
-
return [
|
|
76
|
-
{
|
|
77
|
-
background: count.value > 0 ? '#eaf0ff' : '#f6f7ff',
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
borderTop: count.value > 0 ? '4rpx solid #4c6ef5' : '4rpx solid transparent',
|
|
81
|
-
},
|
|
82
|
-
]
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
const cardClass = computed(() => {
|
|
86
|
-
return [
|
|
87
|
-
{
|
|
88
|
-
'card-active': count.value > 0,
|
|
89
|
-
},
|
|
90
|
-
count.value >= 3 ? 'card-boost' : '',
|
|
91
|
-
]
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
const cardStyle = computed(() => {
|
|
95
|
-
return [
|
|
96
|
-
{
|
|
97
|
-
borderColor: count.value > 0 ? '#4c6ef5' : 'transparent',
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
borderWidth: count.value > 0 ? '2rpx' : '1rpx',
|
|
101
|
-
},
|
|
102
|
-
]
|
|
103
|
-
})
|
|
43
|
+
]
|
|
104
44
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
{
|
|
108
|
-
'btn-boost': count.value > 0,
|
|
109
|
-
},
|
|
110
|
-
count.value >= 3 ? 'btn-boost-strong' : '',
|
|
111
|
-
]
|
|
112
|
-
})
|
|
113
|
-
|
|
114
|
-
const primaryBtnStyle = computed(() => {
|
|
115
|
-
return [
|
|
116
|
-
{
|
|
117
|
-
opacity: count.value > 0 ? 0.88 : 1,
|
|
118
|
-
},
|
|
119
|
-
count.value > 0
|
|
120
|
-
? {
|
|
121
|
-
boxShadow: '0 8rpx 20rpx rgba(76, 110, 245, 0.28)',
|
|
122
|
-
}
|
|
123
|
-
: null,
|
|
124
|
-
]
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
const helloHighlights = computed<HighlightItem[]>(() => {
|
|
128
|
-
return [
|
|
129
|
-
{
|
|
130
|
-
key: 'count',
|
|
131
|
-
label: '当前计数',
|
|
132
|
-
value: count.value,
|
|
133
|
-
tone: 'up' as const,
|
|
134
|
-
note: '来自 ref 状态',
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
key: 'double',
|
|
138
|
-
label: '双倍值',
|
|
139
|
-
value: doubled.value,
|
|
140
|
-
tone: 'flat' as const,
|
|
141
|
-
note: '来自 computed',
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
key: 'feature',
|
|
145
|
-
label: '能力条目',
|
|
146
|
-
value: todos.value.length,
|
|
147
|
-
tone: 'flat' as const,
|
|
148
|
-
note: '模板清单',
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
key: 'title',
|
|
152
|
-
label: '标题长度',
|
|
153
|
-
value: message.value.length,
|
|
154
|
-
tone: message.value.length > 10 ? 'up' : 'down',
|
|
155
|
-
note: '来自 v-model',
|
|
156
|
-
},
|
|
157
|
-
]
|
|
158
|
-
})
|
|
159
|
-
|
|
160
|
-
function showToast(title: string) {
|
|
161
|
-
wx.showToast({
|
|
162
|
-
title,
|
|
163
|
-
icon: 'none',
|
|
164
|
-
duration: 1200,
|
|
165
|
-
})
|
|
45
|
+
async function pushTo(path: string) {
|
|
46
|
+
await router.push(path)
|
|
166
47
|
}
|
|
167
48
|
|
|
168
|
-
function
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
function reset() {
|
|
173
|
-
count.value = 0
|
|
174
|
-
showToast('计数已重置')
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
function handleHelloAction(payload: HelloActionPayload) {
|
|
178
|
-
if (payload.type === 'copy' && payload.value) {
|
|
179
|
-
wx.setClipboardData({
|
|
180
|
-
data: payload.value,
|
|
181
|
-
})
|
|
182
|
-
return
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
if (payload.type === 'toggle') {
|
|
186
|
-
showToast(`面板状态:${payload.value === 'true' ? '展开' : '收起'}`)
|
|
187
|
-
return
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
if (payload.type === 'select' && payload.value) {
|
|
191
|
-
activeGroup.value = payload.value
|
|
192
|
-
showToast(`当前焦点:${payload.value}`)
|
|
193
|
-
return
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
if (payload.type === 'stats' && payload.value) {
|
|
197
|
-
console.log(`[wevu] hello progress: ${payload.value}%`)
|
|
198
|
-
}
|
|
49
|
+
async function relaunchToHome() {
|
|
50
|
+
await router.nativeRouter.reLaunch({
|
|
51
|
+
url: HOME_PATH,
|
|
52
|
+
})
|
|
199
53
|
}
|
|
200
|
-
|
|
201
|
-
watch(count, (newValue, oldValue) => {
|
|
202
|
-
console.log(`[wevu] count changed: ${oldValue} -> ${newValue}`)
|
|
203
|
-
})
|
|
204
54
|
</script>
|
|
205
55
|
|
|
206
56
|
<template>
|
|
207
|
-
<view class="page"
|
|
208
|
-
<
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
57
|
+
<view class="page">
|
|
58
|
+
<view class="hero">
|
|
59
|
+
<view class="hero__eyebrow">
|
|
60
|
+
企业业务模板
|
|
61
|
+
</view>
|
|
62
|
+
<view class="hero__title">
|
|
63
|
+
适合作为正式项目起点的首页框架
|
|
64
|
+
</view>
|
|
65
|
+
<view class="hero__desc">
|
|
66
|
+
内置主包与分包页面结构、统一导航入口与简洁信息模块,默认呈现正式、克制且便于继续扩展的业务模板风格。
|
|
67
|
+
</view>
|
|
68
|
+
<view class="hero__pills">
|
|
69
|
+
<StatusPill label="主包首页" tone="accent" />
|
|
70
|
+
<StatusPill label="可扩展分包" tone="neutral" />
|
|
71
|
+
<StatusPill label="适合二次开发" tone="success" />
|
|
72
|
+
</view>
|
|
73
|
+
</view>
|
|
213
74
|
|
|
214
|
-
<
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
75
|
+
<view class="section">
|
|
76
|
+
<view class="section__title">
|
|
77
|
+
核心指标
|
|
78
|
+
</view>
|
|
79
|
+
<view
|
|
80
|
+
v-for="item in metrics"
|
|
81
|
+
:key="item.label"
|
|
82
|
+
class="metric-card"
|
|
83
|
+
>
|
|
84
|
+
<view class="metric-card__label">
|
|
85
|
+
{{ item.label }}
|
|
86
|
+
</view>
|
|
87
|
+
<view class="metric-card__value">
|
|
88
|
+
{{ item.value }}
|
|
89
|
+
</view>
|
|
90
|
+
<view class="metric-card__detail">
|
|
91
|
+
{{ item.detail }}
|
|
226
92
|
</view>
|
|
227
|
-
</template>
|
|
228
|
-
</HelloWorld>
|
|
229
|
-
|
|
230
|
-
<view class="card" :class="cardClass" :style="cardStyle">
|
|
231
|
-
<view class="row">
|
|
232
|
-
<text class="label">
|
|
233
|
-
当前计数:{{ count }}
|
|
234
|
-
</text>
|
|
235
|
-
<text class="label">
|
|
236
|
-
双倍:{{ doubled }}
|
|
237
|
-
</text>
|
|
238
93
|
</view>
|
|
94
|
+
</view>
|
|
239
95
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
</button>
|
|
244
|
-
<button class="btn danger" @tap.stop="reset">
|
|
245
|
-
重置
|
|
246
|
-
</button>
|
|
96
|
+
<view class="section">
|
|
97
|
+
<view class="section__title">
|
|
98
|
+
常用入口
|
|
247
99
|
</view>
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
100
|
+
<view
|
|
101
|
+
v-for="link in quickLinks"
|
|
102
|
+
:key="link.path"
|
|
103
|
+
class="entry-card"
|
|
104
|
+
>
|
|
105
|
+
<InfoPanel
|
|
106
|
+
eyebrow="PAGE"
|
|
107
|
+
:title="link.title"
|
|
108
|
+
:description="link.description"
|
|
109
|
+
/>
|
|
110
|
+
<button class="action-btn" @tap="pushTo(link.path)">
|
|
111
|
+
{{ link.action }}
|
|
112
|
+
</button>
|
|
253
113
|
</view>
|
|
254
|
-
|
|
114
|
+
</view>
|
|
255
115
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
</view>
|
|
116
|
+
<view class="section">
|
|
117
|
+
<InfoPanel
|
|
118
|
+
eyebrow="ROUTER"
|
|
119
|
+
title="导航状态"
|
|
120
|
+
description="模板保留路由能力作为底层基础,但将其放在辅助信息层,避免首页呈现为技术功能演示页。"
|
|
121
|
+
/>
|
|
122
|
+
<view class="route-note">
|
|
123
|
+
当前路由:{{ routeSummary }}
|
|
265
124
|
</view>
|
|
125
|
+
<button class="action-btn action-btn--light" @tap="relaunchToHome">
|
|
126
|
+
reLaunch 当前首页
|
|
127
|
+
</button>
|
|
266
128
|
</view>
|
|
267
129
|
</view>
|
|
268
130
|
</template>
|
|
@@ -271,100 +133,103 @@ watch(count, (newValue, oldValue) => {
|
|
|
271
133
|
.page {
|
|
272
134
|
box-sizing: border-box;
|
|
273
135
|
min-height: 100vh;
|
|
274
|
-
padding:
|
|
275
|
-
background:
|
|
136
|
+
padding: 28rpx 28rpx 40rpx;
|
|
137
|
+
background:
|
|
138
|
+
radial-gradient(circle at top right, rgb(59 130 246 / 12%), transparent 30%),
|
|
139
|
+
linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
|
|
276
140
|
}
|
|
277
141
|
|
|
278
|
-
.
|
|
279
|
-
|
|
142
|
+
.hero {
|
|
143
|
+
padding: 36rpx 30rpx;
|
|
144
|
+
background: linear-gradient(160deg, #0f172a, #1e293b 72%, #334155);
|
|
145
|
+
border-radius: 32rpx;
|
|
146
|
+
box-shadow: 0 24rpx 60rpx rgb(15 23 42 / 18%);
|
|
280
147
|
}
|
|
281
148
|
|
|
282
|
-
.
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
padding: 32rpx;
|
|
288
|
-
margin-top: 24rpx;
|
|
289
|
-
background: #fff;
|
|
290
|
-
border: 2rpx solid transparent;
|
|
291
|
-
border-radius: 24rpx;
|
|
292
|
-
box-shadow: 0 12rpx 32rpx rgb(44 44 84 / 10%);
|
|
149
|
+
.hero__eyebrow {
|
|
150
|
+
font-size: 22rpx;
|
|
151
|
+
font-weight: 600;
|
|
152
|
+
color: rgb(226 232 240 / 88%);
|
|
153
|
+
letter-spacing: 2rpx;
|
|
293
154
|
}
|
|
294
155
|
|
|
295
|
-
.
|
|
296
|
-
|
|
156
|
+
.hero__title {
|
|
157
|
+
margin-top: 16rpx;
|
|
158
|
+
font-size: 42rpx;
|
|
159
|
+
font-weight: 700;
|
|
160
|
+
line-height: 1.35;
|
|
161
|
+
color: #fff;
|
|
297
162
|
}
|
|
298
163
|
|
|
299
|
-
.
|
|
300
|
-
|
|
164
|
+
.hero__desc {
|
|
165
|
+
margin-top: 16rpx;
|
|
166
|
+
font-size: 24rpx;
|
|
167
|
+
line-height: 1.6;
|
|
168
|
+
color: rgb(226 232 240 / 88%);
|
|
301
169
|
}
|
|
302
170
|
|
|
303
|
-
.
|
|
171
|
+
.hero__pills {
|
|
304
172
|
display: flex;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
margin-bottom: 16rpx;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
.label {
|
|
312
|
-
font-size: 30rpx;
|
|
313
|
-
color: #1c1c3c;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
.actions {
|
|
317
|
-
margin: 24rpx 0;
|
|
173
|
+
flex-wrap: wrap;
|
|
174
|
+
gap: 14rpx;
|
|
175
|
+
margin-top: 24rpx;
|
|
318
176
|
}
|
|
319
177
|
|
|
320
|
-
.
|
|
321
|
-
|
|
322
|
-
line-height: 96rpx;
|
|
323
|
-
color: #fff;
|
|
324
|
-
border-radius: 16rpx;
|
|
178
|
+
.section {
|
|
179
|
+
margin-top: 24rpx;
|
|
325
180
|
}
|
|
326
181
|
|
|
327
|
-
.
|
|
328
|
-
|
|
182
|
+
.section__title {
|
|
183
|
+
margin-bottom: 16rpx;
|
|
184
|
+
font-size: 28rpx;
|
|
185
|
+
font-weight: 700;
|
|
186
|
+
color: #0f172a;
|
|
329
187
|
}
|
|
330
188
|
|
|
331
|
-
.
|
|
332
|
-
|
|
189
|
+
.metric-card,
|
|
190
|
+
.entry-card {
|
|
191
|
+
padding: 24rpx;
|
|
192
|
+
margin-top: 16rpx;
|
|
193
|
+
background: rgb(255 255 255 / 92%);
|
|
194
|
+
border: 2rpx solid rgb(226 232 240 / 88%);
|
|
195
|
+
border-radius: 28rpx;
|
|
196
|
+
box-shadow: 0 12rpx 32rpx rgb(15 23 42 / 4%);
|
|
333
197
|
}
|
|
334
198
|
|
|
335
|
-
.
|
|
336
|
-
|
|
199
|
+
.metric-card__label {
|
|
200
|
+
font-size: 22rpx;
|
|
201
|
+
color: #64748b;
|
|
337
202
|
}
|
|
338
203
|
|
|
339
|
-
.
|
|
340
|
-
|
|
204
|
+
.metric-card__value {
|
|
205
|
+
margin-top: 12rpx;
|
|
206
|
+
font-size: 44rpx;
|
|
207
|
+
font-weight: 700;
|
|
208
|
+
color: #0f172a;
|
|
341
209
|
}
|
|
342
210
|
|
|
343
|
-
.
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
background: #fff;
|
|
349
|
-
border: 2rpx solid #e9ecef;
|
|
350
|
-
border-radius: 16rpx;
|
|
211
|
+
.metric-card__detail {
|
|
212
|
+
margin-top: 8rpx;
|
|
213
|
+
font-size: 24rpx;
|
|
214
|
+
line-height: 1.6;
|
|
215
|
+
color: #475569;
|
|
351
216
|
}
|
|
352
217
|
|
|
353
|
-
.
|
|
354
|
-
margin-
|
|
355
|
-
font-size:
|
|
356
|
-
color: #
|
|
218
|
+
.route-note {
|
|
219
|
+
margin-top: 16rpx;
|
|
220
|
+
font-size: 22rpx;
|
|
221
|
+
color: #64748b;
|
|
357
222
|
}
|
|
358
223
|
|
|
359
|
-
.
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
background: #
|
|
363
|
-
border-radius:
|
|
224
|
+
.action-btn {
|
|
225
|
+
margin-top: 18rpx;
|
|
226
|
+
color: #fff;
|
|
227
|
+
background: #0f172a;
|
|
228
|
+
border-radius: 999rpx;
|
|
364
229
|
}
|
|
365
230
|
|
|
366
|
-
.
|
|
367
|
-
|
|
368
|
-
|
|
231
|
+
.action-btn--light {
|
|
232
|
+
color: #0f172a;
|
|
233
|
+
background: #e2e8f0;
|
|
369
234
|
}
|
|
370
235
|
</style>
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'wevu'
|
|
3
|
+
import { useRoute, useRouter } from 'wevu/router'
|
|
4
|
+
|
|
5
|
+
definePageJson({
|
|
6
|
+
navigationBarTitleText: '运营概览',
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
const HOME_PATH = '/pages/index/index'
|
|
10
|
+
const WORKSPACE_PATH = '/packageA/pages/workspace/index'
|
|
11
|
+
const SETTINGS_PATH = '/packageB/pages/settings/index'
|
|
12
|
+
|
|
13
|
+
const route = useRoute()
|
|
14
|
+
const router = useRouter()
|
|
15
|
+
|
|
16
|
+
const summary = computed(() => {
|
|
17
|
+
return route.fullPath || `/${route.path}`
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const focusItems = [
|
|
21
|
+
{
|
|
22
|
+
title: '项目节奏稳定',
|
|
23
|
+
description: '需求冻结、设计评审与联调时间线已经对齐,适合继续扩展到实际业务场景。',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: '协作角色清晰',
|
|
27
|
+
description: '可在此基础上继续接入团队成员、审批流或项目动态等正式模块。',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: '模板结构简洁',
|
|
31
|
+
description: '页面布局保留必要层级,既能做展示页,也能平滑承接后台工作流。',
|
|
32
|
+
},
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
async function toSettings() {
|
|
36
|
+
await router.push(SETTINGS_PATH)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async function backHome() {
|
|
40
|
+
await router.push(HOME_PATH)
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<view class="page">
|
|
46
|
+
<view class="card">
|
|
47
|
+
<view class="card__eyebrow">
|
|
48
|
+
Overview
|
|
49
|
+
</view>
|
|
50
|
+
<view class="card__title">
|
|
51
|
+
运营概览
|
|
52
|
+
</view>
|
|
53
|
+
<view class="card__desc">
|
|
54
|
+
用正式模板的方式承载项目状态、团队节奏和阶段重点,而不是单纯展示路由跳转能力。
|
|
55
|
+
</view>
|
|
56
|
+
<view class="card__summary">
|
|
57
|
+
当前路由:{{ summary }}
|
|
58
|
+
</view>
|
|
59
|
+
</view>
|
|
60
|
+
|
|
61
|
+
<view
|
|
62
|
+
v-for="item in focusItems"
|
|
63
|
+
:key="item.title"
|
|
64
|
+
class="panel-wrap"
|
|
65
|
+
>
|
|
66
|
+
<InfoPanel
|
|
67
|
+
eyebrow="FOCUS"
|
|
68
|
+
:title="item.title"
|
|
69
|
+
:description="item.description"
|
|
70
|
+
/>
|
|
71
|
+
</view>
|
|
72
|
+
|
|
73
|
+
<view class="actions">
|
|
74
|
+
<button class="action-btn" @tap="router.push(WORKSPACE_PATH)">
|
|
75
|
+
进入项目工作台
|
|
76
|
+
</button>
|
|
77
|
+
<button class="action-btn action-btn--secondary" @tap="toSettings">
|
|
78
|
+
查看系统设置
|
|
79
|
+
</button>
|
|
80
|
+
<button class="action-btn action-btn--ghost" @tap="backHome">
|
|
81
|
+
返回业务门户
|
|
82
|
+
</button>
|
|
83
|
+
</view>
|
|
84
|
+
</view>
|
|
85
|
+
</template>
|
|
86
|
+
|
|
87
|
+
<style>
|
|
88
|
+
.page {
|
|
89
|
+
box-sizing: border-box;
|
|
90
|
+
min-height: 100vh;
|
|
91
|
+
padding: 30rpx;
|
|
92
|
+
background:
|
|
93
|
+
radial-gradient(circle at top left, rgb(16 185 129 / 10%), transparent 28%),
|
|
94
|
+
linear-gradient(180deg, #f6fbf8 0%, #edf5f1 100%);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.card {
|
|
98
|
+
padding: 32rpx 28rpx;
|
|
99
|
+
background: #fff;
|
|
100
|
+
border: 2rpx solid #d1fae5;
|
|
101
|
+
border-radius: 30rpx;
|
|
102
|
+
box-shadow: 0 16rpx 36rpx rgb(15 23 42 / 5%);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.card__eyebrow {
|
|
106
|
+
font-size: 22rpx;
|
|
107
|
+
font-weight: 600;
|
|
108
|
+
color: #0f766e;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.card__title {
|
|
112
|
+
margin-top: 10rpx;
|
|
113
|
+
font-size: 40rpx;
|
|
114
|
+
font-weight: 700;
|
|
115
|
+
color: #134e4a;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.card__desc,
|
|
119
|
+
.card__summary {
|
|
120
|
+
margin-top: 12rpx;
|
|
121
|
+
font-size: 24rpx;
|
|
122
|
+
line-height: 1.6;
|
|
123
|
+
color: #335c58;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.panel-wrap {
|
|
127
|
+
margin-top: 18rpx;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.actions {
|
|
131
|
+
margin-top: 10rpx;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.action-btn {
|
|
135
|
+
margin-top: 18rpx;
|
|
136
|
+
color: #fff;
|
|
137
|
+
background: #0f766e;
|
|
138
|
+
border-radius: 999rpx;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.action-btn--secondary {
|
|
142
|
+
background: #1d4ed8;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.action-btn--ghost {
|
|
146
|
+
color: #134e4a;
|
|
147
|
+
background: #d1fae5;
|
|
148
|
+
}
|
|
149
|
+
</style>
|