@cloudbase/weda-ui 3.25.0 → 3.26.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.
Files changed (86) hide show
  1. package/dist/configs/components/wd-drawer.d.ts +144 -0
  2. package/dist/configs/components/wd-drawer.js +358 -0
  3. package/dist/configs/components/wd-image.js +1 -1
  4. package/dist/configs/components/wd-modal.js +5 -1
  5. package/dist/configs/components/wd-table.d.ts +5 -0
  6. package/dist/configs/components/wd-table.js +11 -0
  7. package/dist/configs/components/wxOpenApi/userInfo.d.ts +2 -2
  8. package/dist/configs/index.d.ts +256 -2
  9. package/dist/configs/index.js +2 -0
  10. package/dist/enum/index.d.ts +4 -0
  11. package/dist/enum/index.js +18 -0
  12. package/dist/style/index.css +146 -3
  13. package/dist/style/index.scss +1 -1
  14. package/dist/style/weda-ui.min.css +4 -4
  15. package/dist/web/components/form/uploader/upload/index.js +3 -1
  16. package/dist/web/components/form/uploader/uploader.pc.js +3 -1
  17. package/dist/web/components/form/uploaderFile/uploadFile.h5.js +25 -17
  18. package/dist/web/components/form/uploaderFile/uploadFile.pc.js +26 -17
  19. package/dist/web/components/form/userOrgSelect/component/depart-breadcrumb.js +3 -1
  20. package/dist/web/components/form/userOrgSelect/component/depart-select/depart-select-pc.d.ts +2 -2
  21. package/dist/web/components/form/userOrgSelect/component/depart-select/depart-select-pc.js +8 -4
  22. package/dist/web/components/form/userOrgSelect/component/depart-select/index.js +10 -3
  23. package/dist/web/components/form/userOrgSelect/component/depart-select/org-modal-pc.js +6 -6
  24. package/dist/web/components/form/userOrgSelect/component/error-tips.d.ts +1 -1
  25. package/dist/web/components/form/userOrgSelect/component/error-tips.js +7 -4
  26. package/dist/web/components/form/userOrgSelect/component/modal-search-h5.js +3 -1
  27. package/dist/web/components/form/userOrgSelect/component/modal-search.js +4 -1
  28. package/dist/web/components/form/userOrgSelect/component/modal-select-h5.js +8 -11
  29. package/dist/web/components/form/userOrgSelect/component/org-tree.js +3 -1
  30. package/dist/web/components/form/userOrgSelect/component/selected-list-h5.js +8 -8
  31. package/dist/web/components/form/userOrgSelect/component/selected-list.js +5 -10
  32. package/dist/web/components/form/userOrgSelect/component/user-org-list.js +12 -21
  33. package/dist/web/components/form/userOrgSelect/component/user-select-h5/user-list-h5.js +6 -10
  34. package/dist/web/components/form/userOrgSelect/component/user-select-h5/user-select-h5.d.ts +1 -1
  35. package/dist/web/components/form/userOrgSelect/component/user-select-h5/user-select-h5.js +5 -1
  36. package/dist/web/components/form/userOrgSelect/component/user-select-pc/model-user-list.d.ts +1 -1
  37. package/dist/web/components/form/userOrgSelect/component/user-select-pc/model-user-list.js +4 -2
  38. package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-model.js +4 -2
  39. package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-select-pc.d.ts +2 -2
  40. package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-select-pc.js +6 -2
  41. package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.d.ts +2 -2
  42. package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.js +12 -11
  43. package/dist/web/components/form/userOrgSelect/hooks/use-depart-data.js +9 -9
  44. package/dist/web/components/form-input-hooks/validator.js +1 -1
  45. package/dist/web/components/index.d.ts +2 -0
  46. package/dist/web/components/index.js +2 -0
  47. package/dist/web/components/richText/const.d.ts +57 -0
  48. package/dist/web/components/richText/const.js +57 -0
  49. package/dist/web/components/richText/index.css +3 -1
  50. package/dist/web/components/richText/index.d.ts +1 -2
  51. package/dist/web/components/richText/index.js +26 -20
  52. package/dist/web/components/table/ImportFileModal/index.css +21 -69
  53. package/dist/web/components/uploaderFileView/index.js +2 -0
  54. package/dist/web/components/uploaderView/index.js +6 -3
  55. package/dist/web/components/wd-config-provider/wd-config-context.d.ts +9 -0
  56. package/dist/web/components/wd-config-provider/wd-config-context.js +2 -0
  57. package/dist/web/components/wd-config-provider/wd-config-provider.js +8 -9
  58. package/dist/web/components/wd-drawer/index.d.ts +3 -0
  59. package/dist/web/components/wd-drawer/index.js +3 -0
  60. package/dist/web/components/wd-drawer/wd-drawer.d.ts +11 -0
  61. package/dist/web/components/wd-drawer/wd-drawer.js +122 -0
  62. package/dist/web/components/wd-form/hooks/use-remote-value.js +1 -1
  63. package/dist/web/components/wd-image/ImagePreview.js +5 -1
  64. package/dist/web/components/wd-modal/wd-modal.js +4 -2
  65. package/dist/web/components/wd-rich-text/wd-rich-text.js +1 -1
  66. package/dist/web/components/wd-table/components/Table/index.js +3 -1
  67. package/dist/web/components/wd-table/wd-table.js +27 -29
  68. package/dist/web/components/wd-tabs/tabs-h5.js +6 -3
  69. package/dist/web/components/wd-tabs/tabs-pc.js +6 -3
  70. package/dist/web/components/wd-tabs/tabs.js +2 -6
  71. package/dist/web/components/wd-tree/utils.d.ts +1 -1
  72. package/dist/web/components/wd-unified-link/utils.js +2 -2
  73. package/dist/web/components/wd-upload-file/wd-upload-file.js +5 -1
  74. package/dist/web/utils/config-context/use-config.d.ts +1 -0
  75. package/dist/web/utils/config-context/use-config.js +2 -1
  76. package/dist/web/utils/i18n/index.d.ts +1 -0
  77. package/dist/web/utils/i18n/index.js +1 -0
  78. package/dist/web/utils/i18n/locale/en_US.d.ts +119 -0
  79. package/dist/web/utils/i18n/locale/en_US.js +187 -0
  80. package/dist/web/utils/i18n/locale/zh_CN.d.ts +120 -0
  81. package/dist/web/utils/i18n/locale/zh_CN.js +188 -0
  82. package/dist/web/utils/i18n/translation.d.ts +9 -0
  83. package/dist/web/utils/i18n/translation.js +28 -0
  84. package/dist/web/utils/i18n/translationMap.d.ts +15 -0
  85. package/dist/web/utils/i18n/translationMap.js +10 -0
  86. package/package.json +3 -3
@@ -0,0 +1,144 @@
1
+ import { Static } from '../type-utils';
2
+ import type { Simplify } from 'type-fest';
3
+ declare const data: import("@sinclair/typebox").TObject<{
4
+ visible: import("@sinclair/typebox").TBoolean;
5
+ placement: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
6
+ closeType: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
7
+ mask: import("@sinclair/typebox").TBoolean;
8
+ enableHeaderSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
9
+ enableContentSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
10
+ enableFooterSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
11
+ headerSlot: import("@sinclair/typebox").TUnsafe<import("react").ReactNode>;
12
+ contentSlot: import("@sinclair/typebox").TUnsafe<import("react").ReactNode>;
13
+ footerSlot: import("@sinclair/typebox").TUnsafe<import("react").ReactNode>;
14
+ }>;
15
+ declare const properties: import("@sinclair/typebox").TObject<{
16
+ modalState: import("@sinclair/typebox").TUnsafe<string>;
17
+ openInfo: import("@sinclair/typebox").TUnknown;
18
+ closeInfo: import("@sinclair/typebox").TUnknown;
19
+ }>;
20
+ export type DataType = Simplify<Static<typeof data>>;
21
+ export type PropsType = Simplify<Static<typeof properties>>;
22
+ declare const config: {
23
+ readonly $schema: "https://comp-public-replace-1303824488-cos.weda.tencent.com/schema/lcds_component.json";
24
+ readonly data: import("@sinclair/typebox").TObject<{
25
+ visible: import("@sinclair/typebox").TBoolean;
26
+ placement: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
27
+ closeType: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
28
+ mask: import("@sinclair/typebox").TBoolean;
29
+ enableHeaderSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
30
+ enableContentSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
31
+ enableFooterSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
32
+ headerSlot: import("@sinclair/typebox").TUnsafe<import("react").ReactNode>;
33
+ contentSlot: import("@sinclair/typebox").TUnsafe<import("react").ReactNode>;
34
+ footerSlot: import("@sinclair/typebox").TUnsafe<import("react").ReactNode>;
35
+ }>;
36
+ readonly properties: import("@sinclair/typebox").TObject<{
37
+ modalState: import("@sinclair/typebox").TUnsafe<string>;
38
+ openInfo: import("@sinclair/typebox").TUnknown;
39
+ closeInfo: import("@sinclair/typebox").TUnknown;
40
+ }>;
41
+ readonly classes: readonly [{
42
+ readonly name: "根元素";
43
+ readonly selector: ".wd-drawer";
44
+ readonly description: "组件根元素";
45
+ readonly code: "\n :scope.wd-drawer {\n /* 在这里编写CSS 样式 */\n }\n ";
46
+ }, {
47
+ readonly name: "PC 端根元素";
48
+ readonly selector: ".wd-pc-drawer";
49
+ readonly description: "组件根元素";
50
+ readonly code: "\n :scope.wd-pc-drawer {\n /* 在这里编写CSS 样式 */\n }\n ";
51
+ }, {
52
+ readonly name: "H5 端根元素";
53
+ readonly selector: ".wd-h5-drawer";
54
+ readonly description: "可以为 H5 端的编写样式";
55
+ readonly code: "\n :scope.wd-h5-drawer {\n /* 在这里编写CSS 样式 */\n }\n ";
56
+ }, {
57
+ readonly name: "小程序 端根元素";
58
+ readonly selector: ".wd-mp-drawer";
59
+ readonly description: "可以为 小程序 端的编写样式";
60
+ readonly code: "\n :scope.wd-mp-drawer {\n /* 可以为 小程序 端的编写样式 */\n }\n ";
61
+ }, {
62
+ readonly name: "抽屉遮罩层样式";
63
+ readonly selector: ".wd-drawer-mask";
64
+ readonly description: "可以为遮罩层编写样式";
65
+ readonly code: "\n :scope .wd-drawer-mask {\n /* 可以为遮罩层编写样式 */\n background-color: rgba(0, 0, 0, 0.5)\n }\n ";
66
+ }, {
67
+ readonly name: "抽屉主体容器样式";
68
+ readonly selector: ".wd-drawer-content-wrapper";
69
+ readonly description: "可以为主体容器编写样式";
70
+ readonly code: "\n :scope .wd-drawer-content-wrapper {\n /* 可以为主体容器编写样式 */\n inset-inline-start: auto;\n inset-inline-end: 0;\n }\n ";
71
+ }, {
72
+ readonly name: "抽屉顶部容器样式";
73
+ readonly selector: ".wd-drawer-header";
74
+ readonly description: "可以为顶部容器编写样式";
75
+ readonly code: "\n :scope .wd-drawer-header {\n /* 可以为顶部容器编写样式*/\n padding: 0;\n }\n ";
76
+ }, {
77
+ readonly name: "抽屉内容容器样式";
78
+ readonly selector: ".wd-drawer-body";
79
+ readonly description: "可以为内容容器编写样式";
80
+ readonly code: "\n :scope .wd-drawer-body {\n /* 可以为内容容器编写样式 */\n padding: 0;\n }\n ";
81
+ }, {
82
+ readonly name: "抽屉底部容器样式";
83
+ readonly selector: ".wd-drawer-footer";
84
+ readonly description: "可以为底部容器编写样式";
85
+ readonly code: "\n :scope .wd-drawer-footer {\n /* 可以为底部容器编写样式 */\n padding: 0;\n }\n ";
86
+ }];
87
+ readonly methods: readonly [{
88
+ readonly name: "open";
89
+ readonly label: "打开抽屉";
90
+ readonly params: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
91
+ info: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
92
+ }>>;
93
+ }, {
94
+ readonly name: "close";
95
+ readonly label: "关闭抽屉";
96
+ readonly params: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
97
+ info: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
98
+ }>>;
99
+ }];
100
+ readonly events: readonly [{
101
+ readonly title: "抽屉打开时";
102
+ readonly name: "open";
103
+ readonly detail: import("@sinclair/typebox").TObject<{
104
+ info: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
105
+ }>;
106
+ }, {
107
+ readonly title: "抽屉关闭时";
108
+ readonly name: "close";
109
+ readonly detail: import("@sinclair/typebox").TObject<{
110
+ info: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
111
+ }>;
112
+ }];
113
+ readonly meta: {
114
+ readonly name: "WdDrawer";
115
+ readonly componentName: "drawer";
116
+ readonly title: "抽屉";
117
+ readonly description: "屏幕边缘滑出的浮层面板。";
118
+ readonly propertyPanelTips: "在小程序中使用时,不建议嵌套在其他容器/组件中,以免抽屉被遮盖";
119
+ readonly figureIcon: "../figureIcons/WdModal.svg";
120
+ readonly icon: "../icons/Modal.svg";
121
+ readonly category: "布局";
122
+ readonly categoryOrder: 200;
123
+ readonly componentOrder: 150;
124
+ readonly visible: readonly ["APP"];
125
+ readonly docsUrl: "https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/grid/WdModal";
126
+ readonly templates: readonly [{
127
+ readonly when: "$attached";
128
+ readonly to: "headerSlot";
129
+ readonly body: string;
130
+ }];
131
+ readonly inlineStyleForm: {
132
+ readonly justifyContent: {
133
+ readonly visible: false;
134
+ };
135
+ readonly flexDirection: {
136
+ readonly visible: false;
137
+ };
138
+ readonly alignItems: {
139
+ readonly visible: false;
140
+ };
141
+ };
142
+ };
143
+ };
144
+ export default config;
@@ -0,0 +1,358 @@
1
+ import { defineConfig, Type, Tuple } from '../type-utils';
2
+ import { WD_DRAWER_PLACEMENT } from '../../enum';
3
+ // 生成随机id
4
+ const getRandomId = () => Date.now().toString(36);
5
+ /**
6
+ * 模板内组件绑定对应的event事件
7
+ * @returns
8
+ */
9
+ const getEventListener = ({ event = 'tap', // 绑定的event名称
10
+ parentId = '{{$self.id}}', // 绑定的关联组件
11
+ method, // 要绑定关联组件的方法
12
+ info = '', // 关联event的入参
13
+ }) => {
14
+ return `
15
+ [[template.listeners]]
16
+ id = "${getRandomId()}"
17
+ eventName = "${event}"
18
+ type = "platform"
19
+ [template.listeners.handler]
20
+ name = "invoke"
21
+ module = "platform"
22
+ [template.listeners.handler.params]
23
+ component = "${parentId}"
24
+ method = "${method}"
25
+ [template.listeners.handler.params.params]
26
+ info = "${info}"
27
+ `;
28
+ };
29
+ const getHeaderText = (hasContainer = false) => {
30
+ const container = `[[template]]
31
+ component = "Container"
32
+ [template.extra.commonStyle]
33
+ display = "flex"
34
+ alignItems = "center"
35
+ flexDirection = "column"
36
+ width = "100%"
37
+ `;
38
+ const prefix = hasContainer ? 'template.items' : 'template';
39
+ return `
40
+ ${hasContainer ? container : ''}
41
+ [[${prefix}]]
42
+ component = "WdText"
43
+ label = "抽屉标题"
44
+ [${prefix}.attributes]
45
+ text = "抽屉标题"
46
+ level = "title-7"
47
+ [${prefix}.extra.commonStyle.self]
48
+ fontWeight = "bolder"
49
+ `;
50
+ };
51
+ // 抽屉顶部插槽模板
52
+ const HEADER_TPL = `
53
+ {{#with $self as |$self|}}
54
+
55
+ [[directives]]
56
+ ":if" = true
57
+ ${getHeaderText()}
58
+ [[template]]
59
+ component = "WdIcon"
60
+ label = "关闭按钮"
61
+ [template.attributes]
62
+ name = "td:close"
63
+ ${getEventListener({ method: 'close', info: 'icon' })}
64
+ [template.extra.commonStyle.text]
65
+ color = "rgba(0, 0, 0, 0.6)"
66
+
67
+ {{/with}}
68
+ `;
69
+ const data = Type.Object({
70
+ visible: Type.Boolean({
71
+ title: '抽屉默认打开状态',
72
+ default: true,
73
+ 'x-index': 9,
74
+ 'x-category': '基础属性',
75
+ 'x-helper-text': '设置默认打开状态。在【事件-组件方法】中调用抽屉的打开/关闭方法,可动态控制抽屉开关。[查看指引](https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/grid/WdModal#3-打开关闭抽屉)',
76
+ }),
77
+ placement: Type.Optional(Type.String({
78
+ title: '抽屉方向',
79
+ 'x-category': '基础属性',
80
+ default: 'right',
81
+ description: '抽屉方向。可选项:left/right/top/bottom',
82
+ enum: Tuple(WD_DRAWER_PLACEMENT),
83
+ 'x-index': 15,
84
+ })),
85
+ closeType: Type.Array(Type.String(), {
86
+ title: '关闭方式',
87
+ default: ['outerClick'],
88
+ description: '多选模式,outerClick-点击面板外收起面板,esc-点击键盘ESC关闭(仅在PC端生效)',
89
+ 'x-index': 30,
90
+ 'x-category': '高级属性',
91
+ 'x-helper-text': '点击键盘ESC键关闭抽屉仅在PC端生效',
92
+ 'x-component': 'checkbox-group',
93
+ 'x-component-props': {
94
+ defaultValue: ['outerClick'],
95
+ options: Tuple([
96
+ {
97
+ label: '点击面板外收起面板',
98
+ value: 'outerClick',
99
+ },
100
+ {
101
+ label: 'ESC',
102
+ value: 'esc',
103
+ },
104
+ ]),
105
+ },
106
+ }),
107
+ mask: Type.Boolean({
108
+ title: '展示遮罩',
109
+ default: true,
110
+ 'x-index': 40,
111
+ 'x-category': '高级属性',
112
+ }),
113
+ enableHeaderSlot: Type.Optional(Type.Boolean({
114
+ title: '顶部插槽',
115
+ 'x-index': 50,
116
+ 'x-runtime-default': true,
117
+ 'x-category': '高级属性',
118
+ })),
119
+ enableContentSlot: Type.Optional(Type.Boolean({
120
+ title: '内容插槽',
121
+ 'x-index': 51,
122
+ 'x-runtime-default': true,
123
+ 'x-category': '高级属性',
124
+ })),
125
+ enableFooterSlot: Type.Optional(Type.Boolean({
126
+ title: '底部插槽',
127
+ 'x-index': 52,
128
+ 'x-runtime-default': false,
129
+ 'x-category': '高级属性',
130
+ })),
131
+ headerSlot: Type.Slot({
132
+ title: '抽屉顶部',
133
+ description: '抽屉顶部插槽',
134
+ 'x-index': 53,
135
+ 'x-category': '高级属性',
136
+ }),
137
+ contentSlot: Type.Slot({
138
+ title: '抽屉内容',
139
+ description: '抽屉内容插槽',
140
+ 'x-index': 54,
141
+ 'x-category': '高级属性',
142
+ }),
143
+ footerSlot: Type.Slot({
144
+ title: '底部插槽',
145
+ description: '抽屉底部插槽',
146
+ 'x-index': 55,
147
+ 'x-category': '高级属性',
148
+ }),
149
+ });
150
+ const properties = Type.Object({
151
+ modalState: Type.StringEnum({
152
+ enum: Tuple([
153
+ {
154
+ label: '打开',
155
+ value: 'open',
156
+ },
157
+ {
158
+ label: '关闭',
159
+ value: 'close',
160
+ },
161
+ ]),
162
+ title: '抽屉状态',
163
+ }),
164
+ openInfo: Type.Unknown({
165
+ description: '透传信息,在触发抽屉打开时接收的信息,信息来自于调用组件open方法的info',
166
+ }),
167
+ closeInfo: Type.Unknown({
168
+ description: '透传信息,在触发抽屉关闭时接收的信息,信息来自于调用组件close方法的info',
169
+ }),
170
+ });
171
+ // export default
172
+ const config = defineConfig({
173
+ $schema: 'https://comp-public-replace-1303824488-cos.weda.tencent.com/schema/lcds_component.json',
174
+ // 属性定义
175
+ data,
176
+ // 只读属性定义
177
+ properties,
178
+ // 样式API
179
+ classes: [
180
+ {
181
+ name: '根元素',
182
+ selector: '.wd-drawer',
183
+ description: '组件根元素',
184
+ code: `
185
+ :scope.wd-drawer {
186
+ /* 在这里编写CSS 样式 */
187
+ }
188
+ `,
189
+ },
190
+ {
191
+ name: 'PC 端根元素',
192
+ selector: '.wd-pc-drawer',
193
+ description: '组件根元素',
194
+ code: `
195
+ :scope.wd-pc-drawer {
196
+ /* 在这里编写CSS 样式 */
197
+ }
198
+ `,
199
+ },
200
+ {
201
+ name: 'H5 端根元素',
202
+ selector: '.wd-h5-drawer',
203
+ description: '可以为 H5 端的编写样式',
204
+ code: `
205
+ :scope.wd-h5-drawer {
206
+ /* 在这里编写CSS 样式 */
207
+ }
208
+ `,
209
+ },
210
+ {
211
+ name: '小程序 端根元素',
212
+ selector: '.wd-mp-drawer',
213
+ description: '可以为 小程序 端的编写样式',
214
+ code: `
215
+ :scope.wd-mp-drawer {
216
+ /* 可以为 小程序 端的编写样式 */
217
+ }
218
+ `,
219
+ },
220
+ {
221
+ name: '抽屉遮罩层样式',
222
+ selector: '.wd-drawer-mask',
223
+ description: '可以为遮罩层编写样式',
224
+ code: `
225
+ :scope .wd-drawer-mask {
226
+ /* 可以为遮罩层编写样式 */
227
+ background-color: rgba(0, 0, 0, 0.5)
228
+ }
229
+ `,
230
+ },
231
+ {
232
+ name: '抽屉主体容器样式',
233
+ selector: '.wd-drawer-content-wrapper',
234
+ description: '可以为主体容器编写样式',
235
+ code: `
236
+ :scope .wd-drawer-content-wrapper {
237
+ /* 可以为主体容器编写样式 */
238
+ inset-inline-start: auto;
239
+ inset-inline-end: 0;
240
+ }
241
+ `,
242
+ },
243
+ {
244
+ name: '抽屉顶部容器样式',
245
+ selector: '.wd-drawer-header',
246
+ description: '可以为顶部容器编写样式',
247
+ code: `
248
+ :scope .wd-drawer-header {
249
+ /* 可以为顶部容器编写样式*/
250
+ padding: 0;
251
+ }
252
+ `,
253
+ },
254
+ {
255
+ name: '抽屉内容容器样式',
256
+ selector: '.wd-drawer-body',
257
+ description: '可以为内容容器编写样式',
258
+ code: `
259
+ :scope .wd-drawer-body {
260
+ /* 可以为内容容器编写样式 */
261
+ padding: 0;
262
+ }
263
+ `,
264
+ },
265
+ {
266
+ name: '抽屉底部容器样式',
267
+ selector: '.wd-drawer-footer',
268
+ description: '可以为底部容器编写样式',
269
+ code: `
270
+ :scope .wd-drawer-footer {
271
+ /* 可以为底部容器编写样式 */
272
+ padding: 0;
273
+ }
274
+ `,
275
+ },
276
+ ],
277
+ // 组件方法
278
+ methods: [
279
+ {
280
+ name: 'open',
281
+ label: '打开抽屉',
282
+ params: Type.Optional(Type.Object({
283
+ info: Type.Optional(Type.Unknown({
284
+ description: '透传信息,在监听到抽屉打开时会传递该信息',
285
+ })),
286
+ })),
287
+ },
288
+ {
289
+ name: 'close',
290
+ label: '关闭抽屉',
291
+ params: Type.Optional(Type.Object({
292
+ info: Type.Optional(Type.Unknown({
293
+ description: '透传信息,在监听到抽屉关闭时会传递该信息',
294
+ })),
295
+ })),
296
+ },
297
+ ],
298
+ // 组件对外暴露事件
299
+ events: [
300
+ {
301
+ title: '抽屉打开时',
302
+ name: 'open',
303
+ detail: Type.Object({
304
+ info: Type.Optional(Type.Unknown({
305
+ description: '透传信息,在触发抽屉打开时接收该信息,信息来自于调用组件open方法的info',
306
+ })),
307
+ }),
308
+ },
309
+ {
310
+ title: '抽屉关闭时',
311
+ name: 'close',
312
+ detail: Type.Object({
313
+ info: Type.Optional(Type.Unknown({
314
+ description: '透传信息,在触发抽屉关闭时接收该信息,信息来自于调用组件close方法的info',
315
+ })),
316
+ }),
317
+ },
318
+ ],
319
+ // 组件元信息
320
+ meta: {
321
+ name: 'WdDrawer',
322
+ // 组件别名,用于生成组件 id,例如 Icon1
323
+ componentName: 'drawer',
324
+ title: '抽屉',
325
+ description: '屏幕边缘滑出的浮层面板。',
326
+ propertyPanelTips: '在小程序中使用时,不建议嵌套在其他容器/组件中,以免抽屉被遮盖',
327
+ figureIcon: '../figureIcons/WdModal.svg',
328
+ icon: '../icons/Modal.svg',
329
+ category: '布局',
330
+ categoryOrder: 200,
331
+ componentOrder: 150,
332
+ visible: ['APP'],
333
+ docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/grid/WdModal',
334
+ // 快捷编辑时展示在编辑区的属性
335
+ // shortcut: {
336
+ // props: ['line', 'checkable'],
337
+ // },
338
+ templates: [
339
+ {
340
+ when: '$attached',
341
+ to: 'headerSlot',
342
+ body: HEADER_TPL,
343
+ },
344
+ ],
345
+ inlineStyleForm: {
346
+ justifyContent: {
347
+ visible: false,
348
+ },
349
+ flexDirection: {
350
+ visible: false,
351
+ },
352
+ alignItems: {
353
+ visible: false,
354
+ },
355
+ },
356
+ },
357
+ });
358
+ export default config;
@@ -5,7 +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
+ 'x-helper-text': '图片地址支持云存储cloudID或https协议地址,[小程序端不支持 http 协议](https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/show/WdImage#%E8%AE%BE%E7%BD%AE-http-%E5%9C%B0%E5%9D%80%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F%E4%B8%8D%E5%B1%95%E7%A4%BA)。',
9
9
  'x-category': '基础属性',
10
10
  'x-index': 1,
11
11
  'x-component': 'image',
@@ -51,8 +51,10 @@ const getHeaderText = (hasContainer = false) => {
51
51
  // 弹窗顶部插槽模板
52
52
  const HEADER_TPL = `
53
53
  {{#with $self as |$self|}}
54
+ {{#with $self.attributes.template as |_currentTemplate|}}
55
+ {{#with (helper_utils 'concat' 'default' 'list') as |_template|}}
54
56
 
55
- {{#if (helper_utils '||' (helper_utils '===' $self.attributes.template 'default') (helper_utils '===' $self.attributes.template 'list'))}}
57
+ {{#if (helper_utils 'includes' _template _currentTemplate)}}
56
58
  [[directives]]
57
59
  ":if" = true
58
60
  ${getHeaderText()}
@@ -95,6 +97,8 @@ ${getHeaderText(true)}
95
97
 
96
98
  {{/if}}
97
99
  {{/with}}
100
+ {{/with}}
101
+ {{/with}}
98
102
  `;
99
103
  // 弹窗按钮区插槽模板
100
104
  const FOOTER_TPL = `
@@ -296,6 +296,11 @@ declare const config: {
296
296
  readonly selector: ".wd-table__box td";
297
297
  readonly description: "表格文字样式";
298
298
  readonly code: "\n :scope .wd-table__box td {\n background-color: lightgray;\n height: 36px;\n }\n ";
299
+ }, {
300
+ readonly name: "表格内容文本元素";
301
+ readonly selector: ".wd-table__box td .wd-text-overflow";
302
+ readonly description: "表格筛选面板根元素";
303
+ readonly code: "\n :scope .wd-table__box td .wd-text-overflow {\n border: 2px solid gray;\n border-radius: 10px;\n }\n ";
299
304
  }, {
300
305
  readonly name: "表格主体样式";
301
306
  readonly selector: ".wd-table";
@@ -1712,6 +1712,17 @@ const config = defineConfig({
1712
1712
  background-color: lightgray;
1713
1713
  height: 36px;
1714
1714
  }
1715
+ `,
1716
+ },
1717
+ {
1718
+ name: '表格内容文本元素',
1719
+ selector: '.wd-table__box td .wd-text-overflow',
1720
+ description: '表格筛选面板根元素',
1721
+ code: `
1722
+ :scope .wd-table__box td .wd-text-overflow {
1723
+ border: 2px solid gray;
1724
+ border-radius: 10px;
1725
+ }
1715
1726
  `,
1716
1727
  },
1717
1728
  {
@@ -4,7 +4,7 @@ declare const data: import("@sinclair/typebox").TObject<{
4
4
  type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<"primary" | "default" | "warn" | "wechat">>;
5
5
  size: import("@sinclair/typebox").TUnsafe<"default" | "mini" | "large">;
6
6
  usage: import("@sinclair/typebox").TString;
7
- language: import("@sinclair/typebox").TUnsafe<"zh_CN" | "zh_TW" | "en">;
7
+ language: import("@sinclair/typebox").TUnsafe<"en" | "zh_CN" | "zh_TW">;
8
8
  }>;
9
9
  export type DataType = Simplify<Static<typeof data>>;
10
10
  declare const config: {
@@ -14,7 +14,7 @@ declare const config: {
14
14
  type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<"primary" | "default" | "warn" | "wechat">>;
15
15
  size: import("@sinclair/typebox").TUnsafe<"default" | "mini" | "large">;
16
16
  usage: import("@sinclair/typebox").TString;
17
- language: import("@sinclair/typebox").TUnsafe<"zh_CN" | "zh_TW" | "en">;
17
+ language: import("@sinclair/typebox").TUnsafe<"en" | "zh_CN" | "zh_TW">;
18
18
  }>;
19
19
  readonly events: readonly [{
20
20
  readonly title: "用户信息授权成功";