@vue-start/element-pro 0.2.0 → 0.2.3
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/CHANGELOG.md +6 -0
- package/dist/index.d.ts +401 -618
- package/dist/index.es.js +212 -677
- package/dist/index.js +210 -677
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -82,6 +82,8 @@ function _nonIterableSpread() {
|
|
|
82
82
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
var ProGrid = pro.createGrid(elementPlus.ElRow, elementPlus.ElCol);
|
|
86
|
+
|
|
85
87
|
var createLoadingId = function createLoadingId() {
|
|
86
88
|
var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "comp";
|
|
87
89
|
return prefix + "-" + pro.generateId();
|
|
@@ -173,227 +175,6 @@ var ProLoading = vue.defineComponent({
|
|
|
173
175
|
}
|
|
174
176
|
});
|
|
175
177
|
|
|
176
|
-
var Content$1 = vue.defineComponent(function () {
|
|
177
|
-
var _useProTable = pro.useProTable(),
|
|
178
|
-
columns = _useProTable.columns;
|
|
179
|
-
|
|
180
|
-
return function () {
|
|
181
|
-
return vue.createVNode(vue.Fragment, null, [lodash.map(columns.value, function (item) {
|
|
182
|
-
var formatter = function formatter(record, column, value, index) {
|
|
183
|
-
if (item.customRender) {
|
|
184
|
-
return item.customRender({
|
|
185
|
-
value: value,
|
|
186
|
-
text: value,
|
|
187
|
-
record: record,
|
|
188
|
-
column: column,
|
|
189
|
-
index: index
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
return value;
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
return vue.createVNode(elementPlus.ElTableColumn, vue.mergeProps({
|
|
197
|
-
"key": item.dataIndex
|
|
198
|
-
}, lodash.omit(item, "title", "label", "renderHeader", "prop", "dataIndex", "formatter", "customRender"), {
|
|
199
|
-
"label": vue.isVNode(item.title) ? undefined : item.title || lodash.get(item, "label"),
|
|
200
|
-
"renderHeader": vue.isVNode(item.title) ? function () {
|
|
201
|
-
return item.title;
|
|
202
|
-
} : undefined,
|
|
203
|
-
"prop": item.dataIndex,
|
|
204
|
-
"formatter": formatter
|
|
205
|
-
}), null);
|
|
206
|
-
})]);
|
|
207
|
-
};
|
|
208
|
-
});
|
|
209
|
-
var ProTable = vue.defineComponent({
|
|
210
|
-
inheritAttrs: false,
|
|
211
|
-
props: _objectSpread2(_objectSpread2({}, elementPlus.ElTable.props), pro.ProTable.props),
|
|
212
|
-
setup: function setup(props, _ref) {
|
|
213
|
-
var slots = _ref.slots,
|
|
214
|
-
expose = _ref.expose,
|
|
215
|
-
attrs = _ref.attrs;
|
|
216
|
-
var id = createLoadingId("table");
|
|
217
|
-
var tableRef = vue.ref();
|
|
218
|
-
expose({
|
|
219
|
-
tableRef: tableRef
|
|
220
|
-
});
|
|
221
|
-
var originKeys = lodash.keys(pro.ProTable.props);
|
|
222
|
-
return function () {
|
|
223
|
-
var _slots$top, _slots$default;
|
|
224
|
-
|
|
225
|
-
return vue.createVNode(pro.ProTable, vue.mergeProps(lodash.pick.apply(void 0, [props].concat(_toConsumableArray(originKeys), ["provideExtra"])), {
|
|
226
|
-
"provideExtra": _objectSpread2({
|
|
227
|
-
tableRef: tableRef
|
|
228
|
-
}, props.provideExtra)
|
|
229
|
-
}), {
|
|
230
|
-
"default": function _default() {
|
|
231
|
-
return [vue.createVNode(elementPlus.ElTable, vue.mergeProps({
|
|
232
|
-
"ref": tableRef,
|
|
233
|
-
"id": id
|
|
234
|
-
}, attrs, lodash.omit(props, originKeys)), _objectSpread2({
|
|
235
|
-
"default": function _default() {
|
|
236
|
-
return [(_slots$top = slots.top) === null || _slots$top === void 0 ? void 0 : _slots$top.call(slots), vue.createVNode(Content$1, null, null), (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots), props.loading && vue.createVNode(ProLoading, {
|
|
237
|
-
"target": id,
|
|
238
|
-
"loading": true
|
|
239
|
-
}, null)];
|
|
240
|
-
}
|
|
241
|
-
}, lodash.omit(slots, "default")))];
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
|
|
248
|
-
var defaultPage = {
|
|
249
|
-
page: 1,
|
|
250
|
-
pageSize: 10
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
var proListProps = function proListProps() {
|
|
254
|
-
return {
|
|
255
|
-
/**
|
|
256
|
-
* extra 是否放到SearchForm中
|
|
257
|
-
*/
|
|
258
|
-
extraInSearch: {
|
|
259
|
-
type: Boolean,
|
|
260
|
-
"default": undefined
|
|
261
|
-
},
|
|
262
|
-
//search
|
|
263
|
-
searchProps: {
|
|
264
|
-
type: Object
|
|
265
|
-
},
|
|
266
|
-
//table
|
|
267
|
-
tableProps: {
|
|
268
|
-
type: Object
|
|
269
|
-
},
|
|
270
|
-
//pagination
|
|
271
|
-
paginationProps: {
|
|
272
|
-
type: Object
|
|
273
|
-
},
|
|
274
|
-
//pageState
|
|
275
|
-
pageState: {
|
|
276
|
-
type: Object
|
|
277
|
-
}
|
|
278
|
-
};
|
|
279
|
-
};
|
|
280
|
-
|
|
281
|
-
var ProList = vue.defineComponent({
|
|
282
|
-
props: _objectSpread2({}, proListProps()),
|
|
283
|
-
setup: function setup(props, _ref) {
|
|
284
|
-
var slots = _ref.slots,
|
|
285
|
-
emit = _ref.emit;
|
|
286
|
-
|
|
287
|
-
/******************* search pagination ********************/
|
|
288
|
-
var pageState = props.pageState || vue.reactive(_objectSpread2({}, defaultPage));
|
|
289
|
-
var prevValues;
|
|
290
|
-
|
|
291
|
-
var handleSearch = function handleSearch() {
|
|
292
|
-
emit("list", _objectSpread2(_objectSpread2({}, prevValues), pageState));
|
|
293
|
-
}; //页数重置1 且搜索
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
var executeSearchWithResetPage = function executeSearchWithResetPage(values) {
|
|
297
|
-
prevValues = values;
|
|
298
|
-
pageState.page = 1;
|
|
299
|
-
handleSearch();
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
return function () {
|
|
303
|
-
var _slots$divide, _slots$divide2, _slots$footerLeft, _slots$footerRight;
|
|
304
|
-
|
|
305
|
-
var searchProps = props.searchProps;
|
|
306
|
-
var tableProps = props.tableProps;
|
|
307
|
-
var paginationProps = props.paginationProps; //操作按钮
|
|
308
|
-
|
|
309
|
-
var extra = slots.extra ? vue.createVNode("div", {
|
|
310
|
-
"class": "pro-list-search"
|
|
311
|
-
}, [slots.extra()]) : null; //分页参数
|
|
312
|
-
|
|
313
|
-
var pagination = _objectSpread2(_objectSpread2({}, paginationProps), {}, {
|
|
314
|
-
currentPage: pageState.page,
|
|
315
|
-
pageSize: pageState.pageSize,
|
|
316
|
-
onSizeChange: function onSizeChange(pageSize) {
|
|
317
|
-
pageState.pageSize = pageSize;
|
|
318
|
-
handleSearch();
|
|
319
|
-
},
|
|
320
|
-
onCurrentChange: function onCurrentChange(current) {
|
|
321
|
-
pageState.page = current;
|
|
322
|
-
handleSearch();
|
|
323
|
-
}
|
|
324
|
-
});
|
|
325
|
-
|
|
326
|
-
return vue.createVNode(vue.Fragment, null, [vue.createVNode(ProSearchForm, vue.mergeProps(searchProps, {
|
|
327
|
-
"onFinish": executeSearchWithResetPage
|
|
328
|
-
}), {
|
|
329
|
-
"default": function _default() {
|
|
330
|
-
return [props.extraInSearch && extra];
|
|
331
|
-
}
|
|
332
|
-
}), (_slots$divide = slots.divide) === null || _slots$divide === void 0 ? void 0 : _slots$divide.call(slots), !props.extraInSearch && extra, slots["default"] ? slots["default"]() : vue.createVNode(ProTable, vue.mergeProps({
|
|
333
|
-
"pagination": {
|
|
334
|
-
page: pageState.page,
|
|
335
|
-
pageSize: pageState.pageSize
|
|
336
|
-
}
|
|
337
|
-
}, lodash.omit(tableProps, "slots")), tableProps === null || tableProps === void 0 ? void 0 : tableProps.slots), (_slots$divide2 = slots.divide2) === null || _slots$divide2 === void 0 ? void 0 : _slots$divide2.call(slots), vue.createVNode("div", {
|
|
338
|
-
"class": "pro-list-footer"
|
|
339
|
-
}, [(_slots$footerLeft = slots.footerLeft) === null || _slots$footerLeft === void 0 ? void 0 : _slots$footerLeft.call(slots), lodash.isNumber(paginationProps === null || paginationProps === void 0 ? void 0 : paginationProps.total) && paginationProps.total > 0 && vue.createVNode(vue.Fragment, null, [slots.pagination ? slots.pagination(pagination) : vue.createVNode(elementPlus.ElPagination, pagination, null)]), (_slots$footerRight = slots.footerRight) === null || _slots$footerRight === void 0 ? void 0 : _slots$footerRight.call(slots)])]);
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
|
|
344
|
-
function _isSlot$1(s) {
|
|
345
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
var proGridProps = function proGridProps() {
|
|
349
|
-
return {
|
|
350
|
-
/**
|
|
351
|
-
* row属性
|
|
352
|
-
*/
|
|
353
|
-
row: {
|
|
354
|
-
type: Object,
|
|
355
|
-
"default": undefined
|
|
356
|
-
},
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* 公共col属性
|
|
360
|
-
*/
|
|
361
|
-
col: {
|
|
362
|
-
type: Object
|
|
363
|
-
},
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
*
|
|
367
|
-
*/
|
|
368
|
-
items: {
|
|
369
|
-
type: Array
|
|
370
|
-
}
|
|
371
|
-
};
|
|
372
|
-
};
|
|
373
|
-
|
|
374
|
-
var ProGrid = vue.defineComponent({
|
|
375
|
-
props: _objectSpread2({}, proGridProps()),
|
|
376
|
-
setup: function setup(props) {
|
|
377
|
-
return function () {
|
|
378
|
-
var _slot;
|
|
379
|
-
|
|
380
|
-
return vue.createVNode(elementPlus.ElRow, props.row, _isSlot$1(_slot = lodash.map(props.items, function (item) {
|
|
381
|
-
return vue.createVNode(elementPlus.ElCol, vue.mergeProps({
|
|
382
|
-
"key": item.rowKey
|
|
383
|
-
}, props.col, item.col), {
|
|
384
|
-
"default": function _default() {
|
|
385
|
-
return [item.vNode];
|
|
386
|
-
}
|
|
387
|
-
});
|
|
388
|
-
})) ? _slot : {
|
|
389
|
-
"default": function _default() {
|
|
390
|
-
return [_slot];
|
|
391
|
-
}
|
|
392
|
-
});
|
|
393
|
-
};
|
|
394
|
-
}
|
|
395
|
-
});
|
|
396
|
-
|
|
397
178
|
var proFormItemProps = function proFormItemProps() {
|
|
398
179
|
return {
|
|
399
180
|
name: {
|
|
@@ -414,141 +195,54 @@ var ProFormItem = vue.defineComponent({
|
|
|
414
195
|
};
|
|
415
196
|
}
|
|
416
197
|
});
|
|
417
|
-
|
|
418
|
-
var
|
|
419
|
-
props: _objectSpread2(
|
|
420
|
-
needRules: {
|
|
421
|
-
type: Boolean
|
|
422
|
-
}
|
|
423
|
-
}),
|
|
424
|
-
setup: function setup(props) {
|
|
425
|
-
var _useProForm = pro.useProForm(),
|
|
426
|
-
formElementMap = _useProForm.formElementMap,
|
|
427
|
-
columns = _useProForm.columns;
|
|
428
|
-
|
|
429
|
-
return function () {
|
|
430
|
-
if (!formElementMap || lodash.size(columns.value) <= 0) {
|
|
431
|
-
return null;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
if (!props.row) {
|
|
435
|
-
return lodash.map(columns.value, function (item) {
|
|
436
|
-
return pro.getFormItemEl(formElementMap, item, props.needRules);
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
return vue.createVNode(ProGrid, {
|
|
441
|
-
"row": props.row,
|
|
442
|
-
"col": props.col,
|
|
443
|
-
"items": lodash.map(columns.value, function (item) {
|
|
444
|
-
var vNode = pro.getFormItemEl(formElementMap, item, props.needRules);
|
|
445
|
-
return {
|
|
446
|
-
rowKey: pro.getColumnFormItemName(item),
|
|
447
|
-
vNode: vNode,
|
|
448
|
-
col: lodash.get(item, ["extra", "col"])
|
|
449
|
-
};
|
|
450
|
-
})
|
|
451
|
-
}, null);
|
|
452
|
-
};
|
|
453
|
-
}
|
|
454
|
-
});
|
|
455
|
-
var ProForm = vue.defineComponent({
|
|
456
|
-
inheritAttrs: false,
|
|
457
|
-
props: _objectSpread2(_objectSpread2(_objectSpread2({}, elementPlus.ElForm.props), lodash.omit(pro.ProForm.props, "model")), lodash.omit(ProGrid.props, "items")),
|
|
198
|
+
var FormMethods = ["clearValidate", "resetFields", "scrollToField", "validate", "validateField", "submit"];
|
|
199
|
+
var Form = vue.defineComponent({
|
|
200
|
+
props: _objectSpread2({}, elementPlus.ElForm.props),
|
|
458
201
|
setup: function setup(props, _ref2) {
|
|
459
202
|
var slots = _ref2.slots,
|
|
460
|
-
expose = _ref2.expose,
|
|
461
203
|
emit = _ref2.emit,
|
|
462
|
-
|
|
463
|
-
var formRef = vue.ref();
|
|
204
|
+
expose = _ref2.expose;
|
|
464
205
|
var formState = props.model || vue.reactive({});
|
|
465
|
-
var
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
var _el$validate;
|
|
471
|
-
|
|
472
|
-
(_el$validate = el.validate) === null || _el$validate === void 0 ? void 0 : _el$validate.call(el, function (isValid, invalidFields) {
|
|
473
|
-
if (isValid) {
|
|
474
|
-
//验证成功
|
|
475
|
-
//删除不显示的值再触发事件
|
|
476
|
-
var _showValues = pro.getValidValues(formState, showState, props.showStateRules);
|
|
477
|
-
|
|
478
|
-
emit("finish", _showValues, vue.toRaw(formState));
|
|
479
|
-
} else {
|
|
480
|
-
emit("finishFailed", invalidFields);
|
|
481
|
-
}
|
|
482
|
-
});
|
|
483
|
-
}
|
|
484
|
-
});
|
|
206
|
+
var formRef = vue.ref();
|
|
207
|
+
hooks.useEffect(function () {
|
|
208
|
+
if (!formRef.value) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
485
211
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
};
|
|
212
|
+
formRef.value.submit = function () {
|
|
213
|
+
var _formRef$value;
|
|
489
214
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
}, props.provideExtra)
|
|
501
|
-
}), {
|
|
502
|
-
"default": function _default() {
|
|
503
|
-
return [vue.createVNode(elementPlus.ElForm, vue.mergeProps({
|
|
504
|
-
"ref": handleRef
|
|
505
|
-
}, attrs, lodash.omit.apply(void 0, [props].concat(_toConsumableArray(originKeys), ["model"], _toConsumableArray(gridKeys))), {
|
|
506
|
-
"model": formState
|
|
507
|
-
}), {
|
|
508
|
-
"default": function _default() {
|
|
509
|
-
return [(_slots$top = slots.top) === null || _slots$top === void 0 ? void 0 : _slots$top.call(slots), vue.createVNode(Content, vue.mergeProps(lodash.pick(props, gridKeys), {
|
|
510
|
-
"needRules": props.needRules
|
|
511
|
-
}), null), (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)];
|
|
512
|
-
}
|
|
513
|
-
})];
|
|
514
|
-
}
|
|
515
|
-
});
|
|
516
|
-
};
|
|
517
|
-
}
|
|
518
|
-
});
|
|
519
|
-
|
|
520
|
-
var ProSearchForm = vue.defineComponent({
|
|
521
|
-
inheritAttrs: false,
|
|
522
|
-
props: _objectSpread2(_objectSpread2(_objectSpread2({}, lodash.omit(ProForm.props, "inline")), lodash.omit(pro.ProSearchForm.props, "model", "columns")), {}, {
|
|
523
|
-
inline: {
|
|
524
|
-
type: Boolean,
|
|
525
|
-
"default": true
|
|
526
|
-
}
|
|
527
|
-
}),
|
|
528
|
-
setup: function setup(props, _ref) {
|
|
529
|
-
var slots = _ref.slots,
|
|
530
|
-
attrs = _ref.attrs;
|
|
531
|
-
var formRef = vue.ref();
|
|
532
|
-
var formState = props.model || vue.reactive({});
|
|
533
|
-
var originKeys = lodash.keys(lodash.omit(pro.ProSearchForm.props, "model", "columns"));
|
|
215
|
+
(_formRef$value = formRef.value) === null || _formRef$value === void 0 ? void 0 : _formRef$value.validate(function (isValid, invalidFields) {
|
|
216
|
+
if (isValid) {
|
|
217
|
+
emit("finish", vue.toRaw(formState));
|
|
218
|
+
} else {
|
|
219
|
+
emit("finishFailed", invalidFields);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
};
|
|
223
|
+
}, []);
|
|
224
|
+
expose(pro.createExpose(FormMethods, formRef));
|
|
534
225
|
return function () {
|
|
535
|
-
return vue.createVNode(
|
|
226
|
+
return vue.createVNode(elementPlus.ElForm, vue.mergeProps({
|
|
536
227
|
"ref": formRef
|
|
537
|
-
},
|
|
538
|
-
"model": formState
|
|
539
|
-
|
|
540
|
-
}), slots), vue.createVNode(pro.ProSearchForm, vue.mergeProps(lodash.pick(props, originKeys), {
|
|
541
|
-
"model": formState,
|
|
542
|
-
"columns": props.columns,
|
|
543
|
-
"onFinish": function onFinish() {
|
|
544
|
-
var _formRef$value;
|
|
545
|
-
|
|
546
|
-
(_formRef$value = formRef.value) === null || _formRef$value === void 0 ? void 0 : _formRef$value.submit();
|
|
547
|
-
}
|
|
548
|
-
}), null)]);
|
|
228
|
+
}, lodash.omit(props, "model"), {
|
|
229
|
+
"model": formState
|
|
230
|
+
}), slots);
|
|
549
231
|
};
|
|
550
232
|
}
|
|
551
233
|
});
|
|
234
|
+
//emit;
|
|
235
|
+
var ProForm = pro.createForm(Form, ProGrid, FormMethods);
|
|
236
|
+
var ProSearchForm = pro.createSearchForm(ProForm, {
|
|
237
|
+
needRules: {
|
|
238
|
+
type: Boolean,
|
|
239
|
+
"default": false
|
|
240
|
+
},
|
|
241
|
+
inline: {
|
|
242
|
+
type: Boolean,
|
|
243
|
+
"default": true
|
|
244
|
+
}
|
|
245
|
+
}, FormMethods);
|
|
552
246
|
|
|
553
247
|
var createFormItemComponent = pro.createFormItemCompFn(ProFormItem, function (value, setValue, disabled) {
|
|
554
248
|
return {
|
|
@@ -577,7 +271,7 @@ var ProSelect = vue.defineComponent({
|
|
|
577
271
|
|
|
578
272
|
return vue.createVNode(elementPlus.ElSelect, vue.mergeProps(lodash.omit(props, invalidKeys), {
|
|
579
273
|
"onUpdate:modelValue": function onUpdateModelValue(v) {
|
|
580
|
-
emit("update:modelValue", v);
|
|
274
|
+
emit("update:modelValue", v ? v : undefined);
|
|
581
275
|
}
|
|
582
276
|
}), _objectSpread2({
|
|
583
277
|
"default": function _default() {
|
|
@@ -587,7 +281,66 @@ var ProSelect = vue.defineComponent({
|
|
|
587
281
|
}, item), null);
|
|
588
282
|
}), (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)];
|
|
589
283
|
}
|
|
590
|
-
}, lodash.omit(
|
|
284
|
+
}, lodash.omit(slots, "default")));
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
function _isSlot(s) {
|
|
290
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
var proRadioProps = function proRadioProps() {
|
|
294
|
+
return {
|
|
295
|
+
options: {
|
|
296
|
+
type: Array
|
|
297
|
+
},
|
|
298
|
+
buttonStyle: {
|
|
299
|
+
type: String,
|
|
300
|
+
"default": "default"
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
var ProRadio = vue.defineComponent({
|
|
306
|
+
props: _objectSpread2(_objectSpread2({}, elementPlus.ElRadioGroup.props), proRadioProps()),
|
|
307
|
+
setup: function setup(props, _ref) {
|
|
308
|
+
var emit = _ref.emit;
|
|
309
|
+
var invalidKeys = lodash.keys(proRadioProps());
|
|
310
|
+
return function () {
|
|
311
|
+
var _slot;
|
|
312
|
+
|
|
313
|
+
return vue.createVNode(elementPlus.ElRadioGroup, vue.mergeProps(lodash.omit(props, invalidKeys), {
|
|
314
|
+
"onUpdate:modelValue": function onUpdateModelValue(v) {
|
|
315
|
+
emit("update:modelValue", v);
|
|
316
|
+
}
|
|
317
|
+
}), _isSlot(_slot = lodash.map(props.options, function (item) {
|
|
318
|
+
if (props.buttonStyle === "button") {
|
|
319
|
+
return vue.createVNode(elementPlus.ElRadioButton, vue.mergeProps({
|
|
320
|
+
"key": item.value
|
|
321
|
+
}, item, {
|
|
322
|
+
"label": item.value
|
|
323
|
+
}), {
|
|
324
|
+
"default": function _default() {
|
|
325
|
+
return [item.label];
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
return vue.createVNode(elementPlus.ElRadio, vue.mergeProps({
|
|
331
|
+
"key": item.value
|
|
332
|
+
}, item, {
|
|
333
|
+
"label": item.value
|
|
334
|
+
}), {
|
|
335
|
+
"default": function _default() {
|
|
336
|
+
return [item.label];
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
})) ? _slot : {
|
|
340
|
+
"default": function _default() {
|
|
341
|
+
return [_slot];
|
|
342
|
+
}
|
|
343
|
+
});
|
|
591
344
|
};
|
|
592
345
|
}
|
|
593
346
|
});
|
|
@@ -628,7 +381,7 @@ var ProFormCheckbox = createFormItemComponent({
|
|
|
628
381
|
name: "PFromCheckbox"
|
|
629
382
|
});
|
|
630
383
|
var ProFormRadio = createFormItemComponent({
|
|
631
|
-
InputComp:
|
|
384
|
+
InputComp: ProRadio,
|
|
632
385
|
valueType: "radio",
|
|
633
386
|
name: "PFromRadio"
|
|
634
387
|
});
|
|
@@ -666,6 +419,8 @@ var ProSubmitButton = vue.defineComponent({
|
|
|
666
419
|
}
|
|
667
420
|
});
|
|
668
421
|
|
|
422
|
+
var FormList = pro.createFormList(ProFormItem);
|
|
423
|
+
|
|
669
424
|
var proFormListProps = function proFormListProps() {
|
|
670
425
|
return {
|
|
671
426
|
addButtonText: {
|
|
@@ -687,215 +442,103 @@ var proFormListProps = function proFormListProps() {
|
|
|
687
442
|
|
|
688
443
|
var ProFormList = vue.defineComponent({
|
|
689
444
|
name: "PFormList",
|
|
690
|
-
props: _objectSpread2(_objectSpread2({},
|
|
445
|
+
props: _objectSpread2(_objectSpread2({}, FormList.props), proFormListProps()),
|
|
691
446
|
setup: function setup(props, _ref) {
|
|
692
447
|
var slots = _ref.slots;
|
|
693
|
-
var originKeys = lodash.keys(pro.ProFormList.props);
|
|
694
448
|
var invalidKeys = lodash.keys(proFormListProps());
|
|
695
449
|
return function () {
|
|
696
|
-
return vue.createVNode(
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
"name": props.name
|
|
702
|
-
}), _objectSpread2({
|
|
703
|
-
itemMinus: function itemMinus() {
|
|
704
|
-
return vue.createVNode(elementPlus.ElButton, vue.mergeProps({
|
|
705
|
-
"link": true
|
|
706
|
-
}, props.minusButtonProps), {
|
|
707
|
-
"default": function _default() {
|
|
708
|
-
return [props.minusButtonText];
|
|
709
|
-
}
|
|
710
|
-
});
|
|
711
|
-
},
|
|
712
|
-
add: function add() {
|
|
713
|
-
return vue.createVNode(elementPlus.ElButton, vue.mergeProps({
|
|
714
|
-
"type": "primary"
|
|
715
|
-
}, props.addButtonProps), {
|
|
716
|
-
"default": function _default() {
|
|
717
|
-
return [props.addButtonText];
|
|
718
|
-
}
|
|
719
|
-
});
|
|
450
|
+
return vue.createVNode(FormList, lodash.omit(props, invalidKeys), _objectSpread2({
|
|
451
|
+
itemMinus: function itemMinus() {
|
|
452
|
+
return vue.createVNode(elementPlus.ElButton, props.minusButtonProps, {
|
|
453
|
+
"default": function _default() {
|
|
454
|
+
return [props.minusButtonText];
|
|
720
455
|
}
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
* 添加 和 修改 时候的确定按钮
|
|
730
|
-
*/
|
|
731
|
-
|
|
732
|
-
var OkButton = vue.defineComponent({
|
|
733
|
-
props: _objectSpread2({}, elementPlus.ElButton.props),
|
|
734
|
-
setup: function setup(props, _ref) {
|
|
735
|
-
var slots = _ref.slots;
|
|
736
|
-
|
|
737
|
-
var _useProCurd = pro.useProCurd(),
|
|
738
|
-
curdState = _useProCurd.curdState;
|
|
739
|
-
|
|
740
|
-
return function () {
|
|
741
|
-
return vue.createVNode(ProSubmitButton, vue.mergeProps({
|
|
742
|
-
"onClick": function onClick() {
|
|
743
|
-
curdState.addAction = pro.CurdAddAction.NORMAL;
|
|
744
|
-
}
|
|
745
|
-
}, props, {
|
|
746
|
-
"loading": curdState.operateLoading
|
|
747
|
-
}), {
|
|
748
|
-
"default": function _default() {
|
|
749
|
-
return [slots["default"] ? slots["default"]() : "确定"];
|
|
750
|
-
}
|
|
751
|
-
});
|
|
752
|
-
};
|
|
753
|
-
}
|
|
754
|
-
});
|
|
755
|
-
/**
|
|
756
|
-
* 添加 时候的 确定并继续添加按钮
|
|
757
|
-
*/
|
|
758
|
-
|
|
759
|
-
var ContinueAddButton = vue.defineComponent({
|
|
760
|
-
props: _objectSpread2({}, elementPlus.ElButton.props),
|
|
761
|
-
setup: function setup(props, _ref2) {
|
|
762
|
-
var slots = _ref2.slots;
|
|
763
|
-
|
|
764
|
-
var _useProCurd2 = pro.useProCurd(),
|
|
765
|
-
curdState = _useProCurd2.curdState;
|
|
766
|
-
|
|
767
|
-
return function () {
|
|
768
|
-
return vue.createVNode(ProSubmitButton, vue.mergeProps({
|
|
769
|
-
"onClick": function onClick() {
|
|
770
|
-
curdState.addAction = pro.CurdAddAction.CONTINUE;
|
|
771
|
-
}
|
|
772
|
-
}, props, {
|
|
773
|
-
"loading": curdState.operateLoading
|
|
774
|
-
}), {
|
|
775
|
-
"default": function _default() {
|
|
776
|
-
return [slots["default"] ? slots["default"]() : "确定并继续"];
|
|
456
|
+
});
|
|
457
|
+
},
|
|
458
|
+
add: function add() {
|
|
459
|
+
return vue.createVNode(elementPlus.ElButton, props.addButtonProps, {
|
|
460
|
+
"default": function _default() {
|
|
461
|
+
return [props.addButtonText];
|
|
462
|
+
}
|
|
463
|
+
});
|
|
777
464
|
}
|
|
778
|
-
});
|
|
465
|
+
}, slots));
|
|
779
466
|
};
|
|
780
467
|
}
|
|
781
468
|
});
|
|
782
469
|
|
|
783
|
-
var
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
type:
|
|
788
|
-
"default": false
|
|
789
|
-
},
|
|
790
|
-
//
|
|
791
|
-
okText: {
|
|
792
|
-
type: String,
|
|
793
|
-
"default": "确定"
|
|
794
|
-
},
|
|
795
|
-
okButtonProps: {
|
|
796
|
-
type: Object
|
|
470
|
+
var TableMethods = ["clearSelection", "getSelectionRows", "toggleRowSelection", "toggleAllSelection", "toggleRowExpansion", "setCurrentRow", "clearSort", "clearFilter", "doLayout", "sort", "scrollTo", "setScrollTop", "setScrollLeft"];
|
|
471
|
+
var Table = vue.defineComponent({
|
|
472
|
+
props: _objectSpread2(_objectSpread2({}, elementPlus.ElTable.props), {}, {
|
|
473
|
+
columns: {
|
|
474
|
+
type: Array
|
|
797
475
|
},
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
type: String,
|
|
801
|
-
"default": "确定并继续"
|
|
476
|
+
dataSource: {
|
|
477
|
+
type: Array
|
|
802
478
|
},
|
|
803
|
-
|
|
804
|
-
type:
|
|
479
|
+
loading: {
|
|
480
|
+
type: Boolean
|
|
805
481
|
}
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
var _useProCurd3 = pro.useProCurd(),
|
|
815
|
-
curdState = _useProCurd3.curdState;
|
|
816
|
-
|
|
482
|
+
}),
|
|
483
|
+
setup: function setup(props, _ref) {
|
|
484
|
+
var slots = _ref.slots,
|
|
485
|
+
expose = _ref.expose;
|
|
486
|
+
var tableRef = vue.ref();
|
|
487
|
+
var id = createLoadingId("table");
|
|
488
|
+
expose(pro.createExpose(TableMethods, tableRef));
|
|
817
489
|
return function () {
|
|
818
|
-
var _slots$
|
|
490
|
+
var _slots$start, _slots$default;
|
|
819
491
|
|
|
820
|
-
return vue.createVNode(
|
|
821
|
-
"
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
}), (_slots$center = slots.center) === null || _slots$center === void 0 ? void 0 : _slots$center.call(slots), curdState.mode === pro.CurdCurrentMode.ADD && props.showContinueAdd && vue.createVNode(ContinueAddButton, props.continueButtonProps, {
|
|
492
|
+
return vue.createVNode(elementPlus.ElTable, vue.mergeProps({
|
|
493
|
+
"ref": tableRef,
|
|
494
|
+
"id": id
|
|
495
|
+
}, lodash.omit(props, "columns", "dataSource", "loading"), {
|
|
496
|
+
"data": props.dataSource || props.data
|
|
497
|
+
}), _objectSpread2({
|
|
827
498
|
"default": function _default() {
|
|
828
|
-
return [props.
|
|
499
|
+
return [(_slots$start = slots.start) === null || _slots$start === void 0 ? void 0 : _slots$start.call(slots), lodash.map(props.columns, function (item) {
|
|
500
|
+
return vue.createVNode(elementPlus.ElTableColumn, vue.mergeProps({
|
|
501
|
+
"key": item.dataIndex
|
|
502
|
+
}, lodash.omit(item, "title", "label", "renderHeader", "prop", "dataIndex", "formatter", "customRender"), {
|
|
503
|
+
"label": vue.isVNode(item.title) ? undefined : item.title || lodash.get(item, "label"),
|
|
504
|
+
"renderHeader": vue.isVNode(item.title) ? function () {
|
|
505
|
+
return item.title;
|
|
506
|
+
} : undefined,
|
|
507
|
+
"prop": item.dataIndex,
|
|
508
|
+
"formatter": function formatter(record, column, value, index) {
|
|
509
|
+
if (item.customRender) {
|
|
510
|
+
return item.customRender({
|
|
511
|
+
value: value,
|
|
512
|
+
text: value,
|
|
513
|
+
record: record,
|
|
514
|
+
column: column,
|
|
515
|
+
index: index
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
return value;
|
|
520
|
+
}
|
|
521
|
+
}), null);
|
|
522
|
+
}), (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots), props.loading && vue.createVNode(ProLoading, {
|
|
523
|
+
"target": id,
|
|
524
|
+
"loading": true
|
|
525
|
+
}, null)];
|
|
829
526
|
}
|
|
830
|
-
}
|
|
527
|
+
}, lodash.omit(slots, "default", "start")));
|
|
831
528
|
};
|
|
832
529
|
}
|
|
833
530
|
});
|
|
531
|
+
var ProTable = pro.createTable(Table, undefined, TableMethods);
|
|
834
532
|
|
|
835
|
-
var
|
|
533
|
+
var ProCurdForm = pro.createCurdForm(ProForm, elementPlus.ElButton, function (curdState) {
|
|
836
534
|
return {
|
|
837
|
-
|
|
838
|
-
operateButtonProps: {
|
|
839
|
-
type: Object
|
|
840
|
-
}
|
|
535
|
+
hideRequiredAsterisk: curdState.mode === pro.CurdCurrentMode.DETAIL
|
|
841
536
|
};
|
|
842
|
-
};
|
|
843
|
-
|
|
844
|
-
var ProCurdForm = vue.defineComponent({
|
|
845
|
-
props: _objectSpread2(_objectSpread2({}, ProForm.props), proCurdFormProps()),
|
|
846
|
-
setup: function setup(props, _ref4) {
|
|
847
|
-
var slots = _ref4.slots;
|
|
848
|
-
|
|
849
|
-
var _useProModule = pro.useProModule(),
|
|
850
|
-
elementMap = _useProModule.elementMap,
|
|
851
|
-
formElementMap = _useProModule.formElementMap;
|
|
852
|
-
|
|
853
|
-
var _useProCurd4 = pro.useProCurd(),
|
|
854
|
-
curdState = _useProCurd4.curdState,
|
|
855
|
-
formColumns = _useProCurd4.formColumns,
|
|
856
|
-
sendCurdEvent = _useProCurd4.sendCurdEvent;
|
|
857
|
-
|
|
858
|
-
var handleFinish = function handleFinish(values) {
|
|
859
|
-
if (curdState.mode === pro.CurdCurrentMode.EDIT) {
|
|
860
|
-
//edit
|
|
861
|
-
sendCurdEvent({
|
|
862
|
-
action: pro.CurdAction.EDIT,
|
|
863
|
-
type: pro.CurdSubAction.EXECUTE,
|
|
864
|
-
values: values
|
|
865
|
-
});
|
|
866
|
-
} else {
|
|
867
|
-
//add
|
|
868
|
-
sendCurdEvent({
|
|
869
|
-
action: pro.CurdAction.ADD,
|
|
870
|
-
type: pro.CurdSubAction.EXECUTE,
|
|
871
|
-
values: values
|
|
872
|
-
});
|
|
873
|
-
}
|
|
874
|
-
};
|
|
875
|
-
|
|
876
|
-
return function () {
|
|
877
|
-
var _slots$default;
|
|
878
|
-
|
|
879
|
-
return vue.createVNode(ProForm, vue.mergeProps(lodash.omit(props, "elementMap", "formElementMap"), {
|
|
880
|
-
"elementMap": props.elementMap || elementMap,
|
|
881
|
-
"formElementMap": props.formElementMap || formElementMap,
|
|
882
|
-
"columns": formColumns.value,
|
|
883
|
-
"model": curdState.detailData,
|
|
884
|
-
"readonly": curdState.mode === pro.CurdCurrentMode.DETAIL,
|
|
885
|
-
"hideRequiredAsterisk": curdState.mode === pro.CurdCurrentMode.DETAIL,
|
|
886
|
-
"onFinish": handleFinish
|
|
887
|
-
}), _objectSpread2({
|
|
888
|
-
"default": function _default() {
|
|
889
|
-
return [curdState.mode !== pro.CurdCurrentMode.DETAIL && vue.createVNode(ProOperateButton, lodash.omit(props.operateButtonProps, "slots"), lodash.get(props.operateButtonProps, "slots")), (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)];
|
|
890
|
-
}
|
|
891
|
-
}, lodash.omit(slots, "default")));
|
|
892
|
-
};
|
|
893
|
-
}
|
|
894
|
-
});
|
|
537
|
+
}, FormMethods);
|
|
895
538
|
var ProCurdFormConnect = vue.defineComponent({
|
|
896
539
|
setup: function setup() {
|
|
897
|
-
var
|
|
898
|
-
formProps =
|
|
540
|
+
var _useProCurd = pro.useProCurd(),
|
|
541
|
+
formProps = _useProCurd.formProps;
|
|
899
542
|
|
|
900
543
|
return function () {
|
|
901
544
|
return vue.createVNode(ProCurdForm, lodash.omit(formProps === null || formProps === void 0 ? void 0 : formProps.value, "slots"), lodash.get(formProps === null || formProps === void 0 ? void 0 : formProps.value, "slots"));
|
|
@@ -903,114 +546,45 @@ var ProCurdFormConnect = vue.defineComponent({
|
|
|
903
546
|
}
|
|
904
547
|
});
|
|
905
548
|
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
549
|
+
var CurdList = pro.createCurdList(ProSearchForm, ProTable);
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* 组合列表
|
|
553
|
+
* SearchForm + Table + Pagination
|
|
909
554
|
*/
|
|
910
555
|
var ProCurdList = vue.defineComponent({
|
|
911
|
-
props: _objectSpread2({},
|
|
556
|
+
props: _objectSpread2(_objectSpread2({}, CurdList.props), {}, {
|
|
557
|
+
paginationProps: {
|
|
558
|
+
type: Object
|
|
559
|
+
}
|
|
560
|
+
}),
|
|
912
561
|
setup: function setup(props, _ref) {
|
|
913
562
|
var slots = _ref.slots;
|
|
914
|
-
|
|
915
|
-
var _useProModule = pro.useProModule(),
|
|
916
|
-
elementMap = _useProModule.elementMap,
|
|
917
|
-
formElementMap = _useProModule.formElementMap;
|
|
918
|
-
|
|
919
|
-
var _useProCurd = pro.useProCurd(),
|
|
920
|
-
curdState = _useProCurd.curdState,
|
|
921
|
-
searchColumns = _useProCurd.searchColumns,
|
|
922
|
-
tableColumns = _useProCurd.tableColumns,
|
|
923
|
-
getOperate = _useProCurd.getOperate,
|
|
924
|
-
sendCurdEvent = _useProCurd.sendCurdEvent;
|
|
925
|
-
/******************* table ********************/
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
var prepareTableItem = function prepareTableItem(action) {
|
|
929
|
-
var item = getOperate(action);
|
|
930
|
-
return _objectSpread2(_objectSpread2({}, lodash.pick(item, "label", "element", "disabled", "sort")), {}, {
|
|
931
|
-
show: !lodash.isUndefined(item === null || item === void 0 ? void 0 : item.show) ? item === null || item === void 0 ? void 0 : item.show : false,
|
|
932
|
-
onClick: function onClick(record) {
|
|
933
|
-
if (item !== null && item !== void 0 && item.onClick) {
|
|
934
|
-
item.onClick(record);
|
|
935
|
-
return;
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
sendCurdEvent({
|
|
939
|
-
action: action,
|
|
940
|
-
type: pro.CurdSubAction.EMIT,
|
|
941
|
-
record: record
|
|
942
|
-
});
|
|
943
|
-
},
|
|
944
|
-
value: action
|
|
945
|
-
});
|
|
946
|
-
}; //table操作栏 items
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
var tableOperateItems = [prepareTableItem(pro.CurdAction.DETAIL), prepareTableItem(pro.CurdAction.EDIT), prepareTableItem(pro.CurdAction.DELETE)];
|
|
950
563
|
return function () {
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
"searchProps": _objectSpread2(_objectSpread2({
|
|
965
|
-
formElementMap: formElementMap
|
|
966
|
-
}, props.searchProps), {}, {
|
|
967
|
-
columns: searchColumns.value
|
|
968
|
-
}),
|
|
969
|
-
"tableProps": _objectSpread2(_objectSpread2({
|
|
970
|
-
elementMap: elementMap
|
|
971
|
-
}, tableProps), {}, {
|
|
972
|
-
operate: lodash.mergeWith({
|
|
973
|
-
items: tableOperateItems
|
|
974
|
-
}, tableProps === null || tableProps === void 0 ? void 0 : tableProps.operate, function (objValue, srcValue) {
|
|
975
|
-
if (lodash.isArray(objValue)) {
|
|
976
|
-
if (lodash.isArray(srcValue)) {
|
|
977
|
-
//合并
|
|
978
|
-
return lodash.concat(objValue, lodash.map(srcValue, function (item) {
|
|
979
|
-
var nextItem = _objectSpread2({}, item);
|
|
980
|
-
|
|
981
|
-
if (!item.onClick) {
|
|
982
|
-
nextItem.onClick = function (record) {
|
|
983
|
-
sendCurdEvent({
|
|
984
|
-
action: "operate",
|
|
985
|
-
type: item.value,
|
|
986
|
-
record: record
|
|
987
|
-
});
|
|
988
|
-
};
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
return nextItem;
|
|
992
|
-
}));
|
|
993
|
-
} else {
|
|
994
|
-
//使用curd默认
|
|
995
|
-
return objValue;
|
|
996
|
-
}
|
|
564
|
+
return vue.createVNode(CurdList, lodash.omit(props, "paginationProps"), _objectSpread2({
|
|
565
|
+
pagination: function pagination(pageState, total, handleSearch) {
|
|
566
|
+
return vue.createVNode(elementPlus.ElPagination, vue.mergeProps(props.paginationProps, {
|
|
567
|
+
"total": total,
|
|
568
|
+
"currentPage": pageState.page,
|
|
569
|
+
"pageSize": pageState.pageSize,
|
|
570
|
+
"onSizeChange": function onSizeChange(pageSize) {
|
|
571
|
+
pageState.pageSize = pageSize;
|
|
572
|
+
handleSearch();
|
|
573
|
+
},
|
|
574
|
+
"onCurrentChange": function onCurrentChange(current) {
|
|
575
|
+
pageState.page = current;
|
|
576
|
+
handleSearch();
|
|
997
577
|
}
|
|
998
|
-
}),
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
data: (_curdState$listData = curdState.listData) === null || _curdState$listData === void 0 ? void 0 : _curdState$listData.dataSource
|
|
1002
|
-
}),
|
|
1003
|
-
"paginationProps": _objectSpread2(_objectSpread2({}, paginationProps), {}, {
|
|
1004
|
-
total: (_curdState$listData2 = curdState.listData) === null || _curdState$listData2 === void 0 ? void 0 : _curdState$listData2.total
|
|
1005
|
-
})
|
|
1006
|
-
}), slots);
|
|
578
|
+
}), null);
|
|
579
|
+
}
|
|
580
|
+
}, slots));
|
|
1007
581
|
};
|
|
1008
582
|
}
|
|
1009
583
|
});
|
|
1010
584
|
var ProCurdListConnect = vue.defineComponent({
|
|
1011
585
|
setup: function setup() {
|
|
1012
|
-
var
|
|
1013
|
-
listProps =
|
|
586
|
+
var _useProCurd = pro.useProCurd(),
|
|
587
|
+
listProps = _useProCurd.listProps;
|
|
1014
588
|
|
|
1015
589
|
return function () {
|
|
1016
590
|
return vue.createVNode(ProCurdList, lodash.omit(listProps === null || listProps === void 0 ? void 0 : listProps.value, "slots"), lodash.get(listProps === null || listProps === void 0 ? void 0 : listProps.value, "slots"));
|
|
@@ -1018,53 +592,14 @@ var ProCurdListConnect = vue.defineComponent({
|
|
|
1018
592
|
}
|
|
1019
593
|
});
|
|
1020
594
|
|
|
1021
|
-
|
|
1022
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
var ProCurdDesc = vue.defineComponent({
|
|
1026
|
-
props: _objectSpread2({}, elementPlus.ElDescriptions.props),
|
|
1027
|
-
setup: function setup(props, _ref) {
|
|
1028
|
-
var slots = _ref.slots;
|
|
1029
|
-
|
|
1030
|
-
var _useProModule = pro.useProModule(),
|
|
1031
|
-
getItemVNode = _useProModule.getItemVNode;
|
|
1032
|
-
|
|
1033
|
-
var _useProCurd = pro.useProCurd(),
|
|
1034
|
-
curdState = _useProCurd.curdState,
|
|
1035
|
-
descColumns = _useProCurd.descColumns;
|
|
1036
|
-
|
|
1037
|
-
var descVNodes = vue.computed(function () {
|
|
1038
|
-
return lodash.map(descColumns.value, function (item) {
|
|
1039
|
-
var _slot;
|
|
1040
|
-
|
|
1041
|
-
var value = lodash.get(curdState.detailData, item.dataIndex);
|
|
1042
|
-
return vue.createVNode(elementPlus.ElDescriptionsItem, vue.mergeProps({
|
|
1043
|
-
"key": item.dataIndex,
|
|
1044
|
-
"label": item.title
|
|
1045
|
-
}, lodash.get(item.extra, "desc")), _isSlot(_slot = getItemVNode(item, value)) ? _slot : {
|
|
1046
|
-
"default": function _default() {
|
|
1047
|
-
return [_slot];
|
|
1048
|
-
}
|
|
1049
|
-
});
|
|
1050
|
-
});
|
|
1051
|
-
});
|
|
1052
|
-
return function () {
|
|
1053
|
-
return vue.createVNode(elementPlus.ElDescriptions, props, _objectSpread2({
|
|
1054
|
-
"default": function _default() {
|
|
1055
|
-
return descVNodes.value;
|
|
1056
|
-
}
|
|
1057
|
-
}, lodash.omit(slots, "default")));
|
|
1058
|
-
};
|
|
1059
|
-
}
|
|
1060
|
-
});
|
|
595
|
+
var ProCurdDesc = pro.createCurdDesc(elementPlus.ElDescriptions, elementPlus.ElDescriptionsItem);
|
|
1061
596
|
var ProCurdDescConnect = vue.defineComponent({
|
|
1062
597
|
setup: function setup() {
|
|
1063
|
-
var
|
|
1064
|
-
descProps =
|
|
598
|
+
var _useProCurd = pro.useProCurd(),
|
|
599
|
+
descProps = _useProCurd.descProps;
|
|
1065
600
|
|
|
1066
601
|
return function () {
|
|
1067
|
-
return vue.createVNode(
|
|
602
|
+
return vue.createVNode(ProCurdDesc, lodash.omit(descProps === null || descProps === void 0 ? void 0 : descProps.value, "slots"), lodash.get(descProps === null || descProps === void 0 ? void 0 : descProps.value, "slots"));
|
|
1068
603
|
};
|
|
1069
604
|
}
|
|
1070
605
|
});
|
|
@@ -1126,8 +661,7 @@ var ProCurdModalConnect = vue.defineComponent({
|
|
|
1126
661
|
}
|
|
1127
662
|
});
|
|
1128
663
|
|
|
1129
|
-
exports.
|
|
1130
|
-
exports.OkButton = OkButton;
|
|
664
|
+
exports.FormMethods = FormMethods;
|
|
1131
665
|
exports.ProCurdDesc = ProCurdDesc;
|
|
1132
666
|
exports.ProCurdDescConnect = ProCurdDescConnect;
|
|
1133
667
|
exports.ProCurdForm = ProCurdForm;
|
|
@@ -1150,13 +684,12 @@ exports.ProFormTextNumber = ProFormTextNumber;
|
|
|
1150
684
|
exports.ProFormTimePicker = ProFormTimePicker;
|
|
1151
685
|
exports.ProFormTreeSelect = ProFormTreeSelect;
|
|
1152
686
|
exports.ProGrid = ProGrid;
|
|
1153
|
-
exports.ProList = ProList;
|
|
1154
687
|
exports.ProLoading = ProLoading;
|
|
1155
|
-
exports.
|
|
688
|
+
exports.ProRadio = ProRadio;
|
|
1156
689
|
exports.ProSearchForm = ProSearchForm;
|
|
1157
690
|
exports.ProSelect = ProSelect;
|
|
1158
691
|
exports.ProSubmitButton = ProSubmitButton;
|
|
1159
692
|
exports.ProTable = ProTable;
|
|
693
|
+
exports.TableMethods = TableMethods;
|
|
1160
694
|
exports.createFormItemComponent = createFormItemComponent;
|
|
1161
695
|
exports.createLoadingId = createLoadingId;
|
|
1162
|
-
exports.defaultPage = defaultPage;
|