@cloudbase/weda-ui 3.11.11 → 3.12.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.
Files changed (47) hide show
  1. package/dist/configs/components/dataView.d.ts +1 -0
  2. package/dist/configs/components/dataView.js +2 -1
  3. package/dist/configs/components/listView.js +5 -12
  4. package/dist/configs/components/wd-form-arr.d.ts +4 -1
  5. package/dist/configs/components/wd-form-arr.js +11 -140
  6. package/dist/configs/components/wd-form-obj.d.ts +2 -0
  7. package/dist/configs/components/wd-form-obj.js +13 -1
  8. package/dist/configs/components/wd-modal.d.ts +10 -1
  9. package/dist/configs/components/wd-modal.js +52 -1
  10. package/dist/configs/components/wd-table.d.ts +10 -0
  11. package/dist/configs/components/wd-table.js +9 -17
  12. package/dist/configs/components/web-view.d.ts +4 -0
  13. package/dist/configs/components/web-view.js +19 -1
  14. package/dist/configs/index.d.ts +44 -4
  15. package/dist/configs/type-utils/type-form.d.ts +2 -0
  16. package/dist/configs/type-utils/type-form.js +5 -3
  17. package/dist/configs/utils/field.d.ts +4 -0
  18. package/dist/configs/utils/field.js +508 -0
  19. package/dist/style/index.css +41 -3
  20. package/dist/style/index.scss +1 -1
  21. package/dist/style/weda-ui.min.css +2 -2
  22. package/dist/web/components/form/uploader/uploader.pc.d.ts +8 -1
  23. package/dist/web/components/form/uploader/uploader.pc.js +22 -20
  24. package/dist/web/components/uploaderView/index.d.ts +8 -1
  25. package/dist/web/components/uploaderView/index.js +5 -4
  26. package/dist/web/components/wd-form-item/wd-form-item.js +3 -3
  27. package/dist/web/components/wd-form-item/wd-input-wrap.js +8 -2
  28. package/dist/web/components/wd-form-obj/base-form-obj.js +4 -1
  29. package/dist/web/components/wd-image/ImagePreview.d.ts +1 -0
  30. package/dist/web/components/wd-image/ImagePreview.js +124 -0
  31. package/dist/web/components/wd-image/image.d.ts +2 -1
  32. package/dist/web/components/wd-image/image.js +47 -159
  33. package/dist/web/components/wd-image/index.d.ts +1 -0
  34. package/dist/web/components/wd-image/index.js +7 -3
  35. package/dist/web/components/wd-menu-list/CommonMenuList.js +12 -1
  36. package/dist/web/components/wd-rich-text/wd-rich-text.js +1 -1
  37. package/dist/web/components/wd-select/relationSelect/relationSelect.js +7 -12
  38. package/dist/web/components/wd-select/select/selectUI.js +8 -13
  39. package/dist/web/components/wd-table/components/FieldRender/ImagePreview.js +8 -1
  40. package/dist/web/components/wd-table/components/FieldRender/index.js +2 -2
  41. package/dist/web/components/wd-table/wd-table.js +16 -46
  42. package/dist/web/components/wd-upload-file/wd-upload-file.js +1 -1
  43. package/dist/web/components/wd-upload-image/wd-upload-image.js +1 -1
  44. package/dist/web/components/web-view/web-view.d.ts +2 -0
  45. package/dist/web/components/web-view/web-view.js +2 -2
  46. package/dist/web/utils/getModelParams.js +8 -3
  47. package/package.json +3 -3
@@ -184,6 +184,7 @@ declare const config: {
184
184
  'data-withBindMeta': boolean;
185
185
  };
186
186
  description: string;
187
+ 'x-helper-text': string;
187
188
  };
188
189
  isSupportApis: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
189
190
  selectFieldType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
@@ -1,7 +1,7 @@
1
1
  import { svgDataUri as svg } from '../svg-tag';
2
2
  import { Type } from '../type-utils';
3
3
  import { genericErrorType } from '../type-utils/error';
4
- import { OFFICIAL_LIB_KEY, previewOperationHeaderIcon, } from '../utils/constants';
4
+ import { OFFICIAL_LIB_KEY, previewOperationHeaderIcon } from '../utils/constants';
5
5
  const rawTemplate = `
6
6
  {{#with (helper_utils 'concat' 'string' 'number' 'boolean') as |_rangeTypes|}}
7
7
 
@@ -499,6 +499,7 @@ const config = {
499
499
  'data-withBindMeta': true,
500
500
  },
501
501
  description: '对数据进行筛选过滤',
502
+ 'x-helper-text': '点击fx支持编辑数据筛选表达式 [查看格式](https://docs.cloudbase.net/lowcode/manage/datasource-v2#%E6%9F%A5%E8%AF%A2wedagetitemv2)',
502
503
  },
503
504
  isSupportApis: Type.Optional(Type.Boolean({
504
505
  title: '是否支持apis',
@@ -1021,9 +1021,7 @@ const data = Type.Object({
1021
1021
  condition: '{{!!$value && !!$value.name && !!$form.values?.sorter?.length && !$form.values.sorter.every(o => getDataSourceValueOptions($value.name, undefined, true).find(n=>o.orderBy===n.value))}}',
1022
1022
  target: 'sorter',
1023
1023
  state: {
1024
- value: [
1025
- { orderBy: 'updatedAt', orderType: 'desc', label: '更新时间' },
1026
- ],
1024
+ value: [{ orderBy: 'updatedAt', orderType: 'desc', label: '更新时间' }],
1027
1025
  },
1028
1026
  },
1029
1027
  {
@@ -1105,7 +1103,7 @@ const data = Type.Object({
1105
1103
  },
1106
1104
  description: '展示数据的APIs来源选择',
1107
1105
  })),
1108
- dataSourceData: Type.Optional(Type.Array(Type.Object({}, {
1106
+ dataSourceData: Type.Optional(Type.Array(Type.Object({}), {
1109
1107
  title: '表达式',
1110
1108
  type: 'array',
1111
1109
  required: true,
@@ -1114,7 +1112,7 @@ const data = Type.Object({
1114
1112
  'x-helper-text': '新特性:数据列表追加绑定表达式数据,原APIs路径优化为表达式。注意:数组中默认需包含_id字段。且当输入的表达式变化时,会触发自动生成列表字段。因此建议先输入表达式再调整样式。[查看示例](https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/database/ListView#2-%E7%BB%91%E5%AE%9A%E8%A1%A8%E8%BE%BE%E5%BC%8F)',
1115
1113
  'x-group': '数据',
1116
1114
  'x-index': 14,
1117
- }))),
1115
+ })),
1118
1116
  exprToFieldsSchema: Type.Optional(Type.String({
1119
1117
  title: '',
1120
1118
  type: 'string',
@@ -1228,6 +1226,7 @@ const data = Type.Object({
1228
1226
  'data-withBindMeta': true,
1229
1227
  },
1230
1228
  description: '对数据进行筛选过滤',
1229
+ 'x-helper-text': '点击fx支持编辑数据筛选表达式 [查看格式](https://docs.cloudbase.net/lowcode/manage/datasource-v2#%E6%9F%A5%E8%AF%A2wedagetitemv2)',
1231
1230
  })),
1232
1231
  orderBy: Type.Optional(Type.String({
1233
1232
  'x-index': 30,
@@ -1837,13 +1836,7 @@ export default {
1837
1836
  keywords: ['数据列表', '商品列表', '卡片列表', '图文卡片', '列表页'],
1838
1837
  docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/database/ListView',
1839
1838
  shortcut: {
1840
- props: [
1841
- 'dataSourceType',
1842
- 'datasource',
1843
- 'bindConnectMetadata',
1844
- 'connectorMethod',
1845
- 'template',
1846
- ],
1839
+ props: ['dataSourceType', 'datasource', 'bindConnectMetadata', 'connectorMethod', 'template'],
1847
1840
  },
1848
1841
  contextData: {
1849
1842
  setField: true,
@@ -2,6 +2,7 @@ import { Static } from '../type-utils';
2
2
  import type { Simplify } from 'type-fest';
3
3
  declare const data: import("@sinclair/typebox").TObject<{
4
4
  status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
5
+ dataSourceName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
5
6
  layout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string> & {
6
7
  title: string;
7
8
  }>;
@@ -27,6 +28,7 @@ declare const config: {
27
28
  readonly $schema: "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json";
28
29
  readonly data: import("@sinclair/typebox").TObject<{
29
30
  status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
31
+ dataSourceName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
30
32
  layout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string> & {
31
33
  title: string;
32
34
  }>;
@@ -178,11 +180,12 @@ declare const config: {
178
180
  readonly __k: "init-name-with-id";
179
181
  }, {
180
182
  readonly when: "$attached";
181
- readonly body: "\n[attributes]\nvalue = [{}]\n\":addDefaultValue\"=\"{}\"\n[[template]]\ncomponent = \"Repeater\"\n[template.attributes]\n\":data\" = \"($w.{{$self.id}}.value || [])\"\nsuffix = '{{$self.id}}'\nforItem = 'item_{{$self.id}}'\nforIndex = 'index_{{$self.id}}'\n[[template.items]]\ncomponent = \"Container\"\nscopedStyle = \":scope {\n position: relative;\n width: 100%;\n}\"\n[[template.items.items]]\ncomponent = 'WdFormObj'\n[template.items.items.attributes]\n\":label\" = \"`${$w.{{$self.id}}.label}[${$w.index_{{$self.id}} + 1}]`\"\n\":name\" = \"$w.index_{{$self.id}}\"\nisRoot = false\nvalue = {}\n[[template.items.items]]\ncomponent = 'WdIcon'\nscopedStyle = \":scope {\n position: absolute;\n right: var(--wd-card-heder-pd-bordered);\n top: var(--wd-card-heder-pd-bordered);\n color: var(--wd-color-brand);\n}\n\n:scope.wd-mp-icon {\n top: var(--wd-card-heder-pd-bordered);\n}\"\n[template.items.items.attributes]\nname = \"td:delete\"\nsize = \"sm\"\n[[template.items.items.listeners]]\neventName = \"tap\"\ntype = \"platform\"\n[template.items.items.listeners.handler]\nmodule = \"platform\"\nname = \"invoke\"\n[template.items.items.listeners.handler.params]\ncomponent = \"{{$self.id}}\"\nmethod = \"remove\"\n[template.items.items.listeners.handler.params.params]\n\":index\" = \"$w.index_{{$self.id}}\"\n\n[[template]]\ncomponent = 'Grid'\nscopedStyle = \":scope {\n margin-top: 10px;\n width: 100%;\n}\"\n[[template.listeners]]\neventName = \"tap\"\ntype = \"platform\"\n[template.listeners.handler]\nmodule = \"platform\"\nname = \"invoke\"\n[template.listeners.handler.params]\ncomponent = \"{{$self.id}}\"\nmethod = \"add\"\n[[template.items]]\ncomponent = 'Row'\n[template.items.attributes]\nalignItems = \"center\"\n[[template.items.items]]\ncomponent = 'Col'\nscopedStyle = \":scope {\n flex: 0;\n}\"\n[template.items.items.attributes]\nlgWidthType = \"fit-content\"\nwidthType = \"fit-content\"\n[[template.items.items.items]]\ncomponent = 'WdIcon'\nscopedStyle = \":scope {\n color: var(--wd-color-brand);\n}\"\n[template.items.items.items.attributes]\nname = \"td:add-circle\"\n\n[[template.items.items]]\ncomponent = 'Col'\nscopedStyle = \":scope {\n flex: 0;\n}\"\n[template.items.items.attributes]\nlgWidthType = \"fit-content\"\nwidthType = \"fit-content\"\n[[template.items.items.items]]\ncomponent = 'WdText'\nscopedStyle = \":scope {\n color: var(--wd-color-brand);\n white-space: nowrap;\n}\"\n[template.items.items.items.attributes]\ntext = \"新增\"\n";
183
+ readonly body: string;
182
184
  }, {
183
185
  readonly when: "mode";
184
186
  readonly to: "$children";
185
187
  readonly body: string;
188
+ readonly remainToTemplateContainer: "WdFormObj *";
186
189
  }];
187
190
  };
188
191
  };
@@ -2,146 +2,7 @@ import { defineConfig, Type } from '../type-utils';
2
2
  import { FORM_ITEM_DATA, FORM_ITEM_META, ItemData, FORM_ITEM_DATA_TITLE, } from '../type-utils/type-form';
3
3
  import { getClasses } from '../type-utils/classes';
4
4
  import { templateInitNameWithId } from './common/init-name-with-id';
5
- const $attached_template = `
6
- [attributes]
7
- value = [{}]
8
- ":addDefaultValue"="{}"
9
- [[template]]
10
- component = "Repeater"
11
- [template.attributes]
12
- ":data" = "($w.{{$self.id}}.value || [])"
13
- suffix = '{{$self.id}}'
14
- forItem = 'item_{{$self.id}}'
15
- forIndex = 'index_{{$self.id}}'
16
- [[template.items]]
17
- component = "Container"
18
- scopedStyle = ":scope {\n position: relative;\n width: 100%;\n}"
19
- [[template.items.items]]
20
- component = 'WdFormObj'
21
- [template.items.items.attributes]
22
- ":label" = "\`\${$w.{{$self.id}}.label}[\${$w.index_{{$self.id}} + 1}]\`"
23
- ":name" = "$w.index_{{$self.id}}"
24
- isRoot = false
25
- value = {}
26
- [[template.items.items]]
27
- component = 'WdIcon'
28
- scopedStyle = ":scope {\n position: absolute;\n right: var(--wd-card-heder-pd-bordered);\n top: var(--wd-card-heder-pd-bordered);\n color: var(--wd-color-brand);\n}\n\n:scope.wd-mp-icon {\n top: var(--wd-card-heder-pd-bordered);\n}"
29
- [template.items.items.attributes]
30
- name = "td:delete"
31
- size = "sm"
32
- [[template.items.items.listeners]]
33
- eventName = "tap"
34
- type = "platform"
35
- [template.items.items.listeners.handler]
36
- module = "platform"
37
- name = "invoke"
38
- [template.items.items.listeners.handler.params]
39
- component = "{{$self.id}}"
40
- method = "remove"
41
- [template.items.items.listeners.handler.params.params]
42
- ":index" = "$w.index_{{$self.id}}"
43
-
44
- [[template]]
45
- component = 'Grid'
46
- scopedStyle = ":scope {\n margin-top: 10px;\n width: 100%;\n}"
47
- [[template.listeners]]
48
- eventName = "tap"
49
- type = "platform"
50
- [template.listeners.handler]
51
- module = "platform"
52
- name = "invoke"
53
- [template.listeners.handler.params]
54
- component = "{{$self.id}}"
55
- method = "add"
56
- [[template.items]]
57
- component = 'Row'
58
- [template.items.attributes]
59
- alignItems = "center"
60
- [[template.items.items]]
61
- component = 'Col'
62
- scopedStyle = ":scope {\n flex: 0;\n}"
63
- [template.items.items.attributes]
64
- lgWidthType = "fit-content"
65
- widthType = "fit-content"
66
- [[template.items.items.items]]
67
- component = 'WdIcon'
68
- scopedStyle = ":scope {\n color: var(--wd-color-brand);\n}"
69
- [template.items.items.items.attributes]
70
- name = "td:add-circle"
71
-
72
- [[template.items.items]]
73
- component = 'Col'
74
- scopedStyle = ":scope {\n flex: 0;\n}"
75
- [template.items.items.attributes]
76
- lgWidthType = "fit-content"
77
- widthType = "fit-content"
78
- [[template.items.items.items]]
79
- component = 'WdText'
80
- scopedStyle = ":scope {\n color: var(--wd-color-brand);\n white-space: nowrap;\n}"
81
- [template.items.items.items.attributes]
82
- text = "新增"
83
- `;
84
- const $field_template = `
85
- [attributes]
86
- value = ['']
87
- ":addDefaultValue"="undefined"
88
- [[template]]
89
- component = "Repeater"
90
- [template.attributes]
91
- ":data" = "($w.{{$self.id}}.value || [])"
92
- suffix = '{{$self.id}}'
93
- forItem = 'item_{{$self.id}}'
94
- forIndex = 'index_{{$self.id}}'
95
- [[template.items]]
96
- component = "Container"
97
- scopedStyle = ":scope {\n display: flex;\n align-items: center;\n width: 100%;\n}"
98
- [[template.items.items]]
99
- component = 'WdInput'
100
- [template.items.items.attributes]
101
- ":name" = "$w.index_{{$self.id}}"
102
- labelVisible = false
103
- value = {}
104
- [[template.items.items]]
105
- component = 'WdIcon'
106
- scopedStyle = ":scope {\n color: var(--wd-color-brand);\n margin-left: 10px;\n}"
107
- [template.items.items.attributes]
108
- name = "td:delete"
109
- size = "sm"
110
- [[template.items.items.listeners]]
111
- eventName = "tap"
112
- type = "platform"
113
- [template.items.items.listeners.handler]
114
- module = "platform"
115
- name = "invoke"
116
- [template.items.items.listeners.handler.params]
117
- component = "{{$self.id}}"
118
- method = "remove"
119
- [template.items.items.listeners.handler.params.params]
120
- ":index" = "$w.index_{{$self.id}}"
121
-
122
- [[template]]
123
- component = 'Container'
124
- scopedStyle = ":scope {\n display: flex;\n align-items: center;\n width: 100%;\n color: var(--wd-color-brand);\n margin-top: 5px;\n}"
125
- [[template.listeners]]
126
- eventName = "tap"
127
- type = "platform"
128
- [template.listeners.handler]
129
- module = "platform"
130
- name = "invoke"
131
- [template.listeners.handler.params]
132
- component = "{{$self.id}}"
133
- method = "add"
134
- [[template.items]]
135
- component = 'WdIcon'
136
- scopedStyle = ":scope{\n margin-right: 5px;\n}"
137
- [template.items.attributes]
138
- name = "td:add-circle"
139
- [[template.items]]
140
- component = 'WdText'
141
- scopedStyle = ":scope{\n color: var(--wd-color-brand);\n}"
142
- [template.items.attributes]
143
- text = "新增"
144
- `;
5
+ import { $attached_template, $custom_template, $table_template, $field_template, } from '../utils/field';
145
6
  const $mode_template = `
146
7
  {{#with $self as |$self|}}
147
8
  {{#if (helper_utils '===' $self.attributes.mode 'obj')}}
@@ -149,6 +10,14 @@ ${$attached_template}
149
10
  {{else if (helper_utils '===' $self.attributes.mode 'field')}}
150
11
 
151
12
  ${$field_template}
13
+
14
+ {{else if (helper_utils '===' $self.attributes.mode 'table')}}
15
+
16
+ ${$table_template}
17
+
18
+ {{else if (helper_utils '===' $self.attributes.mode 'custom')}}
19
+
20
+ ${$custom_template}
152
21
  {{/if}}
153
22
  {{/with}}
154
23
  `;
@@ -176,6 +45,7 @@ const data = Type.Partial(Type.Object({
176
45
  },
177
46
  // 状态校验
178
47
  status: FORM_ITEM_DATA.status,
48
+ dataSourceName: FORM_ITEM_DATA.dataSourceName,
179
49
  }));
180
50
  const properties = Type.Composite([
181
51
  Type.Pick(data, ['name', 'label', 'value']),
@@ -264,6 +134,7 @@ const config = defineConfig({
264
134
  when: 'mode',
265
135
  to: '$children',
266
136
  body: $mode_template,
137
+ remainToTemplateContainer: 'WdFormObj *',
267
138
  },
268
139
  ],
269
140
  },
@@ -20,6 +20,7 @@ declare const data: import("@sinclair/typebox").TObject<{
20
20
  value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>]>>;
21
21
  size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
22
22
  isRoot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
23
+ mode: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
23
24
  }>;
24
25
  export type DataType = Simplify<Static<typeof data>>;
25
26
  declare const config: {
@@ -44,6 +45,7 @@ declare const config: {
44
45
  value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>]>>;
45
46
  size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
46
47
  isRoot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
48
+ mode: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
47
49
  }>;
48
50
  readonly properties: import("@sinclair/typebox").TObject<{
49
51
  value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{}>, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>]>>;
@@ -1,5 +1,5 @@
1
1
  import { defineConfig, Type } from '../type-utils';
2
- import { FORM_ITEM_DATA, FORM_ITEM_META, ItemData, FORM_ITEM_DATA_TITLE, } from '../type-utils/type-form';
2
+ import { FORM_ITEM_DATA, FORM_ITEM_META, ItemData, FORM_ITEM_DATA_TITLE, X_CATEGORY, } from '../type-utils/type-form';
3
3
  import { getClasses } from '../type-utils/classes';
4
4
  import { templateInitNameWithId } from './common/init-name-with-id';
5
5
  // 属性类型定义
@@ -16,6 +16,18 @@ const data = Type.Partial(Type.Object({
16
16
  value: FORM_ITEM_DATA._valueInFormObj,
17
17
  size: FORM_ITEM_DATA.size,
18
18
  isRoot: FORM_ITEM_DATA.isRoot,
19
+ mode: Type.StringEnum({
20
+ title: '模板',
21
+ type: 'string',
22
+ default: 'obj',
23
+ enum: [
24
+ { label: '卡片', value: 'obj' },
25
+ { label: '自定义', value: 'custom' },
26
+ ],
27
+ 'x-category': X_CATEGORY.COMMON,
28
+ 'x-component': 'string',
29
+ 'x-index': 21,
30
+ }),
19
31
  // 标题
20
32
  ...{
21
33
  ...FORM_ITEM_DATA_TITLE,
@@ -38,38 +38,47 @@ declare const config: {
38
38
  readonly name: "根元素";
39
39
  readonly selector: ".wd-modal";
40
40
  readonly description: "组件根元素";
41
+ readonly code: "\n :scope.wd-modal {\n /* 在这里编写CSS 样式 */\n }\n ";
41
42
  }, {
42
43
  readonly name: "PC 端根元素";
43
44
  readonly selector: ".wd-pc-modal";
44
45
  readonly description: "可以为 PC 端的编写样式";
46
+ readonly code: "\n :scope.wd-pc-modal {\n /* 可以为 PC 端的编写样式 */\n }\n ";
45
47
  }, {
46
48
  readonly name: "H5 端根元素";
47
49
  readonly selector: ".wd-h5-modal";
48
50
  readonly description: "可以为 H5 端的编写样式";
51
+ readonly code: "\n :scope.wd-h5-modal {\n /* 在这里编写CSS 样式 */\n }\n ";
49
52
  }, {
50
53
  readonly name: "小程序 端根元素";
51
54
  readonly selector: ".wd-mp-modal";
52
55
  readonly description: "可以为 小程序 端的编写样式";
56
+ readonly code: "\n :scope.wd-mp-modal {\n /* 可以为 小程序 端的编写样式 */\n }\n ";
53
57
  }, {
54
58
  readonly name: "弹窗遮罩层样式";
55
59
  readonly selector: ".wd-modal-mask";
56
60
  readonly description: "可以为遮罩层编写样式";
61
+ readonly code: "\n :scope .wd-modal-mask {\n /* 可以为遮罩层编写样式 */\n background-color: rgba(0, 0, 0, 0.5)\n }\n ";
57
62
  }, {
58
63
  readonly name: "弹窗主体容器样式";
59
- readonly selector: ".wd-modal-bd";
64
+ readonly selector: ".wd-modal-content";
60
65
  readonly description: "可以为主体容器编写样式";
66
+ readonly code: "\n :scope .wd-modal-content {\n /* 可以为主体容器编写样式 */\n inset-inline-start: auto;\n inset-inline-end: 0;\n }\n ";
61
67
  }, {
62
68
  readonly name: "弹窗标题区样式";
63
69
  readonly selector: ".wd-modal-bd__hd";
64
70
  readonly description: "可以为标题区编写样式";
71
+ readonly code: "\n :scope .wd-modal-bd__hd .wd-typography {\n /* 可以为标题区编写样式 */\n font-size: 20px;\n color: #333;\n }\n ";
65
72
  }, {
66
73
  readonly name: "弹窗内容区样式";
67
74
  readonly selector: ".wd-modal-bd__main";
68
75
  readonly description: "可以为内容区编写样式";
76
+ readonly code: "\n :scope .wd-modal-bd__main {\n /* 可以为内容区编写样式 */\n }\n ";
69
77
  }, {
70
78
  readonly name: "弹窗按钮区样式";
71
79
  readonly selector: ".wd-modal-bd__ft";
72
80
  readonly description: "可以为按钮区编写样式";
81
+ readonly code: "\n :scope .wd-modal-bd__ft {\n /* 可以为按钮区编写样式 */\n justify-content: flex-start;\n }\n ";
73
82
  }];
74
83
  readonly methods: readonly [{
75
84
  readonly name: "open";
@@ -522,46 +522,97 @@ const config = defineConfig({
522
522
  name: '根元素',
523
523
  selector: '.wd-modal',
524
524
  description: '组件根元素',
525
+ code: `
526
+ :scope.wd-modal {
527
+ /* 在这里编写CSS 样式 */
528
+ }
529
+ `,
525
530
  },
526
531
  {
527
532
  name: 'PC 端根元素',
528
533
  selector: '.wd-pc-modal',
529
534
  description: '可以为 PC 端的编写样式',
535
+ code: `
536
+ :scope.wd-pc-modal {
537
+ /* 可以为 PC 端的编写样式 */
538
+ }
539
+ `,
530
540
  },
531
541
  {
532
542
  name: 'H5 端根元素',
533
543
  selector: '.wd-h5-modal',
534
544
  description: '可以为 H5 端的编写样式',
545
+ code: `
546
+ :scope.wd-h5-modal {
547
+ /* 在这里编写CSS 样式 */
548
+ }
549
+ `,
535
550
  },
536
551
  {
537
552
  name: '小程序 端根元素',
538
553
  selector: '.wd-mp-modal',
539
554
  description: '可以为 小程序 端的编写样式',
555
+ code: `
556
+ :scope.wd-mp-modal {
557
+ /* 可以为 小程序 端的编写样式 */
558
+ }
559
+ `,
540
560
  },
541
561
  {
542
562
  name: '弹窗遮罩层样式',
543
563
  selector: '.wd-modal-mask',
544
564
  description: '可以为遮罩层编写样式',
565
+ code: `
566
+ :scope .wd-modal-mask {
567
+ /* 可以为遮罩层编写样式 */
568
+ background-color: rgba(0, 0, 0, 0.5)
569
+ }
570
+ `,
545
571
  },
546
572
  {
547
573
  name: '弹窗主体容器样式',
548
- selector: '.wd-modal-bd',
574
+ selector: '.wd-modal-content',
549
575
  description: '可以为主体容器编写样式',
576
+ code: `
577
+ :scope .wd-modal-content {
578
+ /* 可以为主体容器编写样式 */
579
+ inset-inline-start: auto;
580
+ inset-inline-end: 0;
581
+ }
582
+ `,
550
583
  },
551
584
  {
552
585
  name: '弹窗标题区样式',
553
586
  selector: '.wd-modal-bd__hd',
554
587
  description: '可以为标题区编写样式',
588
+ code: `
589
+ :scope .wd-modal-bd__hd .wd-typography {
590
+ /* 可以为标题区编写样式 */
591
+ font-size: 20px;
592
+ color: #333;
593
+ }
594
+ `,
555
595
  },
556
596
  {
557
597
  name: '弹窗内容区样式',
558
598
  selector: '.wd-modal-bd__main',
559
599
  description: '可以为内容区编写样式',
600
+ code: `
601
+ :scope .wd-modal-bd__main {
602
+ /* 可以为内容区编写样式 */
603
+ }
604
+ `,
560
605
  },
561
606
  {
562
607
  name: '弹窗按钮区样式',
563
608
  selector: '.wd-modal-bd__ft',
564
609
  description: '可以为按钮区编写样式',
610
+ code: `
611
+ :scope .wd-modal-bd__ft {
612
+ /* 可以为按钮区编写样式 */
613
+ justify-content: flex-start;
614
+ }
615
+ `,
565
616
  },
566
617
  ],
567
618
  // 组件方法
@@ -340,6 +340,11 @@ declare const config: {
340
340
  readonly label: "重置筛选器";
341
341
  readonly 'x-platforms': readonly ["MOBILEWEB", "PCWEB"];
342
342
  readonly description: "重置筛选器";
343
+ }, {
344
+ readonly name: "clearSelection";
345
+ readonly label: "清空选中项";
346
+ readonly 'x-platforms': readonly ["MOBILEWEB", "PCWEB"];
347
+ readonly description: "清空选中项";
343
348
  }];
344
349
  readonly events: readonly [{
345
350
  readonly title: "点击表格行";
@@ -658,4 +663,9 @@ export declare const methods: readonly [{
658
663
  readonly label: "重置筛选器";
659
664
  readonly 'x-platforms': readonly ["MOBILEWEB", "PCWEB"];
660
665
  readonly description: "重置筛选器";
666
+ }, {
667
+ readonly name: "clearSelection";
668
+ readonly label: "清空选中项";
669
+ readonly 'x-platforms': readonly ["MOBILEWEB", "PCWEB"];
670
+ readonly description: "清空选中项";
661
671
  }];
@@ -374,9 +374,7 @@ const data = Type.Object({
374
374
  condition: '{{!!$value && !!$value.datasource && !!$value.datasource.name && !!$form.values?.sorter?.length && !$form.values.sorter.every(o => getDataSourceValueOptions($value.datasource.name, undefined, true).find(n=>o.orderBy===n.value))}}',
375
375
  target: 'sorter',
376
376
  state: {
377
- value: [
378
- { orderBy: 'updatedAt', orderType: 'desc', label: '更新时间' },
379
- ],
377
+ value: [{ orderBy: 'updatedAt', orderType: 'desc', label: '更新时间' }],
380
378
  },
381
379
  },
382
380
  {
@@ -1704,6 +1702,12 @@ const config = defineConfig({
1704
1702
  'x-platforms': ['MOBILEWEB', 'PCWEB'],
1705
1703
  description: '重置筛选器',
1706
1704
  },
1705
+ {
1706
+ name: 'clearSelection',
1707
+ label: '清空选中项',
1708
+ 'x-platforms': ['MOBILEWEB', 'PCWEB'],
1709
+ description: '清空选中项',
1710
+ },
1707
1711
  ],
1708
1712
  // 组件对外暴露事件
1709
1713
  events: [
@@ -1932,21 +1936,9 @@ const config = defineConfig({
1932
1936
  // 当前场景
1933
1937
  scenes: ['batchSelect', 'batchDelete', 'create', 'select', 'update'],
1934
1938
  // 允许选择的场景
1935
- availableScenes: [
1936
- 'batchSelect',
1937
- 'create',
1938
- 'select',
1939
- 'update',
1940
- 'batchDelete',
1941
- ],
1939
+ availableScenes: ['batchSelect', 'create', 'select', 'update', 'batchDelete'],
1942
1940
  // 场景组合
1943
- validCombinations: getCombinations([
1944
- 'batchSelect',
1945
- 'create',
1946
- 'select',
1947
- 'update',
1948
- 'batchDelete',
1949
- ]).filter((scenes) => {
1941
+ validCombinations: getCombinations(['batchSelect', 'create', 'select', 'update', 'batchDelete']).filter((scenes) => {
1950
1942
  if (!scenes.includes('batchSelect')) {
1951
1943
  return false;
1952
1944
  }
@@ -2,6 +2,8 @@ import { Static, StaticEventsType } from '../type-utils';
2
2
  import type { Simplify } from 'type-fest';
3
3
  declare const data: import("@sinclair/typebox").TObject<{
4
4
  link: import("@sinclair/typebox").TString;
5
+ allow: import("@sinclair/typebox").TString;
6
+ sandbox: import("@sinclair/typebox").TString;
5
7
  }>;
6
8
  export type DataType = Simplify<Static<typeof data>>;
7
9
  declare const events: [{
@@ -27,6 +29,8 @@ declare const config: {
27
29
  readonly $schema: "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json";
28
30
  readonly data: import("@sinclair/typebox").TObject<{
29
31
  link: import("@sinclair/typebox").TString;
32
+ allow: import("@sinclair/typebox").TString;
33
+ sandbox: import("@sinclair/typebox").TString;
30
34
  }>;
31
35
  readonly properties: import("@sinclair/typebox").TObject<{
32
36
  link: import("@sinclair/typebox").TString;
@@ -1,4 +1,4 @@
1
- import { defineConfig, Type, Tuple, } from '../type-utils';
1
+ import { defineConfig, Type, Tuple } from '../type-utils';
2
2
  // 属性类型定义
3
3
  const data = Type.Object({
4
4
  link: Type.String({
@@ -10,6 +10,24 @@ const data = Type.Object({
10
10
  'x-category': '基础属性',
11
11
  'x-helper-text': `小程序端以真机调试效果为准。除关联公众号文章链接外,其他链接需配置业务域名才可生效,[去配置](https://console.cloud.tencent.com/lowcode/auth/personal-wechat?from=editor)`,
12
12
  }),
13
+ allow: Type.String({
14
+ title: 'allow',
15
+ type: 'string',
16
+ default: 'microphone;camera;midi;encrypted-media;geolocation;fullscreen;clipboard-write;clipboard-read;',
17
+ required: true,
18
+ 'x-index': 20,
19
+ 'x-category': '基础属性',
20
+ 'x-helper-text': '用于为 <iframe> 指定其权限策略。该策略根据请求的来源规定 <iframe> 可以使用哪些特性(例如,访问麦克风、摄像头、电池、web 共享等)。该属性暂不支持小程序。',
21
+ }),
22
+ sandbox: Type.String({
23
+ title: 'sandbox',
24
+ type: 'string',
25
+ default: 'allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts allow-downloads',
26
+ required: true,
27
+ 'x-index': 30,
28
+ 'x-category': '基础属性',
29
+ 'x-helper-text': '控制应用于嵌入在 <iframe> 中的内容的限制。该属性的值可以为空以应用所有限制,也可以为空格分隔的标记以解除特定的限制。该属性暂不支持小程序。',
30
+ }),
13
31
  });
14
32
  // 组件对外暴露的只读属性
15
33
  // 未来可通过 widget API 开放,应用可以获取到组件的实例属性