create-weapp-vite 2.0.47 → 2.0.48
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/{chunk-UECMRNKY.js → chunk-LIWR2QXJ.js} +8 -7
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- 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/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,473 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, ref, watch } from 'wevu'
|
|
3
|
-
|
|
4
|
-
type HighlightTone = 'up' | 'down' | 'flat'
|
|
5
|
-
|
|
6
|
-
interface HighlightItem {
|
|
7
|
-
key: string
|
|
8
|
-
label: string
|
|
9
|
-
value: string | number
|
|
10
|
-
tone?: HighlightTone
|
|
11
|
-
note?: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface FeatureItem {
|
|
15
|
-
id: string
|
|
16
|
-
title: string
|
|
17
|
-
group: 'core' | 'template' | 'engineering'
|
|
18
|
-
done?: boolean
|
|
19
|
-
level?: 'base' | 'advanced'
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const props = withDefaults(
|
|
23
|
-
defineProps<{
|
|
24
|
-
title?: string
|
|
25
|
-
subtitle?: string
|
|
26
|
-
highlights?: HighlightItem[]
|
|
27
|
-
features?: FeatureItem[]
|
|
28
|
-
compact?: boolean
|
|
29
|
-
}>(),
|
|
30
|
-
{
|
|
31
|
-
title: 'Hello WeVU',
|
|
32
|
-
subtitle: '',
|
|
33
|
-
highlights: () => [],
|
|
34
|
-
features: () => [],
|
|
35
|
-
compact: false,
|
|
36
|
-
},
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
const emit = defineEmits<{
|
|
40
|
-
(e: 'action', payload: { type: 'toggle' | 'copy' | 'select' | 'stats', value?: string }): void
|
|
41
|
-
}>()
|
|
42
|
-
|
|
43
|
-
const expanded = ref(true)
|
|
44
|
-
const keyword = ref('')
|
|
45
|
-
const activeGroup = ref<'all' | FeatureItem['group']>('all')
|
|
46
|
-
const selectedFeatureId = ref('')
|
|
47
|
-
const searchHit = ref(0)
|
|
48
|
-
const searchMiss = ref(0)
|
|
49
|
-
|
|
50
|
-
watch(
|
|
51
|
-
() => props.features,
|
|
52
|
-
(nextFeatures) => {
|
|
53
|
-
if (!nextFeatures.length) {
|
|
54
|
-
selectedFeatureId.value = ''
|
|
55
|
-
return
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const exists = nextFeatures.some(feature => feature.id === selectedFeatureId.value)
|
|
59
|
-
if (!selectedFeatureId.value || !exists) {
|
|
60
|
-
selectedFeatureId.value = nextFeatures[0]?.id ?? ''
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
{ immediate: true },
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
const panelClass = computed(() => {
|
|
67
|
-
return props.compact ? 'hello-panel hello-panel-compact' : 'hello-panel'
|
|
68
|
-
})
|
|
69
|
-
|
|
70
|
-
const summaryText = computed(() => {
|
|
71
|
-
return `${props.highlights.length} 个指标 · ${props.features.length} 条能力`
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
const filteredFeatures = computed(() => {
|
|
75
|
-
const normalized = keyword.value.trim().toLowerCase()
|
|
76
|
-
return props.features.filter((feature) => {
|
|
77
|
-
const matchGroup = activeGroup.value === 'all' || feature.group === activeGroup.value
|
|
78
|
-
if (!matchGroup) {
|
|
79
|
-
return false
|
|
80
|
-
}
|
|
81
|
-
if (!normalized) {
|
|
82
|
-
return true
|
|
83
|
-
}
|
|
84
|
-
return feature.title.toLowerCase().includes(normalized)
|
|
85
|
-
})
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
const selectedFeature = computed(() => {
|
|
89
|
-
return props.features.find(feature => feature.id === selectedFeatureId.value)
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
const stats = computed(() => {
|
|
93
|
-
const total = props.features.length
|
|
94
|
-
const done = props.features.filter(feature => feature.done).length
|
|
95
|
-
const advanced = props.features.filter(feature => feature.level === 'advanced').length
|
|
96
|
-
const progress = total > 0 ? Math.round((done / total) * 100) : 0
|
|
97
|
-
return {
|
|
98
|
-
total,
|
|
99
|
-
done,
|
|
100
|
-
advanced,
|
|
101
|
-
progress,
|
|
102
|
-
}
|
|
103
|
-
})
|
|
104
|
-
|
|
105
|
-
const completionText = computed(() => {
|
|
106
|
-
return `${stats.value.done}/${stats.value.total} · ${stats.value.progress}%`
|
|
107
|
-
})
|
|
108
|
-
|
|
109
|
-
const groupTabs = computed(() => {
|
|
110
|
-
const base = [
|
|
111
|
-
{ key: 'all', label: '全部' },
|
|
112
|
-
{ key: 'core', label: '核心' },
|
|
113
|
-
{ key: 'template', label: '模板' },
|
|
114
|
-
{ key: 'engineering', label: '工程化' },
|
|
115
|
-
] as const
|
|
116
|
-
return base
|
|
117
|
-
})
|
|
118
|
-
|
|
119
|
-
watch(
|
|
120
|
-
[keyword, filteredFeatures],
|
|
121
|
-
() => {
|
|
122
|
-
if (!keyword.value.trim()) {
|
|
123
|
-
return
|
|
124
|
-
}
|
|
125
|
-
if (filteredFeatures.value.length > 0) {
|
|
126
|
-
searchHit.value += 1
|
|
127
|
-
return
|
|
128
|
-
}
|
|
129
|
-
searchMiss.value += 1
|
|
130
|
-
},
|
|
131
|
-
)
|
|
132
|
-
|
|
133
|
-
watch(
|
|
134
|
-
() => stats.value.progress,
|
|
135
|
-
(progress) => {
|
|
136
|
-
emit('action', { type: 'stats', value: String(progress) })
|
|
137
|
-
},
|
|
138
|
-
{ immediate: true },
|
|
139
|
-
)
|
|
140
|
-
|
|
141
|
-
function toneClass(tone?: HighlightTone) {
|
|
142
|
-
if (tone === 'up') {
|
|
143
|
-
return 'metric-value metric-up'
|
|
144
|
-
}
|
|
145
|
-
if (tone === 'down') {
|
|
146
|
-
return 'metric-value metric-down'
|
|
147
|
-
}
|
|
148
|
-
return 'metric-value metric-flat'
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function toggleExpand() {
|
|
152
|
-
expanded.value = !expanded.value
|
|
153
|
-
emit('action', { type: 'toggle', value: String(expanded.value) })
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
function selectGroup(group: 'all' | FeatureItem['group']) {
|
|
157
|
-
activeGroup.value = group
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
function selectFeature(feature: FeatureItem) {
|
|
161
|
-
selectedFeatureId.value = feature.id
|
|
162
|
-
emit('action', { type: 'select', value: feature.title })
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
function copySelected() {
|
|
166
|
-
if (!selectedFeature.value) {
|
|
167
|
-
return
|
|
168
|
-
}
|
|
169
|
-
emit('action', { type: 'copy', value: selectedFeature.value.title })
|
|
170
|
-
}
|
|
171
|
-
</script>
|
|
172
|
-
|
|
173
|
-
<template>
|
|
174
|
-
<view :class="panelClass">
|
|
175
|
-
<view class="head-row">
|
|
176
|
-
<view class="head-main">
|
|
177
|
-
<text class="title">
|
|
178
|
-
{{ props.title }}
|
|
179
|
-
</text>
|
|
180
|
-
<text v-if="props.subtitle" class="subtitle">
|
|
181
|
-
{{ props.subtitle }}
|
|
182
|
-
</text>
|
|
183
|
-
<text class="summary">
|
|
184
|
-
{{ summaryText }}
|
|
185
|
-
</text>
|
|
186
|
-
<text class="summary">
|
|
187
|
-
完成度:{{ completionText }}
|
|
188
|
-
</text>
|
|
189
|
-
</view>
|
|
190
|
-
<button class="tiny-btn" @tap.stop="toggleExpand">
|
|
191
|
-
{{ expanded ? '收起' : '展开' }}
|
|
192
|
-
</button>
|
|
193
|
-
</view>
|
|
194
|
-
|
|
195
|
-
<view v-if="expanded" class="panel-body">
|
|
196
|
-
<view v-if="props.highlights.length" class="metrics">
|
|
197
|
-
<view v-for="item in props.highlights" :key="item.key" class="metric-item">
|
|
198
|
-
<text class="metric-label">
|
|
199
|
-
{{ item.label }}
|
|
200
|
-
</text>
|
|
201
|
-
<text :class="toneClass(item.tone)">
|
|
202
|
-
{{ item.value }}
|
|
203
|
-
</text>
|
|
204
|
-
<text v-if="item.note" class="metric-note">
|
|
205
|
-
{{ item.note }}
|
|
206
|
-
</text>
|
|
207
|
-
</view>
|
|
208
|
-
</view>
|
|
209
|
-
|
|
210
|
-
<view class="feature-toolbar">
|
|
211
|
-
<input v-model="keyword" class="search-input" placeholder="筛选能力关键词…">
|
|
212
|
-
<button class="tiny-btn tiny-btn-light" @tap.catch="copySelected">
|
|
213
|
-
复制当前
|
|
214
|
-
</button>
|
|
215
|
-
</view>
|
|
216
|
-
|
|
217
|
-
<view class="group-tabs">
|
|
218
|
-
<view
|
|
219
|
-
v-for="tab in groupTabs"
|
|
220
|
-
:key="tab.key"
|
|
221
|
-
class="group-tab"
|
|
222
|
-
:class="tab.key === activeGroup ? 'group-tab-active' : ''"
|
|
223
|
-
@tap="selectGroup(tab.key)"
|
|
224
|
-
>
|
|
225
|
-
{{ tab.label }}
|
|
226
|
-
</view>
|
|
227
|
-
</view>
|
|
228
|
-
|
|
229
|
-
<view class="chips">
|
|
230
|
-
<view
|
|
231
|
-
v-for="feature in filteredFeatures"
|
|
232
|
-
:key="feature.id"
|
|
233
|
-
class="chip"
|
|
234
|
-
:class="feature.id === selectedFeatureId ? 'chip-active' : ''"
|
|
235
|
-
@tap="selectFeature(feature)"
|
|
236
|
-
>
|
|
237
|
-
{{ feature.title }}
|
|
238
|
-
</view>
|
|
239
|
-
</view>
|
|
240
|
-
|
|
241
|
-
<view class="search-stat">
|
|
242
|
-
<text>
|
|
243
|
-
搜索命中:{{ searchHit }}
|
|
244
|
-
</text>
|
|
245
|
-
<text>
|
|
246
|
-
未命中:{{ searchMiss }}
|
|
247
|
-
</text>
|
|
248
|
-
</view>
|
|
249
|
-
|
|
250
|
-
<view v-if="selectedFeature" class="selected-card">
|
|
251
|
-
<text class="selected-label">
|
|
252
|
-
当前焦点
|
|
253
|
-
</text>
|
|
254
|
-
<text class="selected-value">
|
|
255
|
-
{{ selectedFeature.title }}
|
|
256
|
-
</text>
|
|
257
|
-
<text class="selected-meta">
|
|
258
|
-
分组:{{ selectedFeature.group }} | 等级:{{ selectedFeature.level ?? 'base' }}
|
|
259
|
-
</text>
|
|
260
|
-
</view>
|
|
261
|
-
|
|
262
|
-
<slot name="footer" />
|
|
263
|
-
</view>
|
|
264
|
-
</view>
|
|
265
|
-
</template>
|
|
266
|
-
|
|
267
|
-
<style>
|
|
268
|
-
.hello-panel {
|
|
269
|
-
padding: 24rpx;
|
|
270
|
-
margin-top: 20rpx;
|
|
271
|
-
background: linear-gradient(180deg, #fff, #f8faff);
|
|
272
|
-
border-radius: 24rpx;
|
|
273
|
-
box-shadow: 0 10rpx 28rpx rgb(76 110 245 / 12%);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.hello-panel-compact {
|
|
277
|
-
padding: 18rpx;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.head-row {
|
|
281
|
-
display: flex;
|
|
282
|
-
align-items: flex-start;
|
|
283
|
-
justify-content: space-between;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.head-main {
|
|
287
|
-
display: flex;
|
|
288
|
-
flex-direction: column;
|
|
289
|
-
gap: 8rpx;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
.title {
|
|
293
|
-
display: block;
|
|
294
|
-
font-size: 36rpx;
|
|
295
|
-
font-weight: 700;
|
|
296
|
-
color: #2d2f6b;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
.subtitle {
|
|
300
|
-
display: block;
|
|
301
|
-
font-size: 24rpx;
|
|
302
|
-
color: #5b5f93;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.summary {
|
|
306
|
-
display: block;
|
|
307
|
-
font-size: 22rpx;
|
|
308
|
-
color: #7b80af;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
.panel-body {
|
|
312
|
-
margin-top: 20rpx;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.metrics {
|
|
316
|
-
display: grid;
|
|
317
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
318
|
-
gap: 12rpx;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.metric-item {
|
|
322
|
-
display: flex;
|
|
323
|
-
flex-direction: column;
|
|
324
|
-
gap: 6rpx;
|
|
325
|
-
padding: 14rpx;
|
|
326
|
-
background: #fff;
|
|
327
|
-
border: 2rpx solid #eef1ff;
|
|
328
|
-
border-radius: 16rpx;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
.metric-label {
|
|
332
|
-
font-size: 22rpx;
|
|
333
|
-
color: #6870a2;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
.metric-value {
|
|
337
|
-
font-size: 30rpx;
|
|
338
|
-
font-weight: 700;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
.metric-up {
|
|
342
|
-
color: #1b7a3a;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
.metric-down {
|
|
346
|
-
color: #c92a2a;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.metric-flat {
|
|
350
|
-
color: #3b3f73;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.metric-note {
|
|
354
|
-
font-size: 20rpx;
|
|
355
|
-
color: #8a90bd;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
.feature-toolbar {
|
|
359
|
-
display: flex;
|
|
360
|
-
gap: 12rpx;
|
|
361
|
-
align-items: center;
|
|
362
|
-
margin-top: 16rpx;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
.search-input {
|
|
366
|
-
box-sizing: border-box;
|
|
367
|
-
flex: 1;
|
|
368
|
-
height: 68rpx;
|
|
369
|
-
padding: 0 18rpx;
|
|
370
|
-
margin: 0;
|
|
371
|
-
font-size: 24rpx;
|
|
372
|
-
background: #fff;
|
|
373
|
-
border: 2rpx solid #e6e9f7;
|
|
374
|
-
border-radius: 12rpx;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
.chips {
|
|
378
|
-
display: flex;
|
|
379
|
-
flex-wrap: wrap;
|
|
380
|
-
gap: 10rpx;
|
|
381
|
-
margin-top: 14rpx;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
.group-tabs {
|
|
385
|
-
display: flex;
|
|
386
|
-
gap: 10rpx;
|
|
387
|
-
margin-top: 14rpx;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
.group-tab {
|
|
391
|
-
padding: 8rpx 14rpx;
|
|
392
|
-
font-size: 22rpx;
|
|
393
|
-
color: #596090;
|
|
394
|
-
background: #f0f3ff;
|
|
395
|
-
border-radius: 999rpx;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
.group-tab-active {
|
|
399
|
-
color: #fff;
|
|
400
|
-
background: #4f5ee3;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.chip {
|
|
404
|
-
padding: 10rpx 16rpx;
|
|
405
|
-
font-size: 22rpx;
|
|
406
|
-
color: #4f5685;
|
|
407
|
-
background: #edf1ff;
|
|
408
|
-
border-radius: 999rpx;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
.chip-active {
|
|
412
|
-
color: #fff;
|
|
413
|
-
background: #5b5ce2;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
.selected-card {
|
|
417
|
-
padding: 14rpx 16rpx;
|
|
418
|
-
margin-top: 14rpx;
|
|
419
|
-
background: #fff;
|
|
420
|
-
border: 2rpx dashed #ccd4ff;
|
|
421
|
-
border-radius: 14rpx;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
.selected-label {
|
|
425
|
-
display: block;
|
|
426
|
-
font-size: 20rpx;
|
|
427
|
-
color: #7c84b0;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
.selected-value {
|
|
431
|
-
display: block;
|
|
432
|
-
margin-top: 4rpx;
|
|
433
|
-
font-size: 24rpx;
|
|
434
|
-
font-weight: 600;
|
|
435
|
-
color: #36407a;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
.selected-meta {
|
|
439
|
-
display: block;
|
|
440
|
-
margin-top: 4rpx;
|
|
441
|
-
font-size: 20rpx;
|
|
442
|
-
color: #7b82b1;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
.search-stat {
|
|
446
|
-
display: flex;
|
|
447
|
-
gap: 16rpx;
|
|
448
|
-
margin-top: 12rpx;
|
|
449
|
-
font-size: 20rpx;
|
|
450
|
-
color: #6d74a5;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
.tiny-btn {
|
|
454
|
-
min-width: 108rpx;
|
|
455
|
-
height: 56rpx;
|
|
456
|
-
padding: 0 16rpx;
|
|
457
|
-
margin: 0;
|
|
458
|
-
font-size: 22rpx;
|
|
459
|
-
line-height: 56rpx;
|
|
460
|
-
color: #fff;
|
|
461
|
-
background: #5b5ce2;
|
|
462
|
-
border-radius: 12rpx;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
.tiny-btn-light {
|
|
466
|
-
color: #4f5ee3;
|
|
467
|
-
background: #edf0ff;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
.tiny-btn::after {
|
|
471
|
-
border: 0;
|
|
472
|
-
}
|
|
473
|
-
</style>
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
const props = withDefaults(
|
|
3
|
-
defineProps<{
|
|
4
|
-
title?: string
|
|
5
|
-
description?: string
|
|
6
|
-
badge?: string
|
|
7
|
-
}>(),
|
|
8
|
-
{
|
|
9
|
-
title: 'WeVU Starter',
|
|
10
|
-
description: '',
|
|
11
|
-
badge: 'Template',
|
|
12
|
-
},
|
|
13
|
-
)
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<template>
|
|
17
|
-
<view class="banner">
|
|
18
|
-
<view class="main">
|
|
19
|
-
<text class="title">
|
|
20
|
-
{{ props.title }}
|
|
21
|
-
</text>
|
|
22
|
-
<text v-if="props.description" class="description">
|
|
23
|
-
{{ props.description }}
|
|
24
|
-
</text>
|
|
25
|
-
</view>
|
|
26
|
-
<text class="badge">
|
|
27
|
-
{{ props.badge }}
|
|
28
|
-
</text>
|
|
29
|
-
</view>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<style>
|
|
33
|
-
.banner {
|
|
34
|
-
display: flex;
|
|
35
|
-
gap: 20rpx;
|
|
36
|
-
align-items: center;
|
|
37
|
-
justify-content: space-between;
|
|
38
|
-
padding: 26rpx 28rpx;
|
|
39
|
-
margin: 16rpx 0 24rpx;
|
|
40
|
-
background: linear-gradient(120deg, #4c6ef5, #5f3dc4);
|
|
41
|
-
border-radius: 24rpx;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.main {
|
|
45
|
-
display: flex;
|
|
46
|
-
flex: 1;
|
|
47
|
-
flex-direction: column;
|
|
48
|
-
gap: 8rpx;
|
|
49
|
-
min-width: 0;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.title {
|
|
53
|
-
display: block;
|
|
54
|
-
overflow: hidden;
|
|
55
|
-
text-overflow: ellipsis;
|
|
56
|
-
font-size: 34rpx;
|
|
57
|
-
font-weight: 700;
|
|
58
|
-
color: #fff;
|
|
59
|
-
white-space: nowrap;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.description {
|
|
63
|
-
display: block;
|
|
64
|
-
overflow: hidden;
|
|
65
|
-
text-overflow: ellipsis;
|
|
66
|
-
font-size: 24rpx;
|
|
67
|
-
color: rgb(255 255 255 / 86%);
|
|
68
|
-
white-space: nowrap;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.badge {
|
|
72
|
-
flex: none;
|
|
73
|
-
padding: 8rpx 16rpx;
|
|
74
|
-
font-size: 22rpx;
|
|
75
|
-
color: #4c2fa6;
|
|
76
|
-
background: #fff;
|
|
77
|
-
border-radius: 999rpx;
|
|
78
|
-
}
|
|
79
|
-
</style>
|
|
File without changes
|
|
File without changes
|