@cloudbase/weda-ui-mp 3.6.5 → 3.7.2
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/components/form/form/wd-form.wxss +10 -0
- package/components/form/uploader/index.js +3 -3
- package/components/form/uploader/weui-uploader.wxml +1 -1
- package/components/form/uploader/weui-uploader.wxss +4 -0
- package/components/form-field-behavior/form-field-behavior.js +29 -3
- package/components/wd-cascader/index.js +198 -0
- package/components/wd-cascader/index.json +12 -0
- package/components/wd-cascader/index.wxml +59 -0
- package/components/wd-cascader/index.wxss +2 -0
- package/components/wd-cascader/utils.js +70 -0
- package/components/wd-cascader/wd-cascader.wxss +284 -0
- package/components/wd-date/modal/index.js +4 -1
- package/components/wd-date/modal/index.wxml +1 -1
- package/components/wd-form/form-utils.js +4 -0
- package/components/wd-form/wd-form.wxss +10 -0
- package/components/wd-form-arr/index.js +330 -0
- package/components/wd-form-arr/index.json +7 -0
- package/components/wd-form-arr/index.wxml +5 -0
- package/components/wd-form-arr/index.wxss +2 -0
- package/components/wd-form-arr/wd-form-obj.wxss +51 -0
- package/components/wd-form-item/wd-form-item.wxss +10 -0
- package/components/wd-form-item-obj/index.js +113 -0
- package/components/wd-form-item-obj/index.json +8 -0
- package/components/wd-form-item-obj/index.wxml +51 -0
- package/components/wd-form-item-obj/index.wxss +2 -0
- package/components/wd-form-item-obj/wd-form-item.wxss +1106 -0
- package/components/wd-form-obj/index.js +305 -0
- package/components/wd-form-obj/index.json +7 -0
- package/components/wd-form-obj/index.wxml +5 -0
- package/components/wd-form-obj/index.wxss +2 -0
- package/components/wd-form-obj/wd-form-obj.wxss +51 -0
- package/components/wd-icon/index.json +1 -1
- package/components/wd-input/inner-input/wd-input.wxss +10 -0
- package/components/wd-progress/wd-progress.wxss +10 -0
- package/components/wd-rating/wd-rating.wxss +10 -0
- package/components/wd-select/select.wxss +9 -3
- package/components/wd-switch/wd-switch.wxss +10 -0
- package/components/wd-tag-select/wd-tag-select.wxss +10 -0
- package/components/web-view/index.js +3 -0
- package/index.json +2 -0
- package/package.json +1 -1
- package/utils/enum.js +13 -0
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import itemBehavior from '../form-field-behavior/item-behavior';
|
|
2
|
+
import { noop } from '../../utils/constant';
|
|
3
|
+
import { commonCompBehavior } from '../../utils/common-behavior';
|
|
4
|
+
import formFieldBehavior from '../form-field-behavior/form-field-behavior';
|
|
5
|
+
import { isNil, deepClone } from '../../utils/lodash';
|
|
6
|
+
import debounce from '../../utils/debounce';
|
|
7
|
+
import lodashGet from 'lodash.get';
|
|
8
|
+
import lodashSet from 'lodash.set';
|
|
9
|
+
|
|
10
|
+
import equal from '../../utils/deepEqual';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* 获取待操作的数据路径,嵌套表单中子组件的名称是按lodashSet形式拼接的,在更新嵌套表单值时,要去除掉当前嵌套表单的路径名称
|
|
14
|
+
* @param operateName 待操作的表单项名称
|
|
15
|
+
* @param currentName 当前表单项名称
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
const getValueName = (operateName, currentName) =>
|
|
19
|
+
operateName.replace(new RegExp(`^${currentName}(\\.)?`), '');
|
|
20
|
+
|
|
21
|
+
Component({
|
|
22
|
+
options: { virtualHost: true },
|
|
23
|
+
behaviors: [itemBehavior, commonCompBehavior, formFieldBehavior],
|
|
24
|
+
properties: {
|
|
25
|
+
classRoot: {
|
|
26
|
+
type: String,
|
|
27
|
+
value: 'form-obj',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
data: {
|
|
31
|
+
status: 'edit',
|
|
32
|
+
objValue: {},
|
|
33
|
+
formsItemMap: {},
|
|
34
|
+
},
|
|
35
|
+
lifetimes: {
|
|
36
|
+
created() {
|
|
37
|
+
this.updateChildValue = debounce(this.updateChildValueDebounce, 0);
|
|
38
|
+
},
|
|
39
|
+
attached: function () {
|
|
40
|
+
const that = this;
|
|
41
|
+
this.updateWidgetAPI({
|
|
42
|
+
getConfig() {
|
|
43
|
+
return {
|
|
44
|
+
componentType: 'formObj',
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
/**
|
|
48
|
+
* 外部直接set嵌入表单的值
|
|
49
|
+
* @param value
|
|
50
|
+
*/
|
|
51
|
+
setValue(value) {
|
|
52
|
+
that.change({ name: '', value }, { isUpdateParentForm: true });
|
|
53
|
+
},
|
|
54
|
+
change(params) {
|
|
55
|
+
that.change(params, { isUpdateParentForm: true });
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* 用于同步子组件的默认值
|
|
59
|
+
* @param params
|
|
60
|
+
*/
|
|
61
|
+
__setValueImmediate__(params) {
|
|
62
|
+
that.changeByChildFormObj(params);
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* 嵌套表单内部子组件值改变时,触发嵌套表单组件的值更新
|
|
66
|
+
* @param params.name 子组件名称
|
|
67
|
+
* @param params.value 子组件值
|
|
68
|
+
*/
|
|
69
|
+
valueChangeFromChild(params = {}) {
|
|
70
|
+
if (!params.name) return;
|
|
71
|
+
|
|
72
|
+
// 由于是子组件值变更触发,所以嵌套表单值更新后不再次触发子组件值变更
|
|
73
|
+
that.change(params, {
|
|
74
|
+
isUpdateParentForm: true,
|
|
75
|
+
isUpdateChildValue: false,
|
|
76
|
+
});
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* 收集嵌套表单内的子组件实例,以便嵌套表单值变化时,主动触发子组件值更新
|
|
80
|
+
* @param childName 子组件名称
|
|
81
|
+
* @param formItem 子组件$widget
|
|
82
|
+
* @returns
|
|
83
|
+
*/
|
|
84
|
+
addFormItem(childName, formItem) {
|
|
85
|
+
if (
|
|
86
|
+
isNil(childName) ||
|
|
87
|
+
!formItem ||
|
|
88
|
+
(typeof childName === 'string' && childName.length === 0)
|
|
89
|
+
) {
|
|
90
|
+
// childName 没设置或为空串的时候不受表单容器控制
|
|
91
|
+
console.warn(
|
|
92
|
+
`组件 #${formItem?.id} 表单key(表单输入类组件 childName 属性)没设置或为空串的时候不受表单容器控制`
|
|
93
|
+
);
|
|
94
|
+
return noop;
|
|
95
|
+
}
|
|
96
|
+
const { formsItemMap } = that.data;
|
|
97
|
+
if (Array.isArray(formsItemMap[childName])) {
|
|
98
|
+
formsItemMap[childName].push(formItem);
|
|
99
|
+
} else {
|
|
100
|
+
formsItemMap[childName] = [formItem];
|
|
101
|
+
}
|
|
102
|
+
that.setData({ formsItemMap });
|
|
103
|
+
return () => {
|
|
104
|
+
const removedArr = formsItemMap[childName].filter(
|
|
105
|
+
(item) => item !== formItem
|
|
106
|
+
);
|
|
107
|
+
if (removedArr.length <= 0) {
|
|
108
|
+
delete formsItemMap[childName];
|
|
109
|
+
} else {
|
|
110
|
+
formsItemMap[childName] = removedArr;
|
|
111
|
+
}
|
|
112
|
+
that.setData({ formsItemMap });
|
|
113
|
+
};
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
methods: {
|
|
119
|
+
updateWidgetAPI(apis = {}) {
|
|
120
|
+
const { name, objValue, label, visible, readOnly, disabled, status } =
|
|
121
|
+
this.data;
|
|
122
|
+
this.setReadonlyAttributes?.({
|
|
123
|
+
...apis,
|
|
124
|
+
label,
|
|
125
|
+
name,
|
|
126
|
+
value: objValue,
|
|
127
|
+
visible,
|
|
128
|
+
disabled,
|
|
129
|
+
readOnly,
|
|
130
|
+
status,
|
|
131
|
+
formObjName: name,
|
|
132
|
+
getValue() {
|
|
133
|
+
return objValue;
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
},
|
|
137
|
+
// 父级普通表单对象
|
|
138
|
+
getParentForm() {
|
|
139
|
+
const parent = this?.$widget?.closest(
|
|
140
|
+
(w) => w.getConfig?.().componentType === 'form'
|
|
141
|
+
);
|
|
142
|
+
return parent;
|
|
143
|
+
},
|
|
144
|
+
// 父级嵌套表单对象
|
|
145
|
+
getParentFormObj() {
|
|
146
|
+
const parent = this?.$widget?.closest(
|
|
147
|
+
(w) => w.getConfig?.().componentType === 'formObj'
|
|
148
|
+
);
|
|
149
|
+
return parent;
|
|
150
|
+
},
|
|
151
|
+
/**
|
|
152
|
+
* 对外触发嵌套表单的onDataChange事件
|
|
153
|
+
*/
|
|
154
|
+
triggerOnDataChange(value) {
|
|
155
|
+
this.triggerEvent('onDataChange', { data: value });
|
|
156
|
+
},
|
|
157
|
+
/**
|
|
158
|
+
* 不在表单容器中使用时,更新子组件值
|
|
159
|
+
*/
|
|
160
|
+
updateChildValue() {},
|
|
161
|
+
updateChildValueDebounce(value) {
|
|
162
|
+
Object.keys(this.data.formsItemMap).forEach((childName) => {
|
|
163
|
+
let items = this.data.formsItemMap[childName];
|
|
164
|
+
|
|
165
|
+
if (!Array.isArray(items)) {
|
|
166
|
+
items = [items];
|
|
167
|
+
}
|
|
168
|
+
const newValue = lodashGet(
|
|
169
|
+
value,
|
|
170
|
+
getValueName(childName, this.data.name)
|
|
171
|
+
);
|
|
172
|
+
items.forEach((item) => {
|
|
173
|
+
if (item?.setValue && !equal(item.value, newValue)) {
|
|
174
|
+
item.setValue(newValue);
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
},
|
|
179
|
+
/**
|
|
180
|
+
* 更新值
|
|
181
|
+
* @param params.name
|
|
182
|
+
* @param params.value
|
|
183
|
+
* @param params.type 'change' | 'add' | 'remove'
|
|
184
|
+
* @param param1.isUpdateParentForm 是否更新父级表单,因子组件值变化调用change时不去触发父表单的更新,因为子组件自己会触发;因为外部设置了值,则触发父表单更新
|
|
185
|
+
* @param param1.isUpdateChildValue 是否更新子组件值, 因子组件值变化调用change时不去触发updateChildValueWithoutForm;因为外部设置了值,则触发updateChildValueWithoutForm去更新子组件值
|
|
186
|
+
* @returns
|
|
187
|
+
*/
|
|
188
|
+
change(
|
|
189
|
+
params,
|
|
190
|
+
{ isUpdateParentForm = false, isUpdateChildValue = true } = {}
|
|
191
|
+
) {
|
|
192
|
+
const { objValue, name } = this.data;
|
|
193
|
+
let value = deepClone(params.value);
|
|
194
|
+
|
|
195
|
+
// 如果有更新标识,则按标识路径更新值
|
|
196
|
+
if (params.name) {
|
|
197
|
+
value = deepClone(objValue);
|
|
198
|
+
lodashSet(value, getValueName(params.name, name), params.value);
|
|
199
|
+
} else if (Object.keys(objValue || {})?.length) {
|
|
200
|
+
value = deepClone({ ...objValue, ...value });
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
if (equal(value, objValue)) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
this.setData({ objValue: value || {} });
|
|
208
|
+
this.updateWidgetAPI();
|
|
209
|
+
|
|
210
|
+
if (isUpdateChildValue) {
|
|
211
|
+
// 外部设置数据,同时去更新子组件的值
|
|
212
|
+
this.updateChildValue(value);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const parentForm = this.getParentForm();
|
|
216
|
+
const parentFormObj = this.getParentFormObj();
|
|
217
|
+
|
|
218
|
+
// 不存在父级嵌套表单时,去更新父级普通表单,避免重复更新
|
|
219
|
+
if (!parentFormObj && isUpdateParentForm) {
|
|
220
|
+
// 触发父级普通表单值更新
|
|
221
|
+
parentForm?.setValue?.({ [name]: value }, false, true);
|
|
222
|
+
// 刷新父级普通表单的formData
|
|
223
|
+
parentForm?.updateFormContext();
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (params.name) {
|
|
227
|
+
// 触发父级嵌套表单值更新
|
|
228
|
+
parentFormObj?.__setValueImmediate__?.({
|
|
229
|
+
name: params.name,
|
|
230
|
+
value: params.value,
|
|
231
|
+
});
|
|
232
|
+
} else if (parentFormObj?.formObjName) {
|
|
233
|
+
// 外部直接调用formObj.setValue的情况下,触发父级嵌套表单值更新
|
|
234
|
+
parentFormObj?.__setValueImmediate__?.({ name, value });
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
this.triggerOnDataChange(value);
|
|
238
|
+
},
|
|
239
|
+
/**
|
|
240
|
+
* 子组件默认值变更,触发嵌套表单值更新
|
|
241
|
+
* @param params.name
|
|
242
|
+
* @param params.value
|
|
243
|
+
*/
|
|
244
|
+
changeByChildFormObj(params) {
|
|
245
|
+
const { objValue, name } = this.data;
|
|
246
|
+
const value = deepClone(objValue);
|
|
247
|
+
lodashSet(value, getValueName(params.name, name), params.value);
|
|
248
|
+
|
|
249
|
+
if (equal(value, objValue)) {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
const parentFormObj = this.getParentFormObj();
|
|
254
|
+
const parentForm = this.getParentForm();
|
|
255
|
+
|
|
256
|
+
if (params.name) {
|
|
257
|
+
// 判断是否将当前的name前缀加上,以便父级嵌套表单更新值
|
|
258
|
+
const nameTemp = `${
|
|
259
|
+
!params.name.startsWith(name) && name ? `${name}.` : ''
|
|
260
|
+
}${params.name}`;
|
|
261
|
+
// 将值同步给父级嵌套表单
|
|
262
|
+
parentFormObj?.__setValueImmediate__?.({
|
|
263
|
+
name: nameTemp,
|
|
264
|
+
value: params.value,
|
|
265
|
+
});
|
|
266
|
+
} else if (parentFormObj?.formObjName) {
|
|
267
|
+
// 外部直接调用formObj.setValue的情况下,触发父级嵌套表单值更新
|
|
268
|
+
parentFormObj?.__setValueImmediate__?.({ name, value });
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
if (!parentFormObj && parentForm) {
|
|
272
|
+
// 触发父级普通表单值更新
|
|
273
|
+
parentForm?.setValue?.({ [name]: value }, false, true);
|
|
274
|
+
// 刷新父级普通表单的formData
|
|
275
|
+
parentForm?.updateFormContext();
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
this.setData({ objValue: value || {} });
|
|
279
|
+
this.updateWidgetAPI();
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
observers: {
|
|
283
|
+
'disabled, readOnly': function (disabled, readOnly) {
|
|
284
|
+
if (readOnly) {
|
|
285
|
+
this.setData({ status: 'readOnly' });
|
|
286
|
+
} else if (disabled) {
|
|
287
|
+
this.setData({ status: 'disabled' });
|
|
288
|
+
} else {
|
|
289
|
+
this.setData({ status: 'edit' });
|
|
290
|
+
}
|
|
291
|
+
this.updateWidgetAPI();
|
|
292
|
+
},
|
|
293
|
+
value: function (value) {
|
|
294
|
+
this.setData({ objValue: value });
|
|
295
|
+
this.updateWidgetAPI();
|
|
296
|
+
},
|
|
297
|
+
objValue: function (objValue) {
|
|
298
|
+
// 如果是最顶层的嵌套表单,则去更新子组件的值,否则自己的值更新不去触发子组件值更新,因为父级普通表单会去更新
|
|
299
|
+
const parentFormObj = this.getParentFormObj();
|
|
300
|
+
if (!parentFormObj) {
|
|
301
|
+
this.updateChildValue(objValue);
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<block wx:if="{{visible}}">
|
|
2
|
+
<wd-form-item-obj id="{{id}}" className="{{className}}" style="{{style}}" label="{{label}}" labelVisible="{{labelVisible}}" labelTips="{{labelTips}}" labelWidth="{{labelWidth}}" labelAlign="{{labelAlign}}" labelWrap="{{labelWrap}}" extra="{{extra}}" classRoot="{{classRoot}}" layout="{{_layout}}">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</wd-form-item-obj>
|
|
5
|
+
</block>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
._B00_Xa {
|
|
3
|
+
/* 如果生成的wxss 为空文件似乎会导致IDE编译报错, 所以这里给他弄个占位 */
|
|
4
|
+
word-break: inherit;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.wd-form-obj-root {
|
|
8
|
+
display: flex;
|
|
9
|
+
}
|
|
10
|
+
.wd-form-obj-root .wd-form-obj-root {
|
|
11
|
+
margin-top: 10px;
|
|
12
|
+
}
|
|
13
|
+
.wd-form-obj-root.wd-form-item--weui.wd-form-item {
|
|
14
|
+
padding: 0;
|
|
15
|
+
}
|
|
16
|
+
.wd-form-obj-root .wd-form-obj {
|
|
17
|
+
min-width: 200px;
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
.wd-form-obj-root.size-width-sm {
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
.wd-form-obj-root.size-width-md {
|
|
24
|
+
width: 100%;
|
|
25
|
+
}
|
|
26
|
+
.wd-form-obj-root.size-width-lg {
|
|
27
|
+
width: 100%;
|
|
28
|
+
}
|
|
29
|
+
.wd-form-obj-root .wd-form-item-wrap {
|
|
30
|
+
width: 100%;
|
|
31
|
+
}
|
|
32
|
+
.wd-form-obj-root .wd-form-item-wrap .wd-form-item-wrap__control {
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
}
|
|
35
|
+
.wd-form-obj-root .wd-form-item-wrap .wd-card-root {
|
|
36
|
+
width: 100%;
|
|
37
|
+
}
|
|
38
|
+
.wd-form-obj-root .wd-form-item-wrap .wd-card-root.wd-card-content__hidden .wd-card__body {
|
|
39
|
+
height: 0;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
padding: 0;
|
|
42
|
+
}
|
|
43
|
+
.wd-form-obj-root .wd-form-item-wrap__label.wd-form-obj__label {
|
|
44
|
+
height: unset;
|
|
45
|
+
line-height: unset;
|
|
46
|
+
padding: unset;
|
|
47
|
+
margin-left: var(--wd-form-item-label-mr);
|
|
48
|
+
}
|
|
49
|
+
.wd-form-obj-root .wd-form-item-wrap .is-nowrap.wd-form-item-wrap__label.wd-form-obj__label > label {
|
|
50
|
+
line-height: unset;
|
|
51
|
+
}
|
|
@@ -1257,6 +1257,16 @@ textarea {
|
|
|
1257
1257
|
width: 100%;
|
|
1258
1258
|
}
|
|
1259
1259
|
|
|
1260
|
+
.wd-mp-form-item-obj .wd-form-obj-card-header {
|
|
1261
|
+
display: flex;
|
|
1262
|
+
}
|
|
1263
|
+
.wd-mp-form-item-obj .wd-form-obj-item-wrap__control-wrap {
|
|
1264
|
+
flex-direction: column;
|
|
1265
|
+
}
|
|
1266
|
+
.wd-mp-form-item-obj .wd-form-item--weui.wd-form-item {
|
|
1267
|
+
width: 100%;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1260
1270
|
.wd-form-input-wrap {
|
|
1261
1271
|
--wd-form-input-wrap-border-radius: var(--wd-border-radius);
|
|
1262
1272
|
--wd-form-input-wrap-text-default: var(--wd-color-text-form-default);
|
|
@@ -1125,4 +1125,14 @@ textarea {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
.wd-form.size-width-hundred {
|
|
1127
1127
|
width: 100%;
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
.wd-mp-form-item-obj .wd-form-obj-card-header {
|
|
1131
|
+
display: flex;
|
|
1132
|
+
}
|
|
1133
|
+
.wd-mp-form-item-obj .wd-form-obj-item-wrap__control-wrap {
|
|
1134
|
+
flex-direction: column;
|
|
1135
|
+
}
|
|
1136
|
+
.wd-mp-form-item-obj .wd-form-item--weui.wd-form-item {
|
|
1137
|
+
width: 100%;
|
|
1128
1138
|
}
|
|
@@ -1118,4 +1118,14 @@ textarea {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
.wd-form.size-width-hundred {
|
|
1120
1120
|
width: 100%;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
.wd-mp-form-item-obj .wd-form-obj-card-header {
|
|
1124
|
+
display: flex;
|
|
1125
|
+
}
|
|
1126
|
+
.wd-mp-form-item-obj .wd-form-obj-item-wrap__control-wrap {
|
|
1127
|
+
flex-direction: column;
|
|
1128
|
+
}
|
|
1129
|
+
.wd-mp-form-item-obj .wd-form-item--weui.wd-form-item {
|
|
1130
|
+
width: 100%;
|
|
1121
1131
|
}
|
|
@@ -227,6 +227,11 @@
|
|
|
227
227
|
.wd-custom-search-box__search-icon {
|
|
228
228
|
color: rgba(0, 0, 0, 0.9);
|
|
229
229
|
margin-right: 4px;
|
|
230
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE0Ljc2NTUgMTUuMzI3OUMxMy41Mzc4IDE2LjMyMjEgMTEuOTc0MSAxNi45MTc2IDEwLjI3MTQgMTYuOTE3NkM2LjMyNDUzIDE2LjkxNzYgMy4xMjUgMTMuNzE4MSAzLjEyNSA5Ljc3MTMyQzMuMTI1IDUuODI0NTEgNi4zMjQ1MyAyLjYyNSAxMC4yNzE0IDIuNjI1QzE0LjIxODIgMi42MjUgMTcuNDE3NyA1LjgyNDUxIDE3LjQxNzcgOS43NzEzMkMxNy40MTc3IDExLjQ3NDEgMTYuODIyMSAxMy4wMzc4IDE1LjgyOCAxNC4yNjU1TDIxLjEyNSAxOS41NjI1TDIwLjA2MjYgMjAuNjI1TDE0Ljc2NTUgMTUuMzI3OVpNMTUuOTE1MiA5Ljc3MTMyQzE1LjkxNTIgNi42NTQzNCAxMy4zODg0IDQuMTI3NTIgMTAuMjcxNCA0LjEyNzUyQzcuMTU0MzUgNC4xMjc1MiA0LjYyNzUyIDYuNjU0MzQgNC42Mjc1MiA5Ljc3MTMyQzQuNjI3NTIgMTIuODg4MyA3LjE1NDM1IDE1LjQxNTEgMTAuMjcxNCAxNS40MTUxQzEzLjM4ODQgMTUuNDE1MSAxNS45MTUyIDEyLjg4ODMgMTUuOTE1MiA5Ljc3MTMyWiIgZmlsbD0iYmxhY2siIGZpbGwtb3BhY2l0eT0iMC40Ii8+Cjwvc3ZnPgo=);
|
|
231
|
+
background-repeat: no-repeat;
|
|
232
|
+
width: 24px;
|
|
233
|
+
height: 24px;
|
|
234
|
+
display: inline-block;
|
|
230
235
|
}
|
|
231
236
|
.wd-custom-search-box__dismiss-icon {
|
|
232
237
|
position: absolute;
|
|
@@ -309,16 +314,17 @@
|
|
|
309
314
|
border-radius: 0;
|
|
310
315
|
}
|
|
311
316
|
.wd-custom-picker__header {
|
|
312
|
-
height:
|
|
317
|
+
height: 48px;
|
|
313
318
|
flex: 0 0 48px;
|
|
314
319
|
display: flex;
|
|
315
320
|
align-items: center;
|
|
316
321
|
justify-content: space-between;
|
|
322
|
+
border-bottom: 1px solid #e3e6eb;
|
|
317
323
|
}
|
|
318
324
|
.wd-custom-picker__header-confirm, .wd-custom-picker__header-cancle {
|
|
319
325
|
flex: 0 0 auto;
|
|
320
|
-
padding: 0
|
|
321
|
-
font
|
|
326
|
+
padding: 0 20px;
|
|
327
|
+
font: var(--wd-typography-body-md);
|
|
322
328
|
color: rgba(0, 0, 0, 0.6);
|
|
323
329
|
cursor: pointer;
|
|
324
330
|
}
|
|
@@ -1214,4 +1214,14 @@ textarea {
|
|
|
1214
1214
|
}
|
|
1215
1215
|
.wd-form.size-width-hundred {
|
|
1216
1216
|
width: 100%;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
.wd-mp-form-item-obj .wd-form-obj-card-header {
|
|
1220
|
+
display: flex;
|
|
1221
|
+
}
|
|
1222
|
+
.wd-mp-form-item-obj .wd-form-obj-item-wrap__control-wrap {
|
|
1223
|
+
flex-direction: column;
|
|
1224
|
+
}
|
|
1225
|
+
.wd-mp-form-item-obj .wd-form-item--weui.wd-form-item {
|
|
1226
|
+
width: 100%;
|
|
1217
1227
|
}
|
|
@@ -1255,4 +1255,14 @@ textarea {
|
|
|
1255
1255
|
}
|
|
1256
1256
|
.wd-form.size-width-hundred {
|
|
1257
1257
|
width: 100%;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
.wd-mp-form-item-obj .wd-form-obj-card-header {
|
|
1261
|
+
display: flex;
|
|
1262
|
+
}
|
|
1263
|
+
.wd-mp-form-item-obj .wd-form-obj-item-wrap__control-wrap {
|
|
1264
|
+
flex-direction: column;
|
|
1265
|
+
}
|
|
1266
|
+
.wd-mp-form-item-obj .wd-form-item--weui.wd-form-item {
|
|
1267
|
+
width: 100%;
|
|
1258
1268
|
}
|
package/index.json
CHANGED
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"FormTextArea": "components/form-text-area/index",
|
|
38
38
|
"FormInput": "components/form-input/index",
|
|
39
39
|
"WdForm": "components/wd-form/index",
|
|
40
|
+
"WdFormObj": "components/wd-form-obj/index",
|
|
41
|
+
"WdFormArr": "components/wd-form-arr/index",
|
|
40
42
|
"WdInput": "components/wd-input/index",
|
|
41
43
|
"WdInputUrl": "components/wd-input-url/index",
|
|
42
44
|
"WdInputPhone": "components/wd-input-phone/index",
|
package/package.json
CHANGED
package/utils/enum.js
CHANGED
|
@@ -1245,3 +1245,16 @@ export const WD_TABLE_CUSTOM_FORMAT = [
|
|
|
1245
1245
|
{ label: '数组', value: 'array' },
|
|
1246
1246
|
{ label: 'JSON', value: 'json' },
|
|
1247
1247
|
];
|
|
1248
|
+
|
|
1249
|
+
export const WD_CODE_EDITOR_LANGUAGE = [
|
|
1250
|
+
{ label: 'JS', value: 'javascript' },
|
|
1251
|
+
{ label: 'TypeScript', value: 'typescript' },
|
|
1252
|
+
{ label: 'MongoDB', value: 'mongodb' },
|
|
1253
|
+
{ label: 'SQL', value: 'sql' },
|
|
1254
|
+
{ label: 'MySQL', value: 'mysql' },
|
|
1255
|
+
];
|
|
1256
|
+
|
|
1257
|
+
export const WD_CODE_EDITOR_THEME = [
|
|
1258
|
+
{ label: '暗黑', value: 'githubDark' },
|
|
1259
|
+
{ label: '明亮', value: 'githubLight' },
|
|
1260
|
+
];
|