@vue-start/pro 0.3.2 → 0.4.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/CHANGELOG.md +15 -0
- package/dist/index.d.ts +106 -71
- package/dist/index.es.js +693 -437
- package/dist/index.js +695 -434
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, createVNode, mergeProps, isVNode, computed,
|
|
2
|
-
import { map, isString, forEach,
|
|
1
|
+
import { defineComponent, createVNode, mergeProps, isVNode, computed, h, inject, reactive, Fragment, provide, ref } from 'vue';
|
|
2
|
+
import { map, isString, forEach, reduce, size, get, set, pick, omit, isArray, some, keys, isFunction, head, isObject, findIndex, find, filter as filter$1, split, isEmpty, mergeWith, sortBy, concat, isUndefined, debounce, clone, isBoolean } from 'lodash';
|
|
3
3
|
import { filter, tap, merge, Subject } from 'rxjs';
|
|
4
4
|
import { useEffect, setReactiveValue, useWatch } from '@vue-start/hooks';
|
|
5
5
|
import { useRequestProvide, isFailedRequestActor, isPreRequestActor, isDoneRequestActor } from '@vue-start/request';
|
|
@@ -195,186 +195,12 @@ var useComposeRequestActor = function useComposeRequestActor(actors, options, ca
|
|
|
195
195
|
}, []);
|
|
196
196
|
};
|
|
197
197
|
|
|
198
|
-
|
|
199
|
-
children: "children",
|
|
200
|
-
label: "label",
|
|
201
|
-
value: "value"
|
|
202
|
-
};
|
|
203
|
-
/**
|
|
204
|
-
* 根据value从treeData中找到对象
|
|
205
|
-
* @param data
|
|
206
|
-
* @param value
|
|
207
|
-
* @param fieldNames
|
|
208
|
-
* @param cb 对象:同步 方法:回调,可以理解为异步
|
|
209
|
-
*/
|
|
210
|
-
|
|
211
|
-
var findTargetInTree = function findTargetInTree(data, value, fieldNames, cb) {
|
|
212
|
-
var index = findIndex(data, function (item) {
|
|
213
|
-
return get(item, (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value) || treeDefaultNames.value) === value;
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
if (index > -1) {
|
|
217
|
-
if (isFunction(cb)) {
|
|
218
|
-
cb(index, data[index], data);
|
|
219
|
-
} else {
|
|
220
|
-
cb.index = index;
|
|
221
|
-
cb.target = data[index];
|
|
222
|
-
cb.list = data;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
forEach(data, function (item) {
|
|
229
|
-
var children = get(item, (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || treeDefaultNames.children);
|
|
230
|
-
|
|
231
|
-
if (size(children) > 0) {
|
|
232
|
-
findTargetInTree(children, value, fieldNames, cb);
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
};
|
|
236
|
-
/**
|
|
237
|
-
* 根据value从treeData中找出对象及父列表
|
|
238
|
-
* @param data
|
|
239
|
-
* @param value
|
|
240
|
-
* @param fieldNames
|
|
241
|
-
* @param cb
|
|
242
|
-
* @param parent
|
|
243
|
-
*/
|
|
244
|
-
|
|
245
|
-
var findTargetListInTree = function findTargetListInTree(data, value, fieldNames, cb) {
|
|
246
|
-
var parent = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
|
|
247
|
-
var target = find(data, function (item) {
|
|
248
|
-
return get(item, (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value) || treeDefaultNames.value) === value;
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
if (target) {
|
|
252
|
-
if (isFunction(cb)) {
|
|
253
|
-
cb([].concat(_toConsumableArray(parent), [target]));
|
|
254
|
-
} else {
|
|
255
|
-
cb.list = [].concat(_toConsumableArray(parent), [target]);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
return;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
forEach(data, function (item) {
|
|
262
|
-
var children = get(item, (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || treeDefaultNames.children);
|
|
263
|
-
|
|
264
|
-
if (size(children) > 0) {
|
|
265
|
-
findTargetListInTree(children, value, fieldNames, cb, [].concat(_toConsumableArray(parent), [item]));
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* 剔除showState或showStateRules规则为!true的值
|
|
272
|
-
* @param values
|
|
273
|
-
* @param showState
|
|
274
|
-
* @param showStateRules
|
|
275
|
-
*/
|
|
276
|
-
|
|
277
|
-
var getValidValues = function getValidValues(values, showState, showStateRules) {
|
|
278
|
-
if (showState) {
|
|
279
|
-
var invalidKeys = filter$1(keys(showState), function (key) {
|
|
280
|
-
return !showState[key];
|
|
281
|
-
});
|
|
282
|
-
return omit(values, invalidKeys);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
if (showStateRules) {
|
|
286
|
-
var _invalidKeys = filter$1(keys(showStateRules), function (key) {
|
|
287
|
-
return !showStateRules[key](values);
|
|
288
|
-
});
|
|
289
|
-
|
|
290
|
-
return omit(values, _invalidKeys);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
return values;
|
|
294
|
-
};
|
|
295
|
-
/**
|
|
296
|
-
* string类型的path转为arr
|
|
297
|
-
* @param path
|
|
298
|
-
*/
|
|
299
|
-
|
|
300
|
-
var convertPathToList = function convertPathToList(path) {
|
|
301
|
-
if (!path) {
|
|
302
|
-
return undefined;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
if (isArray(path)) {
|
|
306
|
-
return path;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
if (path && isString(path) && path.indexOf(".") > 0) {
|
|
310
|
-
return split(path, ".");
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
return [path];
|
|
314
|
-
};
|
|
315
|
-
/**
|
|
316
|
-
* 将listState 中的数据通过id merge到 list item中
|
|
317
|
-
* ps:数组会替换
|
|
318
|
-
* 注意:mergeWith 会改变原始对象
|
|
319
|
-
* @param list
|
|
320
|
-
* @param listState
|
|
321
|
-
* @param id
|
|
322
|
-
*/
|
|
323
|
-
|
|
324
|
-
var mergeStateToList = function mergeStateToList(list, listState, id) {
|
|
325
|
-
if (!listState || !id) {
|
|
326
|
-
return list;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
return map(list, function (item) {
|
|
330
|
-
var idName = isFunction(id) ? id(item) : id; //如果listState中有值,merge处理
|
|
331
|
-
|
|
332
|
-
var stateData = get(listState, idName);
|
|
333
|
-
|
|
334
|
-
if (!stateData || isEmpty(stateData) || isFunction(stateData) || !isObject(stateData)) {
|
|
335
|
-
return item;
|
|
336
|
-
} //只有是对象(键值对)才合并
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
return mergeWith(item, stateData, function (objValue, srcValue) {
|
|
340
|
-
//如果是数组,替换
|
|
341
|
-
if (isArray(objValue) || isArray(srcValue)) {
|
|
342
|
-
return srcValue;
|
|
343
|
-
}
|
|
344
|
-
});
|
|
345
|
-
});
|
|
346
|
-
};
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* 唯一id
|
|
350
|
-
*/
|
|
351
|
-
|
|
352
|
-
var generateId = function generateId() {
|
|
353
|
-
return Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36);
|
|
354
|
-
};
|
|
355
|
-
/**
|
|
356
|
-
* ref 传递
|
|
357
|
-
*/
|
|
358
|
-
|
|
359
|
-
var createExpose = function createExpose(methods, targetRef) {
|
|
360
|
-
return reduce(methods, function (pair, method) {
|
|
361
|
-
return _objectSpread2(_objectSpread2({}, pair), {}, _defineProperty({}, method, function () {
|
|
362
|
-
var _targetRef$value, _targetRef$value$meth;
|
|
363
|
-
|
|
364
|
-
for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
365
|
-
params[_key] = arguments[_key];
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
return (_targetRef$value = targetRef.value) === null || _targetRef$value === void 0 ? void 0 : (_targetRef$value$meth = _targetRef$value[method]) === null || _targetRef$value$meth === void 0 ? void 0 : _targetRef$value$meth.call.apply(_targetRef$value$meth, [_targetRef$value].concat(params));
|
|
369
|
-
}));
|
|
370
|
-
}, {});
|
|
371
|
-
};
|
|
198
|
+
/***************************************** curd模式 *****************************************/
|
|
372
199
|
|
|
373
200
|
/**
|
|
374
201
|
* 获取Column的valueType,默认"text"
|
|
375
202
|
* @param column
|
|
376
203
|
*/
|
|
377
|
-
|
|
378
204
|
var getColumnValueType = function getColumnValueType(column) {
|
|
379
205
|
return column.formValueType || column.valueType || "text";
|
|
380
206
|
};
|
|
@@ -440,6 +266,213 @@ var getItemEl = function getItemEl(elementMap, column, value) {
|
|
|
440
266
|
value: value
|
|
441
267
|
}), (_column$formFieldProp2 = column.formFieldProps) === null || _column$formFieldProp2 === void 0 ? void 0 : _column$formFieldProp2.slots);
|
|
442
268
|
};
|
|
269
|
+
/***************************************** 通用模式 *****************************************/
|
|
270
|
+
|
|
271
|
+
var renderElements = function renderElements(elementMap, elementConfigs) {
|
|
272
|
+
return map(elementConfigs, function (elementConfig) {
|
|
273
|
+
return renderElement(elementMap, elementConfig);
|
|
274
|
+
});
|
|
275
|
+
};
|
|
276
|
+
/**
|
|
277
|
+
* props转换
|
|
278
|
+
*/
|
|
279
|
+
|
|
280
|
+
var convertPropsEl = function convertPropsEl(elementMap, elementConfig) {
|
|
281
|
+
var _elementConfig$highCo;
|
|
282
|
+
|
|
283
|
+
var elementProps = elementConfig.elementProps;
|
|
284
|
+
|
|
285
|
+
var nextProps = _objectSpread2({}, elementConfig.elementProps);
|
|
286
|
+
|
|
287
|
+
forEach((_elementConfig$highCo = elementConfig.highConfig$) === null || _elementConfig$highCo === void 0 ? void 0 : _elementConfig$highCo.registerPropsTrans, function (item) {
|
|
288
|
+
var target = get(elementProps, item.name);
|
|
289
|
+
|
|
290
|
+
if (!target || isVNode(target)) {
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
if (isArray(target)) {
|
|
295
|
+
//如果list中存在VNode,不转换
|
|
296
|
+
if (some(target, function (sub) {
|
|
297
|
+
return isVNode(sub);
|
|
298
|
+
})) {
|
|
299
|
+
return;
|
|
300
|
+
} //如果碰到特殊场景,可以替换成单个渲染模式
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
set(nextProps, item.name, renderElements(elementMap, target));
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
if (!target.elementType) {
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if (item.isFun) {
|
|
312
|
+
set(nextProps, item.name, function () {
|
|
313
|
+
for (var _len = arguments.length, params$ = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
314
|
+
params$[_key] = arguments[_key];
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
var ep = item.needParams ? _objectSpread2(_objectSpread2({}, target.elementProps), {}, {
|
|
318
|
+
params$: params$
|
|
319
|
+
}) : target.elementProps;
|
|
320
|
+
return renderElement(elementMap, _objectSpread2(_objectSpread2({}, target), {}, {
|
|
321
|
+
elementProps: ep
|
|
322
|
+
}));
|
|
323
|
+
});
|
|
324
|
+
} else {
|
|
325
|
+
set(nextProps, item.name, renderElement(elementMap, target));
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
return nextProps;
|
|
329
|
+
};
|
|
330
|
+
/**
|
|
331
|
+
* slots转换
|
|
332
|
+
*/
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
var convertSlots = function convertSlots(elementMap, elementConfig) {
|
|
336
|
+
var children = size(elementConfig.children) > 0 ? renderElements(elementMap, elementConfig.children) : undefined; //children插槽名称
|
|
337
|
+
|
|
338
|
+
var childrenSlotName = elementConfig.childrenSlotName || "default";
|
|
339
|
+
var validSlots = omit(elementConfig.slots, children ? childrenSlotName : ""); //如果slots注册的是 IElementConfig ,进行转换
|
|
340
|
+
|
|
341
|
+
forEach(keys(validSlots), function (k) {
|
|
342
|
+
var v = validSlots[k]; //IElementConfig
|
|
343
|
+
|
|
344
|
+
if (v && !isFunction(v) && v.elementType) {
|
|
345
|
+
validSlots[k] = function () {
|
|
346
|
+
for (var _len2 = arguments.length, params$ = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
347
|
+
params$[_key2] = arguments[_key2];
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
//如果需要params,在props中注入 params$
|
|
351
|
+
var elementProps = v.needParams ? _objectSpread2(_objectSpread2({}, v.elementProps), {}, {
|
|
352
|
+
params$: params$
|
|
353
|
+
}) : v.elementProps;
|
|
354
|
+
return renderElement(elementMap, _objectSpread2(_objectSpread2({}, v), {}, {
|
|
355
|
+
elementProps: elementProps
|
|
356
|
+
}));
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
return _objectSpread2(_defineProperty({}, childrenSlotName, children ? function () {
|
|
361
|
+
return children;
|
|
362
|
+
} : undefined), validSlots);
|
|
363
|
+
};
|
|
364
|
+
/**
|
|
365
|
+
*
|
|
366
|
+
* @param elementMap
|
|
367
|
+
* @param elementConfig
|
|
368
|
+
*/
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
var renderElement = function renderElement(elementMap, elementConfig) {
|
|
372
|
+
var El = get(elementMap, elementConfig.elementType) || elementConfig.elementType; //如果有highConfig$,包裹一层Wrapper
|
|
373
|
+
|
|
374
|
+
if (elementConfig.highConfig$) {
|
|
375
|
+
return h(Wrapper, {
|
|
376
|
+
key: elementConfig.elementId,
|
|
377
|
+
elementMap: elementMap,
|
|
378
|
+
elementConfig: elementConfig
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
var slots = convertSlots(elementMap, elementConfig);
|
|
383
|
+
var elementProps = convertPropsEl(elementMap, elementConfig);
|
|
384
|
+
return h(El, _objectSpread2({
|
|
385
|
+
key: elementConfig.elementId
|
|
386
|
+
}, elementProps), slots);
|
|
387
|
+
};
|
|
388
|
+
/**
|
|
389
|
+
* 获取第一层级属性名
|
|
390
|
+
* 如:['aaa','bbb',...] 中的 'aaa'
|
|
391
|
+
* 如:"aaa.bbb.ccc..." 中的 'aaa'
|
|
392
|
+
*/
|
|
393
|
+
|
|
394
|
+
var getFirstPropName = function getFirstPropName(name) {
|
|
395
|
+
if (isArray(name)) {
|
|
396
|
+
return head(name);
|
|
397
|
+
} else if (isString(name) && name.indexOf(".") > 0) {
|
|
398
|
+
return name.substring(0, name.indexOf("."));
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
return name;
|
|
402
|
+
};
|
|
403
|
+
/**
|
|
404
|
+
* 处理highConfig$
|
|
405
|
+
*/
|
|
406
|
+
|
|
407
|
+
var Wrapper = defineComponent({
|
|
408
|
+
props: {
|
|
409
|
+
elementMap: {
|
|
410
|
+
type: Object
|
|
411
|
+
},
|
|
412
|
+
elementConfig: {
|
|
413
|
+
type: Object
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
setup: function setup(props) {
|
|
417
|
+
var _useProModule = useProModule(),
|
|
418
|
+
state = _useProModule.state,
|
|
419
|
+
sendEvent = _useProModule.sendEvent;
|
|
420
|
+
|
|
421
|
+
var elementMap = props.elementMap,
|
|
422
|
+
elementConfig = props.elementConfig;
|
|
423
|
+
var highConfig$ = elementConfig.highConfig$; //转换props
|
|
424
|
+
|
|
425
|
+
var elementProps = convertPropsEl(elementMap, elementConfig); //事件订阅
|
|
426
|
+
|
|
427
|
+
var events = reduce(highConfig$.registerEventList, function (pair, item) {
|
|
428
|
+
return _objectSpread2(_objectSpread2({}, pair), {}, _defineProperty({}, item.name, function () {
|
|
429
|
+
for (var _len3 = arguments.length, params = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
430
|
+
params[_key3] = arguments[_key3];
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
sendEvent({
|
|
434
|
+
type: item.sendEventName || elementConfig.elementId,
|
|
435
|
+
payload: params
|
|
436
|
+
});
|
|
437
|
+
}));
|
|
438
|
+
}, {}); //receiveStateList 订阅
|
|
439
|
+
|
|
440
|
+
var receiveStates = computed(function () {
|
|
441
|
+
if (!highConfig$.registerStateList || size(highConfig$.registerStateList) <= 0) {
|
|
442
|
+
return undefined;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
var changeProps = _objectSpread2({}, elementProps); //赋值 && 返回一级属性名称
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
var firstPropNameList = map(highConfig$.registerStateList, function (item) {
|
|
449
|
+
var targetName = item.mapName || item.name; //从state中取值
|
|
450
|
+
|
|
451
|
+
var value = get(state, item.name); //赋值
|
|
452
|
+
|
|
453
|
+
set(changeProps, targetName, value); //返回一级属性名称
|
|
454
|
+
|
|
455
|
+
return getFirstPropName(targetName);
|
|
456
|
+
});
|
|
457
|
+
return pick(changeProps, firstPropNameList);
|
|
458
|
+
});
|
|
459
|
+
var El = get(elementMap, elementConfig.elementType) || elementConfig.elementType;
|
|
460
|
+
var slots = convertSlots(elementMap, elementConfig);
|
|
461
|
+
return function () {
|
|
462
|
+
//如果标记show$值为false,不渲染组件
|
|
463
|
+
var show$ = get(receiveStates.value, "show$");
|
|
464
|
+
|
|
465
|
+
if (show$ === false) {
|
|
466
|
+
return null;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
return h(El, _objectSpread2(_objectSpread2(_objectSpread2({
|
|
470
|
+
key: elementConfig.elementId
|
|
471
|
+
}, elementProps), omit(receiveStates.value, "show$")), events), slots);
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
});
|
|
475
|
+
|
|
443
476
|
var ProModuleKey = Symbol("pro-module");
|
|
444
477
|
var useProModule = function useProModule() {
|
|
445
478
|
return inject(ProModuleKey);
|
|
@@ -462,32 +495,17 @@ var proModuleProps = function proModuleProps() {
|
|
|
462
495
|
},
|
|
463
496
|
|
|
464
497
|
/**
|
|
465
|
-
*
|
|
466
|
-
*/
|
|
467
|
-
columns: {
|
|
468
|
-
type: Array
|
|
469
|
-
},
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
* 配置(动态)
|
|
473
|
-
* columns动态属性兼容
|
|
474
|
-
*/
|
|
475
|
-
columnState: {
|
|
476
|
-
type: Object
|
|
477
|
-
},
|
|
478
|
-
|
|
479
|
-
/**
|
|
480
|
-
* 展示组件集
|
|
498
|
+
* 组件集
|
|
481
499
|
*/
|
|
482
500
|
elementMap: {
|
|
483
501
|
type: Object
|
|
484
502
|
},
|
|
485
503
|
|
|
486
504
|
/**
|
|
487
|
-
*
|
|
505
|
+
* 组件描述(树)
|
|
488
506
|
*/
|
|
489
|
-
|
|
490
|
-
type:
|
|
507
|
+
elementConfigs: {
|
|
508
|
+
type: Array
|
|
491
509
|
},
|
|
492
510
|
|
|
493
511
|
/**
|
|
@@ -496,34 +514,22 @@ var proModuleProps = function proModuleProps() {
|
|
|
496
514
|
requests: {
|
|
497
515
|
type: Array
|
|
498
516
|
}
|
|
499
|
-
};
|
|
500
|
-
};
|
|
501
|
-
|
|
502
|
-
var ProModule = defineComponent({
|
|
503
|
-
props: _objectSpread2({}, proModuleProps()),
|
|
504
|
-
setup: function setup(props, _ref) {
|
|
505
|
-
var slots = _ref.slots,
|
|
506
|
-
expose = _ref.expose;
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* columns columnState 合并
|
|
510
|
-
*/
|
|
511
|
-
var columns = computed(function () {
|
|
512
|
-
return mergeStateToList(props.columns, props.columnState, function (item) {
|
|
513
|
-
return getColumnFormItemName(item);
|
|
514
|
-
});
|
|
515
|
-
});
|
|
516
|
-
/*********************************** 渲染组件 ***************************************/
|
|
517
|
-
// 获取FormItem VNode
|
|
518
|
-
|
|
519
|
-
var getFormItemVNode = function getFormItemVNode(column) {
|
|
520
|
-
var needRules = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
521
|
-
return getFormItemEl(props.formElementMap, column, needRules);
|
|
522
|
-
}; // 获取Item VNode
|
|
517
|
+
};
|
|
518
|
+
};
|
|
523
519
|
|
|
520
|
+
var ProModule = defineComponent({
|
|
521
|
+
props: _objectSpread2({}, proModuleProps()),
|
|
522
|
+
setup: function setup(props, _ref) {
|
|
523
|
+
var slots = _ref.slots,
|
|
524
|
+
expose = _ref.expose;
|
|
524
525
|
|
|
525
|
-
|
|
526
|
-
|
|
526
|
+
/*********************************** render ***************************************/
|
|
527
|
+
var render = function render(elementConfig) {
|
|
528
|
+
if (isArray(elementConfig)) {
|
|
529
|
+
return renderElements(props.elementMap, elementConfig);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
return renderElement(props.elementMap, elementConfig);
|
|
527
533
|
};
|
|
528
534
|
/*********************************** 事件处理 ***************************************/
|
|
529
535
|
|
|
@@ -539,13 +545,15 @@ var ProModule = defineComponent({
|
|
|
539
545
|
var state = props.state || reactive({});
|
|
540
546
|
|
|
541
547
|
var dispatch = function dispatch(action) {
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
548
|
+
var prev = state[action.type];
|
|
549
|
+
var data = isFunction(action.payload) ? action.payload(prev) : action.payload; //如果要更新的属性值是 object ,执行覆盖操作
|
|
550
|
+
|
|
551
|
+
if (isObject(prev)) {
|
|
552
|
+
setReactiveValue(state[action.type], data);
|
|
545
553
|
return;
|
|
546
554
|
}
|
|
547
555
|
|
|
548
|
-
state[action.type] =
|
|
556
|
+
state[action.type] = data;
|
|
549
557
|
};
|
|
550
558
|
/*********************************** request ***************************************/
|
|
551
559
|
|
|
@@ -649,11 +657,7 @@ var ProModule = defineComponent({
|
|
|
649
657
|
}
|
|
650
658
|
}, true);
|
|
651
659
|
provideProModule({
|
|
652
|
-
columns: columns,
|
|
653
|
-
getFormItemVNode: getFormItemVNode,
|
|
654
|
-
getItemVNode: getItemVNode,
|
|
655
660
|
elementMap: props.elementMap,
|
|
656
|
-
formElementMap: props.formElementMap,
|
|
657
661
|
//
|
|
658
662
|
subject$: subject$,
|
|
659
663
|
sendEvent: sendEvent,
|
|
@@ -671,7 +675,7 @@ var ProModule = defineComponent({
|
|
|
671
675
|
return function () {
|
|
672
676
|
var _slots$default;
|
|
673
677
|
|
|
674
|
-
return (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots);
|
|
678
|
+
return createVNode(Fragment, null, [size(props.elementConfigs) > 0 && render(props.elementConfigs), (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)]);
|
|
675
679
|
};
|
|
676
680
|
}
|
|
677
681
|
});
|
|
@@ -750,6 +754,181 @@ var CurdAddAction;
|
|
|
750
754
|
CurdAddAction["CONTINUE"] = "CONTINUE";
|
|
751
755
|
})(CurdAddAction || (CurdAddAction = {}));
|
|
752
756
|
|
|
757
|
+
var treeDefaultNames = {
|
|
758
|
+
children: "children",
|
|
759
|
+
label: "label",
|
|
760
|
+
value: "value"
|
|
761
|
+
};
|
|
762
|
+
/**
|
|
763
|
+
* 根据value从treeData中找到对象
|
|
764
|
+
* @param data
|
|
765
|
+
* @param value
|
|
766
|
+
* @param fieldNames
|
|
767
|
+
* @param cb 对象:同步 方法:回调,可以理解为异步
|
|
768
|
+
*/
|
|
769
|
+
|
|
770
|
+
var findTargetInTree = function findTargetInTree(data, value, fieldNames, cb) {
|
|
771
|
+
var index = findIndex(data, function (item) {
|
|
772
|
+
return get(item, (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value) || treeDefaultNames.value) === value;
|
|
773
|
+
});
|
|
774
|
+
|
|
775
|
+
if (index > -1) {
|
|
776
|
+
if (isFunction(cb)) {
|
|
777
|
+
cb(index, data[index], data);
|
|
778
|
+
} else {
|
|
779
|
+
cb.index = index;
|
|
780
|
+
cb.target = data[index];
|
|
781
|
+
cb.list = data;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
return;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
forEach(data, function (item) {
|
|
788
|
+
var children = get(item, (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || treeDefaultNames.children);
|
|
789
|
+
|
|
790
|
+
if (size(children) > 0) {
|
|
791
|
+
findTargetInTree(children, value, fieldNames, cb);
|
|
792
|
+
}
|
|
793
|
+
});
|
|
794
|
+
};
|
|
795
|
+
/**
|
|
796
|
+
* 根据value从treeData中找出对象及父列表
|
|
797
|
+
* @param data
|
|
798
|
+
* @param value
|
|
799
|
+
* @param fieldNames
|
|
800
|
+
* @param cb
|
|
801
|
+
* @param parent
|
|
802
|
+
*/
|
|
803
|
+
|
|
804
|
+
var findTargetListInTree = function findTargetListInTree(data, value, fieldNames, cb) {
|
|
805
|
+
var parent = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
|
|
806
|
+
var target = find(data, function (item) {
|
|
807
|
+
return get(item, (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value) || treeDefaultNames.value) === value;
|
|
808
|
+
});
|
|
809
|
+
|
|
810
|
+
if (target) {
|
|
811
|
+
if (isFunction(cb)) {
|
|
812
|
+
cb([].concat(_toConsumableArray(parent), [target]));
|
|
813
|
+
} else {
|
|
814
|
+
cb.list = [].concat(_toConsumableArray(parent), [target]);
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
return;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
forEach(data, function (item) {
|
|
821
|
+
var children = get(item, (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || treeDefaultNames.children);
|
|
822
|
+
|
|
823
|
+
if (size(children) > 0) {
|
|
824
|
+
findTargetListInTree(children, value, fieldNames, cb, [].concat(_toConsumableArray(parent), [item]));
|
|
825
|
+
}
|
|
826
|
+
});
|
|
827
|
+
};
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* 剔除showState或showStateRules规则为!true的值
|
|
831
|
+
* @param values
|
|
832
|
+
* @param showState
|
|
833
|
+
* @param showStateRules
|
|
834
|
+
*/
|
|
835
|
+
|
|
836
|
+
var getValidValues = function getValidValues(values, showState, showStateRules) {
|
|
837
|
+
if (showState) {
|
|
838
|
+
var invalidKeys = filter$1(keys(showState), function (key) {
|
|
839
|
+
return !showState[key];
|
|
840
|
+
});
|
|
841
|
+
return omit(values, invalidKeys);
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
if (showStateRules) {
|
|
845
|
+
var _invalidKeys = filter$1(keys(showStateRules), function (key) {
|
|
846
|
+
return !showStateRules[key](values);
|
|
847
|
+
});
|
|
848
|
+
|
|
849
|
+
return omit(values, _invalidKeys);
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
return values;
|
|
853
|
+
};
|
|
854
|
+
/**
|
|
855
|
+
* string类型的path转为arr
|
|
856
|
+
* @param path
|
|
857
|
+
*/
|
|
858
|
+
|
|
859
|
+
var convertPathToList = function convertPathToList(path) {
|
|
860
|
+
if (!path) {
|
|
861
|
+
return undefined;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
if (isArray(path)) {
|
|
865
|
+
return path;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
if (path && isString(path) && path.indexOf(".") > 0) {
|
|
869
|
+
return split(path, ".");
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
return [path];
|
|
873
|
+
};
|
|
874
|
+
/**
|
|
875
|
+
* 将listState 中的数据通过id merge到 list item中
|
|
876
|
+
* ps:数组会替换
|
|
877
|
+
* 注意:mergeWith 会改变原始对象
|
|
878
|
+
* @param list
|
|
879
|
+
* @param listState
|
|
880
|
+
* @param id
|
|
881
|
+
*/
|
|
882
|
+
|
|
883
|
+
var mergeStateToList = function mergeStateToList(list, listState, id) {
|
|
884
|
+
if (!listState || !id) {
|
|
885
|
+
return list;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
return map(list, function (item) {
|
|
889
|
+
var idName = isFunction(id) ? id(item) : id; //如果listState中有值,merge处理
|
|
890
|
+
|
|
891
|
+
var stateData = get(listState, idName);
|
|
892
|
+
|
|
893
|
+
if (!stateData || isEmpty(stateData) || isFunction(stateData) || !isObject(stateData)) {
|
|
894
|
+
return item;
|
|
895
|
+
} //只有是对象(键值对)才合并
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
return mergeWith(item, stateData, function (objValue, srcValue) {
|
|
899
|
+
//如果是数组,替换
|
|
900
|
+
if (isArray(objValue) || isArray(srcValue)) {
|
|
901
|
+
return srcValue;
|
|
902
|
+
}
|
|
903
|
+
});
|
|
904
|
+
});
|
|
905
|
+
};
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* 唯一id
|
|
909
|
+
*/
|
|
910
|
+
|
|
911
|
+
var generateId = function generateId() {
|
|
912
|
+
return Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36);
|
|
913
|
+
};
|
|
914
|
+
/**
|
|
915
|
+
* ref 传递
|
|
916
|
+
*/
|
|
917
|
+
|
|
918
|
+
var createExpose = function createExpose(methods, targetRef) {
|
|
919
|
+
return reduce(methods, function (pair, method) {
|
|
920
|
+
return _objectSpread2(_objectSpread2({}, pair), {}, _defineProperty({}, method, function () {
|
|
921
|
+
var _targetRef$value, _targetRef$value$meth;
|
|
922
|
+
|
|
923
|
+
for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
924
|
+
params[_key] = arguments[_key];
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
return (_targetRef$value = targetRef.value) === null || _targetRef$value === void 0 ? void 0 : (_targetRef$value$meth = _targetRef$value[method]) === null || _targetRef$value$meth === void 0 ? void 0 : _targetRef$value$meth.call.apply(_targetRef$value$meth, [_targetRef$value].concat(params));
|
|
928
|
+
}));
|
|
929
|
+
}, {});
|
|
930
|
+
};
|
|
931
|
+
|
|
753
932
|
var defaultPage = {
|
|
754
933
|
page: 1,
|
|
755
934
|
pageSize: 10
|
|
@@ -757,16 +936,38 @@ var defaultPage = {
|
|
|
757
936
|
|
|
758
937
|
var proCurdProps = function proCurdProps() {
|
|
759
938
|
return {
|
|
760
|
-
/**
|
|
761
|
-
*
|
|
939
|
+
/**
|
|
940
|
+
* 配置(静态)
|
|
941
|
+
*/
|
|
942
|
+
columns: {
|
|
943
|
+
type: Array
|
|
944
|
+
},
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* 配置(动态)
|
|
948
|
+
* columns动态属性兼容
|
|
949
|
+
*/
|
|
950
|
+
columnState: {
|
|
951
|
+
type: Object
|
|
952
|
+
},
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* 录入组件集
|
|
956
|
+
*/
|
|
957
|
+
formElementMap: {
|
|
958
|
+
type: Object
|
|
959
|
+
},
|
|
960
|
+
|
|
961
|
+
/**
|
|
962
|
+
* 列表 或 详情 的唯一标识
|
|
762
963
|
*/
|
|
763
964
|
rowKey: {
|
|
764
965
|
type: String,
|
|
765
966
|
"default": "id"
|
|
766
967
|
},
|
|
767
968
|
|
|
768
|
-
/**
|
|
769
|
-
* operates
|
|
969
|
+
/**
|
|
970
|
+
* operates
|
|
770
971
|
*/
|
|
771
972
|
operates: {
|
|
772
973
|
type: Array
|
|
@@ -795,58 +996,67 @@ var Curd = defineComponent({
|
|
|
795
996
|
expose = _ref.expose;
|
|
796
997
|
|
|
797
998
|
var _ref2 = useProModule(),
|
|
798
|
-
|
|
999
|
+
elementMap = _ref2.elementMap,
|
|
799
1000
|
state = _ref2.state,
|
|
800
1001
|
sendEvent = _ref2.sendEvent,
|
|
801
1002
|
sendRequest = _ref2.sendRequest;
|
|
802
|
-
/**
|
|
803
|
-
*
|
|
804
|
-
* @param list
|
|
805
|
-
* @param propName
|
|
1003
|
+
/**
|
|
1004
|
+
* columns columnState 合并
|
|
806
1005
|
*/
|
|
807
1006
|
|
|
808
1007
|
|
|
809
|
-
var
|
|
810
|
-
return
|
|
811
|
-
return
|
|
1008
|
+
var columns = computed(function () {
|
|
1009
|
+
return mergeStateToList(props.columns, props.columnState, function (item) {
|
|
1010
|
+
return getColumnFormItemName(item);
|
|
812
1011
|
});
|
|
1012
|
+
});
|
|
1013
|
+
/*********************************** 渲染组件 ***************************************/
|
|
1014
|
+
// 获取FormItem VNode
|
|
1015
|
+
|
|
1016
|
+
var getFormItemVNode = function getFormItemVNode(column) {
|
|
1017
|
+
var needRules = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
1018
|
+
return getFormItemEl(props.formElementMap, column, needRules);
|
|
1019
|
+
}; // 获取Item VNode
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
var getItemVNode = function getItemVNode(column, value) {
|
|
1023
|
+
return getItemEl(elementMap, column, value);
|
|
813
1024
|
};
|
|
814
|
-
/**
|
|
815
|
-
*
|
|
1025
|
+
/**
|
|
1026
|
+
* ${signName} 配置为true 会被选择
|
|
1027
|
+
* @param signName
|
|
1028
|
+
* @param opposite 如果为true,未配置(undefined)会被选择
|
|
816
1029
|
*/
|
|
817
1030
|
|
|
818
1031
|
|
|
1032
|
+
var getSignColumns = function getSignColumns(signName, opposite) {
|
|
1033
|
+
var signColumns = filter$1(columns.value, function (item) {
|
|
1034
|
+
var sign = get(item, ["extra", signName]) || get(item, signName);
|
|
1035
|
+
|
|
1036
|
+
if (opposite) {
|
|
1037
|
+
//不为false 即为选中
|
|
1038
|
+
return sign !== false;
|
|
1039
|
+
} //只有true 才为选中
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
return sign;
|
|
1043
|
+
});
|
|
1044
|
+
return sortBy(signColumns, function (item) {
|
|
1045
|
+
return get(item, ["extra", "".concat(signName, "Sort")]) || get(item, "".concat(signName, "Sort"));
|
|
1046
|
+
});
|
|
1047
|
+
};
|
|
1048
|
+
|
|
819
1049
|
var formColumns = computed(function () {
|
|
820
|
-
return
|
|
821
|
-
return !item.hideInForm;
|
|
822
|
-
}), "formSort");
|
|
1050
|
+
return getSignColumns("form", true);
|
|
823
1051
|
});
|
|
824
|
-
/**
|
|
825
|
-
* 非 hideInDetail columns
|
|
826
|
-
*/
|
|
827
|
-
|
|
828
1052
|
var descColumns = computed(function () {
|
|
829
|
-
return
|
|
830
|
-
return !item.hideInDetail;
|
|
831
|
-
}), "descSort");
|
|
1053
|
+
return getSignColumns("detail", true);
|
|
832
1054
|
});
|
|
833
|
-
/**
|
|
834
|
-
* 非 hideInTable columns
|
|
835
|
-
*/
|
|
836
|
-
|
|
837
1055
|
var tableColumns = computed(function () {
|
|
838
|
-
return
|
|
839
|
-
return !item.hideInTable;
|
|
840
|
-
}), "tableSort");
|
|
1056
|
+
return getSignColumns("table", true);
|
|
841
1057
|
});
|
|
842
|
-
/**
|
|
843
|
-
* search columns
|
|
844
|
-
*/
|
|
845
|
-
|
|
846
1058
|
var searchColumns = computed(function () {
|
|
847
|
-
return
|
|
848
|
-
return !!item.search;
|
|
849
|
-
}), "searchSort");
|
|
1059
|
+
return getSignColumns("search");
|
|
850
1060
|
});
|
|
851
1061
|
/******************************** 逻辑 *************************************/
|
|
852
1062
|
//上一次发起列表请求的参数
|
|
@@ -931,6 +1141,13 @@ var Curd = defineComponent({
|
|
|
931
1141
|
return props.modalProps;
|
|
932
1142
|
});
|
|
933
1143
|
provideProCurd({
|
|
1144
|
+
columns: columns,
|
|
1145
|
+
getSignColumns: getSignColumns,
|
|
1146
|
+
getFormItemVNode: getFormItemVNode,
|
|
1147
|
+
getItemVNode: getItemVNode,
|
|
1148
|
+
elementMap: elementMap,
|
|
1149
|
+
formElementMap: props.formElementMap,
|
|
1150
|
+
//
|
|
934
1151
|
rowKey: props.rowKey,
|
|
935
1152
|
curdState: state,
|
|
936
1153
|
formColumns: formColumns,
|
|
@@ -1412,21 +1629,38 @@ function _isSlot(s) {
|
|
|
1412
1629
|
|
|
1413
1630
|
var createCurdDesc = function createCurdDesc(Descriptions, DescriptionsItem) {
|
|
1414
1631
|
return defineComponent({
|
|
1415
|
-
props: _objectSpread2({}, Descriptions.props),
|
|
1632
|
+
props: _objectSpread2(_objectSpread2({}, Descriptions.props), {}, {
|
|
1633
|
+
//重写Item content
|
|
1634
|
+
renderItem: {
|
|
1635
|
+
type: Function
|
|
1636
|
+
},
|
|
1637
|
+
//标记名称
|
|
1638
|
+
signName: {
|
|
1639
|
+
type: String
|
|
1640
|
+
}
|
|
1641
|
+
}),
|
|
1416
1642
|
setup: function setup(props, _ref) {
|
|
1417
1643
|
var slots = _ref.slots;
|
|
1418
1644
|
|
|
1419
|
-
var _useProModule = useProModule(),
|
|
1420
|
-
getItemVNode = _useProModule.getItemVNode;
|
|
1421
|
-
|
|
1422
1645
|
var _useProCurd = useProCurd(),
|
|
1646
|
+
getItemVNode = _useProCurd.getItemVNode,
|
|
1423
1647
|
curdState = _useProCurd.curdState,
|
|
1424
|
-
descColumns = _useProCurd.descColumns
|
|
1648
|
+
descColumns = _useProCurd.descColumns,
|
|
1649
|
+
getSignColumns = _useProCurd.getSignColumns;
|
|
1425
1650
|
|
|
1426
1651
|
var descVNodes = computed(function () {
|
|
1427
|
-
|
|
1652
|
+
var columns = props.signName ? getSignColumns(props.signName) : descColumns.value;
|
|
1653
|
+
return map(columns, function (item) {
|
|
1428
1654
|
var _slot;
|
|
1429
1655
|
|
|
1656
|
+
var _props$renderItem;
|
|
1657
|
+
|
|
1658
|
+
var vn = (_props$renderItem = props.renderItem) === null || _props$renderItem === void 0 ? void 0 : _props$renderItem.call(props, item);
|
|
1659
|
+
|
|
1660
|
+
if (vn) {
|
|
1661
|
+
return vn;
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1430
1664
|
var value = get(curdState.detailData, item.dataIndex);
|
|
1431
1665
|
return createVNode(DescriptionsItem, mergeProps({
|
|
1432
1666
|
"key": item.dataIndex,
|
|
@@ -1443,7 +1677,7 @@ var createCurdDesc = function createCurdDesc(Descriptions, DescriptionsItem) {
|
|
|
1443
1677
|
|
|
1444
1678
|
return createVNode(Descriptions, props, _objectSpread2({
|
|
1445
1679
|
"default": function _default() {
|
|
1446
|
-
return [(_slots$start = slots.start) === null || _slots$start === void 0 ? void 0 : _slots$start.call(slots), descVNodes, (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)];
|
|
1680
|
+
return [(_slots$start = slots.start) === null || _slots$start === void 0 ? void 0 : _slots$start.call(slots), descVNodes.value, (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)];
|
|
1447
1681
|
}
|
|
1448
1682
|
}, omit(slots, "default", "start")));
|
|
1449
1683
|
};
|
|
@@ -1453,6 +1687,10 @@ var createCurdDesc = function createCurdDesc(Descriptions, DescriptionsItem) {
|
|
|
1453
1687
|
|
|
1454
1688
|
var proCurdAddOrEditProps = function proCurdAddOrEditProps() {
|
|
1455
1689
|
return {
|
|
1690
|
+
//标记名称
|
|
1691
|
+
signName: {
|
|
1692
|
+
type: String
|
|
1693
|
+
},
|
|
1456
1694
|
//是否使用operate bar
|
|
1457
1695
|
operateBar: {
|
|
1458
1696
|
type: Boolean,
|
|
@@ -1484,22 +1722,36 @@ var proCurdAddOrEditProps = function proCurdAddOrEditProps() {
|
|
|
1484
1722
|
|
|
1485
1723
|
var createCurdForm = function createCurdForm(Form, Button, convertFormProps) {
|
|
1486
1724
|
return defineComponent({
|
|
1725
|
+
inheritAttrs: false,
|
|
1487
1726
|
props: _objectSpread2(_objectSpread2({}, Form.props), proCurdAddOrEditProps()),
|
|
1488
1727
|
setup: function setup(props, _ref) {
|
|
1489
|
-
var slots = _ref.slots
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
elementMap = _useProModule.elementMap,
|
|
1493
|
-
formElementMap = _useProModule.formElementMap;
|
|
1728
|
+
var slots = _ref.slots,
|
|
1729
|
+
attrs = _ref.attrs,
|
|
1730
|
+
expose = _ref.expose;
|
|
1494
1731
|
|
|
1495
1732
|
var _useProCurd = useProCurd(),
|
|
1733
|
+
elementMap = _useProCurd.elementMap,
|
|
1734
|
+
formElementMap = _useProCurd.formElementMap,
|
|
1496
1735
|
curdState = _useProCurd.curdState,
|
|
1497
1736
|
formColumns = _useProCurd.formColumns,
|
|
1737
|
+
getSignColumns = _useProCurd.getSignColumns,
|
|
1498
1738
|
sendCurdEvent = _useProCurd.sendCurdEvent;
|
|
1499
1739
|
|
|
1500
1740
|
var formRef = ref();
|
|
1741
|
+
var columns = computed(function () {
|
|
1742
|
+
if (props.signName) {
|
|
1743
|
+
return getSignColumns(props.signName);
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
return formColumns.value;
|
|
1747
|
+
});
|
|
1748
|
+
|
|
1749
|
+
var handleFinish = function handleFinish(values, originValues) {
|
|
1750
|
+
if (attrs.onFinish) {
|
|
1751
|
+
attrs.onFinish(values, originValues);
|
|
1752
|
+
return;
|
|
1753
|
+
}
|
|
1501
1754
|
|
|
1502
|
-
var handleFinish = function handleFinish(values) {
|
|
1503
1755
|
if (curdState.mode === CurdCurrentMode.EDIT) {
|
|
1504
1756
|
//edit
|
|
1505
1757
|
sendCurdEvent({
|
|
@@ -1531,15 +1783,22 @@ var createCurdForm = function createCurdForm(Form, Button, convertFormProps) {
|
|
|
1531
1783
|
(_formRef$value2 = formRef.value) === null || _formRef$value2 === void 0 ? void 0 : _formRef$value2.submit();
|
|
1532
1784
|
};
|
|
1533
1785
|
|
|
1786
|
+
expose({
|
|
1787
|
+
submit: function submit() {
|
|
1788
|
+
var _formRef$value3;
|
|
1789
|
+
|
|
1790
|
+
(_formRef$value3 = formRef.value) === null || _formRef$value3 === void 0 ? void 0 : _formRef$value3.submit();
|
|
1791
|
+
}
|
|
1792
|
+
});
|
|
1534
1793
|
return function () {
|
|
1535
1794
|
var _slots$divide, _slots$operateStart, _slots$operateCenter, _slots$operateEnd, _slots$default;
|
|
1536
1795
|
|
|
1537
1796
|
return createVNode(Form, mergeProps({
|
|
1538
1797
|
"ref": formRef
|
|
1539
|
-
}, props, {
|
|
1798
|
+
}, omit(attrs, "onFinish"), props, {
|
|
1540
1799
|
"elementMap": props.elementMap || elementMap,
|
|
1541
1800
|
"formElementMap": props.formElementMap || formElementMap,
|
|
1542
|
-
"columns":
|
|
1801
|
+
"columns": columns.value,
|
|
1543
1802
|
"model": curdState.detailData,
|
|
1544
1803
|
"readonly": curdState.mode === CurdCurrentMode.DETAIL,
|
|
1545
1804
|
"onFinish": handleFinish
|
|
@@ -1601,11 +1860,9 @@ var createCurdList = function createCurdList(SearchForm, Table) {
|
|
|
1601
1860
|
setup: function setup(props, _ref) {
|
|
1602
1861
|
var slots = _ref.slots;
|
|
1603
1862
|
|
|
1604
|
-
var _useProModule = useProModule(),
|
|
1605
|
-
elementMap = _useProModule.elementMap,
|
|
1606
|
-
formElementMap = _useProModule.formElementMap;
|
|
1607
|
-
|
|
1608
1863
|
var _useProCurd = useProCurd(),
|
|
1864
|
+
elementMap = _useProCurd.elementMap,
|
|
1865
|
+
formElementMap = _useProCurd.formElementMap,
|
|
1609
1866
|
curdState = _useProCurd.curdState,
|
|
1610
1867
|
searchColumns = _useProCurd.searchColumns,
|
|
1611
1868
|
tableColumns = _useProCurd.tableColumns,
|
|
@@ -1719,6 +1976,114 @@ var createCurdList = function createCurdList(SearchForm, Table) {
|
|
|
1719
1976
|
});
|
|
1720
1977
|
};
|
|
1721
1978
|
|
|
1979
|
+
/**
|
|
1980
|
+
* ProFormList ctx
|
|
1981
|
+
*/
|
|
1982
|
+
|
|
1983
|
+
var ProFormListKey = Symbol("pro-form-list");
|
|
1984
|
+
var useProFormList = function useProFormList() {
|
|
1985
|
+
return inject(ProFormListKey);
|
|
1986
|
+
};
|
|
1987
|
+
var provideProFormList = function provideProFormList(ctx) {
|
|
1988
|
+
provide(ProFormListKey, ctx);
|
|
1989
|
+
};
|
|
1990
|
+
var FormListProvider = defineComponent({
|
|
1991
|
+
props: {
|
|
1992
|
+
pathList: {
|
|
1993
|
+
type: Array
|
|
1994
|
+
}
|
|
1995
|
+
},
|
|
1996
|
+
setup: function setup(props, _ref) {
|
|
1997
|
+
var slots = _ref.slots;
|
|
1998
|
+
provideProFormList({
|
|
1999
|
+
pathList: props.pathList
|
|
2000
|
+
});
|
|
2001
|
+
return function () {
|
|
2002
|
+
var _slots$default;
|
|
2003
|
+
|
|
2004
|
+
return (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots);
|
|
2005
|
+
};
|
|
2006
|
+
}
|
|
2007
|
+
});
|
|
2008
|
+
|
|
2009
|
+
var createFormList = function createFormList(FormItem) {
|
|
2010
|
+
return defineComponent({
|
|
2011
|
+
props: _objectSpread2(_objectSpread2({}, FormItem.props), {}, {
|
|
2012
|
+
//每行默认id
|
|
2013
|
+
rowKey: {
|
|
2014
|
+
type: String,
|
|
2015
|
+
"default": "id"
|
|
2016
|
+
}
|
|
2017
|
+
}),
|
|
2018
|
+
setup: function setup(props, _ref2) {
|
|
2019
|
+
var slots = _ref2.slots;
|
|
2020
|
+
|
|
2021
|
+
var _useProForm = useProForm(),
|
|
2022
|
+
formState = _useProForm.formState,
|
|
2023
|
+
readonly = _useProForm.readonly;
|
|
2024
|
+
|
|
2025
|
+
var formListCtx = useProFormList();
|
|
2026
|
+
var nameList = convertPathToList(props.name);
|
|
2027
|
+
var path = formListCtx !== null && formListCtx !== void 0 && formListCtx.pathList ? [].concat(_toConsumableArray(formListCtx.pathList), _toConsumableArray(nameList)) : nameList;
|
|
2028
|
+
|
|
2029
|
+
var handleAdd = function handleAdd() {
|
|
2030
|
+
var targetList = get(formState, path);
|
|
2031
|
+
|
|
2032
|
+
if (!isArray(targetList)) {
|
|
2033
|
+
targetList = [];
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
targetList.push(_defineProperty({}, props.rowKey, new Date().valueOf()));
|
|
2037
|
+
set(formState, path, targetList);
|
|
2038
|
+
};
|
|
2039
|
+
|
|
2040
|
+
var handleRemove = function handleRemove(index) {
|
|
2041
|
+
var targetList = get(formState, path);
|
|
2042
|
+
|
|
2043
|
+
if (size(targetList) <= 0) {
|
|
2044
|
+
return;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
targetList.splice(index, 1);
|
|
2048
|
+
};
|
|
2049
|
+
|
|
2050
|
+
return function () {
|
|
2051
|
+
var _slots$add;
|
|
2052
|
+
|
|
2053
|
+
return createVNode(FormItem, omit(props, "rowKey"), {
|
|
2054
|
+
"default": function _default() {
|
|
2055
|
+
return [map(get(formState, path), function (item, index) {
|
|
2056
|
+
var _slots$default2, _slots$itemAdd, _slots$itemMinus;
|
|
2057
|
+
|
|
2058
|
+
return createVNode(FormListProvider, {
|
|
2059
|
+
"key": item[props.rowKey] || index,
|
|
2060
|
+
"pathList": [].concat(_toConsumableArray(path), [index])
|
|
2061
|
+
}, {
|
|
2062
|
+
"default": function _default() {
|
|
2063
|
+
return [createVNode("div", {
|
|
2064
|
+
"class": "pro-form-list-item"
|
|
2065
|
+
}, [(_slots$default2 = slots["default"]) === null || _slots$default2 === void 0 ? void 0 : _slots$default2.call(slots), !readonly.value && createVNode(Fragment, null, [createVNode("div", {
|
|
2066
|
+
"class": "pro-form-list-item-add",
|
|
2067
|
+
"onClick": handleAdd
|
|
2068
|
+
}, [(_slots$itemAdd = slots.itemAdd) === null || _slots$itemAdd === void 0 ? void 0 : _slots$itemAdd.call(slots)]), createVNode("div", {
|
|
2069
|
+
"class": "pro-form-list-item-minus",
|
|
2070
|
+
"onClick": function onClick() {
|
|
2071
|
+
return handleRemove(index);
|
|
2072
|
+
}
|
|
2073
|
+
}, [(_slots$itemMinus = slots.itemMinus) === null || _slots$itemMinus === void 0 ? void 0 : _slots$itemMinus.call(slots)])])])];
|
|
2074
|
+
}
|
|
2075
|
+
});
|
|
2076
|
+
}), !readonly.value && createVNode("div", {
|
|
2077
|
+
"class": "pro-form-list-add",
|
|
2078
|
+
"onClick": handleAdd
|
|
2079
|
+
}, [(_slots$add = slots.add) === null || _slots$add === void 0 ? void 0 : _slots$add.call(slots)])];
|
|
2080
|
+
}
|
|
2081
|
+
});
|
|
2082
|
+
};
|
|
2083
|
+
}
|
|
2084
|
+
});
|
|
2085
|
+
};
|
|
2086
|
+
|
|
1722
2087
|
var ProFormKey = Symbol("pro-form");
|
|
1723
2088
|
var useProForm = function useProForm() {
|
|
1724
2089
|
return inject(ProFormKey);
|
|
@@ -1730,24 +2095,24 @@ var provideProForm = function provideProForm(ctx) {
|
|
|
1730
2095
|
|
|
1731
2096
|
var proFormProps = function proFormProps() {
|
|
1732
2097
|
return {
|
|
1733
|
-
/**
|
|
1734
|
-
* 同 antd 或 element form中的model
|
|
2098
|
+
/**
|
|
2099
|
+
* 同 antd 或 element form中的model
|
|
1735
2100
|
*/
|
|
1736
2101
|
model: {
|
|
1737
2102
|
type: Object
|
|
1738
2103
|
},
|
|
1739
2104
|
|
|
1740
|
-
/**
|
|
1741
|
-
* 子组件是否只读样式
|
|
2105
|
+
/**
|
|
2106
|
+
* 子组件是否只读样式
|
|
1742
2107
|
*/
|
|
1743
2108
|
readonly: {
|
|
1744
2109
|
type: Boolean,
|
|
1745
2110
|
"default": undefined
|
|
1746
2111
|
},
|
|
1747
2112
|
|
|
1748
|
-
/**
|
|
1749
|
-
* FormComponent 根据此项来确定组件是否显示
|
|
1750
|
-
* rules 根据rules中方法生成showState对象
|
|
2113
|
+
/**
|
|
2114
|
+
* FormComponent 根据此项来确定组件是否显示
|
|
2115
|
+
* rules 根据rules中方法生成showState对象
|
|
1751
2116
|
*/
|
|
1752
2117
|
showState: {
|
|
1753
2118
|
type: Object
|
|
@@ -1756,8 +2121,8 @@ var proFormProps = function proFormProps() {
|
|
|
1756
2121
|
type: Object
|
|
1757
2122
|
},
|
|
1758
2123
|
|
|
1759
|
-
/**
|
|
1760
|
-
* 是否只读
|
|
2124
|
+
/**
|
|
2125
|
+
* 是否只读
|
|
1761
2126
|
*/
|
|
1762
2127
|
readonlyState: {
|
|
1763
2128
|
type: Object
|
|
@@ -1766,8 +2131,8 @@ var proFormProps = function proFormProps() {
|
|
|
1766
2131
|
type: Object
|
|
1767
2132
|
},
|
|
1768
2133
|
|
|
1769
|
-
/**
|
|
1770
|
-
* 是否disabled
|
|
2134
|
+
/**
|
|
2135
|
+
* 是否disabled
|
|
1771
2136
|
*/
|
|
1772
2137
|
disableState: {
|
|
1773
2138
|
type: Object
|
|
@@ -1776,8 +2141,8 @@ var proFormProps = function proFormProps() {
|
|
|
1776
2141
|
type: Object
|
|
1777
2142
|
},
|
|
1778
2143
|
|
|
1779
|
-
/**
|
|
1780
|
-
*
|
|
2144
|
+
/**
|
|
2145
|
+
*
|
|
1781
2146
|
*/
|
|
1782
2147
|
columns: {
|
|
1783
2148
|
type: Array
|
|
@@ -1786,30 +2151,30 @@ var proFormProps = function proFormProps() {
|
|
|
1786
2151
|
type: Object
|
|
1787
2152
|
},
|
|
1788
2153
|
|
|
1789
|
-
/**
|
|
1790
|
-
* 展示控件集合,readonly模式下使用这些组件渲染
|
|
2154
|
+
/**
|
|
2155
|
+
* 展示控件集合,readonly模式下使用这些组件渲染
|
|
1791
2156
|
*/
|
|
1792
2157
|
elementMap: {
|
|
1793
2158
|
type: Object
|
|
1794
2159
|
},
|
|
1795
2160
|
|
|
1796
|
-
/**
|
|
1797
|
-
* 录入控件集合
|
|
2161
|
+
/**
|
|
2162
|
+
* 录入控件集合
|
|
1798
2163
|
*/
|
|
1799
2164
|
formElementMap: {
|
|
1800
2165
|
type: Object
|
|
1801
2166
|
},
|
|
1802
2167
|
|
|
1803
|
-
/**
|
|
1804
|
-
* 是否启用rules验证
|
|
2168
|
+
/**
|
|
2169
|
+
* 是否启用rules验证
|
|
1805
2170
|
*/
|
|
1806
2171
|
needRules: {
|
|
1807
2172
|
type: Boolean,
|
|
1808
2173
|
"default": true
|
|
1809
2174
|
},
|
|
1810
2175
|
|
|
1811
|
-
/**
|
|
1812
|
-
* provide传递
|
|
2176
|
+
/**
|
|
2177
|
+
* provide传递
|
|
1813
2178
|
*/
|
|
1814
2179
|
provideExtra: {
|
|
1815
2180
|
type: Object
|
|
@@ -1899,7 +2264,9 @@ var createForm = function createForm(Form, Grid) {
|
|
|
1899
2264
|
columns: columns,
|
|
1900
2265
|
//
|
|
1901
2266
|
formRef: formRef
|
|
1902
|
-
}, props.provideExtra));
|
|
2267
|
+
}, props.provideExtra)); //为了不warning ...
|
|
2268
|
+
|
|
2269
|
+
provideProFormList({});
|
|
1903
2270
|
var invalidKeys = keys(proFormProps());
|
|
1904
2271
|
var gridKeys = keys(omit(Grid.props, "items"));
|
|
1905
2272
|
return function () {
|
|
@@ -1941,40 +2308,39 @@ var SearchMode;
|
|
|
1941
2308
|
|
|
1942
2309
|
var proSearchFormProps = function proSearchFormProps() {
|
|
1943
2310
|
return {
|
|
1944
|
-
/**
|
|
1945
|
-
* 需要监听的对象
|
|
2311
|
+
/**
|
|
2312
|
+
* 需要监听的对象
|
|
1946
2313
|
*/
|
|
1947
2314
|
model: {
|
|
1948
|
-
type: Object
|
|
1949
|
-
required: true
|
|
2315
|
+
type: Object
|
|
1950
2316
|
},
|
|
1951
2317
|
|
|
1952
|
-
/**
|
|
1953
|
-
* 初始化触发 onFinish
|
|
2318
|
+
/**
|
|
2319
|
+
* 初始化触发 onFinish
|
|
1954
2320
|
*/
|
|
1955
2321
|
initEmit: {
|
|
1956
2322
|
type: Boolean,
|
|
1957
2323
|
"default": true
|
|
1958
2324
|
},
|
|
1959
2325
|
|
|
1960
|
-
/**
|
|
1961
|
-
* 模式 自动触发或者手动触发 onFinish
|
|
2326
|
+
/**
|
|
2327
|
+
* 模式 自动触发或者手动触发 onFinish
|
|
1962
2328
|
*/
|
|
1963
2329
|
searchMode: {
|
|
1964
2330
|
type: String,
|
|
1965
2331
|
"default": SearchMode.AUTO
|
|
1966
2332
|
},
|
|
1967
2333
|
|
|
1968
|
-
/**
|
|
1969
|
-
* 配置 同ProForm中的columns
|
|
1970
|
-
* 可以根据column中valueType计算出默认的debounceKeys
|
|
2334
|
+
/**
|
|
2335
|
+
* 配置 同ProForm中的columns
|
|
2336
|
+
* 可以根据column中valueType计算出默认的debounceKeys
|
|
1971
2337
|
*/
|
|
1972
2338
|
columns: {
|
|
1973
2339
|
type: Array
|
|
1974
2340
|
},
|
|
1975
2341
|
|
|
1976
|
-
/**
|
|
1977
|
-
* 需要debounce处理的字段
|
|
2342
|
+
/**
|
|
2343
|
+
* 需要debounce处理的字段
|
|
1978
2344
|
*/
|
|
1979
2345
|
debounceKeys: {
|
|
1980
2346
|
type: Array
|
|
@@ -1991,9 +2357,9 @@ var proSearchFormProps = function proSearchFormProps() {
|
|
|
1991
2357
|
};
|
|
1992
2358
|
};
|
|
1993
2359
|
|
|
1994
|
-
/**
|
|
1995
|
-
* 该组件只是个模式,最终返回null,不做任何渲染,应配合着ProForm的包装类一起使用
|
|
1996
|
-
* 针对传入的model(监听对象)做相应的finish(回调)处理
|
|
2360
|
+
/**
|
|
2361
|
+
* 该组件只是个模式,最终返回null,不做任何渲染,应配合着ProForm的包装类一起使用
|
|
2362
|
+
* 针对传入的model(监听对象)做相应的finish(回调)处理
|
|
1997
2363
|
*/
|
|
1998
2364
|
var createSearchForm = function createSearchForm(Form, Props) {
|
|
1999
2365
|
return defineComponent({
|
|
@@ -2064,116 +2430,6 @@ var createSearchForm = function createSearchForm(Form, Props) {
|
|
|
2064
2430
|
});
|
|
2065
2431
|
};
|
|
2066
2432
|
|
|
2067
|
-
/**
|
|
2068
|
-
* ProFormList ctx
|
|
2069
|
-
*/
|
|
2070
|
-
|
|
2071
|
-
var ProFormListKey = Symbol("pro-form-list");
|
|
2072
|
-
var useProFormList = function useProFormList() {
|
|
2073
|
-
return inject(ProFormListKey);
|
|
2074
|
-
};
|
|
2075
|
-
|
|
2076
|
-
var provideProFormList = function provideProFormList(ctx) {
|
|
2077
|
-
provide(ProFormListKey, ctx);
|
|
2078
|
-
};
|
|
2079
|
-
|
|
2080
|
-
var FormListProvider = defineComponent({
|
|
2081
|
-
props: {
|
|
2082
|
-
pathList: {
|
|
2083
|
-
type: Array
|
|
2084
|
-
}
|
|
2085
|
-
},
|
|
2086
|
-
setup: function setup(props, _ref) {
|
|
2087
|
-
var slots = _ref.slots;
|
|
2088
|
-
provideProFormList({
|
|
2089
|
-
pathList: props.pathList
|
|
2090
|
-
});
|
|
2091
|
-
return function () {
|
|
2092
|
-
var _slots$default;
|
|
2093
|
-
|
|
2094
|
-
return (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots);
|
|
2095
|
-
};
|
|
2096
|
-
}
|
|
2097
|
-
});
|
|
2098
|
-
|
|
2099
|
-
var createFormList = function createFormList(FormItem) {
|
|
2100
|
-
return defineComponent({
|
|
2101
|
-
props: _objectSpread2(_objectSpread2({}, FormItem.props), {}, {
|
|
2102
|
-
//每行默认id
|
|
2103
|
-
rowKey: {
|
|
2104
|
-
type: String,
|
|
2105
|
-
"default": "id"
|
|
2106
|
-
}
|
|
2107
|
-
}),
|
|
2108
|
-
setup: function setup(props, _ref2) {
|
|
2109
|
-
var slots = _ref2.slots;
|
|
2110
|
-
|
|
2111
|
-
var _useProForm = useProForm(),
|
|
2112
|
-
formState = _useProForm.formState,
|
|
2113
|
-
readonly = _useProForm.readonly;
|
|
2114
|
-
|
|
2115
|
-
var formListCtx = useProFormList();
|
|
2116
|
-
var nameList = convertPathToList(props.name);
|
|
2117
|
-
var path = formListCtx !== null && formListCtx !== void 0 && formListCtx.pathList ? [].concat(_toConsumableArray(formListCtx.pathList), _toConsumableArray(nameList)) : nameList;
|
|
2118
|
-
|
|
2119
|
-
var handleAdd = function handleAdd() {
|
|
2120
|
-
var targetList = get(formState, path);
|
|
2121
|
-
|
|
2122
|
-
if (!isArray(targetList)) {
|
|
2123
|
-
targetList = [];
|
|
2124
|
-
}
|
|
2125
|
-
|
|
2126
|
-
targetList.push(_defineProperty({}, props.rowKey, new Date().valueOf()));
|
|
2127
|
-
set(formState, path, targetList);
|
|
2128
|
-
};
|
|
2129
|
-
|
|
2130
|
-
var handleRemove = function handleRemove(index) {
|
|
2131
|
-
var targetList = get(formState, path);
|
|
2132
|
-
|
|
2133
|
-
if (size(targetList) <= 0) {
|
|
2134
|
-
return;
|
|
2135
|
-
}
|
|
2136
|
-
|
|
2137
|
-
targetList.splice(index, 1);
|
|
2138
|
-
};
|
|
2139
|
-
|
|
2140
|
-
return function () {
|
|
2141
|
-
var _slots$add;
|
|
2142
|
-
|
|
2143
|
-
return createVNode(FormItem, omit(props, "rowKey"), {
|
|
2144
|
-
"default": function _default() {
|
|
2145
|
-
return [map(get(formState, path), function (item, index) {
|
|
2146
|
-
var _slots$default2, _slots$itemAdd, _slots$itemMinus;
|
|
2147
|
-
|
|
2148
|
-
return createVNode(FormListProvider, {
|
|
2149
|
-
"key": item[props.rowKey] || index,
|
|
2150
|
-
"pathList": [].concat(_toConsumableArray(path), [index])
|
|
2151
|
-
}, {
|
|
2152
|
-
"default": function _default() {
|
|
2153
|
-
return [createVNode("div", {
|
|
2154
|
-
"class": "pro-form-list-item"
|
|
2155
|
-
}, [(_slots$default2 = slots["default"]) === null || _slots$default2 === void 0 ? void 0 : _slots$default2.call(slots), !readonly.value && createVNode(Fragment, null, [createVNode("div", {
|
|
2156
|
-
"class": "pro-form-list-item-add",
|
|
2157
|
-
"onClick": handleAdd
|
|
2158
|
-
}, [(_slots$itemAdd = slots.itemAdd) === null || _slots$itemAdd === void 0 ? void 0 : _slots$itemAdd.call(slots)]), createVNode("div", {
|
|
2159
|
-
"class": "pro-form-list-item-minus",
|
|
2160
|
-
"onClick": function onClick() {
|
|
2161
|
-
return handleRemove(index);
|
|
2162
|
-
}
|
|
2163
|
-
}, [(_slots$itemMinus = slots.itemMinus) === null || _slots$itemMinus === void 0 ? void 0 : _slots$itemMinus.call(slots)])])])];
|
|
2164
|
-
}
|
|
2165
|
-
});
|
|
2166
|
-
}), !readonly.value && createVNode("div", {
|
|
2167
|
-
"class": "pro-form-list-add",
|
|
2168
|
-
"onClick": handleAdd
|
|
2169
|
-
}, [(_slots$add = slots.add) === null || _slots$add === void 0 ? void 0 : _slots$add.call(slots)])];
|
|
2170
|
-
}
|
|
2171
|
-
});
|
|
2172
|
-
};
|
|
2173
|
-
}
|
|
2174
|
-
});
|
|
2175
|
-
};
|
|
2176
|
-
|
|
2177
2433
|
var proFormItemProps = function proFormItemProps() {
|
|
2178
2434
|
return {
|
|
2179
2435
|
readonly: {
|
|
@@ -2452,4 +2708,4 @@ var createTable = function createTable(Table, Props) {
|
|
|
2452
2708
|
});
|
|
2453
2709
|
};
|
|
2454
2710
|
|
|
2455
|
-
export { CurdAction, CurdAddAction, CurdCurrentMode, CurdSubAction, ProCurd, ProModalCurd, ProModule, ProPageCurd, RequestAction, SearchMode, convertPathToList, createCurdDesc, createCurdForm, createCurdList, createExpose, createForm, createFormItemCompFn, createFormList, createGrid, createSearchForm, createTable, defaultPage, findTargetInTree, findTargetListInTree, generateId, getColumnFormItemName, getColumnValueType, getFormItemEl, getItemEl, getValidValues, mergeStateToList, provideProCurd, provideProModule, useComposeRequestActor, useDoneRequestActor, useFailedRequestActor, useModuleEvent, useProCurd, useProForm, useProFormList, useProModule, useProTable };
|
|
2711
|
+
export { CurdAction, CurdAddAction, CurdCurrentMode, CurdSubAction, ProCurd, ProModalCurd, ProModule, ProPageCurd, RequestAction, SearchMode, Wrapper, convertPathToList, createCurdDesc, createCurdForm, createCurdList, createExpose, createForm, createFormItemCompFn, createFormList, createGrid, createSearchForm, createTable, defaultPage, findTargetInTree, findTargetListInTree, generateId, getColumnFormItemName, getColumnValueType, getFirstPropName, getFormItemEl, getItemEl, getValidValues, mergeStateToList, provideProCurd, provideProFormList, provideProModule, renderElement, renderElements, useComposeRequestActor, useDoneRequestActor, useFailedRequestActor, useModuleEvent, useProCurd, useProForm, useProFormList, useProModule, useProTable };
|