@opentiny/vue-docs 3.23.0 → 3.24.0
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 +461 -451
- 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
|
@@ -1,100 +1,55 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<tiny-grid
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<tiny-grid
|
|
4
|
+
:data="tableData"
|
|
5
|
+
:edit-config="{ trigger: 'click', mode: 'cell', showStatus: true }"
|
|
6
|
+
height="420px"
|
|
7
|
+
:tiny_mcp_config="{
|
|
8
|
+
server,
|
|
9
|
+
business: {
|
|
10
|
+
id: 'company-information',
|
|
11
|
+
description: '公司人员信息表'
|
|
12
|
+
}
|
|
13
|
+
}"
|
|
14
|
+
>
|
|
15
|
+
<tiny-grid-column type="index" width="60"></tiny-grid-column>
|
|
16
|
+
<tiny-grid-column type="selection" width="60"></tiny-grid-column>
|
|
17
|
+
<tiny-grid-column field="company" title="公司名称"></tiny-grid-column>
|
|
18
|
+
<tiny-grid-column field="employees" title="员工数"></tiny-grid-column>
|
|
19
|
+
<tiny-grid-column field="createdDate" title="创建日期"></tiny-grid-column>
|
|
20
|
+
<tiny-grid-column field="city" title="城市"></tiny-grid-column>
|
|
21
|
+
</tiny-grid>
|
|
22
|
+
</div>
|
|
16
23
|
</template>
|
|
17
24
|
|
|
18
|
-
<script setup
|
|
25
|
+
<script setup>
|
|
26
|
+
import { ref } from 'vue'
|
|
19
27
|
import { TinyGrid, TinyGridColumn } from '@opentiny/vue'
|
|
20
|
-
import {
|
|
28
|
+
import { useNextServer } from '@opentiny/next-vue'
|
|
21
29
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
|
|
41
|
-
name: 'RFV 有限责任公司',
|
|
42
|
-
city: '中山',
|
|
43
|
-
employees: 1300,
|
|
44
|
-
createdDate: '2014-02-14 14:14:14',
|
|
45
|
-
boole: false
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
id: '4',
|
|
49
|
-
name: 'TGB 科技 YX 公司',
|
|
50
|
-
city: '龙岩',
|
|
51
|
-
employees: 360,
|
|
52
|
-
createdDate: '2013-01-13 13:13:13',
|
|
53
|
-
boole: true
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
id: '5',
|
|
57
|
-
name: 'YHN 科技 YX 公司',
|
|
58
|
-
city: '韶关',
|
|
59
|
-
employees: 810,
|
|
60
|
-
createdDate: '2012-12-12 12:12:12',
|
|
61
|
-
boole: true
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
id: '6',
|
|
65
|
-
name: 'WSX 科技 YX 公司',
|
|
66
|
-
city: '黄冈',
|
|
67
|
-
employees: 800,
|
|
68
|
-
createdDate: '2011-11-11 11:11:11',
|
|
69
|
-
boole: true
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
id: '7',
|
|
73
|
-
name: 'KBG 物业 YX 公司',
|
|
74
|
-
city: '赤壁',
|
|
75
|
-
employees: 400,
|
|
76
|
-
createdDate: '2016-04-30 23:56:00',
|
|
77
|
-
boole: false
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
id: '8',
|
|
81
|
-
name: '深圳市福德宝网络技术 YX 公司',
|
|
82
|
-
boole: true,
|
|
83
|
-
city: '厦门',
|
|
84
|
-
createdDate: '2016-06-03 13:53:25',
|
|
85
|
-
employees: 540
|
|
86
|
-
}
|
|
87
|
-
])
|
|
30
|
+
// 初始化表格数据
|
|
31
|
+
const _table = [
|
|
32
|
+
{ company: 'GFD 有限责任公司', city: '广州', employees: 800, createdDate: '2014-04-30 00:56:00' },
|
|
33
|
+
{ company: 'AWE 有限责任公司', city: '深圳', employees: 500, createdDate: '2015-05-01 01:01:01' },
|
|
34
|
+
{ company: 'ASD 有限责任公司', city: '中山', employees: 400, createdDate: '2013-03-03 03:03:03' },
|
|
35
|
+
{ company: 'ZXC 有限责任公司', city: '广州', employees: 1000, createdDate: '2012-02-02 02:02:02' },
|
|
36
|
+
{ company: 'VBN 有限责任公司', city: '深圳', employees: 600, createdDate: '2011-01-01 01:01:01' },
|
|
37
|
+
{ company: 'QWE 有限责任公司', city: '中山', employees: 700, createdDate: '2016-08-08 08:08:08' },
|
|
38
|
+
{ company: 'RTY 有限责任公司', city: '广州', employees: 900, createdDate: '2015-09-09 09:09:09' },
|
|
39
|
+
{ company: 'UIO 有限责任公司', city: '深圳', employees: 1100, createdDate: '2014-10-10 10:10:10' },
|
|
40
|
+
{ company: 'HJK 有限责任公司', city: '中山', employees: 1200, createdDate: '2013-11-11 11:11:11' },
|
|
41
|
+
{ company: 'WWW 有限责任公司', city: '深圳', employees: 300, createdDate: '2016-07-08 12:36:22' },
|
|
42
|
+
{ company: 'RFV 有限责任公司', city: '中山', employees: 1300, createdDate: '2014-02-14 14:14:14' },
|
|
43
|
+
{ company: 'TGB 有限责任公司', city: '广州', employees: 360, createdDate: '2013-01-13 13:13:13' },
|
|
44
|
+
{ company: 'YHN 有限责任公司', city: '深圳', employees: 810, createdDate: '2012-12-12 12:12:12' },
|
|
45
|
+
{ company: 'WSX 有限责任公司', city: '中山', employees: 800, createdDate: '2011-11-11 11:11:11' },
|
|
46
|
+
{ company: 'KBG 有限责任公司', city: '深圳', employees: 400, createdDate: '2014-04-30 23:56:00' },
|
|
47
|
+
{ company: 'SZB 有限责任公司', city: '深圳', employees: 1400, createdDate: '2016-06-03 13:53:25' }
|
|
48
|
+
]
|
|
88
49
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
onChange={(event) => {
|
|
95
|
-
row.boole = event.target.checked
|
|
96
|
-
}}
|
|
97
|
-
/>
|
|
98
|
-
)
|
|
99
|
-
}
|
|
50
|
+
const tableData = ref(_table)
|
|
51
|
+
|
|
52
|
+
const { server } = useNextServer({
|
|
53
|
+
serverInfo: { name: 'company-information', version: '1.0.0' }
|
|
54
|
+
})
|
|
100
55
|
</script>
|
|
@@ -4,5 +4,5 @@ test('标签式表格', async ({ page }) => {
|
|
|
4
4
|
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
5
|
await page.goto('grid#base-basic-usage')
|
|
6
6
|
|
|
7
|
-
await expect(page.getByRole('
|
|
7
|
+
await expect(page.getByRole('cell', { name: 'GFD 有限责任公司' })).toBeVisible()
|
|
8
8
|
})
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<tiny-grid
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
field="
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
format-text="boole"
|
|
13
|
-
:editor="checkboxEdit"
|
|
14
|
-
></tiny-grid-column>
|
|
15
|
-
</tiny-grid>
|
|
2
|
+
<div>
|
|
3
|
+
<tiny-grid :data="tableData" :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true }" height="420px">
|
|
4
|
+
<tiny-grid-column type="index" width="60"></tiny-grid-column>
|
|
5
|
+
<tiny-grid-column type="selection" width="60"></tiny-grid-column>
|
|
6
|
+
<tiny-grid-column field="company" title="公司名称"></tiny-grid-column>
|
|
7
|
+
<tiny-grid-column field="employees" title="员工数"></tiny-grid-column>
|
|
8
|
+
<tiny-grid-column field="createdDate" title="创建日期"></tiny-grid-column>
|
|
9
|
+
<tiny-grid-column field="city" title="城市"></tiny-grid-column>
|
|
10
|
+
</tiny-grid>
|
|
11
|
+
</div>
|
|
16
12
|
</template>
|
|
17
13
|
|
|
18
|
-
<script
|
|
14
|
+
<script>
|
|
19
15
|
import { TinyGrid, TinyGridColumn } from '@opentiny/vue'
|
|
20
16
|
|
|
21
17
|
export default {
|
|
@@ -24,125 +20,26 @@ export default {
|
|
|
24
20
|
TinyGridColumn
|
|
25
21
|
},
|
|
26
22
|
data() {
|
|
27
|
-
const
|
|
28
|
-
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
{
|
|
45
|
-
id: '3',
|
|
46
|
-
name: 'RFV 有限责任公司',
|
|
47
|
-
city: '中山',
|
|
48
|
-
employees: 1300,
|
|
49
|
-
createdDate: '2014-02-14 14:14:14',
|
|
50
|
-
boole: false
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: '4',
|
|
54
|
-
name: 'TGB 科技 YX 公司',
|
|
55
|
-
city: '龙岩',
|
|
56
|
-
employees: 360,
|
|
57
|
-
createdDate: '2013-01-13 13:13:13',
|
|
58
|
-
boole: true
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
id: '5',
|
|
62
|
-
name: 'YHN 科技 YX 公司',
|
|
63
|
-
city: '韶关',
|
|
64
|
-
employees: 810,
|
|
65
|
-
createdDate: '2012-12-12 12:12:12',
|
|
66
|
-
boole: true
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
id: '6',
|
|
70
|
-
name: 'WSX 科技 YX 公司',
|
|
71
|
-
city: '黄冈',
|
|
72
|
-
employees: 800,
|
|
73
|
-
createdDate: '2011-11-11 11:11:11',
|
|
74
|
-
boole: true
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
id: '7',
|
|
78
|
-
name: 'KBG 物业 YX 公司',
|
|
79
|
-
city: '赤壁',
|
|
80
|
-
employees: 400,
|
|
81
|
-
createdDate: '2016-04-30 23:56:00',
|
|
82
|
-
boole: false
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
id: '8',
|
|
86
|
-
name: '深圳市福德宝网络技术 YX 公司',
|
|
87
|
-
boole: true,
|
|
88
|
-
city: '厦门',
|
|
89
|
-
createdDate: '2016-06-03 13:53:25',
|
|
90
|
-
employees: 540
|
|
91
|
-
}
|
|
23
|
+
const _table = [
|
|
24
|
+
{ company: 'GFD 有限责任公司', city: '广州', employees: 800, createdDate: '2014-04-30 00:56:00' },
|
|
25
|
+
{ company: 'AWE 有限责任公司', city: '深圳', employees: 500, createdDate: '2015-05-01 01:01:01' },
|
|
26
|
+
{ company: 'ASD 有限责任公司', city: '中山', employees: 400, createdDate: '2013-03-03 03:03:03' },
|
|
27
|
+
{ company: 'ZXC 有限责任公司', city: '广州', employees: 1000, createdDate: '2012-02-02 02:02:02' },
|
|
28
|
+
{ company: 'VBN 有限责任公司', city: '深圳', employees: 600, createdDate: '2011-01-01 01:01:01' },
|
|
29
|
+
{ company: 'QWE 有限责任公司', city: '中山', employees: 700, createdDate: '2016-08-08 08:08:08' },
|
|
30
|
+
{ company: 'RTY 有限责任公司', city: '广州', employees: 900, createdDate: '2015-09-09 09:09:09' },
|
|
31
|
+
{ company: 'UIO 有限责任公司', city: '深圳', employees: 1100, createdDate: '2014-10-10 10:10:10' },
|
|
32
|
+
{ company: 'HJK 有限责任公司', city: '中山', employees: 1200, createdDate: '2013-11-11 11:11:11' },
|
|
33
|
+
{ company: 'WWW 有限责任公司', city: '深圳', employees: 300, createdDate: '2016-07-08 12:36:22' },
|
|
34
|
+
{ company: 'RFV 有限责任公司', city: '中山', employees: 1300, createdDate: '2014-02-14 14:14:14' },
|
|
35
|
+
{ company: 'TGB 有限责任公司', city: '广州', employees: 360, createdDate: '2013-01-13 13:13:13' },
|
|
36
|
+
{ company: 'YHN 有限责任公司', city: '深圳', employees: 810, createdDate: '2012-12-12 12:12:12' },
|
|
37
|
+
{ company: 'WSX 有限责任公司', city: '中山', employees: 800, createdDate: '2011-11-11 11:11:11' },
|
|
38
|
+
{ company: 'KBG 有限责任公司', city: '深圳', employees: 400, createdDate: '2014-04-30 23:56:00' },
|
|
39
|
+
{ company: 'SZB 有限责任公司', city: '深圳', employees: 1400, createdDate: '2016-06-03 13:53:25' }
|
|
92
40
|
]
|
|
93
|
-
|
|
94
41
|
return {
|
|
95
|
-
|
|
96
|
-
editConfig: {
|
|
97
|
-
trigger: 'click',
|
|
98
|
-
mode: 'cell',
|
|
99
|
-
showStatus: true
|
|
100
|
-
},
|
|
101
|
-
columns: [
|
|
102
|
-
{
|
|
103
|
-
type: 'index',
|
|
104
|
-
width: 60
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
type: 'selection',
|
|
108
|
-
width: 60
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
field: 'employees',
|
|
112
|
-
title: '员工数'
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
field: 'createdDate',
|
|
116
|
-
title: '创建日期'
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
field: 'city',
|
|
120
|
-
title: '城市'
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
field: 'boole',
|
|
124
|
-
title: '布尔值',
|
|
125
|
-
align: 'center',
|
|
126
|
-
formatText: 'boole',
|
|
127
|
-
editor: this.checkboxEdit
|
|
128
|
-
}
|
|
129
|
-
],
|
|
130
|
-
data: tableData
|
|
131
|
-
},
|
|
132
|
-
tableData
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
methods: {
|
|
136
|
-
checkboxEdit(h, { row }) {
|
|
137
|
-
return (
|
|
138
|
-
<input
|
|
139
|
-
type="checkbox"
|
|
140
|
-
checked={row.boole}
|
|
141
|
-
onChange={(event) => {
|
|
142
|
-
row.boole = event.target.checked
|
|
143
|
-
}}
|
|
144
|
-
/>
|
|
145
|
-
)
|
|
42
|
+
tableData: _table
|
|
146
43
|
}
|
|
147
44
|
}
|
|
148
45
|
}
|
|
@@ -4,7 +4,7 @@ test('根据日期动态生成列', async ({ page }) => {
|
|
|
4
4
|
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
5
|
await page.goto('grid-dynamically-columns#dynamically-columns-dynamically-columns')
|
|
6
6
|
await page.getByRole('textbox').nth(1).click()
|
|
7
|
-
await page.getByText('
|
|
8
|
-
await page.getByText('
|
|
9
|
-
await expect(page.getByRole('cell', { name: '12' })).toBeVisible()
|
|
7
|
+
await page.getByText('12 月').first().click()
|
|
8
|
+
await page.getByText('2 月').nth(2).click()
|
|
9
|
+
await expect(page.getByRole('cell', { name: '12' }).first()).toBeVisible()
|
|
10
10
|
})
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
column: '1',
|
|
3
|
+
owner: '',
|
|
4
|
+
demos: [
|
|
5
|
+
{
|
|
6
|
+
demoId: 'grid-ai-agent',
|
|
7
|
+
name: { 'zh-CN': '表格智能体', 'en-US': 'grid agent' },
|
|
8
|
+
desc: {
|
|
9
|
+
'zh-CN': `表格智能体是表格组件面向 AI 领域的应用,提供了一个基于表格数据的智能体交互界面。用户可以通过自然语言与表格进行交互,智能体会根据表格内容和用户输入执行操作。<br>
|
|
10
|
+
目前表格智能体支持的操作包括:<br>
|
|
11
|
+
- 查询表格数据:用户可以输入自然语言查询表格中的数据,智能体会解析查询并返回结果,以及根据结果执行后续的操作。<br>
|
|
12
|
+
- 滚动到指定行:用户可以通过自然语言指令,将表格滚动到指定位置。<br>
|
|
13
|
+
- 选中表格数据:用户可以通过自然语言指令,选中表格数据。<br>
|
|
14
|
+
- 选中全部数据:用户可以通过自然语言指令,选中全部数据。<br>
|
|
15
|
+
|
|
16
|
+
通过属性 <code>tiny_mcp_config</code> 可以配置表格的业务意义以及传入<code>server</code>对象,详见示例。`,
|
|
17
|
+
'en-US': ``
|
|
18
|
+
},
|
|
19
|
+
codeFiles: ['ai-agent/basic-usage.vue']
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
apis: [{ name: 'grid-ai-agent', 'type': 'component', 'props': [], 'events': [], 'slots': [] }]
|
|
23
|
+
}
|
|
@@ -11,6 +11,7 @@ test('PopEditor 布局与配置', async ({ page }) => {
|
|
|
11
11
|
const rightLayout = dialogBox.locator('.tiny-popeditor-body__right')
|
|
12
12
|
|
|
13
13
|
await textBox.click()
|
|
14
|
+
await expect(page.locator('body')).not.toHaveClass(/dialog-box__scroll-lock/)
|
|
14
15
|
await expect(dialogBox).toBeVisible()
|
|
15
16
|
await expect(leftLayout).toBeVisible()
|
|
16
17
|
await expect(rightLayout).toBeVisible()
|
|
@@ -38,9 +38,9 @@ export default {
|
|
|
38
38
|
},
|
|
39
39
|
desc: {
|
|
40
40
|
'zh-CN':
|
|
41
|
-
'<p>通过 <code>conditions</code> 项目里属性里的 <code>span</code> 配置栅格,<code>labelWidth</code> 配置 label 宽度,<code>component</code>配置自定义组件,并通过 <code>attrs</code>
|
|
41
|
+
'<p>通过 <code>conditions</code> 项目里属性里的 <code>span</code> 配置栅格,<code>labelWidth</code> 配置 label 宽度,<code>component</code>配置自定义组件,并通过 <code>attrs</code> 配置组件属性。<code>lock-scroll</code> 配置弹出窗口时是否禁用滚动条。</p>',
|
|
42
42
|
'en-US':
|
|
43
|
-
'<p>Set <code>span</code> in the attributes of the <code>condition</code> project to configure the grid and <code>labelWidth</code> to configure the label width. <code>component</code>Configure custom components and set component attributes through <code>attrs</code
|
|
43
|
+
'<p>Set <code>span</code> in the attributes of the <code>condition</code> project to configure the grid and <code>labelWidth</code> to configure the label width. <code>component</code>Configure custom components and set component attributes through <code>attrs</code>.<code>lock-scroll</code>Configure whether to disable the scrollbar when a pop-up window appears.</p>'
|
|
44
44
|
},
|
|
45
45
|
codeFiles: ['condition-layout.vue']
|
|
46
46
|
},
|
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div class="qr-code-container">
|
|
3
|
+
<div>
|
|
4
|
+
<tiny-button @click="changeColor">改变颜色</tiny-button>
|
|
5
|
+
</div>
|
|
6
|
+
<br />
|
|
7
|
+
<tiny-qr-code v-bind="params"></tiny-qr-code>
|
|
8
|
+
</div>
|
|
3
9
|
</template>
|
|
4
10
|
|
|
5
11
|
<script setup>
|
|
6
|
-
import { TinyQrCode } from '@opentiny/vue'
|
|
12
|
+
import { TinyQrCode, TinyButton } from '@opentiny/vue'
|
|
13
|
+
import { ref } from 'vue'
|
|
7
14
|
|
|
8
|
-
const params = {
|
|
15
|
+
const params = ref({
|
|
9
16
|
value: '测试二维码数据',
|
|
10
17
|
color: '#1677ff',
|
|
11
18
|
size: 250,
|
|
12
19
|
style: { background: '#f5f5f5', padding: '24px' }
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const changeColor = () => {
|
|
23
|
+
params.value.color = '#666'
|
|
13
24
|
}
|
|
14
25
|
</script>
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div class="qr-code-container">
|
|
3
|
+
<div>
|
|
4
|
+
<tiny-button @click="changeColor">改变颜色</tiny-button>
|
|
5
|
+
</div>
|
|
6
|
+
<br />
|
|
7
|
+
<tiny-qr-code v-bind="params"></tiny-qr-code>
|
|
8
|
+
</div>
|
|
3
9
|
</template>
|
|
4
10
|
|
|
5
11
|
<script>
|
|
6
|
-
import { TinyQrCode } from '@opentiny/vue'
|
|
12
|
+
import { TinyQrCode, TinyButton } from '@opentiny/vue'
|
|
7
13
|
|
|
8
14
|
export default {
|
|
9
15
|
components: {
|
|
10
|
-
TinyQrCode
|
|
16
|
+
TinyQrCode,
|
|
17
|
+
TinyButton
|
|
11
18
|
},
|
|
12
19
|
data() {
|
|
13
20
|
return {
|
|
@@ -18,6 +25,11 @@ export default {
|
|
|
18
25
|
style: { background: '#f5f5f5', padding: '24px' }
|
|
19
26
|
}
|
|
20
27
|
}
|
|
28
|
+
},
|
|
29
|
+
methods: {
|
|
30
|
+
changeColor() {
|
|
31
|
+
this.params.color = '#666'
|
|
32
|
+
}
|
|
21
33
|
}
|
|
22
34
|
}
|
|
23
35
|
</script>
|
|
@@ -2,9 +2,9 @@ import { test, expect } from '@playwright/test'
|
|
|
2
2
|
|
|
3
3
|
test('Textpopup 基本用法', async ({ page }) => {
|
|
4
4
|
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
-
await page.goto('text-popup#
|
|
5
|
+
await page.goto('text-popup#modelValue')
|
|
6
6
|
|
|
7
|
-
const preview = page.locator('#
|
|
7
|
+
const preview = page.locator('#modelValue')
|
|
8
8
|
const small = preview.locator('input')
|
|
9
9
|
const larger = preview.locator('textarea')
|
|
10
10
|
|
|
@@ -55,16 +55,16 @@ export default {
|
|
|
55
55
|
codeFiles: ['separtor.vue']
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
|
-
demoId: '
|
|
58
|
+
demoId: 'modelValue',
|
|
59
59
|
name: {
|
|
60
60
|
'zh-CN': '绑定值',
|
|
61
61
|
'en-US': 'Bound Value'
|
|
62
62
|
},
|
|
63
63
|
desc: {
|
|
64
|
-
'zh-CN': '<p>通过 <code>
|
|
65
|
-
'en-US': '<p>You can set the binding value using <code>
|
|
64
|
+
'zh-CN': '<p>通过 <code>modelValue</code> 或 <code>v-model</code> 设置绑定值。</p>\n',
|
|
65
|
+
'en-US': '<p>You can set the binding value using <code>modelValue</code> or <code>v-model</code>. </p>\n'
|
|
66
66
|
},
|
|
67
|
-
codeFiles: ['
|
|
67
|
+
codeFiles: ['modelValue.vue']
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
demoId: 'clear-value',
|
|
@@ -76,7 +76,7 @@ export default {
|
|
|
76
76
|
'zh-CN': '详细用法参考如下示例',
|
|
77
77
|
'en-US': 'For details, see the following example.'
|
|
78
78
|
},
|
|
79
|
-
codeFiles: ['clear-
|
|
79
|
+
codeFiles: ['clear-modelValue.vue']
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
demoId: 'width',
|
|
@@ -98,12 +98,12 @@ export default {
|
|
|
98
98
|
support: {
|
|
99
99
|
value: true
|
|
100
100
|
},
|
|
101
|
-
description: '通过
|
|
101
|
+
description: '通过 modelValue 或 v-model 设置绑定值,通过 placeholder 设置提示占位文本。',
|
|
102
102
|
cloud: {
|
|
103
103
|
value: false
|
|
104
104
|
},
|
|
105
|
-
apis: ['
|
|
106
|
-
demos: ['basic-usage', '
|
|
105
|
+
apis: ['modelValue', 'v-model', 'placeholder'],
|
|
106
|
+
demos: ['basic-usage', 'modelValue', 'placeholder']
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
id: 'readonly',
|