@cloudbase/weda-ui 3.21.0 → 3.21.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.
- package/dist/configs/components/wd-cascader.d.ts +7 -7
- package/dist/configs/components/wd-cascader.js +6 -7
- package/dist/configs/components/wd-form.d.ts +7 -0
- package/dist/configs/components/wd-form.js +12 -6
- package/dist/configs/components/wd-table.js +1 -1
- package/dist/configs/index.d.ts +28 -14
- package/dist/style/weda-ui.min.css +3 -3
- package/dist/web/components/richText/index.css +238 -3
- package/dist/web/components/wd-form/index.js +3 -1
- package/package.json +1 -1
|
@@ -72,6 +72,7 @@ exeditor-toolbar-table-panel {
|
|
|
72
72
|
.weda-richtext-container {
|
|
73
73
|
z-index: 2 !important;
|
|
74
74
|
height: 100%;
|
|
75
|
+
background-color: #fff;
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
.weda-richtext-container.ex-fullscreen {
|
|
@@ -108,9 +109,7 @@ exeditor-toolbar-table-panel {
|
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
.weda-richText.weda-richText-web-not-vertical > :last-child {
|
|
111
|
-
width: calc(
|
|
112
|
-
100% - var(--wd-form-item-label-width) - var(--wd-form-item-label-mr)
|
|
113
|
-
) !important;
|
|
112
|
+
width: calc(100% - var(--wd-form-item-label-width) - var(--wd-form-item-label-mr)) !important;
|
|
114
113
|
max-width: inherit;
|
|
115
114
|
}
|
|
116
115
|
|
|
@@ -137,3 +136,239 @@ exeditor-link-modal {
|
|
|
137
136
|
background-color: inherit;
|
|
138
137
|
width: 100%;
|
|
139
138
|
}
|
|
139
|
+
|
|
140
|
+
.exeditor-toolbar[data-theme='basic'] {
|
|
141
|
+
--exeditor-toolbar-color: var(--exeditor-basic-toolbar-color, #555);
|
|
142
|
+
display: flex;
|
|
143
|
+
flex-wrap: wrap;
|
|
144
|
+
align-items: center;
|
|
145
|
+
padding: var(--exeditor-toolbar-padding, 15px);
|
|
146
|
+
color: var(--exeditor-toolbar-color, #555);
|
|
147
|
+
background: var(--exeditor-toolbar-background, #fcfcfc);
|
|
148
|
+
}
|
|
149
|
+
.exeditor-toolbar[data-theme='basic'][data-in='popover'] {
|
|
150
|
+
box-sizing: border-box;
|
|
151
|
+
display: none;
|
|
152
|
+
position: absolute;
|
|
153
|
+
left: 0;
|
|
154
|
+
top: 0;
|
|
155
|
+
max-width: 100%;
|
|
156
|
+
padding: 5px;
|
|
157
|
+
border-radius: 4px;
|
|
158
|
+
box-shadow: 0 0 10px 5px rgb(0 0 0 / 6%);
|
|
159
|
+
}
|
|
160
|
+
.exeditor-toolbar--multiline[data-theme='basic'] {
|
|
161
|
+
flex-direction: column;
|
|
162
|
+
align-items: flex-start;
|
|
163
|
+
}
|
|
164
|
+
.exeditor-toolbar--multiline[data-theme='basic'] > .exeditor-toolbar__row {
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-wrap: wrap;
|
|
167
|
+
align-items: center;
|
|
168
|
+
}
|
|
169
|
+
.exeditor-toolbar[data-theme='basic'] [data-toolbar-item-of] {
|
|
170
|
+
flex-basis: 0;
|
|
171
|
+
margin: 0 var(--exeditor-basic-toolbar-button-margin, 5px);
|
|
172
|
+
white-space: nowrap;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.ExEditor-basic::after {
|
|
176
|
+
content: '';
|
|
177
|
+
display: block;
|
|
178
|
+
clear: both;
|
|
179
|
+
}
|
|
180
|
+
.ExEditor-basic {
|
|
181
|
+
box-sizing: border-box;
|
|
182
|
+
min-height: var(--exeditor-editor-min-height, 100px);
|
|
183
|
+
background: var(--exeditor-editor-background, #fff);
|
|
184
|
+
padding: var(--exeditor-editor-padding, 20px);
|
|
185
|
+
outline: none;
|
|
186
|
+
white-space: pre-wrap;
|
|
187
|
+
--exeditor-hr-color: var(--exeditor-basic-hr-color, #e7e7e7);
|
|
188
|
+
--exeditor-link-color: var(--exeditor-basic-link-color, #0052ff);
|
|
189
|
+
--exeditor-selected-outline: var(--exeditor-basic-selected-outline, 2px solid #68cef8);
|
|
190
|
+
--exeditor-selected-background: var(--exeditor-basic-selected-background, rgba(24, 144, 255, 0.3));
|
|
191
|
+
--exeditor-selected-cell-background: var(--exeditor-basic-selected-cell-background, rgba(24, 144, 255, 0.15));
|
|
192
|
+
--exeditor-formula-vertical-align: var(--exeditor-basic-formula-vertical-align, middle);
|
|
193
|
+
}
|
|
194
|
+
.ExEditor-basic a:any-link {
|
|
195
|
+
color: var(--exeditor-link-color);
|
|
196
|
+
text-decoration: underline;
|
|
197
|
+
}
|
|
198
|
+
.ExEditor-basic h1 {
|
|
199
|
+
font-size: 2em;
|
|
200
|
+
}
|
|
201
|
+
.ExEditor-basic p {
|
|
202
|
+
line-height: 26px;
|
|
203
|
+
min-height: 1em;
|
|
204
|
+
}
|
|
205
|
+
.ExEditor-basic blockquote {
|
|
206
|
+
background: #00000008;
|
|
207
|
+
border-left: 6px solid #ccc;
|
|
208
|
+
margin: 1.5em 10px;
|
|
209
|
+
padding: 0.5em 10px;
|
|
210
|
+
}
|
|
211
|
+
.ExEditor-basic pre {
|
|
212
|
+
padding: 6px;
|
|
213
|
+
background: #efefef;
|
|
214
|
+
overflow: auto;
|
|
215
|
+
}
|
|
216
|
+
.ExEditor-basic p,
|
|
217
|
+
.ExEditor-basic pre {
|
|
218
|
+
margin-top: 15px;
|
|
219
|
+
margin-bottom: 15px;
|
|
220
|
+
}
|
|
221
|
+
.ExEditor-basic hr {
|
|
222
|
+
border-width: 2px 0 0 0;
|
|
223
|
+
border-style: solid;
|
|
224
|
+
border-color: var(--exeditor-hr-color);
|
|
225
|
+
margin-top: 1.5em;
|
|
226
|
+
margin-bottom: 1.5em;
|
|
227
|
+
}
|
|
228
|
+
.ExEditor-basic img[data-formula] {
|
|
229
|
+
vertical-align: var(--exeditor-formula-vertical-align);
|
|
230
|
+
}
|
|
231
|
+
.ExEditor-basic video {
|
|
232
|
+
display: block;
|
|
233
|
+
margin: 1em auto;
|
|
234
|
+
}
|
|
235
|
+
.ExEditor-basic video[data-inline] {
|
|
236
|
+
display: inline-block;
|
|
237
|
+
margin: 0;
|
|
238
|
+
}
|
|
239
|
+
.ExEditor-basic video:not([data-inline]) {
|
|
240
|
+
width: auto;
|
|
241
|
+
height: auto;
|
|
242
|
+
max-width: 100%;
|
|
243
|
+
}
|
|
244
|
+
.ExEditor-basic audio {
|
|
245
|
+
display: block;
|
|
246
|
+
margin: 1em auto;
|
|
247
|
+
}
|
|
248
|
+
.ExEditor-basic audio[data-inline] {
|
|
249
|
+
display: inline-block;
|
|
250
|
+
margin: 0 2px;
|
|
251
|
+
}
|
|
252
|
+
.ExEditor-basic.ProseMirror-focused .excore-selected-node:not(.no-outline) {
|
|
253
|
+
outline: var(--exeditor-selected-outline);
|
|
254
|
+
}
|
|
255
|
+
.ExEditor-basic.ProseMirror-focused .excore-in-selection {
|
|
256
|
+
background: var(--exeditor-selected-background);
|
|
257
|
+
box-shadow: 0 0 0 2px var(--exeditor-selected-background);
|
|
258
|
+
}
|
|
259
|
+
.ExEditor-basic .tableWrapper {
|
|
260
|
+
margin: 20px 0;
|
|
261
|
+
padding: 0;
|
|
262
|
+
overflow-x: auto;
|
|
263
|
+
}
|
|
264
|
+
.ExEditor-basic table {
|
|
265
|
+
table-layout: fixed;
|
|
266
|
+
min-width: fit-content;
|
|
267
|
+
border-collapse: collapse;
|
|
268
|
+
margin: 0;
|
|
269
|
+
overflow: hidden;
|
|
270
|
+
}
|
|
271
|
+
.ExEditor-basic table th,
|
|
272
|
+
.ExEditor-basic table td {
|
|
273
|
+
box-sizing: border-box;
|
|
274
|
+
position: relative;
|
|
275
|
+
min-width: 70px;
|
|
276
|
+
padding: 0px 5px;
|
|
277
|
+
border: 2px solid #dcdcdc;
|
|
278
|
+
vertical-align: top;
|
|
279
|
+
background-clip: padding-box;
|
|
280
|
+
}
|
|
281
|
+
.ExEditor-basic table th {
|
|
282
|
+
font-weight: bold;
|
|
283
|
+
background-color: #f3f3f3;
|
|
284
|
+
}
|
|
285
|
+
.ExEditor-basic table td {
|
|
286
|
+
background-color: white;
|
|
287
|
+
}
|
|
288
|
+
.ExEditor-basic table th > p,
|
|
289
|
+
.ExEditor-basic table td > p {
|
|
290
|
+
min-height: 1em;
|
|
291
|
+
}
|
|
292
|
+
.ExEditor-basic table .selectedCell::after {
|
|
293
|
+
z-index: 2;
|
|
294
|
+
position: absolute;
|
|
295
|
+
content: '';
|
|
296
|
+
left: 0;
|
|
297
|
+
right: 0;
|
|
298
|
+
top: 0;
|
|
299
|
+
bottom: 0;
|
|
300
|
+
background: var(--exeditor-selected-cell-background);
|
|
301
|
+
pointer-events: none;
|
|
302
|
+
}
|
|
303
|
+
.ExEditor-basic.resize-cursor {
|
|
304
|
+
cursor: col-resize;
|
|
305
|
+
}
|
|
306
|
+
.ExEditor-basic.resize-cursor.vert {
|
|
307
|
+
cursor: nw-resize;
|
|
308
|
+
cursor: row-resize;
|
|
309
|
+
}
|
|
310
|
+
.ExEditor-basic table .column-resize-handle {
|
|
311
|
+
position: absolute;
|
|
312
|
+
right: -2px;
|
|
313
|
+
top: 0;
|
|
314
|
+
bottom: -2px;
|
|
315
|
+
width: 4px;
|
|
316
|
+
background-color: #adf;
|
|
317
|
+
pointer-events: none;
|
|
318
|
+
}
|
|
319
|
+
.ExEditor-basic table .row-resize-handle {
|
|
320
|
+
position: absolute;
|
|
321
|
+
bottom: -2px;
|
|
322
|
+
left: 0;
|
|
323
|
+
right: 0;
|
|
324
|
+
height: 4px;
|
|
325
|
+
z-index: 20;
|
|
326
|
+
background-color: #adf;
|
|
327
|
+
pointer-events: none;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.ExEditor-basic ol {
|
|
331
|
+
--ol-start: 1;
|
|
332
|
+
--ol-list-style-type: decimal;
|
|
333
|
+
list-style-type: none;
|
|
334
|
+
counter-reset: olCounter calc(var(--ol-start, 1) - 1);
|
|
335
|
+
position: relative;
|
|
336
|
+
}
|
|
337
|
+
.ExEditor-basic ol > li > :first-child::before {
|
|
338
|
+
content: counter(olCounter, var(--ol-list-style-type)) '. ';
|
|
339
|
+
counter-increment: olCounter;
|
|
340
|
+
font-variant-numeric: tabular-nums;
|
|
341
|
+
position: absolute;
|
|
342
|
+
transform: translate(-100%, 0);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.ExEditor-basic ul {
|
|
346
|
+
--ul-list-style-type: circle;
|
|
347
|
+
list-style-type: none;
|
|
348
|
+
position: relative;
|
|
349
|
+
}
|
|
350
|
+
.ExEditor-basic ul.nonUnicode-list-style-type > li > :first-child::before {
|
|
351
|
+
content: var(--ul-list-style-type) ' ';
|
|
352
|
+
font-variant-numeric: tabular-nums;
|
|
353
|
+
position: absolute;
|
|
354
|
+
transform: translate(-100%, 0.05em) scale(0.5);
|
|
355
|
+
}
|
|
356
|
+
.ExEditor-basic ul.unicode-list-style-type > li > :first-child::before {
|
|
357
|
+
content: var(--ul-list-style-type) ' ';
|
|
358
|
+
font-variant-numeric: tabular-nums;
|
|
359
|
+
position: absolute;
|
|
360
|
+
transform: translate(-100%, 0) scale(0.8);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.ExEditor-basic ul[data-type='todo'] {
|
|
364
|
+
padding-left: calc(2em + 10px);
|
|
365
|
+
}
|
|
366
|
+
.ExEditor-basic ul[data-type='todo'] > li > :first-child::before {
|
|
367
|
+
content: '';
|
|
368
|
+
}
|
|
369
|
+
.ExEditor-basic ul[data-type='todo'] > li > input[type='checkbox'] {
|
|
370
|
+
position: absolute;
|
|
371
|
+
left: 1em;
|
|
372
|
+
margin-top: 6px;
|
|
373
|
+
margin-right: 10px;
|
|
374
|
+
}
|
|
@@ -20,6 +20,7 @@ import { WdForm as FormUi } from './wd-form';
|
|
|
20
20
|
import EmptyContent from '../statusContent';
|
|
21
21
|
import { deepClone } from '../../utils/tool';
|
|
22
22
|
import isObjectEqual from '../../utils/isObjectEqual';
|
|
23
|
+
import { convertMethodParam } from '../../utils/hooks/useFormLegacy';
|
|
23
24
|
import '../style';
|
|
24
25
|
import { getErrorObjectFromValidateResult } from './form-utils';
|
|
25
26
|
import { isNil } from '../../utils/lodash';
|
|
@@ -392,7 +393,8 @@ const WdForm = React.forwardRef(function WdForm(props, ref) {
|
|
|
392
393
|
};
|
|
393
394
|
},
|
|
394
395
|
submitParams,
|
|
395
|
-
setValue(
|
|
396
|
+
setValue(val, opts = { notMerge: false }) {
|
|
397
|
+
const value = convertMethodParam(val);
|
|
396
398
|
// notMerge 默认false,表示与之前的表单值合并
|
|
397
399
|
if (opts.notMerge) {
|
|
398
400
|
setValueDebounce(value);
|