create-weapp-vite 2.3.15 → 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.
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{src-D8uqfCKh.js → src-C8kzMXK7.js} +1 -1
- package/package.json +1 -1
- package/templates/wevu/README.md +3 -3
- package/templates/wevu/package.json +1 -1
- package/templates/wevu/src/app.vue +1 -60
- package/templates/wevu/src/pages/index/index.vue +26 -194
- package/templates/wevu/src/pages/layouts/index.vue +0 -18
- package/templates/wevu/weapp-vite.config.ts +0 -7
- package/templates/wevu-tdesign/README.md +3 -6
- package/templates/wevu-tdesign/package.json +1 -1
- package/templates/wevu-tdesign/project.private.config.json +0 -66
- package/templates/wevu-tdesign/src/app.vue +1 -73
- package/templates/wevu-tdesign/src/pages/index/index.vue +19 -362
- package/templates/wevu/src/components/InfoPanel/index.vue +0 -52
- package/templates/wevu/src/components/StatusPill/index.vue +0 -42
- package/templates/wevu/src/packageA/pages/workspace/index.vue +0 -137
- package/templates/wevu/src/packageB/pages/settings/index.vue +0 -131
- package/templates/wevu/src/pages/overview/index.vue +0 -149
- package/templates/wevu-tdesign/public/tabbar/ability-active.png +0 -0
- package/templates/wevu-tdesign/public/tabbar/ability.png +0 -0
- package/templates/wevu-tdesign/public/tabbar/data-active.png +0 -0
- package/templates/wevu-tdesign/public/tabbar/data.png +0 -0
- package/templates/wevu-tdesign/public/tabbar/form-active.png +0 -0
- package/templates/wevu-tdesign/public/tabbar/form.png +0 -0
- package/templates/wevu-tdesign/public/tabbar/home-active.png +0 -0
- package/templates/wevu-tdesign/public/tabbar/home.png +0 -0
- package/templates/wevu-tdesign/public/tabbar/list-active.png +0 -0
- package/templates/wevu-tdesign/public/tabbar/list.png +0 -0
- package/templates/wevu-tdesign/src/components/EmptyState/index.vue +0 -36
- package/templates/wevu-tdesign/src/components/FilterBar/index.vue +0 -64
- package/templates/wevu-tdesign/src/components/FormRow/index.vue +0 -43
- package/templates/wevu-tdesign/src/components/FormStep/index.vue +0 -48
- package/templates/wevu-tdesign/src/components/KpiBoard/index.vue +0 -145
- package/templates/wevu-tdesign/src/components/QuickActionGrid/index.vue +0 -79
- package/templates/wevu-tdesign/src/components/ResultCard/index.vue +0 -51
- package/templates/wevu-tdesign/src/components/SectionTitle/index.vue +0 -34
- package/templates/wevu-tdesign/src/components/TrendCard/index.vue +0 -101
- package/templates/wevu-tdesign/src/components/VirtualHostClassDemo/BrokenCard.vue +0 -46
- package/templates/wevu-tdesign/src/components/VirtualHostClassDemo/FixedExternalClassCard.vue +0 -50
- package/templates/wevu-tdesign/src/components/VirtualHostClassDemo/RecommendedCard.vue +0 -53
- package/templates/wevu-tdesign/src/hooks/useDialog.ts +0 -205
- package/templates/wevu-tdesign/src/hooks/useFormBinder.ts +0 -17
- package/templates/wevu-tdesign/src/hooks/useLayoutFeedbackBridge.ts +0 -17
- package/templates/wevu-tdesign/src/hooks/usePullDownRefresh.ts +0 -12
- package/templates/wevu-tdesign/src/hooks/useToast.ts +0 -100
- package/templates/wevu-tdesign/src/layouts/admin.vue +0 -41
- package/templates/wevu-tdesign/src/layouts/default.vue +0 -23
- package/templates/wevu-tdesign/src/pages/ability/index.vue +0 -164
- package/templates/wevu-tdesign/src/pages/data/index.vue +0 -189
- package/templates/wevu-tdesign/src/pages/form/index.vue +0 -271
- package/templates/wevu-tdesign/src/pages/layout-feedback/components/FeedbackCallerCard.vue +0 -79
- package/templates/wevu-tdesign/src/pages/layout-feedback/index.vue +0 -211
- package/templates/wevu-tdesign/src/pages/layout-store/index.vue +0 -127
- package/templates/wevu-tdesign/src/pages/layouts/index.vue +0 -120
- package/templates/wevu-tdesign/src/pages/list/index.vue +0 -146
- package/templates/wevu-tdesign/src/stores/layoutInteractionDemo.ts +0 -129
- package/templates/wevu-tdesign/src/subpackages/ability/index.vue +0 -103
- package/templates/wevu-tdesign/src/subpackages/lab/class-binding/index.vue +0 -440
- package/templates/wevu-tdesign/src/subpackages/lab/index.vue +0 -169
- package/templates/wevu-tdesign/src/subpackages/lab/virtual-host-class/index.vue +0 -94
- package/templates/wevu-tdesign/src/types/action.ts +0 -14
- package/templates/wevu-tdesign/src/types/list.ts +0 -17
- package/templates/wevu-tdesign/src/utils/changeEvent.ts +0 -53
- package/templates/wevu-tdesign/src/utils/listFilters.ts +0 -34
|
@@ -1,380 +1,37 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import { computed, getCurrentInstance, ref, resolveLayoutBridge, resolveLayoutHost, watch } from 'wevu'
|
|
5
|
-
import { wpi } from 'wevu/api'
|
|
6
|
-
import KpiBoard from '@/components/KpiBoard/index.vue'
|
|
7
|
-
import QuickActionGrid from '@/components/QuickActionGrid/index.vue'
|
|
8
|
-
import { LAYOUT_TOAST_BRIDGE_KEY } from '@/hooks/useLayoutFeedbackBridge'
|
|
9
|
-
import { usePullDownRefresh } from '@/hooks/usePullDownRefresh'
|
|
10
|
-
import { useToast } from '@/hooks/useToast'
|
|
2
|
+
import { computed, ref } from 'wevu'
|
|
11
3
|
|
|
12
4
|
definePageJson({
|
|
13
|
-
navigationBarTitleText: '
|
|
14
|
-
enablePullDownRefresh: true,
|
|
5
|
+
navigationBarTitleText: 'TDesign 模板',
|
|
15
6
|
backgroundColor: '#f6f7fb',
|
|
16
7
|
})
|
|
17
8
|
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
const noticeText = ref('欢迎体验 wevu + weapp-vite + TDesign 模板,已启用分包与多页面导航。')
|
|
22
|
-
const lastUpdated = ref('刚刚')
|
|
23
|
-
const refreshSeed = ref(1)
|
|
24
|
-
|
|
25
|
-
const kpiItems = computed(() => {
|
|
26
|
-
const seed = refreshSeed.value
|
|
27
|
-
return [
|
|
28
|
-
{
|
|
29
|
-
key: 'visits',
|
|
30
|
-
label: '今日访问',
|
|
31
|
-
value: 1280 + seed * 3,
|
|
32
|
-
unit: '次',
|
|
33
|
-
delta: 6 + seed,
|
|
34
|
-
footnote: '较昨日',
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
key: 'conversion',
|
|
38
|
-
label: '转化率',
|
|
39
|
-
value: 24 + seed,
|
|
40
|
-
unit: '%',
|
|
41
|
-
delta: 2,
|
|
42
|
-
footnote: '近 7 日',
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
key: 'tickets',
|
|
46
|
-
label: '待处理',
|
|
47
|
-
value: 18 - seed,
|
|
48
|
-
unit: '单',
|
|
49
|
-
delta: -1,
|
|
50
|
-
footnote: '来自清单',
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
key: 'satisfaction',
|
|
54
|
-
label: '满意度',
|
|
55
|
-
value: 4.8,
|
|
56
|
-
unit: '分',
|
|
57
|
-
delta: 0.2,
|
|
58
|
-
footnote: '客服评分',
|
|
59
|
-
},
|
|
60
|
-
]
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
const quickActions = ref<QuickActionItem[]>([
|
|
64
|
-
{
|
|
65
|
-
key: 'data',
|
|
66
|
-
title: '数据洞察',
|
|
67
|
-
description: '仪表盘与趋势',
|
|
68
|
-
icon: 'chart-analytics',
|
|
69
|
-
tag: 'KPI',
|
|
70
|
-
tone: 'brand',
|
|
71
|
-
path: '/pages/data/index',
|
|
72
|
-
type: 'tab',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
key: 'form',
|
|
76
|
-
title: '流程表单',
|
|
77
|
-
description: '多步录入',
|
|
78
|
-
icon: 'edit-1',
|
|
79
|
-
tag: 'Flow',
|
|
80
|
-
tone: 'neutral',
|
|
81
|
-
path: '/pages/form/index',
|
|
82
|
-
type: 'tab',
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
key: 'list',
|
|
86
|
-
title: '清单看板',
|
|
87
|
-
description: '筛选与列表',
|
|
88
|
-
icon: 'view-list',
|
|
89
|
-
tag: 'List',
|
|
90
|
-
tone: 'neutral',
|
|
91
|
-
path: '/pages/list/index',
|
|
92
|
-
type: 'tab',
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
key: 'ability',
|
|
96
|
-
title: '能力中心',
|
|
97
|
-
description: '小程序 API',
|
|
98
|
-
icon: 'app',
|
|
99
|
-
tag: 'API',
|
|
100
|
-
tone: 'brand',
|
|
101
|
-
path: '/pages/ability/index',
|
|
102
|
-
type: 'tab',
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
key: 'layouts',
|
|
106
|
-
title: '布局能力',
|
|
107
|
-
description: 'default / admin / false',
|
|
108
|
-
icon: 'layers',
|
|
109
|
-
tag: 'Layout',
|
|
110
|
-
tone: 'brand',
|
|
111
|
-
path: '/pages/layouts/index',
|
|
112
|
-
type: 'sub',
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
key: 'layout-feedback',
|
|
116
|
-
title: 'Layout 通信',
|
|
117
|
-
description: '页面/组件调用 layout',
|
|
118
|
-
icon: 'chat-bubble',
|
|
119
|
-
tag: 'Bridge',
|
|
120
|
-
tone: 'brand',
|
|
121
|
-
path: '/pages/layout-feedback/index',
|
|
122
|
-
type: 'sub',
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
key: 'layout-store',
|
|
126
|
-
title: 'Store 调用 Layout',
|
|
127
|
-
description: 'store 驱动 layout 宿主',
|
|
128
|
-
icon: 'layers',
|
|
129
|
-
tag: 'Store',
|
|
130
|
-
tone: 'brand',
|
|
131
|
-
path: '/pages/layout-store/index',
|
|
132
|
-
type: 'sub',
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
key: 'lab',
|
|
136
|
-
title: '组件实验室',
|
|
137
|
-
description: 'TDesign 组件',
|
|
138
|
-
icon: 'grid-view',
|
|
139
|
-
tag: 'Lab',
|
|
140
|
-
tone: 'neutral',
|
|
141
|
-
path: '/subpackages/lab/index',
|
|
142
|
-
type: 'sub',
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
key: 'class-binding',
|
|
146
|
-
title: 'Class 绑定',
|
|
147
|
-
description: '对象/数组语法',
|
|
148
|
-
icon: 'grid-view',
|
|
149
|
-
tag: 'Vue',
|
|
150
|
-
tone: 'brand',
|
|
151
|
-
path: '/subpackages/lab/class-binding/index',
|
|
152
|
-
type: 'sub',
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
key: 'ability-lab',
|
|
156
|
-
title: 'API 场景',
|
|
157
|
-
description: '系统信息',
|
|
158
|
-
icon: 'share',
|
|
159
|
-
tag: 'Sub',
|
|
160
|
-
tone: 'neutral',
|
|
161
|
-
path: '/subpackages/ability/index',
|
|
162
|
-
type: 'sub',
|
|
163
|
-
},
|
|
164
|
-
])
|
|
165
|
-
|
|
166
|
-
const featureTags = [
|
|
167
|
-
'Composition API',
|
|
168
|
-
'SubPackages',
|
|
169
|
-
'Auto Import',
|
|
170
|
-
'Tailwind',
|
|
171
|
-
]
|
|
172
|
-
|
|
173
|
-
watch(refreshSeed, () => {
|
|
174
|
-
lastUpdated.value = `更新于 ${new Date().toLocaleTimeString()}`
|
|
175
|
-
})
|
|
176
|
-
|
|
177
|
-
function nextRefreshSeedValue() {
|
|
178
|
-
return refreshSeed.value >= 9 ? 1 : refreshSeed.value + 1
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
function refreshDashboard() {
|
|
182
|
-
refreshSeed.value = nextRefreshSeedValue()
|
|
183
|
-
showToast('指标已刷新')
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
function inspectLayoutToastBridge() {
|
|
187
|
-
const bridge = resolveLayoutBridge(LAYOUT_TOAST_BRIDGE_KEY, pageInstance)
|
|
188
|
-
const layoutByPage = pageInstance?.selectComponent?.('weapp-layout-default')
|
|
189
|
-
?? pageInstance?.selectComponent?.('.weapp-layout-default')
|
|
190
|
-
?? null
|
|
191
|
-
const toastFromBridge = resolveLayoutHost(LAYOUT_TOAST_BRIDGE_KEY, { context: pageInstance })
|
|
192
|
-
|
|
193
|
-
return {
|
|
194
|
-
bridgeResolved: Boolean(bridge),
|
|
195
|
-
bridgeIsPage: bridge === pageInstance,
|
|
196
|
-
bridgeHasSelectComponent: typeof bridge?.selectComponent === 'function',
|
|
197
|
-
layoutFoundByPage: Boolean(layoutByPage),
|
|
198
|
-
toastFoundByBridge: Boolean(toastFromBridge),
|
|
199
|
-
bridgeKeys: bridge ? Object.keys(bridge).slice(0, 20) : [],
|
|
200
|
-
layoutKeys: layoutByPage ? Object.keys(layoutByPage).slice(0, 20) : [],
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
void inspectLayoutToastBridge
|
|
205
|
-
|
|
206
|
-
function runLayoutToastE2E() {
|
|
207
|
-
refreshSeed.value = nextRefreshSeedValue()
|
|
208
|
-
const bridgeState = inspectLayoutToastBridge()
|
|
209
|
-
setTimeout(() => {
|
|
210
|
-
showToast('指标已刷新')
|
|
211
|
-
}, 0)
|
|
212
|
-
return {
|
|
213
|
-
...bridgeState,
|
|
214
|
-
refreshSeed: refreshSeed.value,
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
void runLayoutToastE2E
|
|
219
|
-
|
|
220
|
-
usePullDownRefresh(refreshDashboard)
|
|
221
|
-
|
|
222
|
-
async function onQuickAction(action: QuickActionItem) {
|
|
223
|
-
if (!action.path) {
|
|
224
|
-
showToast('该入口暂未配置')
|
|
225
|
-
return
|
|
226
|
-
}
|
|
227
|
-
if (action.type === 'tab') {
|
|
228
|
-
await wpi.switchTab({
|
|
229
|
-
url: action.path,
|
|
230
|
-
})
|
|
231
|
-
return
|
|
232
|
-
}
|
|
233
|
-
await wpi.navigateTo({
|
|
234
|
-
url: action.path,
|
|
235
|
-
})
|
|
236
|
-
}
|
|
9
|
+
const count = ref(0)
|
|
10
|
+
const buttonText = computed(() => `已点击 ${count.value} 次`)
|
|
237
11
|
</script>
|
|
238
12
|
|
|
239
13
|
<template>
|
|
240
|
-
<view class="min-h-screen bg-[#f6f7fb] px-[28rpx]
|
|
241
|
-
<view class="rounded-[28rpx] bg-
|
|
242
|
-
<
|
|
243
|
-
|
|
244
|
-
</
|
|
245
|
-
<
|
|
246
|
-
|
|
247
|
-
</text>
|
|
248
|
-
<view class="mt-[12rpx] flex flex-wrap gap-[8rpx]">
|
|
249
|
-
<t-tag v-for="tag in featureTags" :key="tag" size="small" theme="primary" variant="dark">
|
|
250
|
-
{{ tag }}
|
|
251
|
-
</t-tag>
|
|
14
|
+
<view class="min-h-screen bg-[#f6f7fb] px-[28rpx] py-[32rpx] text-[#1f1a3f]">
|
|
15
|
+
<view class="rounded-[28rpx] bg-white p-[28rpx] shadow-[0_18rpx_40rpx_rgba(17,24,39,0.08)]">
|
|
16
|
+
<t-tag theme="primary" variant="light">
|
|
17
|
+
wevu
|
|
18
|
+
</t-tag>
|
|
19
|
+
<view class="mt-[16rpx] text-[38rpx] font-semibold">
|
|
20
|
+
TDesign 最小模板
|
|
252
21
|
</view>
|
|
253
|
-
<view class="mt-[
|
|
254
|
-
|
|
255
|
-
{{ lastUpdated }}
|
|
256
|
-
</text>
|
|
257
|
-
<view id="refresh-dashboard-trigger" @tap="refreshDashboard">
|
|
258
|
-
<t-button size="small" theme="default" variant="outline">
|
|
259
|
-
刷新指标
|
|
260
|
-
</t-button>
|
|
261
|
-
</view>
|
|
22
|
+
<view class="mt-[12rpx] text-[24rpx] leading-[1.6] text-[#64748b]">
|
|
23
|
+
保留 Vue SFC、Tailwind CSS 与 TDesign 自动导入的最小组合,复杂验证场景已迁到 e2e-apps。
|
|
262
24
|
</view>
|
|
263
|
-
</view>
|
|
264
|
-
|
|
265
|
-
<view class="mt-[16rpx]">
|
|
266
|
-
<t-notice-bar theme="info" :content="noticeText" />
|
|
267
|
-
</view>
|
|
268
|
-
|
|
269
|
-
<view class="mt-[20rpx]">
|
|
270
|
-
<KpiBoard title="今日概览" subtitle="实时跟踪业务健康度" :items="kpiItems">
|
|
271
|
-
<template #action>
|
|
272
|
-
<t-button size="small" theme="primary" variant="outline" @tap="refreshDashboard">
|
|
273
|
-
重新计算
|
|
274
|
-
</t-button>
|
|
275
|
-
</template>
|
|
276
|
-
<template #items="{ items }">
|
|
277
|
-
<view v-for="card in items" :key="card.key" class="rounded-[18rpx] bg-[#f4f6ff] p-[16rpx]">
|
|
278
|
-
<view class="flex items-center justify-between">
|
|
279
|
-
<text class="text-[22rpx] text-[#51517c]">
|
|
280
|
-
{{ card.item.label }}
|
|
281
|
-
</text>
|
|
282
|
-
<t-tag v-if="card.isLeading" size="small" theme="warning" variant="light">
|
|
283
|
-
热点
|
|
284
|
-
</t-tag>
|
|
285
|
-
</view>
|
|
286
|
-
<view class="mt-[12rpx] flex items-end justify-between">
|
|
287
|
-
<view class="flex items-baseline gap-[6rpx]">
|
|
288
|
-
<text class="text-[32rpx] font-semibold text-[#1f1a3f]">
|
|
289
|
-
{{ card.item.value }}
|
|
290
|
-
</text>
|
|
291
|
-
<text v-if="card.item.unit" class="text-[20rpx] text-[#7a7aa0]">
|
|
292
|
-
{{ card.item.unit }}
|
|
293
|
-
</text>
|
|
294
|
-
</view>
|
|
295
|
-
<text
|
|
296
|
-
class="text-[20rpx] font-semibold"
|
|
297
|
-
:class="card.tone === 'positive' ? 'text-[#1b7a3a]' : card.tone === 'negative' ? 'text-[#b42318]' : 'text-[#64748b]'"
|
|
298
|
-
>
|
|
299
|
-
{{ card.tone === 'positive' ? '↑' : card.tone === 'negative' ? '↓' : '→' }}
|
|
300
|
-
{{ card.item.delta ?? '--' }}
|
|
301
|
-
</text>
|
|
302
|
-
</view>
|
|
303
|
-
<text v-if="card.item.footnote" class="mt-[6rpx] block text-[20rpx] text-[#7a7aa0]">
|
|
304
|
-
{{ card.item.footnote }}
|
|
305
|
-
</text>
|
|
306
|
-
</view>
|
|
307
|
-
</template>
|
|
308
|
-
</KpiBoard>
|
|
309
|
-
</view>
|
|
310
25
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
subtitle="覆盖主包与分包页面"
|
|
315
|
-
:items="quickActions"
|
|
316
|
-
@select="onQuickAction"
|
|
317
|
-
/>
|
|
318
|
-
</view>
|
|
319
|
-
|
|
320
|
-
<view class="mt-[20rpx] rounded-[24rpx] bg-white p-[20rpx] shadow-[0_18rpx_40rpx_rgba(17,24,39,0.08)]">
|
|
321
|
-
<view class="flex items-center justify-between">
|
|
322
|
-
<text class="text-[26rpx] font-semibold text-[#1f1a3f]">
|
|
323
|
-
Class 绑定示例
|
|
26
|
+
<view class="mt-[24rpx] rounded-[20rpx] bg-[#f4f6ff] p-[20rpx]">
|
|
27
|
+
<text class="text-[24rpx] text-[#51517c]">
|
|
28
|
+
{{ buttonText }}
|
|
324
29
|
</text>
|
|
325
|
-
<t-tag size="small" theme="primary" variant="light">
|
|
326
|
-
模板
|
|
327
|
-
</t-tag>
|
|
328
30
|
</view>
|
|
329
|
-
<view class="mt-[12rpx] flex flex-col gap-[12rpx]">
|
|
330
|
-
<view
|
|
331
|
-
class="rounded-[16rpx] px-[16rpx] py-[12rpx] text-[20rpx]"
|
|
332
|
-
:class="{
|
|
333
|
-
'bg-[#eef2ff]': refreshSeed % 2 === 0,
|
|
334
|
-
'text-[#1f1a3f]': refreshSeed % 2 === 0,
|
|
335
|
-
'bg-[#fff7ed]': refreshSeed % 2 !== 0,
|
|
336
|
-
'text-[#92400e]': refreshSeed % 2 !== 0,
|
|
337
|
-
'ring-2 ring-[#6366f1]': refreshSeed % 3 === 0,
|
|
338
|
-
}"
|
|
339
|
-
>
|
|
340
|
-
对象语法:根据刷新次数切换配色与高亮
|
|
341
|
-
</view>
|
|
342
|
-
<view
|
|
343
|
-
class="rounded-[16rpx] px-[16rpx] py-[12rpx] text-[20rpx]" :class="[
|
|
344
|
-
refreshSeed % 2 === 0 ? 'bg-[#ecfeff] text-[#0f766e]' : 'bg-[#fef2f2] text-[#991b1b]',
|
|
345
|
-
refreshSeed % 4 === 0
|
|
346
|
-
? 'shadow-[0_10rpx_18rpx_rgba(15,118,110,0.18)]'
|
|
347
|
-
: 'shadow-[0_10rpx_18rpx_rgba(153,27,27,0.18)]',
|
|
348
|
-
]"
|
|
349
|
-
>
|
|
350
|
-
数组语法:组合静态与条件 class
|
|
351
|
-
</view>
|
|
352
|
-
<view
|
|
353
|
-
class="rounded-[16rpx] border border-[#e2e8f0] px-[16rpx] py-[12rpx] text-[20rpx]"
|
|
354
|
-
:class="refreshSeed % 2 === 0 ? 'bg-[#f8fafc] text-[#334155]' : 'bg-[#111827] text-white'"
|
|
355
|
-
>
|
|
356
|
-
class + :class 合并:静态边框叠加动态背景
|
|
357
|
-
</view>
|
|
358
|
-
</view>
|
|
359
|
-
</view>
|
|
360
31
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
体验清单
|
|
365
|
-
</text>
|
|
366
|
-
<t-tag size="small" theme="primary" variant="light">
|
|
367
|
-
指南
|
|
368
|
-
</t-tag>
|
|
369
|
-
</view>
|
|
370
|
-
<view class="mt-[12rpx]">
|
|
371
|
-
<t-cell-group>
|
|
372
|
-
<t-cell title="多页面 TabBar" note="首页/数据/表单/清单/能力" />
|
|
373
|
-
<t-cell title="分包加载" note="组件实验室与 API 场景" />
|
|
374
|
-
<t-cell title="Composition API" note="ref/computed/watch 驱动" />
|
|
375
|
-
<t-cell title="TDesign 组件" note="表单、列表、反馈" />
|
|
376
|
-
</t-cell-group>
|
|
377
|
-
</view>
|
|
32
|
+
<t-button class="mt-[24rpx]" theme="primary" block @tap="count += 1">
|
|
33
|
+
点一下
|
|
34
|
+
</t-button>
|
|
378
35
|
</view>
|
|
379
36
|
</view>
|
|
380
37
|
</template>
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
withDefaults(defineProps<{
|
|
3
|
-
eyebrow?: string
|
|
4
|
-
title: string
|
|
5
|
-
description: string
|
|
6
|
-
}>(), {})
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<view class="feature">
|
|
11
|
-
<view v-if="eyebrow" class="feature__eyebrow">
|
|
12
|
-
{{ eyebrow }}
|
|
13
|
-
</view>
|
|
14
|
-
<view class="feature__title">
|
|
15
|
-
{{ title }}
|
|
16
|
-
</view>
|
|
17
|
-
<view class="feature__desc">
|
|
18
|
-
{{ description }}
|
|
19
|
-
</view>
|
|
20
|
-
</view>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<style>
|
|
24
|
-
.feature {
|
|
25
|
-
padding: 24rpx;
|
|
26
|
-
background: #fff;
|
|
27
|
-
border: 2rpx solid #e2e8f0;
|
|
28
|
-
border-radius: 24rpx;
|
|
29
|
-
box-shadow: 0 10rpx 30rpx rgb(15 23 42 / 4%);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.feature__eyebrow {
|
|
33
|
-
font-size: 20rpx;
|
|
34
|
-
font-weight: 600;
|
|
35
|
-
color: #64748b;
|
|
36
|
-
letter-spacing: 1rpx;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.feature__title {
|
|
40
|
-
margin-top: 8rpx;
|
|
41
|
-
font-size: 26rpx;
|
|
42
|
-
font-weight: 700;
|
|
43
|
-
color: #0f172a;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.feature__desc {
|
|
47
|
-
margin-top: 8rpx;
|
|
48
|
-
font-size: 24rpx;
|
|
49
|
-
line-height: 1.6;
|
|
50
|
-
color: #64748b;
|
|
51
|
-
}
|
|
52
|
-
</style>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
withDefaults(defineProps<{
|
|
3
|
-
label: string
|
|
4
|
-
tone?: 'neutral' | 'accent' | 'success'
|
|
5
|
-
}>(), {
|
|
6
|
-
tone: 'neutral',
|
|
7
|
-
})
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<template>
|
|
11
|
-
<view class="badge" :class="`badge--${tone}`">
|
|
12
|
-
{{ label }}
|
|
13
|
-
</view>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<style>
|
|
17
|
-
.badge {
|
|
18
|
-
display: inline-flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
min-width: 120rpx;
|
|
22
|
-
padding: 12rpx 22rpx;
|
|
23
|
-
font-size: 22rpx;
|
|
24
|
-
font-weight: 600;
|
|
25
|
-
border-radius: 999rpx;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.badge--neutral {
|
|
29
|
-
color: #475569;
|
|
30
|
-
background: #e2e8f0;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.badge--accent {
|
|
34
|
-
color: #155eef;
|
|
35
|
-
background: #dbeafe;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.badge--success {
|
|
39
|
-
color: #047857;
|
|
40
|
-
background: #d1fae5;
|
|
41
|
-
}
|
|
42
|
-
</style>
|
|
@@ -1,137 +0,0 @@
|
|
|
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 SETTINGS_PATH = '/packageB/pages/settings/index'
|
|
11
|
-
|
|
12
|
-
const route = useRoute()
|
|
13
|
-
const router = useRouter()
|
|
14
|
-
|
|
15
|
-
const routeSummary = computed(() => route.fullPath || `/${route.path}`)
|
|
16
|
-
|
|
17
|
-
const taskGroups = [
|
|
18
|
-
{
|
|
19
|
-
title: '待处理任务',
|
|
20
|
-
description: '整理本周迭代的交付清单,确保需求与开发状态同步。',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
title: '风险跟踪',
|
|
24
|
-
description: '识别阻塞项和依赖项,适合继续扩展为真实项目看板。',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
title: '版本准备',
|
|
28
|
-
description: '预留提测、回归和上线前检查的展示区域。',
|
|
29
|
-
},
|
|
30
|
-
]
|
|
31
|
-
|
|
32
|
-
async function toIndependent() {
|
|
33
|
-
await router.push(SETTINGS_PATH)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
async function backHome() {
|
|
37
|
-
await router.push(HOME_PATH)
|
|
38
|
-
}
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
<template>
|
|
42
|
-
<view class="page">
|
|
43
|
-
<view class="card">
|
|
44
|
-
<view class="card__eyebrow">
|
|
45
|
-
Workspace
|
|
46
|
-
</view>
|
|
47
|
-
<view class="card__title">
|
|
48
|
-
项目工作台
|
|
49
|
-
</view>
|
|
50
|
-
<view class="card__desc">
|
|
51
|
-
这里适合作为分包内的业务处理入口,例如待办、进度、看板或内部运营模块。
|
|
52
|
-
</view>
|
|
53
|
-
<view class="card__summary">
|
|
54
|
-
当前路由:{{ routeSummary }}
|
|
55
|
-
</view>
|
|
56
|
-
</view>
|
|
57
|
-
|
|
58
|
-
<view
|
|
59
|
-
v-for="item in taskGroups"
|
|
60
|
-
:key="item.title"
|
|
61
|
-
class="panel-wrap"
|
|
62
|
-
>
|
|
63
|
-
<InfoPanel
|
|
64
|
-
eyebrow="TASK"
|
|
65
|
-
:title="item.title"
|
|
66
|
-
:description="item.description"
|
|
67
|
-
/>
|
|
68
|
-
</view>
|
|
69
|
-
|
|
70
|
-
<button class="action-btn action-btn--secondary" @tap="toIndependent">
|
|
71
|
-
前往系统设置
|
|
72
|
-
</button>
|
|
73
|
-
<button class="action-btn action-btn--ghost" @tap="backHome">
|
|
74
|
-
返回业务门户
|
|
75
|
-
</button>
|
|
76
|
-
</view>
|
|
77
|
-
</template>
|
|
78
|
-
|
|
79
|
-
<style>
|
|
80
|
-
.page {
|
|
81
|
-
box-sizing: border-box;
|
|
82
|
-
min-height: 100vh;
|
|
83
|
-
padding: 34rpx 30rpx;
|
|
84
|
-
background:
|
|
85
|
-
radial-gradient(circle at top right, rgb(59 130 246 / 12%), transparent 30%),
|
|
86
|
-
linear-gradient(180deg, #f8fbff 0%, #edf2f9 100%);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.card {
|
|
90
|
-
padding: 30rpx 28rpx;
|
|
91
|
-
background: #fff;
|
|
92
|
-
border: 2rpx solid rgb(191 219 254 / 78%);
|
|
93
|
-
border-radius: 30rpx;
|
|
94
|
-
box-shadow: 0 16rpx 36rpx rgb(15 23 42 / 5%);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.card__eyebrow {
|
|
98
|
-
font-size: 22rpx;
|
|
99
|
-
font-weight: 600;
|
|
100
|
-
color: #2563eb;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.card__title {
|
|
104
|
-
margin-top: 10rpx;
|
|
105
|
-
font-size: 40rpx;
|
|
106
|
-
font-weight: 700;
|
|
107
|
-
color: #172554;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.card__desc,
|
|
111
|
-
.card__summary {
|
|
112
|
-
margin-top: 12rpx;
|
|
113
|
-
font-size: 24rpx;
|
|
114
|
-
line-height: 1.6;
|
|
115
|
-
color: #334155;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.panel-wrap {
|
|
119
|
-
margin-top: 18rpx;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.action-btn {
|
|
123
|
-
margin-top: 18rpx;
|
|
124
|
-
color: #fff;
|
|
125
|
-
background: #2563eb;
|
|
126
|
-
border-radius: 999rpx;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.action-btn--secondary {
|
|
130
|
-
background: #0f172a;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.action-btn--ghost {
|
|
134
|
-
color: #1d4ed8;
|
|
135
|
-
background: #dbeafe;
|
|
136
|
-
}
|
|
137
|
-
</style>
|