@cloudbase/weda-ui 3.18.8 → 3.20.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/dist/configs/components/lottery.d.ts +2 -0
- package/dist/configs/components/lottery.js +6 -1
- package/dist/configs/components/wd-checkbox.js +4 -0
- package/dist/configs/components/wd-form.d.ts +2 -2
- package/dist/configs/components/wd-form.js +2 -3
- package/dist/configs/components/wd-image.js +1 -0
- package/dist/configs/components/wd-radio.js +4 -0
- package/dist/configs/components/wd-table.d.ts +19 -3
- package/dist/configs/components/wd-table.js +16 -0
- package/dist/configs/components/wd-tree.d.ts +33 -0
- package/dist/configs/components/wd-tree.js +58 -0
- package/dist/configs/index.d.ts +66 -6
- package/dist/configs/type-utils/type-form.d.ts +2 -2
- package/dist/configs/type-utils/type-form.js +4 -0
- package/dist/style/index.css +2 -1
- package/dist/style/index.scss +1 -1
- package/dist/style/weda-ui.min.css +2 -2
- package/dist/web/components/customer-service/customer-service.js +4 -3
- package/dist/web/components/form-input-hooks/index.d.ts +3 -1
- package/dist/web/components/form-input-hooks/index.js +93 -54
- package/dist/web/components/form-rich-text/index.d.ts +1 -1
- package/dist/web/components/form-rich-text/index.js +6 -2
- package/dist/web/components/formdetail/index.d.ts +1 -1
- package/dist/web/components/formdetail/index.js +28 -42
- package/dist/web/components/lottery/index.d.ts +1 -0
- package/dist/web/components/lottery/index.js +19 -47
- package/dist/web/components/lottery/lotteryUtil.d.ts +1 -1
- package/dist/web/components/lottery/lotteryUtil.js +4 -5
- package/dist/web/components/richText/index.js +9 -3
- package/dist/web/components/wd-form/contexts/form-field-arr-context.d.ts +21 -0
- package/dist/web/components/wd-form/contexts/form-field-arr-context.js +10 -0
- package/dist/web/components/wd-form/contexts/form-field-context.d.ts +19 -0
- package/dist/web/components/wd-form/contexts/form-field-context.js +10 -0
- package/dist/web/components/wd-form/contexts/form-field-obj-context.d.ts +13 -0
- package/dist/web/components/wd-form/contexts/form-field-obj-context.js +10 -0
- package/dist/web/components/wd-form/form-utils.d.ts +1 -0
- package/dist/web/components/wd-form/form-utils.js +32 -0
- package/dist/web/components/wd-form/index.d.ts +4 -4
- package/dist/web/components/wd-form/index.js +137 -191
- package/dist/web/components/wd-form-item/wd-form-item.d.ts +2 -2
- package/dist/web/components/wd-form-item/wd-form-item.js +96 -14
- package/dist/web/components/wd-form-obj/base-form-obj.js +57 -197
- package/dist/web/components/wd-input/wd-input.js +1 -1
- package/dist/web/components/wd-input-number/wd-input-number.js +40 -2
- package/dist/web/components/wd-rich-text/wd-rich-text.d.ts +1 -1
- package/dist/web/components/wd-rich-text/wd-rich-text.js +7 -3
- package/dist/web/components/wd-table/components/Table/index.js +14 -9
- package/dist/web/components/wd-table/utils/index.d.ts +0 -1
- package/dist/web/components/wd-table/utils/index.js +1 -1
- package/dist/web/components/wd-table/wd-table.js +4 -0
- package/dist/web/components/wd-tree/utils.d.ts +29 -3
- package/dist/web/components/wd-tree/utils.js +26 -12
- package/dist/web/components/wd-tree/wd-tree.d.ts +1 -0
- package/dist/web/components/wd-tree/wd-tree.js +65 -40
- package/dist/web/utils/widget-api/index.d.ts +0 -14
- package/dist/web/utils/widget-api/index.js +0 -7
- package/package.json +5 -5
|
@@ -5,6 +5,7 @@ declare const data: import("@sinclair/typebox").TObject<{
|
|
|
5
5
|
image: import("@sinclair/typebox").TString;
|
|
6
6
|
}>>;
|
|
7
7
|
enablePrize: import("@sinclair/typebox").TBoolean;
|
|
8
|
+
duration: import("@sinclair/typebox").TNumber;
|
|
8
9
|
prizeResult: import("@sinclair/typebox").TUnsafe<string>;
|
|
9
10
|
}>;
|
|
10
11
|
declare const events: [{
|
|
@@ -29,6 +30,7 @@ declare const config: {
|
|
|
29
30
|
image: import("@sinclair/typebox").TString;
|
|
30
31
|
}>>;
|
|
31
32
|
enablePrize: import("@sinclair/typebox").TBoolean;
|
|
33
|
+
duration: import("@sinclair/typebox").TNumber;
|
|
32
34
|
prizeResult: import("@sinclair/typebox").TUnsafe<string>;
|
|
33
35
|
}>;
|
|
34
36
|
readonly events: [{
|
|
@@ -86,10 +86,15 @@ const data = Type.Object({
|
|
|
86
86
|
'x-index': 20,
|
|
87
87
|
default: true,
|
|
88
88
|
}),
|
|
89
|
+
duration: Type.Number({
|
|
90
|
+
title: '抽奖时长',
|
|
91
|
+
'x-index': 30,
|
|
92
|
+
'x-runtime-default': 2000,
|
|
93
|
+
}),
|
|
89
94
|
prizeResult: Type.StringEnum({
|
|
90
95
|
type: 'string',
|
|
91
96
|
title: '抽奖结果',
|
|
92
|
-
'x-index':
|
|
97
|
+
'x-index': 40,
|
|
93
98
|
default: '1',
|
|
94
99
|
'x-helper-text': '以左上角为起始位置,顺时针确定8个奖品位置分别1-8',
|
|
95
100
|
enum: [
|
|
@@ -128,11 +128,15 @@ const data = Type.Object({
|
|
|
128
128
|
type: 'string',
|
|
129
129
|
title: '选项名称',
|
|
130
130
|
default: '选项1',
|
|
131
|
+
description: '用于作为选项展示的文本',
|
|
132
|
+
'x-helper-text': '用于作为选项展示的文本',
|
|
131
133
|
},
|
|
132
134
|
value: {
|
|
133
135
|
type: 'string',
|
|
134
136
|
title: '选项值',
|
|
135
137
|
default: '1',
|
|
138
|
+
description: '选项的值,一般用于表单提交对应字段的存储值',
|
|
139
|
+
'x-helper-text': '选项的值,一般用于表单提交对应字段的存储值',
|
|
136
140
|
},
|
|
137
141
|
disabled: {
|
|
138
142
|
type: 'boolean',
|
|
@@ -43,7 +43,7 @@ declare const data: import("@sinclair/typebox").TObject<{
|
|
|
43
43
|
isDisabledSubmit: import("@sinclair/typebox").TBoolean;
|
|
44
44
|
formType: import("@sinclair/typebox").TUnsafe<"create" | "edit" | "read">;
|
|
45
45
|
formType_bind: import("@sinclair/typebox").TBoolean;
|
|
46
|
-
datasourceType: import("@sinclair/typebox").TUnsafe<"connector" | "
|
|
46
|
+
datasourceType: import("@sinclair/typebox").TUnsafe<"connector" | "custom-connector" | "model" | "expression">;
|
|
47
47
|
dataSourceName: import("@sinclair/typebox").TString;
|
|
48
48
|
value: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>;
|
|
49
49
|
_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -85,7 +85,7 @@ declare const _default: {
|
|
|
85
85
|
isDisabledSubmit: import("@sinclair/typebox").TBoolean;
|
|
86
86
|
formType: import("@sinclair/typebox").TUnsafe<"create" | "edit" | "read">;
|
|
87
87
|
formType_bind: import("@sinclair/typebox").TBoolean;
|
|
88
|
-
datasourceType: import("@sinclair/typebox").TUnsafe<"connector" | "
|
|
88
|
+
datasourceType: import("@sinclair/typebox").TUnsafe<"connector" | "custom-connector" | "model" | "expression">;
|
|
89
89
|
dataSourceName: import("@sinclair/typebox").TString;
|
|
90
90
|
value: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>;
|
|
91
91
|
_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -529,10 +529,9 @@ const data = Type.Object({
|
|
|
529
529
|
initialValues: Type.Record(Type.String(), Type.Unknown(), {
|
|
530
530
|
title: '表单初始值',
|
|
531
531
|
default: {},
|
|
532
|
-
|
|
533
|
-
'x-index': 1230,
|
|
532
|
+
'x-index': 43,
|
|
534
533
|
'x-group': '数据',
|
|
535
|
-
description: '
|
|
534
|
+
description: '可以用于设置表单的初始值。 在低码IDE中仅初次渲染能查看到效果, 后续配置变动无效果.',
|
|
536
535
|
'x-component': 'jsontext',
|
|
537
536
|
}),
|
|
538
537
|
});
|
|
@@ -5,6 +5,7 @@ const data = Type.Object({
|
|
|
5
5
|
type: 'string',
|
|
6
6
|
default: 'https://qcloudimg.tencent-cloud.cn/raw/4a29d51b504f12b4933ce4490110b4dc.svg',
|
|
7
7
|
description: '更改需要展示的图片',
|
|
8
|
+
'x-helper-text': '图片地址支持云存储cloudID或https协议地址',
|
|
8
9
|
'x-category': '基础属性',
|
|
9
10
|
'x-index': 1,
|
|
10
11
|
'x-component': 'image',
|
|
@@ -124,11 +124,15 @@ const data = Type.Object({
|
|
|
124
124
|
type: 'string',
|
|
125
125
|
title: '选项名称',
|
|
126
126
|
default: '选项1',
|
|
127
|
+
description: '用于作为选项展示的文本',
|
|
128
|
+
'x-helper-text': '用于作为选项展示的文本',
|
|
127
129
|
},
|
|
128
130
|
value: {
|
|
129
131
|
type: 'string',
|
|
130
132
|
title: '选项值',
|
|
131
133
|
default: '1',
|
|
134
|
+
description: '选项的值,一般用于表单提交对应字段的存储值',
|
|
135
|
+
'x-helper-text': '选项的值,一般用于表单提交对应字段的存储值',
|
|
132
136
|
},
|
|
133
137
|
disabled: {
|
|
134
138
|
type: 'boolean',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Static } from '../type-utils';
|
|
2
2
|
import type { Simplify } from 'type-fest';
|
|
3
3
|
declare const data: import("@sinclair/typebox").TObject<{
|
|
4
|
-
dataSourceType: import("@sinclair/typebox").TUnsafe<"
|
|
4
|
+
dataSourceType: import("@sinclair/typebox").TUnsafe<"custom-connector" | "expression" | "data-model">;
|
|
5
5
|
bindMetadata: import("@sinclair/typebox").TObject<{
|
|
6
6
|
datasource: import("@sinclair/typebox").TObject<{
|
|
7
7
|
title: import("@sinclair/typebox").TString;
|
|
@@ -99,7 +99,7 @@ export type DataType = Simplify<Static<typeof data>>;
|
|
|
99
99
|
declare const config: {
|
|
100
100
|
readonly $schema: "https://comp-public-replace-1303824488-cos.weda.tencent.com/schema/lcds_component.json";
|
|
101
101
|
readonly data: import("@sinclair/typebox").TObject<{
|
|
102
|
-
dataSourceType: import("@sinclair/typebox").TUnsafe<"
|
|
102
|
+
dataSourceType: import("@sinclair/typebox").TUnsafe<"custom-connector" | "expression" | "data-model">;
|
|
103
103
|
bindMetadata: import("@sinclair/typebox").TObject<{
|
|
104
104
|
datasource: import("@sinclair/typebox").TObject<{
|
|
105
105
|
title: import("@sinclair/typebox").TString;
|
|
@@ -203,7 +203,7 @@ declare const config: {
|
|
|
203
203
|
filter: import("@sinclair/typebox").TAny;
|
|
204
204
|
sort: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>;
|
|
205
205
|
pageNo: import("@sinclair/typebox").TNumber;
|
|
206
|
-
dataSourceType: import("@sinclair/typebox").TUnsafe<"
|
|
206
|
+
dataSourceType: import("@sinclair/typebox").TUnsafe<"custom-connector" | "expression" | "data-model">;
|
|
207
207
|
pageSize: import("@sinclair/typebox").TNumber;
|
|
208
208
|
records: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>;
|
|
209
209
|
total: import("@sinclair/typebox").TNumber;
|
|
@@ -352,6 +352,14 @@ declare const config: {
|
|
|
352
352
|
readonly label: "清空选中项";
|
|
353
353
|
readonly 'x-platforms': readonly ["MOBILEWEB", "PCWEB"];
|
|
354
354
|
readonly description: "清空选中项";
|
|
355
|
+
}, {
|
|
356
|
+
readonly name: "setSelectedKeys";
|
|
357
|
+
readonly label: "设置行选中";
|
|
358
|
+
readonly params: import("@sinclair/typebox").TObject<{
|
|
359
|
+
selectedKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
360
|
+
}>;
|
|
361
|
+
readonly 'x-platforms': readonly ["MOBILEWEB", "PCWEB"];
|
|
362
|
+
readonly description: "设置行选中";
|
|
355
363
|
}];
|
|
356
364
|
readonly events: readonly [{
|
|
357
365
|
readonly title: "点击表格行";
|
|
@@ -675,4 +683,12 @@ export declare const methods: readonly [{
|
|
|
675
683
|
readonly label: "清空选中项";
|
|
676
684
|
readonly 'x-platforms': readonly ["MOBILEWEB", "PCWEB"];
|
|
677
685
|
readonly description: "清空选中项";
|
|
686
|
+
}, {
|
|
687
|
+
readonly name: "setSelectedKeys";
|
|
688
|
+
readonly label: "设置行选中";
|
|
689
|
+
readonly params: import("@sinclair/typebox").TObject<{
|
|
690
|
+
selectedKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
691
|
+
}>;
|
|
692
|
+
readonly 'x-platforms': readonly ["MOBILEWEB", "PCWEB"];
|
|
693
|
+
readonly description: "设置行选中";
|
|
678
694
|
}];
|
|
@@ -1726,6 +1726,22 @@ const config = defineConfig({
|
|
|
1726
1726
|
'x-platforms': ['MOBILEWEB', 'PCWEB'],
|
|
1727
1727
|
description: '清空选中项',
|
|
1728
1728
|
},
|
|
1729
|
+
{
|
|
1730
|
+
name: 'setSelectedKeys',
|
|
1731
|
+
label: '设置行选中',
|
|
1732
|
+
params: Type.Object({
|
|
1733
|
+
selectedKeys: Type.Array(Type.String({
|
|
1734
|
+
title: '数据标识',
|
|
1735
|
+
}), {
|
|
1736
|
+
title: '数据标识',
|
|
1737
|
+
default: [],
|
|
1738
|
+
description: '设置行选中。数据标识字段默认为_id,表达式场景可以通过数据主键来指定其他字段。默认示例:[id1,id2],其中id1和id2对应选中行数据标识。',
|
|
1739
|
+
'x-helper-text': '设置行选中。数据标识字段默认为_id,表达式场景可以通过数据主键来指定其他字段。默认示例:[id1,id2],其中id1和id2对应选中行数据标识。',
|
|
1740
|
+
}),
|
|
1741
|
+
}),
|
|
1742
|
+
'x-platforms': ['MOBILEWEB', 'PCWEB'],
|
|
1743
|
+
description: '设置行选中',
|
|
1744
|
+
},
|
|
1729
1745
|
],
|
|
1730
1746
|
// 组件对外暴露事件
|
|
1731
1747
|
events: [
|
|
@@ -19,6 +19,9 @@ declare const data: import("@sinclair/typebox").TObject<{
|
|
|
19
19
|
expendIcon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
20
20
|
leafIcon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
21
21
|
line: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
22
|
+
isSupportSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
23
|
+
enableSearchText: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
24
|
+
contentSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("react").ReactNode>>;
|
|
22
25
|
}>;
|
|
23
26
|
declare const properties: import("@sinclair/typebox").TObject<{
|
|
24
27
|
data: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TObject<{
|
|
@@ -39,6 +42,15 @@ declare const properties: import("@sinclair/typebox").TObject<{
|
|
|
39
42
|
expandType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
40
43
|
expandCustom: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
41
44
|
showIcon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
45
|
+
treeNodeList: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TObject<{
|
|
46
|
+
label: import("@sinclair/typebox").TString;
|
|
47
|
+
value: import("@sinclair/typebox").TString;
|
|
48
|
+
foldIcon: import("@sinclair/typebox").TString;
|
|
49
|
+
expendIcon: import("@sinclair/typebox").TString;
|
|
50
|
+
leafIcon: import("@sinclair/typebox").TString;
|
|
51
|
+
children: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>;
|
|
52
|
+
disabled: import("@sinclair/typebox").TBoolean;
|
|
53
|
+
}>>>;
|
|
42
54
|
expandedNodes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TObject<{
|
|
43
55
|
label: import("@sinclair/typebox").TString;
|
|
44
56
|
value: import("@sinclair/typebox").TString;
|
|
@@ -153,6 +165,9 @@ declare const config: {
|
|
|
153
165
|
expendIcon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
154
166
|
leafIcon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
155
167
|
line: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
168
|
+
isSupportSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
169
|
+
enableSearchText: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
170
|
+
contentSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("react").ReactNode>>;
|
|
156
171
|
}>;
|
|
157
172
|
readonly properties: import("@sinclair/typebox").TObject<{
|
|
158
173
|
data: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TObject<{
|
|
@@ -173,6 +188,15 @@ declare const config: {
|
|
|
173
188
|
expandType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
174
189
|
expandCustom: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
175
190
|
showIcon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
191
|
+
treeNodeList: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TObject<{
|
|
192
|
+
label: import("@sinclair/typebox").TString;
|
|
193
|
+
value: import("@sinclair/typebox").TString;
|
|
194
|
+
foldIcon: import("@sinclair/typebox").TString;
|
|
195
|
+
expendIcon: import("@sinclair/typebox").TString;
|
|
196
|
+
leafIcon: import("@sinclair/typebox").TString;
|
|
197
|
+
children: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>;
|
|
198
|
+
disabled: import("@sinclair/typebox").TBoolean;
|
|
199
|
+
}>>>;
|
|
176
200
|
expandedNodes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TObject<{
|
|
177
201
|
label: import("@sinclair/typebox").TString;
|
|
178
202
|
value: import("@sinclair/typebox").TString;
|
|
@@ -292,6 +316,11 @@ declare const config: {
|
|
|
292
316
|
readonly name: "连接线";
|
|
293
317
|
readonly selector: ".wd-tree--line";
|
|
294
318
|
readonly description: "展示的连接线的样式";
|
|
319
|
+
}, {
|
|
320
|
+
readonly name: "节点容器区域";
|
|
321
|
+
readonly selector: ".wd-tree-node";
|
|
322
|
+
readonly description: "可以编写节点容器的样式";
|
|
323
|
+
readonly code: "\n :scope .wd-tree-node {\n height: auto;\n }\n ";
|
|
295
324
|
}];
|
|
296
325
|
readonly methods: readonly [{
|
|
297
326
|
readonly name: "searchNode";
|
|
@@ -487,6 +516,10 @@ declare const config: {
|
|
|
487
516
|
readonly 'x-index': 3;
|
|
488
517
|
readonly expand: true;
|
|
489
518
|
};
|
|
519
|
+
readonly 高级属性: {
|
|
520
|
+
readonly 'x-index': 4;
|
|
521
|
+
readonly expand: true;
|
|
522
|
+
};
|
|
490
523
|
};
|
|
491
524
|
readonly inlineStyleForm: {
|
|
492
525
|
readonly flexDirection: {
|
|
@@ -242,6 +242,46 @@ const data = Type.Object({
|
|
|
242
242
|
description: '开启后,各节点间将显示连接线',
|
|
243
243
|
'x-category': '节点风格',
|
|
244
244
|
})),
|
|
245
|
+
isSupportSlot: Type.Optional(Type.Boolean({
|
|
246
|
+
title: '开启插槽',
|
|
247
|
+
'x-index': 105,
|
|
248
|
+
'x-category': '高级属性',
|
|
249
|
+
default: false,
|
|
250
|
+
'x-linkages': [
|
|
251
|
+
{
|
|
252
|
+
type: 'value:visible',
|
|
253
|
+
target: 'enableSearchText',
|
|
254
|
+
condition: '{{$self.value}}',
|
|
255
|
+
},
|
|
256
|
+
],
|
|
257
|
+
})),
|
|
258
|
+
enableSearchText: Type.Optional(Type.Boolean({
|
|
259
|
+
title: '显示默认文本节点',
|
|
260
|
+
'x-index': 106,
|
|
261
|
+
'x-category': '高级属性',
|
|
262
|
+
'x-runtime-default': true,
|
|
263
|
+
'x-helper-text': '开启后展示默认文本节点,该节点支持搜索高亮',
|
|
264
|
+
})),
|
|
265
|
+
contentSlot: Type.Optional(Type.Slot({
|
|
266
|
+
title: '内容插槽',
|
|
267
|
+
'x-index': 110,
|
|
268
|
+
'x-category': '高级属性',
|
|
269
|
+
type: 'slot',
|
|
270
|
+
'x-slot-auto': {
|
|
271
|
+
iterable: "{{ $form.values.isSupportSlot ?[{key:'treeNode',title:'内容插槽'}]:[] }}",
|
|
272
|
+
generator: '{{ {key:$item.key, title: ($item.title) } }}',
|
|
273
|
+
},
|
|
274
|
+
'x-slot-scope': {
|
|
275
|
+
item: {
|
|
276
|
+
title: '节点对象',
|
|
277
|
+
type: 'object',
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
'x-slot-directives': {
|
|
281
|
+
for: 'treeNodeList',
|
|
282
|
+
_index: 'itemIndex',
|
|
283
|
+
},
|
|
284
|
+
})),
|
|
245
285
|
});
|
|
246
286
|
const treeInfo = Type.Object({
|
|
247
287
|
checkedState: Type.Optional(Type.Boolean({ title: '当前操作选中状态' })),
|
|
@@ -309,6 +349,9 @@ const treeInfo = Type.Object({
|
|
|
309
349
|
title: '当前树信息',
|
|
310
350
|
description: '用户操作后的相关树信息',
|
|
311
351
|
});
|
|
352
|
+
const treeNodeList = Type.Array(Node, {
|
|
353
|
+
title: '当前树的扁平化结构信息',
|
|
354
|
+
});
|
|
312
355
|
// 组件对外暴露的只读属性
|
|
313
356
|
const properties = Type.Composite([
|
|
314
357
|
Type.Pick(data, ['data', 'checkable']),
|
|
@@ -329,6 +372,7 @@ const properties = Type.Composite([
|
|
|
329
372
|
Type.Object({
|
|
330
373
|
treeInfo,
|
|
331
374
|
}),
|
|
375
|
+
Type.Object({ treeNodeList }),
|
|
332
376
|
]);
|
|
333
377
|
// export default
|
|
334
378
|
const config = defineConfig({
|
|
@@ -374,6 +418,16 @@ const config = defineConfig({
|
|
|
374
418
|
selector: '.wd-tree--line',
|
|
375
419
|
description: '展示的连接线的样式',
|
|
376
420
|
},
|
|
421
|
+
{
|
|
422
|
+
name: '节点容器区域',
|
|
423
|
+
selector: '.wd-tree-node',
|
|
424
|
+
description: '可以编写节点容器的样式',
|
|
425
|
+
code: `
|
|
426
|
+
:scope .wd-tree-node {
|
|
427
|
+
height: auto;
|
|
428
|
+
}
|
|
429
|
+
`,
|
|
430
|
+
},
|
|
377
431
|
],
|
|
378
432
|
// 组件方法
|
|
379
433
|
methods: [
|
|
@@ -451,6 +505,10 @@ const config = defineConfig({
|
|
|
451
505
|
'x-index': 3,
|
|
452
506
|
expand: true,
|
|
453
507
|
},
|
|
508
|
+
['高级属性']: {
|
|
509
|
+
'x-index': 4,
|
|
510
|
+
expand: true,
|
|
511
|
+
},
|
|
454
512
|
},
|
|
455
513
|
inlineStyleForm: {
|
|
456
514
|
flexDirection: { visible: false },
|
package/dist/configs/index.d.ts
CHANGED
|
@@ -2180,6 +2180,9 @@ export declare const components: {
|
|
|
2180
2180
|
expendIcon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
2181
2181
|
leafIcon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
2182
2182
|
line: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
2183
|
+
isSupportSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
2184
|
+
enableSearchText: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
2185
|
+
contentSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("react").ReactNode>>;
|
|
2183
2186
|
}>;
|
|
2184
2187
|
readonly properties: import("@sinclair/typebox").TObject<{
|
|
2185
2188
|
data: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TObject<{
|
|
@@ -2200,6 +2203,15 @@ export declare const components: {
|
|
|
2200
2203
|
expandType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
2201
2204
|
expandCustom: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
2202
2205
|
showIcon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
2206
|
+
treeNodeList: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TObject<{
|
|
2207
|
+
label: import("@sinclair/typebox").TString;
|
|
2208
|
+
value: import("@sinclair/typebox").TString;
|
|
2209
|
+
foldIcon: import("@sinclair/typebox").TString;
|
|
2210
|
+
expendIcon: import("@sinclair/typebox").TString;
|
|
2211
|
+
leafIcon: import("@sinclair/typebox").TString;
|
|
2212
|
+
children: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>;
|
|
2213
|
+
disabled: import("@sinclair/typebox").TBoolean;
|
|
2214
|
+
}>>>;
|
|
2203
2215
|
expandedNodes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TObject<{
|
|
2204
2216
|
label: import("@sinclair/typebox").TString;
|
|
2205
2217
|
value: import("@sinclair/typebox").TString;
|
|
@@ -2319,6 +2331,11 @@ export declare const components: {
|
|
|
2319
2331
|
readonly name: "连接线";
|
|
2320
2332
|
readonly selector: ".wd-tree--line";
|
|
2321
2333
|
readonly description: "展示的连接线的样式";
|
|
2334
|
+
}, {
|
|
2335
|
+
readonly name: "节点容器区域";
|
|
2336
|
+
readonly selector: ".wd-tree-node";
|
|
2337
|
+
readonly description: "可以编写节点容器的样式";
|
|
2338
|
+
readonly code: "\n :scope .wd-tree-node {\n height: auto;\n }\n ";
|
|
2322
2339
|
}];
|
|
2323
2340
|
readonly methods: readonly [{
|
|
2324
2341
|
readonly name: "searchNode";
|
|
@@ -2514,6 +2531,10 @@ export declare const components: {
|
|
|
2514
2531
|
readonly 'x-index': 3;
|
|
2515
2532
|
readonly expand: true;
|
|
2516
2533
|
};
|
|
2534
|
+
readonly 高级属性: {
|
|
2535
|
+
readonly 'x-index': 4;
|
|
2536
|
+
readonly expand: true;
|
|
2537
|
+
};
|
|
2517
2538
|
};
|
|
2518
2539
|
readonly inlineStyleForm: {
|
|
2519
2540
|
readonly flexDirection: {
|
|
@@ -4068,7 +4089,7 @@ export declare const components: {
|
|
|
4068
4089
|
isDisabledSubmit: import("@sinclair/typebox").TBoolean;
|
|
4069
4090
|
formType: import("@sinclair/typebox").TUnsafe<"create" | "edit" | "read">;
|
|
4070
4091
|
formType_bind: import("@sinclair/typebox").TBoolean;
|
|
4071
|
-
datasourceType: import("@sinclair/typebox").TUnsafe<"connector" | "
|
|
4092
|
+
datasourceType: import("@sinclair/typebox").TUnsafe<"connector" | "custom-connector" | "model" | "expression">;
|
|
4072
4093
|
dataSourceName: import("@sinclair/typebox").TString;
|
|
4073
4094
|
value: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>;
|
|
4074
4095
|
_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -9416,6 +9437,7 @@ export declare const components: {
|
|
|
9416
9437
|
image: import("@sinclair/typebox").TString;
|
|
9417
9438
|
}>>;
|
|
9418
9439
|
enablePrize: import("@sinclair/typebox").TBoolean;
|
|
9440
|
+
duration: import("@sinclair/typebox").TNumber;
|
|
9419
9441
|
prizeResult: import("@sinclair/typebox").TUnsafe<string>;
|
|
9420
9442
|
}>;
|
|
9421
9443
|
readonly events: [{
|
|
@@ -11489,7 +11511,7 @@ export declare const components: {
|
|
|
11489
11511
|
WdTable: {
|
|
11490
11512
|
readonly $schema: "https://comp-public-replace-1303824488-cos.weda.tencent.com/schema/lcds_component.json";
|
|
11491
11513
|
readonly data: import("@sinclair/typebox").TObject<{
|
|
11492
|
-
dataSourceType: import("@sinclair/typebox").TUnsafe<"
|
|
11514
|
+
dataSourceType: import("@sinclair/typebox").TUnsafe<"custom-connector" | "expression" | "data-model">;
|
|
11493
11515
|
bindMetadata: import("@sinclair/typebox").TObject<{
|
|
11494
11516
|
datasource: import("@sinclair/typebox").TObject<{
|
|
11495
11517
|
title: import("@sinclair/typebox").TString;
|
|
@@ -11593,7 +11615,7 @@ export declare const components: {
|
|
|
11593
11615
|
filter: import("@sinclair/typebox").TAny;
|
|
11594
11616
|
sort: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>;
|
|
11595
11617
|
pageNo: import("@sinclair/typebox").TNumber;
|
|
11596
|
-
dataSourceType: import("@sinclair/typebox").TUnsafe<"
|
|
11618
|
+
dataSourceType: import("@sinclair/typebox").TUnsafe<"custom-connector" | "expression" | "data-model">;
|
|
11597
11619
|
pageSize: import("@sinclair/typebox").TNumber;
|
|
11598
11620
|
records: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>;
|
|
11599
11621
|
total: import("@sinclair/typebox").TNumber;
|
|
@@ -11742,6 +11764,14 @@ export declare const components: {
|
|
|
11742
11764
|
readonly label: "清空选中项";
|
|
11743
11765
|
readonly 'x-platforms': readonly ["MOBILEWEB", "PCWEB"];
|
|
11744
11766
|
readonly description: "清空选中项";
|
|
11767
|
+
}, {
|
|
11768
|
+
readonly name: "setSelectedKeys";
|
|
11769
|
+
readonly label: "设置行选中";
|
|
11770
|
+
readonly params: import("@sinclair/typebox").TObject<{
|
|
11771
|
+
selectedKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
11772
|
+
}>;
|
|
11773
|
+
readonly 'x-platforms': readonly ["MOBILEWEB", "PCWEB"];
|
|
11774
|
+
readonly description: "设置行选中";
|
|
11745
11775
|
}];
|
|
11746
11776
|
readonly events: readonly [{
|
|
11747
11777
|
readonly title: "点击表格行";
|
|
@@ -21691,6 +21721,9 @@ declare const _default: {
|
|
|
21691
21721
|
expendIcon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
21692
21722
|
leafIcon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
21693
21723
|
line: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
21724
|
+
isSupportSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
21725
|
+
enableSearchText: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
21726
|
+
contentSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("react").ReactNode>>;
|
|
21694
21727
|
}>;
|
|
21695
21728
|
readonly properties: import("@sinclair/typebox").TObject<{
|
|
21696
21729
|
data: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TObject<{
|
|
@@ -21711,6 +21744,15 @@ declare const _default: {
|
|
|
21711
21744
|
expandType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
21712
21745
|
expandCustom: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
21713
21746
|
showIcon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
21747
|
+
treeNodeList: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TObject<{
|
|
21748
|
+
label: import("@sinclair/typebox").TString;
|
|
21749
|
+
value: import("@sinclair/typebox").TString;
|
|
21750
|
+
foldIcon: import("@sinclair/typebox").TString;
|
|
21751
|
+
expendIcon: import("@sinclair/typebox").TString;
|
|
21752
|
+
leafIcon: import("@sinclair/typebox").TString;
|
|
21753
|
+
children: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>;
|
|
21754
|
+
disabled: import("@sinclair/typebox").TBoolean;
|
|
21755
|
+
}>>>;
|
|
21714
21756
|
expandedNodes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TObject<{
|
|
21715
21757
|
label: import("@sinclair/typebox").TString;
|
|
21716
21758
|
value: import("@sinclair/typebox").TString;
|
|
@@ -21830,6 +21872,11 @@ declare const _default: {
|
|
|
21830
21872
|
readonly name: "连接线";
|
|
21831
21873
|
readonly selector: ".wd-tree--line";
|
|
21832
21874
|
readonly description: "展示的连接线的样式";
|
|
21875
|
+
}, {
|
|
21876
|
+
readonly name: "节点容器区域";
|
|
21877
|
+
readonly selector: ".wd-tree-node";
|
|
21878
|
+
readonly description: "可以编写节点容器的样式";
|
|
21879
|
+
readonly code: "\n :scope .wd-tree-node {\n height: auto;\n }\n ";
|
|
21833
21880
|
}];
|
|
21834
21881
|
readonly methods: readonly [{
|
|
21835
21882
|
readonly name: "searchNode";
|
|
@@ -22025,6 +22072,10 @@ declare const _default: {
|
|
|
22025
22072
|
readonly 'x-index': 3;
|
|
22026
22073
|
readonly expand: true;
|
|
22027
22074
|
};
|
|
22075
|
+
readonly 高级属性: {
|
|
22076
|
+
readonly 'x-index': 4;
|
|
22077
|
+
readonly expand: true;
|
|
22078
|
+
};
|
|
22028
22079
|
};
|
|
22029
22080
|
readonly inlineStyleForm: {
|
|
22030
22081
|
readonly flexDirection: {
|
|
@@ -23579,7 +23630,7 @@ declare const _default: {
|
|
|
23579
23630
|
isDisabledSubmit: import("@sinclair/typebox").TBoolean;
|
|
23580
23631
|
formType: import("@sinclair/typebox").TUnsafe<"create" | "edit" | "read">;
|
|
23581
23632
|
formType_bind: import("@sinclair/typebox").TBoolean;
|
|
23582
|
-
datasourceType: import("@sinclair/typebox").TUnsafe<"connector" | "
|
|
23633
|
+
datasourceType: import("@sinclair/typebox").TUnsafe<"connector" | "custom-connector" | "model" | "expression">;
|
|
23583
23634
|
dataSourceName: import("@sinclair/typebox").TString;
|
|
23584
23635
|
value: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>;
|
|
23585
23636
|
_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -28927,6 +28978,7 @@ declare const _default: {
|
|
|
28927
28978
|
image: import("@sinclair/typebox").TString;
|
|
28928
28979
|
}>>;
|
|
28929
28980
|
enablePrize: import("@sinclair/typebox").TBoolean;
|
|
28981
|
+
duration: import("@sinclair/typebox").TNumber;
|
|
28930
28982
|
prizeResult: import("@sinclair/typebox").TUnsafe<string>;
|
|
28931
28983
|
}>;
|
|
28932
28984
|
readonly events: [{
|
|
@@ -31000,7 +31052,7 @@ declare const _default: {
|
|
|
31000
31052
|
WdTable: {
|
|
31001
31053
|
readonly $schema: "https://comp-public-replace-1303824488-cos.weda.tencent.com/schema/lcds_component.json";
|
|
31002
31054
|
readonly data: import("@sinclair/typebox").TObject<{
|
|
31003
|
-
dataSourceType: import("@sinclair/typebox").TUnsafe<"
|
|
31055
|
+
dataSourceType: import("@sinclair/typebox").TUnsafe<"custom-connector" | "expression" | "data-model">;
|
|
31004
31056
|
bindMetadata: import("@sinclair/typebox").TObject<{
|
|
31005
31057
|
datasource: import("@sinclair/typebox").TObject<{
|
|
31006
31058
|
title: import("@sinclair/typebox").TString;
|
|
@@ -31104,7 +31156,7 @@ declare const _default: {
|
|
|
31104
31156
|
filter: import("@sinclair/typebox").TAny;
|
|
31105
31157
|
sort: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>;
|
|
31106
31158
|
pageNo: import("@sinclair/typebox").TNumber;
|
|
31107
|
-
dataSourceType: import("@sinclair/typebox").TUnsafe<"
|
|
31159
|
+
dataSourceType: import("@sinclair/typebox").TUnsafe<"custom-connector" | "expression" | "data-model">;
|
|
31108
31160
|
pageSize: import("@sinclair/typebox").TNumber;
|
|
31109
31161
|
records: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>;
|
|
31110
31162
|
total: import("@sinclair/typebox").TNumber;
|
|
@@ -31253,6 +31305,14 @@ declare const _default: {
|
|
|
31253
31305
|
readonly label: "清空选中项";
|
|
31254
31306
|
readonly 'x-platforms': readonly ["MOBILEWEB", "PCWEB"];
|
|
31255
31307
|
readonly description: "清空选中项";
|
|
31308
|
+
}, {
|
|
31309
|
+
readonly name: "setSelectedKeys";
|
|
31310
|
+
readonly label: "设置行选中";
|
|
31311
|
+
readonly params: import("@sinclair/typebox").TObject<{
|
|
31312
|
+
selectedKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
31313
|
+
}>;
|
|
31314
|
+
readonly 'x-platforms': readonly ["MOBILEWEB", "PCWEB"];
|
|
31315
|
+
readonly description: "设置行选中";
|
|
31256
31316
|
}];
|
|
31257
31317
|
readonly events: readonly [{
|
|
31258
31318
|
readonly title: "点击表格行";
|
|
@@ -641,8 +641,8 @@ export interface WdFormItemProps extends CommonPropsType, Pick<ItemDataType, 'la
|
|
|
641
641
|
isWdFormDetail?: boolean;
|
|
642
642
|
/** 只读时是否包含前后缀 */
|
|
643
643
|
readBeforeAfter?: boolean;
|
|
644
|
-
/**
|
|
645
|
-
|
|
644
|
+
/** 是否存在标题容器 */
|
|
645
|
+
hasLabelContainer?: boolean;
|
|
646
646
|
/** 是否为根元素 */
|
|
647
647
|
isRoot?: boolean;
|
|
648
648
|
/** 标题后缀 */
|
|
@@ -504,6 +504,8 @@ export const FORM_ITEM_DATA = {
|
|
|
504
504
|
'x-props': {
|
|
505
505
|
'data-hidebind': true,
|
|
506
506
|
},
|
|
507
|
+
description: '用于作为选项展示的文本',
|
|
508
|
+
'x-helper-text': '用于作为选项展示的文本',
|
|
507
509
|
}),
|
|
508
510
|
value: Type.String({
|
|
509
511
|
title: '选项值',
|
|
@@ -511,6 +513,8 @@ export const FORM_ITEM_DATA = {
|
|
|
511
513
|
'x-props': {
|
|
512
514
|
'data-hidebind': true,
|
|
513
515
|
},
|
|
516
|
+
description: '选项的值,一般用于表单提交对应字段的存储值',
|
|
517
|
+
'x-helper-text': '选项的值,一般用于表单提交对应字段的存储值',
|
|
514
518
|
}),
|
|
515
519
|
disabled: Type.Optional(Type.Boolean({
|
|
516
520
|
title: '禁用',
|
package/dist/style/index.css
CHANGED
|
@@ -7061,7 +7061,8 @@ textarea {
|
|
|
7061
7061
|
.wd-tree-node {
|
|
7062
7062
|
background-color: var(--wd-tree-color-bg-default);
|
|
7063
7063
|
white-space: nowrap;
|
|
7064
|
-
height: var(--wd-tree-node-height);
|
|
7064
|
+
min-height: var(--wd-tree-node-height);
|
|
7065
|
+
height: auto;
|
|
7065
7066
|
padding: 0.125rem 0;
|
|
7066
7067
|
display: flex;
|
|
7067
7068
|
z-index: 1;
|