@opentiny/vue-docs 3.23.1 → 3.24.1
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/demos/apis/dialog-select.js +42 -0
- package/demos/apis/popeditor.js +14 -0
- package/demos/apis/steps.js +15 -0
- package/demos/apis/text-popup.js +2 -2
- package/demos/apis/user-head.js +7 -18
- package/demos/mobile-first/app/pager/webdoc/pager.js +0 -48
- package/demos/mobile-first/app/steps/vertical.vue +14 -1
- package/demos/pc/app/calendar-view/calendar-event.spec.ts +2 -2
- package/demos/pc/app/date-panel/basic-usage.spec.ts +6 -6
- package/demos/pc/app/date-panel/custom-week.spec.ts +1 -1
- package/demos/pc/app/date-panel/disabled-date.spec.ts +8 -9
- package/demos/pc/app/date-panel/event.spec.ts +4 -4
- package/demos/pc/app/date-panel/format.spec.ts +2 -2
- package/demos/pc/app/date-panel/readonly.spec.ts +3 -3
- package/demos/pc/app/date-panel/unlink-panels.spec.ts +4 -4
- package/demos/pc/app/date-picker/basic-usage.spec.ts +2 -2
- package/demos/pc/app/date-picker/date-range.spec.ts +3 -3
- package/demos/pc/app/dialog-select/nest-grid-multi-composition-api.vue +19 -1
- package/demos/pc/app/dialog-select/nest-grid-multi.spec.ts +19 -0
- package/demos/pc/app/dialog-select/nest-grid-multi.vue +17 -1
- package/demos/pc/app/dialog-select/webdoc/dialog-select.js +2 -2
- package/demos/pc/app/grid/base/basic-usage-composition-api.vue +48 -93
- package/demos/pc/app/grid/base/basic-usage.spec.js +1 -1
- package/demos/pc/app/grid/base/basic-usage.vue +29 -132
- package/demos/pc/app/grid/dynamically-columns/dynamically-columns.spec.js +3 -3
- package/demos/pc/app/grid/webdoc/grid-ai-agent.js +23 -0
- package/demos/pc/app/popeditor/condition-layout-composition-api.vue +1 -0
- package/demos/pc/app/popeditor/condition-layout.spec.ts +1 -0
- package/demos/pc/app/popeditor/condition-layout.vue +1 -0
- package/demos/pc/app/popeditor/webdoc/popeditor.js +2 -2
- package/demos/pc/app/qr-code/style-composition-api.vue +14 -3
- package/demos/pc/app/qr-code/style.vue +15 -3
- package/demos/pc/app/text-popup/{value.spec.ts → modelValue.spec.ts} +2 -2
- package/demos/pc/app/text-popup/webdoc/text-popup.js +8 -8
- package/demos/pc/webdoc/changelog.md +452 -452
- package/package.json +27 -19
- package/playground/App.vue +2 -2
- package/src/App.vue +18 -1
- package/src/{views/components-doc/components → components}/demo.vue +1 -1
- package/src/{views/components-doc/components → components}/float-settings.vue +24 -7
- package/src/components/mcp-docs.vue +55 -0
- package/src/components/tiny-robot-chat.vue +128 -0
- package/src/composable/DifyModelProvider.ts +65 -0
- package/src/composable/storage.ts +71 -0
- package/src/composable/useTinyRobot.ts +167 -0
- package/src/composable/utils.ts +172 -0
- package/src/i18n/index.js +5 -2
- package/src/main.js +10 -1
- package/src/router.js +9 -0
- package/src/tools/appData.js +12 -2
- package/src/views/components-doc/common.vue +22 -8
- package/src/views/comprehensive/Demo.vue +211 -0
- package/src/views/comprehensive/index.vue +391 -0
- package/src/views/comprehensive/products.json +99 -0
- package/src/views/comprehensive/types/index.ts +37 -0
- package/src/views/layout/layout.vue +2 -2
- package/demos/mobile-first/app/pager/current-change.vue +0 -34
- package/demos/mobile-first/app/pager/next-click.vue +0 -34
- package/demos/mobile-first/app/pager/prev-click.vue +0 -34
- /package/demos/pc/app/text-popup/{clear-value-composition-api.vue → clear-modelValue-composition-api.vue} +0 -0
- /package/demos/pc/app/text-popup/{clear-value.spec.ts → clear-modelValue.spec.ts} +0 -0
- /package/demos/pc/app/text-popup/{clear-value.vue → clear-modelValue.vue} +0 -0
- /package/demos/pc/app/text-popup/{value-composition-api.vue → modelValue-composition-api.vue} +0 -0
- /package/demos/pc/app/text-popup/{value.vue → modelValue.vue} +0 -0
- /package/src/{views/components-doc/components → components}/anchor.vue +0 -0
- /package/src/{views/components-doc/components → components}/api-docs.vue +0 -0
- /package/src/{views/components-doc/components → components}/async-highlight.vue +0 -0
- /package/src/{views/components-doc/components → components}/contributor.vue +0 -0
- /package/src/{views/components-doc/components → components}/header.vue +0 -0
- /package/src/{views/components-doc/components → components}/version-tip.vue +0 -0
- /package/src/{views/components-doc/composition → composable}/useTasksFinish.ts +0 -0
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="header">
|
|
3
|
+
<div class="qr-code-trigger" @click="showQrCode = true">
|
|
4
|
+
<IconAi class="qr-icon" />
|
|
5
|
+
<div class="qr-text-wrapper">
|
|
6
|
+
<span class="qr-label">手机遥控</span>
|
|
7
|
+
<span class="qr-desc">扫码体验移动端操作</span>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="app-container">
|
|
12
|
+
<!-- 主体内容区域 -->
|
|
13
|
+
<div class="main-content">
|
|
14
|
+
<Demo />
|
|
15
|
+
</div>
|
|
16
|
+
<div class="right-panel" :class="{ collapsed: !appData.showTinyRobot }">
|
|
17
|
+
<tiny-robot-chat :prompt-items="promptItems" :suggestion-pill-items="suggestionPillItems" />
|
|
18
|
+
</div>
|
|
19
|
+
<IconAi @click="appData.showTinyRobot = !appData.showTinyRobot" class="style-settings-icon"></IconAi>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<!-- QR Code Modal -->
|
|
23
|
+
<Teleport to="body">
|
|
24
|
+
<div class="qr-modal" v-if="showQrCode" @click.self="showQrCode = false">
|
|
25
|
+
<div class="qr-modal-content">
|
|
26
|
+
<div class="qr-modal-header">
|
|
27
|
+
<h3>手机遥控体验</h3>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="qr-modal-body">
|
|
30
|
+
<div class="qr-wrapper">
|
|
31
|
+
<tiny-qr-code :value="sessionUrl" :size="200" color="#1677ff"></tiny-qr-code>
|
|
32
|
+
<div class="qr-status">
|
|
33
|
+
<div class="status-dot"></div>
|
|
34
|
+
<span>链接已生成</span>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="qr-instructions">
|
|
38
|
+
<p class="instruction-title">使用说明</p>
|
|
39
|
+
<ol class="instruction-steps">
|
|
40
|
+
<li>使用微信扫一扫,扫描上方二维码</li>
|
|
41
|
+
<li>然后点击微信右上角的 "..." 图标</li>
|
|
42
|
+
<li>选择在默认浏览器中打开</li>
|
|
43
|
+
<li>可以选择直接语音交互也可使用AI对话框进行交互</li>
|
|
44
|
+
</ol>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</Teleport>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script setup lang="ts">
|
|
53
|
+
import { watch, ref, h } from 'vue'
|
|
54
|
+
import TinyRobotChat from '@/components/tiny-robot-chat.vue'
|
|
55
|
+
import { globalConversation } from '@/composable/utils'
|
|
56
|
+
import { IconAi } from '@opentiny/tiny-robot-svgs'
|
|
57
|
+
import CryptoJS from 'crypto-js'
|
|
58
|
+
import { TinyQrCode } from '@opentiny/vue'
|
|
59
|
+
import Demo from './Demo.vue'
|
|
60
|
+
import { appData } from '@/tools/appData'
|
|
61
|
+
|
|
62
|
+
appData.showTinyRobot = true
|
|
63
|
+
const showQrCode = ref(false)
|
|
64
|
+
const sessionUrl = ref('placeholder')
|
|
65
|
+
|
|
66
|
+
const promptItems = [
|
|
67
|
+
{
|
|
68
|
+
label: '识别网页的内容',
|
|
69
|
+
description: '帮我在商品列表中查询最贵的手机和最便宜的笔记本',
|
|
70
|
+
icon: h('span', { style: { fontSize: '18px' } }, '💡')
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: '智能操作网页',
|
|
74
|
+
description: '帮我在商品列表中删除最贵的且分类为手机的商品',
|
|
75
|
+
icon: h('span', { style: { fontSize: '18px' } }, '🕹')
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
label: '智能操作网页',
|
|
79
|
+
description: '帮我在商品列表中添加一个华为p60品牌的手机商品',
|
|
80
|
+
icon: h('span', { style: { fontSize: '18px' } }, '🕹')
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
|
|
84
|
+
const suggestionPillItems = [
|
|
85
|
+
{
|
|
86
|
+
id: '1',
|
|
87
|
+
text: '商品列表',
|
|
88
|
+
icon: h('span', { style: { fontSize: '18px' } }, '🏢')
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
|
|
92
|
+
watch(
|
|
93
|
+
() => globalConversation.sessionId,
|
|
94
|
+
(newVal) => {
|
|
95
|
+
if (newVal) {
|
|
96
|
+
const encryptedId = CryptoJS.AES.encrypt(newVal, 'secret-session-id').toString()
|
|
97
|
+
|
|
98
|
+
const secretId = encodeURIComponent(encryptedId)
|
|
99
|
+
sessionUrl.value = 'http://39.108.160.245?id=' + secretId
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{ immediate: true }
|
|
103
|
+
)
|
|
104
|
+
</script>
|
|
105
|
+
|
|
106
|
+
<style scoped>
|
|
107
|
+
.header {
|
|
108
|
+
width: calc(100% - 502px);
|
|
109
|
+
display: flex;
|
|
110
|
+
justify-content: space-between;
|
|
111
|
+
align-items: center;
|
|
112
|
+
padding: 10px 20px;
|
|
113
|
+
background-color: #f5f5f5;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.qr-code-trigger {
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
padding: 12px 20px;
|
|
121
|
+
border-radius: 12px;
|
|
122
|
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
123
|
+
background: linear-gradient(135deg, #1677ff 0%, #06b6d4 100%);
|
|
124
|
+
position: relative;
|
|
125
|
+
overflow: hidden;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.qr-code-trigger::before {
|
|
129
|
+
content: '';
|
|
130
|
+
position: absolute;
|
|
131
|
+
top: 0;
|
|
132
|
+
left: 0;
|
|
133
|
+
width: 100%;
|
|
134
|
+
height: 100%;
|
|
135
|
+
background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
|
|
136
|
+
transform: translateX(-100%);
|
|
137
|
+
transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.qr-code-trigger:hover {
|
|
141
|
+
transform: translateY(-2px);
|
|
142
|
+
box-shadow: 0 8px 20px rgba(22, 119, 255, 0.3);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.qr-code-trigger:hover::before {
|
|
146
|
+
transform: translateX(100%);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.qr-icon {
|
|
150
|
+
font-size: 24px;
|
|
151
|
+
margin-right: 12px;
|
|
152
|
+
color: white;
|
|
153
|
+
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
|
|
154
|
+
animation: float 3s ease-in-out infinite;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.qr-text-wrapper {
|
|
158
|
+
display: flex;
|
|
159
|
+
flex-direction: column;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.qr-label {
|
|
163
|
+
font-size: 16px;
|
|
164
|
+
font-weight: 600;
|
|
165
|
+
color: white;
|
|
166
|
+
margin-bottom: 2px;
|
|
167
|
+
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.qr-desc {
|
|
171
|
+
font-size: 13px;
|
|
172
|
+
color: rgba(255, 255, 255, 0.9);
|
|
173
|
+
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@keyframes float {
|
|
177
|
+
0%,
|
|
178
|
+
100% {
|
|
179
|
+
transform: translateY(0);
|
|
180
|
+
}
|
|
181
|
+
50% {
|
|
182
|
+
transform: translateY(-3px);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.qr-modal {
|
|
187
|
+
position: fixed;
|
|
188
|
+
top: 0;
|
|
189
|
+
left: 0;
|
|
190
|
+
width: 100%;
|
|
191
|
+
height: 100%;
|
|
192
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
193
|
+
display: flex;
|
|
194
|
+
justify-content: center;
|
|
195
|
+
align-items: center;
|
|
196
|
+
z-index: 1000;
|
|
197
|
+
animation: fadeIn 0.3s ease;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.qr-modal-content {
|
|
201
|
+
background: white;
|
|
202
|
+
border-radius: 12px;
|
|
203
|
+
padding: 32px;
|
|
204
|
+
width: 460px;
|
|
205
|
+
box-shadow:
|
|
206
|
+
0 20px 25px -5px rgba(0, 0, 0, 0.1),
|
|
207
|
+
0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.qr-modal-header {
|
|
211
|
+
margin-bottom: 32px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.qr-modal-header h3 {
|
|
215
|
+
font-size: 22px;
|
|
216
|
+
font-weight: 600;
|
|
217
|
+
color: #1f2937;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.close-icon {
|
|
221
|
+
cursor: pointer;
|
|
222
|
+
font-size: 20px;
|
|
223
|
+
color: #999;
|
|
224
|
+
transition: color 0.3s;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.close-icon:hover {
|
|
228
|
+
color: #666;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.qr-modal-body {
|
|
232
|
+
display: flex;
|
|
233
|
+
flex-direction: column;
|
|
234
|
+
align-items: center;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.qr-wrapper {
|
|
238
|
+
background-color: #f8f9fa;
|
|
239
|
+
padding: 24px;
|
|
240
|
+
border-radius: 8px;
|
|
241
|
+
display: flex;
|
|
242
|
+
flex-direction: column;
|
|
243
|
+
align-items: center;
|
|
244
|
+
margin-bottom: 24px;
|
|
245
|
+
position: relative;
|
|
246
|
+
animation: glow 2s ease-in-out infinite;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.qr-wrapper::before {
|
|
250
|
+
content: '';
|
|
251
|
+
position: absolute;
|
|
252
|
+
top: -2px;
|
|
253
|
+
left: -2px;
|
|
254
|
+
right: -2px;
|
|
255
|
+
bottom: -2px;
|
|
256
|
+
background: linear-gradient(45deg, #1677ff, #10b981, #1677ff);
|
|
257
|
+
border-radius: 10px;
|
|
258
|
+
z-index: -1;
|
|
259
|
+
filter: blur(8px);
|
|
260
|
+
opacity: 0.5;
|
|
261
|
+
transition: opacity 0.3s ease;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.qr-wrapper:hover::before {
|
|
265
|
+
opacity: 0.7;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
@keyframes glow {
|
|
269
|
+
0% {
|
|
270
|
+
box-shadow:
|
|
271
|
+
0 0 5px rgba(22, 119, 255, 0.2),
|
|
272
|
+
0 0 10px rgba(22, 119, 255, 0.2),
|
|
273
|
+
0 0 15px rgba(22, 119, 255, 0.2);
|
|
274
|
+
}
|
|
275
|
+
50% {
|
|
276
|
+
box-shadow:
|
|
277
|
+
0 0 10px rgba(22, 119, 255, 0.3),
|
|
278
|
+
0 0 20px rgba(22, 119, 255, 0.3),
|
|
279
|
+
0 0 30px rgba(22, 119, 255, 0.3);
|
|
280
|
+
}
|
|
281
|
+
100% {
|
|
282
|
+
box-shadow:
|
|
283
|
+
0 0 5px rgba(22, 119, 255, 0.2),
|
|
284
|
+
0 0 10px rgba(22, 119, 255, 0.2),
|
|
285
|
+
0 0 15px rgba(22, 119, 255, 0.2);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.qr-status {
|
|
290
|
+
display: flex;
|
|
291
|
+
align-items: center;
|
|
292
|
+
margin-top: 16px;
|
|
293
|
+
background: #fff;
|
|
294
|
+
padding: 6px 12px;
|
|
295
|
+
border-radius: 16px;
|
|
296
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.status-dot {
|
|
300
|
+
width: 8px;
|
|
301
|
+
height: 8px;
|
|
302
|
+
background-color: #10b981;
|
|
303
|
+
border-radius: 50%;
|
|
304
|
+
margin-right: 8px;
|
|
305
|
+
animation: pulse 2s infinite;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.qr-instructions {
|
|
309
|
+
background-color: #f8f9fa;
|
|
310
|
+
border-radius: 8px;
|
|
311
|
+
padding: 20px;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.instruction-title {
|
|
315
|
+
font-size: 16px;
|
|
316
|
+
font-weight: 500;
|
|
317
|
+
color: #1f2937;
|
|
318
|
+
margin-bottom: 12px;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.instruction-steps {
|
|
322
|
+
margin: 0;
|
|
323
|
+
padding-left: 20px;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.instruction-steps li {
|
|
327
|
+
color: #4b5563;
|
|
328
|
+
margin-bottom: 8px;
|
|
329
|
+
font-size: 14px;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.instruction-steps li:last-child {
|
|
333
|
+
margin-bottom: 0;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
@keyframes pulse {
|
|
337
|
+
0% {
|
|
338
|
+
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
|
|
339
|
+
}
|
|
340
|
+
70% {
|
|
341
|
+
box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
|
|
342
|
+
}
|
|
343
|
+
100% {
|
|
344
|
+
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
@keyframes fadeIn {
|
|
349
|
+
from {
|
|
350
|
+
opacity: 0;
|
|
351
|
+
}
|
|
352
|
+
to {
|
|
353
|
+
opacity: 1;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.app-container {
|
|
358
|
+
display: flex;
|
|
359
|
+
height: 100%;
|
|
360
|
+
position: relative;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.main-content {
|
|
364
|
+
padding: 10px 10px;
|
|
365
|
+
height: 100%;
|
|
366
|
+
width: calc(100% - 502px);
|
|
367
|
+
position: relative;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.right-panel {
|
|
371
|
+
width: 480px;
|
|
372
|
+
height: 100%;
|
|
373
|
+
position: relative;
|
|
374
|
+
background: #fff;
|
|
375
|
+
border-left: 1px solid #e4e7ed;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.right-panel.collapsed {
|
|
379
|
+
width: 0;
|
|
380
|
+
overflow: hidden;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.style-settings-icon {
|
|
384
|
+
position: fixed;
|
|
385
|
+
bottom: 100px;
|
|
386
|
+
right: 100px;
|
|
387
|
+
font-size: 24px;
|
|
388
|
+
z-index: 30;
|
|
389
|
+
cursor: pointer;
|
|
390
|
+
}
|
|
391
|
+
</style>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
[
|
|
2
|
+
|
|
3
|
+
{
|
|
4
|
+
"id": 1,
|
|
5
|
+
"name": "iPhone 16",
|
|
6
|
+
"price": 5999,
|
|
7
|
+
"description": "苹果手机",
|
|
8
|
+
"image": "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.alicdn.com%2Fbao%2Fuploaded%2FO1CN011qHTQ81edxfMcnfNR_%21%216000000003895-0-yinhe.jpg_300x300.jpg&refer=http%3A%2F%2Fimg.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1750986769&t=4570d81c9f0301ab1745c75dfff9f272",
|
|
9
|
+
"category": "phones",
|
|
10
|
+
"stock": 100,
|
|
11
|
+
"status": "on",
|
|
12
|
+
"createdAt": "2024-03-20",
|
|
13
|
+
"updatedAt": "2025-05-29T21:56:30.481Z"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": 2,
|
|
17
|
+
"name": "MacBook Pro",
|
|
18
|
+
"price": 12999,
|
|
19
|
+
"description": "笔记本电脑",
|
|
20
|
+
"image": "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fg-search1.alicdn.com%2Fimg%2Fbao%2Fuploaded%2Fi3%2F1831488473%2FO1CN01I8MRyC2CSgWGbhVjJ_%21%211831488473.jpg_300x300.jpg&refer=http%3A%2F%2Fg-search1.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1750986810&t=9eb9c9e0765244130200dd0f935b9cea",
|
|
21
|
+
"category": "laptops",
|
|
22
|
+
"stock": 50,
|
|
23
|
+
"status": "off",
|
|
24
|
+
"createdAt": "2024-03-20",
|
|
25
|
+
"updatedAt": "2024-03-20"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": 3,
|
|
29
|
+
"name": "iPad",
|
|
30
|
+
"price": 2399,
|
|
31
|
+
"description": "平板电脑",
|
|
32
|
+
"image": "https://respic.3d66.com/coverimg/cache/f2d1/53893cd4d00efe87132f1e3371b72339.jpg%21medium-size-2?v=17611204&k=D41D8CD98F00B204E9800998ECF8427E",
|
|
33
|
+
"category": "tablets",
|
|
34
|
+
"stock": 12999,
|
|
35
|
+
"status": "on",
|
|
36
|
+
"createdAt": "2025-05-27T00:49:29.993Z",
|
|
37
|
+
"updatedAt": "2025-05-29T16:11:49.743Z"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": 4,
|
|
41
|
+
"name": "Huawei Pura 70",
|
|
42
|
+
"price": 6499,
|
|
43
|
+
"description": "华为手机",
|
|
44
|
+
"image": "https://img1.baidu.com/it/u=1559062020,1043707656&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500",
|
|
45
|
+
"category": "phones",
|
|
46
|
+
"stock": 1999,
|
|
47
|
+
"status": "on",
|
|
48
|
+
"createdAt": "2025-05-27T00:54:38.771Z",
|
|
49
|
+
"updatedAt": "2025-05-29T22:29:40.124Z"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": 5,
|
|
53
|
+
"name": "Huawei Mate XT ultimate",
|
|
54
|
+
"price": 23999,
|
|
55
|
+
"description": "华为手机 非凡大师",
|
|
56
|
+
"image": "https://img2.baidu.com/it/u=2892977680,910281472&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",
|
|
57
|
+
"category": "phones",
|
|
58
|
+
"stock": 100,
|
|
59
|
+
"status": "on",
|
|
60
|
+
"createdAt": "2025-05-27T00:54:38.771Z",
|
|
61
|
+
"updatedAt": "2025-05-30T17:40:59.199Z"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": 6,
|
|
65
|
+
"name": "小米15",
|
|
66
|
+
"price": 4999,
|
|
67
|
+
"description": "小米手机",
|
|
68
|
+
"image": "https://img2.baidu.com/it/u=2892977680,910281472&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",
|
|
69
|
+
"category": "phones",
|
|
70
|
+
"stock": 222,
|
|
71
|
+
"status": "off",
|
|
72
|
+
"createdAt": "2025-05-29T00:30:02.226Z",
|
|
73
|
+
"updatedAt": "2025-05-29T16:14:35.150Z"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"id": 7,
|
|
77
|
+
"name": "小米 13",
|
|
78
|
+
"price": 3999,
|
|
79
|
+
"description": "小米手机",
|
|
80
|
+
"image": "https://img1.baidu.com/it/u=809120544,2106407569&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500",
|
|
81
|
+
"category": "phones",
|
|
82
|
+
"stock": 2222,
|
|
83
|
+
"status": "on",
|
|
84
|
+
"createdAt": "2025-05-29T00:32:46.308Z",
|
|
85
|
+
"updatedAt": "2025-05-30T21:28:28.543Z"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": 8,
|
|
89
|
+
"name": "Vivo X90",
|
|
90
|
+
"price": 2999,
|
|
91
|
+
"description": "Vivo手机",
|
|
92
|
+
"image": "https://img2.baidu.com/it/u=2892977680,910281472&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",
|
|
93
|
+
"category": "phones",
|
|
94
|
+
"stock": 3999,
|
|
95
|
+
"status": "on",
|
|
96
|
+
"createdAt": "2025-05-27T00:54:38.771Z",
|
|
97
|
+
"updatedAt": "2025-05-30T17:40:59.199Z"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// 用户类型
|
|
2
|
+
export interface User {
|
|
3
|
+
id: number
|
|
4
|
+
username: string
|
|
5
|
+
avatar?: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// 商品类型
|
|
9
|
+
export interface Product {
|
|
10
|
+
id: number
|
|
11
|
+
name: string
|
|
12
|
+
price: number
|
|
13
|
+
description?: string
|
|
14
|
+
image: string
|
|
15
|
+
category: string
|
|
16
|
+
stock: number
|
|
17
|
+
status: 'on' | 'off' // on: 上架, off: 下架
|
|
18
|
+
createdAt?: string
|
|
19
|
+
updatedAt?: string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// 登录表单类型
|
|
23
|
+
export interface LoginForm {
|
|
24
|
+
username: string
|
|
25
|
+
password: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// 商品表单类型
|
|
29
|
+
export interface ProductForm {
|
|
30
|
+
name: string
|
|
31
|
+
price: number
|
|
32
|
+
description: string
|
|
33
|
+
image: string
|
|
34
|
+
category: string
|
|
35
|
+
stock: number
|
|
36
|
+
status: 'on' | 'off'
|
|
37
|
+
}
|
|
@@ -63,8 +63,8 @@ import { genMenus, getMenuIcons } from '@/menus.jsx'
|
|
|
63
63
|
import { router } from '@/router.js'
|
|
64
64
|
import { getWord, i18nByKey, appData, appFn, useApiMode, useTemplateMode } from '@/tools'
|
|
65
65
|
import useTheme from '@/tools/useTheme'
|
|
66
|
-
import FloatSettings from '@/
|
|
67
|
-
import VersionTip from '@/
|
|
66
|
+
import FloatSettings from '@/components/float-settings.vue'
|
|
67
|
+
import VersionTip from '@/components/version-tip.vue'
|
|
68
68
|
|
|
69
69
|
export default defineComponent({
|
|
70
70
|
name: 'LayoutVue',
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<tiny-pager
|
|
3
|
-
@current-change="handleCurrentChange"
|
|
4
|
-
:current-page="currentPage"
|
|
5
|
-
@update:current-page="currentPage = $event"
|
|
6
|
-
:page-size="100"
|
|
7
|
-
layout="total, sizes, prev, pager, next"
|
|
8
|
-
:total="1000"
|
|
9
|
-
>
|
|
10
|
-
</tiny-pager>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
import { TinyPager, TinyModal } from '@opentiny/vue'
|
|
15
|
-
|
|
16
|
-
export default {
|
|
17
|
-
components: {
|
|
18
|
-
TinyPager
|
|
19
|
-
},
|
|
20
|
-
data() {
|
|
21
|
-
return {
|
|
22
|
-
currentPage: 5
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
methods: {
|
|
26
|
-
handleCurrentChange(val) {
|
|
27
|
-
TinyModal.message({
|
|
28
|
-
message: `current-change 事件,当前页: ${val}`,
|
|
29
|
-
status: 'info'
|
|
30
|
-
})
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
</script>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<tiny-pager
|
|
3
|
-
@next-click="nextClick"
|
|
4
|
-
:current-page="currentPage"
|
|
5
|
-
@update:current-page="currentPage = $event"
|
|
6
|
-
:page-size="100"
|
|
7
|
-
layout="total, sizes, prev, pager, next"
|
|
8
|
-
:total="1000"
|
|
9
|
-
>
|
|
10
|
-
</tiny-pager>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
import { TinyPager, TinyModal } from '@opentiny/vue'
|
|
15
|
-
|
|
16
|
-
export default {
|
|
17
|
-
components: {
|
|
18
|
-
TinyPager
|
|
19
|
-
},
|
|
20
|
-
data() {
|
|
21
|
-
return {
|
|
22
|
-
currentPage: 5
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
methods: {
|
|
26
|
-
nextClick(val) {
|
|
27
|
-
TinyModal.message({
|
|
28
|
-
message: `next-click 事件,当前页: ${val}`,
|
|
29
|
-
status: 'info'
|
|
30
|
-
})
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
</script>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<tiny-pager
|
|
3
|
-
@prev-click="prevClick"
|
|
4
|
-
:current-page="currentPage"
|
|
5
|
-
@update:current-page="currentPage = $event"
|
|
6
|
-
:page-size="100"
|
|
7
|
-
layout="total, sizes, prev, pager, next"
|
|
8
|
-
:total="1000"
|
|
9
|
-
>
|
|
10
|
-
</tiny-pager>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
import { TinyPager, TinyModal } from '@opentiny/vue'
|
|
15
|
-
|
|
16
|
-
export default {
|
|
17
|
-
components: {
|
|
18
|
-
TinyPager
|
|
19
|
-
},
|
|
20
|
-
data() {
|
|
21
|
-
return {
|
|
22
|
-
currentPage: 5
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
methods: {
|
|
26
|
-
prevClick(val) {
|
|
27
|
-
TinyModal.message({
|
|
28
|
-
message: `prev-click 事件,当前页: ${val}`,
|
|
29
|
-
status: 'info'
|
|
30
|
-
})
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
</script>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/demos/pc/app/text-popup/{value-composition-api.vue → modelValue-composition-api.vue}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|