@opentinyvue/vue-docs 3.24.0 → 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 +14 -0
- package/demos/apis/popeditor.js +14 -0
- package/demos/pc/app/dialog-select/nest-grid-multi-composition-api.vue +1 -0
- package/demos/pc/app/dialog-select/nest-grid-multi.spec.ts +1 -0
- package/demos/pc/app/dialog-select/nest-grid-multi.vue +1 -0
- 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 +36 -132
- 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/menus.js +0 -1
- package/package.json +11 -11
- package/playground/App.vue +2 -2
- package/src/App.vue +18 -1
- package/src/router.js +3 -0
- package/src/tools/appData.js +12 -2
- package/src/views/components-doc/common.vue +12 -19
- package/src/views/components-doc/components/float-settings.vue +20 -7
- package/src/views/components-doc/components/mcp-docs.vue +55 -0
- package/src/views/components-doc/composition/DifyModelProvider.ts +8 -4
- package/src/views/components-doc/composition/useTinyRobot.ts +10 -76
- package/src/views/components-doc/composition/utils.ts +42 -56
- package/src/views/components-doc/tiny-robot-chat.vue +8 -47
- package/demos/pc/app/grid/ai-agent/basic-usage-composition-api.vue +0 -100
- package/demos/pc/app/grid/ai-agent/basic-usage.vue +0 -100
- package/demos/pc/app/grid/webdoc/grid-ai-agent.cn.md +0 -7
- package/demos/pc/app/grid/webdoc/grid-ai-agent.en.md +0 -7
|
@@ -31,6 +31,20 @@ export default {
|
|
|
31
31
|
mode: ['pc'],
|
|
32
32
|
pcDemo: 'nest-grid-multi'
|
|
33
33
|
},
|
|
34
|
+
{
|
|
35
|
+
name: 'lock-scroll',
|
|
36
|
+
type: 'boolean',
|
|
37
|
+
defaultValue: 'true',
|
|
38
|
+
desc: {
|
|
39
|
+
'zh-CN': '设置弹出面板的锁定滚动',
|
|
40
|
+
'en-US': 'Set the lock scroll of the pop-up panel.'
|
|
41
|
+
},
|
|
42
|
+
meta: {
|
|
43
|
+
stable: '3.24.0'
|
|
44
|
+
},
|
|
45
|
+
mode: ['pc'],
|
|
46
|
+
pcDemo: 'nest-grid-multi'
|
|
47
|
+
},
|
|
34
48
|
{
|
|
35
49
|
name: 'grid-op',
|
|
36
50
|
typeAnchorName: 'IGridOption',
|
package/demos/apis/popeditor.js
CHANGED
|
@@ -344,6 +344,20 @@ export default {
|
|
|
344
344
|
mode: ['pc'],
|
|
345
345
|
pcDemo: 'title'
|
|
346
346
|
},
|
|
347
|
+
{
|
|
348
|
+
name: 'lock-scroll',
|
|
349
|
+
type: 'boolean',
|
|
350
|
+
defaultValue: 'true',
|
|
351
|
+
desc: {
|
|
352
|
+
'zh-CN': '设置弹出面板的锁定滚动',
|
|
353
|
+
'en-US': 'Set the lock scroll of the pop-up panel.'
|
|
354
|
+
},
|
|
355
|
+
meta: {
|
|
356
|
+
stable: '3.24.0'
|
|
357
|
+
},
|
|
358
|
+
mode: ['pc'],
|
|
359
|
+
pcDemo: 'condition-layout'
|
|
360
|
+
},
|
|
347
361
|
{
|
|
348
362
|
name: 'trigger',
|
|
349
363
|
type: "'default' | 'cell' | 'row'",
|
|
@@ -6,6 +6,7 @@ test('dialogSelect 表格多选', async ({ page }) => {
|
|
|
6
6
|
const demo = page.locator('#nest-grid-multi')
|
|
7
7
|
|
|
8
8
|
await demo.getByRole('button', { name: '打开窗口' }).click()
|
|
9
|
+
await expect(page.locator('body')).not.toHaveClass(/dialog-box__scroll-lock/)
|
|
9
10
|
await page
|
|
10
11
|
.locator('div')
|
|
11
12
|
.filter({ hasText: /^GFD 科技有限公司福州WSX 科技有限公司黄冈暂无数据$/ })
|
|
@@ -12,9 +12,9 @@ export default {
|
|
|
12
12
|
},
|
|
13
13
|
desc: {
|
|
14
14
|
'zh-CN':
|
|
15
|
-
'<p>通过 <code>auto-lookup</code>、<code>lookup-method</code> 属性 和 <code>change</code> 事件设置初始化时数据的反查回显功能。</p> \n<p>表格多选场景需要设置 <code>popselector</code> 为 <code>grid</code>,<code>multi</code> 为 <code>true</code>,<code>checkRowKeys</code>
|
|
15
|
+
'<p>通过 <code>auto-lookup</code>、<code>lookup-method</code> 属性 和 <code>change</code> 事件设置初始化时数据的反查回显功能。</p> \n<p>表格多选场景需要设置 <code>popselector</code> 为 <code>grid</code>,<code>multi</code> 为 <code>true</code>,<code>checkRowKeys</code> 设置默认选中数据。<code>lock-scroll</code> 配置弹出窗口时是否禁用滚动条。</p >\n',
|
|
16
16
|
'en-US':
|
|
17
|
-
'<p>Use the <code>auto-lookup</code>,<code>lookup-method</code> attributes, and <code>change</code> event settings to perform data backtracking during initialization. <code>autoLookup</code>The default value is <code>true</code>. </p>\n<p> Multiple selection scenarios in the table require setting<code>popcollector</code>as grid,<code>multi</code>as true, and<code>checkRowKeys</code>as default selected data. </p >\n'
|
|
17
|
+
'<p>Use the <code>auto-lookup</code>,<code>lookup-method</code> attributes, and <code>change</code> event settings to perform data backtracking during initialization. <code>autoLookup</code>The default value is <code>true</code>. </p>\n<p> Multiple selection scenarios in the table require setting<code>popcollector</code>as grid,<code>multi</code>as true, and<code>checkRowKeys</code>as default selected data. <code>lock-scroll</code>Configure whether to disable the scrollbar when a pop-up window appears.</p >\n'
|
|
18
18
|
},
|
|
19
19
|
codeFiles: ['nest-grid-multi.vue']
|
|
20
20
|
},
|
|
@@ -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,33 @@ 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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
+
server: new McpServer({ name: 'base-config', version: '1.0.0' }, {}),
|
|
43
|
+
sessionID: '',
|
|
44
|
+
tableData: _table,
|
|
45
|
+
queryCity: '',
|
|
46
|
+
options: Array.from(new Set(_table.map((item) => item.city))).map((city) => ({
|
|
47
|
+
label: city,
|
|
48
|
+
value: city
|
|
49
|
+
}))
|
|
146
50
|
}
|
|
147
51
|
}
|
|
148
52
|
}
|
|
@@ -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
|
},
|
package/demos/pc/menus.js
CHANGED
|
@@ -175,7 +175,6 @@ export const cmpMenus = [
|
|
|
175
175
|
'key': 'cmp-table-components',
|
|
176
176
|
'children': [
|
|
177
177
|
{ 'nameCn': '基本用法', 'name': '', 'key': 'grid' },
|
|
178
|
-
{ 'nameCn': 'AI智能体', 'name': '', 'key': 'grid-ai-agent' },
|
|
179
178
|
{ 'nameCn': '序号列', 'name': '', 'key': 'grid-serial-column' },
|
|
180
179
|
{ 'nameCn': '选中行', 'name': '', 'key': 'grid-operation-column' },
|
|
181
180
|
{ 'nameCn': '空数据', 'name': '', 'key': 'grid-empty' },
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-docs",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.24.
|
|
4
|
+
"version": "3.24.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@playwright/test": "~1.49.0",
|
|
@@ -43,17 +43,17 @@
|
|
|
43
43
|
"@docsearch/css": "^3.8.0",
|
|
44
44
|
"@docsearch/js": "^3.8.0",
|
|
45
45
|
"@docsearch/react": "npm:@docsearch/css",
|
|
46
|
-
"@modelcontextprotocol/sdk": "1.12.1",
|
|
47
46
|
"@opentiny/next": "0.1.2",
|
|
48
|
-
"@opentiny/
|
|
49
|
-
"@opentiny/tiny-robot
|
|
50
|
-
"@opentiny/tiny-robot-
|
|
51
|
-
"@opentiny/tiny-
|
|
52
|
-
"@opentiny/tiny-vue-mcp": "0.0.1-
|
|
47
|
+
"@opentiny/next-vue": "0.0.1-alpha.1",
|
|
48
|
+
"@opentiny/tiny-robot": "0.2.1",
|
|
49
|
+
"@opentiny/tiny-robot-kit": "0.2.1",
|
|
50
|
+
"@opentiny/tiny-robot-svgs": "0.2.1",
|
|
51
|
+
"@opentiny/tiny-vue-mcp": "0.0.1-alpha.2",
|
|
53
52
|
"@opentiny/vue-repl": "^1.1.2",
|
|
54
53
|
"@opentiny/vue-vite-import": "~1.2.0",
|
|
55
54
|
"@unocss/reset": "0.38.2",
|
|
56
55
|
"@vue/repl": "^2.5.5",
|
|
56
|
+
"@vue/shared": "^3.4.31",
|
|
57
57
|
"@vueuse/core": "^12.7.0",
|
|
58
58
|
"@vueuse/head": "0.7.13",
|
|
59
59
|
"github-markdown-css": "~5.1.0",
|
|
@@ -66,15 +66,15 @@
|
|
|
66
66
|
"vue-i18n": "~9.14.3",
|
|
67
67
|
"vue-router": "4.1.5",
|
|
68
68
|
"@opentiny-internal/unplugin-virtual-template": "~0.1.1-beta.0",
|
|
69
|
-
"@opentiny/utils": "
|
|
70
|
-
"@opentiny/vue": "~3.24.0",
|
|
69
|
+
"@opentiny/utils": "~3.24.0",
|
|
71
70
|
"@opentiny/vue-common": "~3.24.0",
|
|
71
|
+
"@opentiny/vue": "~3.24.0",
|
|
72
72
|
"@opentiny/vue-design-aurora": "~3.24.0",
|
|
73
73
|
"@opentiny/vue-design-saas": "~3.24.0",
|
|
74
|
-
"@opentiny/vue-design-smb": "~3.24.0",
|
|
75
74
|
"@opentiny/vue-directive": "~3.24.0",
|
|
75
|
+
"@opentiny/vue-design-smb": "~3.24.0",
|
|
76
76
|
"@opentiny/vue-flowchart": "~3.24.0",
|
|
77
|
-
"@opentiny/vue-hooks": "
|
|
77
|
+
"@opentiny/vue-hooks": "~3.24.0",
|
|
78
78
|
"@opentiny/vue-huicharts": "~3.24.0",
|
|
79
79
|
"@opentiny/vue-icon": "~3.24.0",
|
|
80
80
|
"@opentiny/vue-icon-multicolor": "~3.24.0",
|
package/playground/App.vue
CHANGED
|
@@ -11,7 +11,7 @@ import logoUrl from './assets/opentiny-logo.svg?url'
|
|
|
11
11
|
import GitHub from './icons/Github.vue'
|
|
12
12
|
import Share from './icons/Share.vue'
|
|
13
13
|
|
|
14
|
-
const VERSION = 'tiny-vue-version-3.
|
|
14
|
+
const VERSION = 'tiny-vue-version-3.24'
|
|
15
15
|
const NOTIFY_KEY = 'tiny-vue-playground-notify'
|
|
16
16
|
const LAYOUT = 'playground-layout'
|
|
17
17
|
const LAYOUT_REVERSE = 'playground-layout-reverse'
|
|
@@ -23,7 +23,7 @@ const isMobileFirst = tinyMode === 'mobile-first'
|
|
|
23
23
|
const isSaas = tinyTheme === 'saas'
|
|
24
24
|
const isPreview = searchObj.get('openMode') === 'preview' // 是否多端弹窗预览
|
|
25
25
|
|
|
26
|
-
const versions = ['3.
|
|
26
|
+
const versions = ['3.24', '3.23', '3.22']
|
|
27
27
|
const getVersion = () => {
|
|
28
28
|
if (isPreview) {
|
|
29
29
|
return versions[0]
|
package/src/App.vue
CHANGED
|
@@ -11,11 +11,13 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script>
|
|
14
|
-
import { defineComponent, onMounted, provide, ref } from 'vue'
|
|
14
|
+
import { defineComponent, onMounted, provide, ref, watch } from 'vue'
|
|
15
15
|
import { ConfigProvider, Modal } from '@opentiny/vue'
|
|
16
16
|
import { iconClose } from '@opentiny/vue-icon'
|
|
17
17
|
import { appData } from './tools'
|
|
18
18
|
import useTheme from './tools/useTheme'
|
|
19
|
+
import { useNextClient } from '@opentiny/next-vue'
|
|
20
|
+
import { globalConversation } from './views/components-doc/composition/utils'
|
|
19
21
|
|
|
20
22
|
export default defineComponent({
|
|
21
23
|
name: 'AppVue',
|
|
@@ -28,6 +30,21 @@ export default defineComponent({
|
|
|
28
30
|
setup() {
|
|
29
31
|
const previewUrl = ref(import.meta.env.VITE_PLAYGROUND_URL)
|
|
30
32
|
const modalSHow = ref(false)
|
|
33
|
+
|
|
34
|
+
const { sessionId } = useNextClient({
|
|
35
|
+
clientInfo: { name: 'my-project', version: '1.0.0' },
|
|
36
|
+
proxyOptions: { url: 'http://39.108.160.245/sse', token: '' }
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
watch(
|
|
40
|
+
() => sessionId.value,
|
|
41
|
+
(newVal) => {
|
|
42
|
+
if (newVal) {
|
|
43
|
+
globalConversation.sessionId = newVal
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
|
|
31
48
|
onMounted(() => {
|
|
32
49
|
// 加载header
|
|
33
50
|
const common = new window.TDCommon(['#header'], {
|
package/src/router.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createRouter, createWebHistory } from 'vue-router'
|
|
2
2
|
import Layout from '@/views/layout/layout.vue'
|
|
3
3
|
import { LANG_PATH_MAP, ZH_CN_LANG, DEFAULT_THEME } from './const'
|
|
4
|
+
import { appData } from './tools/appData.js'
|
|
4
5
|
|
|
5
6
|
const Components = () => import('@/views/components-doc/index.vue')
|
|
6
7
|
const Docs = () => import('@/views/docs/docs.vue')
|
|
@@ -57,5 +58,7 @@ router.afterEach((to, from) => {
|
|
|
57
58
|
if (to.meta.title) {
|
|
58
59
|
document.title = to.meta.title
|
|
59
60
|
}
|
|
61
|
+
// tiny-robot 通过路由,确定浮动区,是否显示AI按钮
|
|
62
|
+
appData.hasFloatRobot = to.path.endsWith('components/grid')
|
|
60
63
|
})
|
|
61
64
|
export { router }
|
package/src/tools/appData.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive, computed } from 'vue'
|
|
1
|
+
import { reactive, computed, watch } from 'vue'
|
|
2
2
|
import { useAutoStore } from './storage'
|
|
3
3
|
import { useMediaQuery } from './useMediaQuery'
|
|
4
4
|
import { ZH_CN_LANG, EN_US_LANG, LANG_KEY, LANG_PATH_MAP } from '../const'
|
|
@@ -8,7 +8,9 @@ const enPath = LANG_PATH_MAP[EN_US_LANG]
|
|
|
8
8
|
const appData = reactive({
|
|
9
9
|
lang: useAutoStore('local', LANG_KEY, ZH_CN_LANG),
|
|
10
10
|
theme: useAutoStore('local', '_theme', 'light'),
|
|
11
|
-
bpState: useMediaQuery([640, 1024, 1280]).matches // 3点4区间, bp0,bp1,bp2,bp3
|
|
11
|
+
bpState: useMediaQuery([640, 1024, 1280]).matches, // 3点4区间, bp0,bp1,bp2,bp3
|
|
12
|
+
showTinyRobot: false,
|
|
13
|
+
hasFloatRobot: false
|
|
12
14
|
})
|
|
13
15
|
const isZhCn = computed(() => appData.lang === ZH_CN_LANG)
|
|
14
16
|
const appFn = {
|
|
@@ -27,4 +29,12 @@ const appFn = {
|
|
|
27
29
|
}
|
|
28
30
|
// 为了和tiny-vue共享同一个响应变量
|
|
29
31
|
window.appData = appData
|
|
32
|
+
|
|
33
|
+
watch(
|
|
34
|
+
() => appData.showTinyRobot,
|
|
35
|
+
(value) => {
|
|
36
|
+
document.body.classList.toggle('docs-on-robot-show', value)
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
|
|
30
40
|
export { appData, appFn, isZhCn }
|