@a2simcode/ui 0.0.69 → 0.0.70
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/simcode-ui.es.js +960 -956
- package/dist/simcode-ui.umd.js +2 -2
- package/dist/stats.html +1 -1
- package/dist/ui.css +1 -1
- package/docs/components/meta/comp.ts +230 -230
- package/docs/components/meta/dynamic-layer.ts +99 -99
- package/docs/components/meta/form-item.ts +50 -50
- package/docs/components/meta/guid.ts +42 -42
- package/docs/components/meta/input.ts +411 -411
- package/docs/components/meta/number.ts +296 -296
- package/docs/components/meta/page.ts +67 -67
- package/docs/components/meta/radio.ts +55 -55
- package/docs/components/meta/table-panel.ts +178 -154
- package/docs/components/meta/table.ts +1 -1
- package/docs/components/page.md +15 -0
- package/docs/components/table-panel.md +19 -0
- package/docs/examples/page/log.vue +207 -0
- package/docs/examples/table-panel/sub-table-lazy.vue +100 -0
- package/package.json +1 -1
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
"props": [
|
|
3
|
-
{
|
|
4
|
-
"name": "schema",
|
|
5
|
-
"description": "模版",
|
|
6
|
-
"type": "PageSchemaConfig[]",
|
|
7
|
-
"default": "() => []"
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"name": "noPadding",
|
|
11
|
-
"description": "是否有边距",
|
|
12
|
-
"type": "boolean"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"name": "actions",
|
|
16
|
-
"description": "事件编排执行动作",
|
|
17
|
-
"type": "Record<string, any>",
|
|
18
|
-
"default": "() => ({})"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"events": [],
|
|
22
|
-
"slots": [],
|
|
23
|
-
"methods": [
|
|
24
|
-
{
|
|
25
|
-
"name": "init",
|
|
26
|
-
"description": "",
|
|
27
|
-
"type": "() => void"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"name": "call",
|
|
31
|
-
"description": "",
|
|
32
|
-
"type": "() => void"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"name": "on",
|
|
36
|
-
"description": "",
|
|
37
|
-
"type": "() => void"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"name": "off",
|
|
41
|
-
"description": "",
|
|
42
|
-
"type": "() => void"
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
"types": [
|
|
46
|
-
{
|
|
47
|
-
"name": "PageSchemaConfig",
|
|
48
|
-
"properties": [
|
|
49
|
-
{
|
|
50
|
-
"name": "id",
|
|
51
|
-
"type": "string",
|
|
52
|
-
"description": "id"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"name": "type",
|
|
56
|
-
"type": "string",
|
|
57
|
-
"description": "类型"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"name": "children",
|
|
61
|
-
"type": "PageSchemaConfig[]",
|
|
62
|
-
"description": "子集"
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
}
|
|
1
|
+
export default {
|
|
2
|
+
"props": [
|
|
3
|
+
{
|
|
4
|
+
"name": "schema",
|
|
5
|
+
"description": "模版",
|
|
6
|
+
"type": "PageSchemaConfig[]",
|
|
7
|
+
"default": "() => []"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "noPadding",
|
|
11
|
+
"description": "是否有边距",
|
|
12
|
+
"type": "boolean"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "actions",
|
|
16
|
+
"description": "事件编排执行动作",
|
|
17
|
+
"type": "Record<string, any>",
|
|
18
|
+
"default": "() => ({})"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"events": [],
|
|
22
|
+
"slots": [],
|
|
23
|
+
"methods": [
|
|
24
|
+
{
|
|
25
|
+
"name": "init",
|
|
26
|
+
"description": "",
|
|
27
|
+
"type": "() => void"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "call",
|
|
31
|
+
"description": "",
|
|
32
|
+
"type": "() => void"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "on",
|
|
36
|
+
"description": "",
|
|
37
|
+
"type": "() => void"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "off",
|
|
41
|
+
"description": "",
|
|
42
|
+
"type": "() => void"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"types": [
|
|
46
|
+
{
|
|
47
|
+
"name": "PageSchemaConfig",
|
|
48
|
+
"properties": [
|
|
49
|
+
{
|
|
50
|
+
"name": "id",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "id"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "type",
|
|
56
|
+
"type": "string",
|
|
57
|
+
"description": "类型"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "children",
|
|
61
|
+
"type": "PageSchemaConfig[]",
|
|
62
|
+
"description": "子集"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
"props": [
|
|
3
|
-
{
|
|
4
|
-
"name": "modelValue",
|
|
5
|
-
"description": "输入值",
|
|
6
|
-
"type": "string | number",
|
|
7
|
-
"default": "undefined"
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"name": "options",
|
|
11
|
-
"description": "选项列表",
|
|
12
|
-
"type": "{ label: string; value: string; color?: string }[]",
|
|
13
|
-
"default": "() => []"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"name": "size",
|
|
17
|
-
"description": "尺寸",
|
|
18
|
-
"type": "'large' | 'default' | 'small'",
|
|
19
|
-
"default": "'default'"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"name": "isButton",
|
|
23
|
-
"description": "是否为按钮样式",
|
|
24
|
-
"type": "boolean",
|
|
25
|
-
"default": "false"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"name": "isColor",
|
|
29
|
-
"description": "是否显示颜色,",
|
|
30
|
-
"type": "boolean",
|
|
31
|
-
"default": "false"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"name": "colors",
|
|
35
|
-
"description": "颜色列表",
|
|
36
|
-
"type": "string[]",
|
|
37
|
-
"default": "() => []"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"name": "readonly",
|
|
41
|
-
"description": "是否禁用。",
|
|
42
|
-
"type": "boolean"
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
"events": [
|
|
46
|
-
{
|
|
47
|
-
"name": "update:modelValue",
|
|
48
|
-
"description": "",
|
|
49
|
-
"type": "unknown"
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
"slots": [],
|
|
53
|
-
"methods": [],
|
|
54
|
-
"types": []
|
|
55
|
-
}
|
|
1
|
+
export default {
|
|
2
|
+
"props": [
|
|
3
|
+
{
|
|
4
|
+
"name": "modelValue",
|
|
5
|
+
"description": "输入值",
|
|
6
|
+
"type": "string | number",
|
|
7
|
+
"default": "undefined"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "options",
|
|
11
|
+
"description": "选项列表",
|
|
12
|
+
"type": "{ label: string; value: string; color?: string }[]",
|
|
13
|
+
"default": "() => []"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "size",
|
|
17
|
+
"description": "尺寸",
|
|
18
|
+
"type": "'large' | 'default' | 'small'",
|
|
19
|
+
"default": "'default'"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "isButton",
|
|
23
|
+
"description": "是否为按钮样式",
|
|
24
|
+
"type": "boolean",
|
|
25
|
+
"default": "false"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "isColor",
|
|
29
|
+
"description": "是否显示颜色,",
|
|
30
|
+
"type": "boolean",
|
|
31
|
+
"default": "false"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "colors",
|
|
35
|
+
"description": "颜色列表",
|
|
36
|
+
"type": "string[]",
|
|
37
|
+
"default": "() => []"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "readonly",
|
|
41
|
+
"description": "是否禁用。",
|
|
42
|
+
"type": "boolean"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"events": [
|
|
46
|
+
{
|
|
47
|
+
"name": "update:modelValue",
|
|
48
|
+
"description": "",
|
|
49
|
+
"type": "unknown"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"slots": [],
|
|
53
|
+
"methods": [],
|
|
54
|
+
"types": []
|
|
55
|
+
}
|
|
@@ -1,154 +1,178 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
"props": [
|
|
3
|
-
{
|
|
4
|
-
"name": "columns",
|
|
5
|
-
"description": "表格列配置",
|
|
6
|
-
"type": "SchemaConfig[]",
|
|
7
|
-
"default": "() => []"
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"name": "isTree",
|
|
11
|
-
"description": "是否是树形结构",
|
|
12
|
-
"type": "boolean",
|
|
13
|
-
"default": "false"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"name": "isShowNumber",
|
|
17
|
-
"description": "是否显示序号",
|
|
18
|
-
"type": "boolean",
|
|
19
|
-
"default": "true"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"name": "isMultiple",
|
|
23
|
-
"description": "是否开启多选",
|
|
24
|
-
"type": "boolean",
|
|
25
|
-
"default": "false"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"name": "isPage",
|
|
29
|
-
"description": "是否分页",
|
|
30
|
-
"type": "boolean",
|
|
31
|
-
"default": "false"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"name": "pageSizes",
|
|
35
|
-
"description": "每页显示个数选择器的选项设置",
|
|
36
|
-
"type": "array"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"name": "pageSize",
|
|
40
|
-
"description": "当前显示页数",
|
|
41
|
-
"type": "number",
|
|
42
|
-
"default": "100"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"name": "
|
|
46
|
-
"description": "
|
|
47
|
-
"type": "
|
|
48
|
-
"default": "
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"name": "
|
|
52
|
-
"description": "
|
|
53
|
-
"type": "
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"name": "
|
|
81
|
-
"description": "
|
|
82
|
-
"type": "
|
|
83
|
-
"default": "
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"name": "
|
|
87
|
-
"description": "
|
|
88
|
-
"type": "
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
{
|
|
110
|
-
"name": "
|
|
111
|
-
"description": "",
|
|
112
|
-
"type": "
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"name": "
|
|
116
|
-
"description": "",
|
|
117
|
-
"type": "
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
"
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
1
|
+
export default {
|
|
2
|
+
"props": [
|
|
3
|
+
{
|
|
4
|
+
"name": "columns",
|
|
5
|
+
"description": "表格列配置",
|
|
6
|
+
"type": "SchemaConfig[]",
|
|
7
|
+
"default": "() => []"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "isTree",
|
|
11
|
+
"description": "是否是树形结构",
|
|
12
|
+
"type": "boolean",
|
|
13
|
+
"default": "false"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "isShowNumber",
|
|
17
|
+
"description": "是否显示序号",
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"default": "true"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "isMultiple",
|
|
23
|
+
"description": "是否开启多选",
|
|
24
|
+
"type": "boolean",
|
|
25
|
+
"default": "false"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "isPage",
|
|
29
|
+
"description": "是否分页",
|
|
30
|
+
"type": "boolean",
|
|
31
|
+
"default": "false"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "pageSizes",
|
|
35
|
+
"description": "每页显示个数选择器的选项设置",
|
|
36
|
+
"type": "array"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "pageSize",
|
|
40
|
+
"description": "当前显示页数",
|
|
41
|
+
"type": "number",
|
|
42
|
+
"default": "100"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "subColumns",
|
|
46
|
+
"description": "子表列配置",
|
|
47
|
+
"type": "any[]",
|
|
48
|
+
"default": "() => []"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "isSubShowNumber",
|
|
52
|
+
"description": "是否显示子表序号",
|
|
53
|
+
"type": "boolean",
|
|
54
|
+
"default": "true"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "subActions",
|
|
58
|
+
"description": "子表行内操作按钮配置",
|
|
59
|
+
"type": "ButtonCompType[]",
|
|
60
|
+
"default": "() => []"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "loadChildren",
|
|
64
|
+
"description": "懒加载子节点数据",
|
|
65
|
+
"type": "(record: Record<string, any>) => Promise<any[]>",
|
|
66
|
+
"default": "null"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "rowKey",
|
|
70
|
+
"description": "行主键",
|
|
71
|
+
"type": "string",
|
|
72
|
+
"default": "undefined"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "sort",
|
|
76
|
+
"description": "排序字段",
|
|
77
|
+
"type": "string"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "buttons",
|
|
81
|
+
"description": "面板按钮",
|
|
82
|
+
"type": "ButtonCompType[]",
|
|
83
|
+
"default": "() => []"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "batchButtons",
|
|
87
|
+
"description": "批量操作按钮配置(选中记录后显示)",
|
|
88
|
+
"type": "ButtonCompType[]",
|
|
89
|
+
"default": "() => []"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "actions",
|
|
93
|
+
"description": "行内操作按钮配置",
|
|
94
|
+
"type": "ButtonCompType[]",
|
|
95
|
+
"default": "() => []"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "actionsMaxCount",
|
|
99
|
+
"description": "操作列最大显示按钮数量",
|
|
100
|
+
"type": "number",
|
|
101
|
+
"default": "3"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"name": "actionsLabel",
|
|
105
|
+
"description": "操作列标题",
|
|
106
|
+
"type": "string",
|
|
107
|
+
"default": "'操作'"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "loadData",
|
|
111
|
+
"description": "加载数据方法",
|
|
112
|
+
"type": "(params: Record<string, any>) => Promise<any>"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "immediate",
|
|
116
|
+
"description": "是否立即执行加载数据",
|
|
117
|
+
"type": "boolean",
|
|
118
|
+
"default": "true"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "noPadding",
|
|
122
|
+
"description": "不要边距",
|
|
123
|
+
"type": "boolean"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "highlightMode",
|
|
127
|
+
"description": "高亮模式 cross 十字 row 行 column 列 cell 单元格",
|
|
128
|
+
"type": "'cross' | 'row' | 'column' | 'cell'",
|
|
129
|
+
"default": "'row'"
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"events": [
|
|
133
|
+
{
|
|
134
|
+
"name": "select",
|
|
135
|
+
"description": "",
|
|
136
|
+
"type": "unknown"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "ready",
|
|
140
|
+
"description": "",
|
|
141
|
+
"type": "unknown"
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"slots": [],
|
|
145
|
+
"methods": [
|
|
146
|
+
{
|
|
147
|
+
"name": "refreshData",
|
|
148
|
+
"description": "",
|
|
149
|
+
"type": "async () => Promise<any>"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"name": "resetData",
|
|
153
|
+
"description": "",
|
|
154
|
+
"type": "async () => Promise<any>"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "getSelection",
|
|
158
|
+
"description": "",
|
|
159
|
+
"type": "() => void"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"name": "setSelection",
|
|
163
|
+
"description": "",
|
|
164
|
+
"type": "() => void"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "clearSelection",
|
|
168
|
+
"description": "",
|
|
169
|
+
"type": "() => void"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "getInstance",
|
|
173
|
+
"description": "",
|
|
174
|
+
"type": "() => void"
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
"types": []
|
|
178
|
+
}
|
package/docs/components/page.md
CHANGED
|
@@ -28,6 +28,19 @@
|
|
|
28
28
|
</template>
|
|
29
29
|
</Demo>
|
|
30
30
|
|
|
31
|
+
## 日志页面示例
|
|
32
|
+
|
|
33
|
+
结合 Table Panel 的复杂页面示例。
|
|
34
|
+
|
|
35
|
+
<Demo :source-code="pageLogCode">
|
|
36
|
+
<template #source>
|
|
37
|
+
<page-log />
|
|
38
|
+
</template>
|
|
39
|
+
<template #description>
|
|
40
|
+
展示了如何使用 `j-page` 配置一个包含表格、弹窗和自定义逻辑的完整页面。
|
|
41
|
+
</template>
|
|
42
|
+
</Demo>
|
|
43
|
+
|
|
31
44
|
## API
|
|
32
45
|
|
|
33
46
|
<ApiTable :data="pageApi" componentName="page" />
|
|
@@ -35,8 +48,10 @@
|
|
|
35
48
|
<script setup>
|
|
36
49
|
import PageBasic from '../examples/page/basic.vue'
|
|
37
50
|
import PageInit from '../examples/page/init.vue'
|
|
51
|
+
import PageLog from '../examples/page/log.vue'
|
|
38
52
|
import pageApi from './meta/page'
|
|
39
53
|
|
|
40
54
|
import pageBasicCode from '../examples/page/basic.vue?raw'
|
|
41
55
|
import pageInitCode from '../examples/page/init.vue?raw'
|
|
56
|
+
import pageLogCode from '../examples/page/log.vue?raw'
|
|
42
57
|
</script>
|
|
@@ -43,6 +43,23 @@
|
|
|
43
43
|
</template>
|
|
44
44
|
</Demo>
|
|
45
45
|
|
|
46
|
+
## 懒加载子表数据
|
|
47
|
+
|
|
48
|
+
当子表数据量较大时,可以将主表记录的 `children` 设置为 `true` 作为“需要懒加载”的标识;在用户展开该行时,组件会调用 `loadChildren(record)` 异步获取子表数据,并自动写入并展开。
|
|
49
|
+
|
|
50
|
+
- 触发条件:展开行且 `originData.children === true`
|
|
51
|
+
- 成功后:会把返回的数组设置为该行的子数据(下次再展开不会重复请求)
|
|
52
|
+
|
|
53
|
+
<Demo :source-code="tablePanelSubTableLazyCode">
|
|
54
|
+
<template #source>
|
|
55
|
+
<table-panel-sub-table-lazy />
|
|
56
|
+
</template>
|
|
57
|
+
<template #description>
|
|
58
|
+
将主表行的 <code>children</code> 设置为 <code>true</code> 作为懒加载标识;展开该行时会调用 <code>loadChildren(record)</code> 获取子表数据并写入。
|
|
59
|
+
</template>
|
|
60
|
+
</Demo>
|
|
61
|
+
|
|
62
|
+
|
|
46
63
|
## 多选功能
|
|
47
64
|
|
|
48
65
|
通过 `is-multiple` 属性开启多选功能。多选功能支持两种使用场景:
|
|
@@ -189,6 +206,7 @@ import TablePanelFilter from '../examples/table-panel/filter.vue'
|
|
|
189
206
|
import TablePanelPagination from '../examples/table-panel/pagination.vue'
|
|
190
207
|
import TablePanelMultipleSelection from '../examples/table-panel/multiple-selection.vue'
|
|
191
208
|
import TablePanelBatchOperations from '../examples/table-panel/batch-operations.vue'
|
|
209
|
+
import TablePanelSubTableLazy from '../examples/table-panel/sub-table-lazy.vue'
|
|
192
210
|
import tablePanelApi from './meta/table-panel'
|
|
193
211
|
|
|
194
212
|
import tablePanelBasicCode from '../examples/table-panel/basic.vue?raw'
|
|
@@ -196,4 +214,5 @@ import tablePanelFilterCode from '../examples/table-panel/filter.vue?raw'
|
|
|
196
214
|
import tablePanelPaginationCode from '../examples/table-panel/pagination.vue?raw'
|
|
197
215
|
import tablePanelMultipleSelectionCode from '../examples/table-panel/multiple-selection.vue?raw'
|
|
198
216
|
import tablePanelBatchOperationsCode from '../examples/table-panel/batch-operations.vue?raw'
|
|
217
|
+
import tablePanelSubTableLazyCode from '../examples/table-panel/sub-table-lazy.vue?raw'
|
|
199
218
|
</script>
|