@vue-start/pro 0.4.6 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +12 -30
- package/dist/index.es.js +16 -90
- package/dist/index.js +14 -91
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,13 @@ declare type TOption = {
|
|
|
31
31
|
disabled?: boolean;
|
|
32
32
|
};
|
|
33
33
|
declare type TOptions = TOption[];
|
|
34
|
+
declare type TreeOption = {
|
|
35
|
+
label?: string;
|
|
36
|
+
value: string | number;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
children?: TreeOption[];
|
|
39
|
+
};
|
|
40
|
+
declare type TreeOptions = TreeOption[];
|
|
34
41
|
declare type TColumn = {
|
|
35
42
|
title?: string | VNode;
|
|
36
43
|
dataIndex?: string | number;
|
|
@@ -562,6 +569,10 @@ declare const proCurdAddOrEditProps: () => {
|
|
|
562
569
|
signName: {
|
|
563
570
|
type: StringConstructor;
|
|
564
571
|
};
|
|
572
|
+
modelName: {
|
|
573
|
+
type: StringConstructor;
|
|
574
|
+
default: string;
|
|
575
|
+
};
|
|
565
576
|
operateBar: {
|
|
566
577
|
type: BooleanConstructor;
|
|
567
578
|
default: boolean;
|
|
@@ -906,31 +917,6 @@ declare const proFormListProps: () => {
|
|
|
906
917
|
declare type ProFormListProps = Partial<ExtractPropTypes<ReturnType<typeof proFormListProps>>>;
|
|
907
918
|
declare const createFormList: (FormItem: any) => any;
|
|
908
919
|
|
|
909
|
-
declare type TData = Record<string, any>;
|
|
910
|
-
/**
|
|
911
|
-
* 根据value从treeData中找到对象
|
|
912
|
-
* @param data
|
|
913
|
-
* @param value
|
|
914
|
-
* @param fieldNames
|
|
915
|
-
* @param cb 对象:同步 方法:回调,可以理解为异步
|
|
916
|
-
*/
|
|
917
|
-
declare const findTargetInTree: (data: TData[], value: TOption["value"], fieldNames: FieldNames, cb: {
|
|
918
|
-
target?: TData | undefined;
|
|
919
|
-
index?: number | undefined;
|
|
920
|
-
list?: TData[] | undefined;
|
|
921
|
-
} | ((index: number, target: TData, list: TData[]) => void)) => void;
|
|
922
|
-
/**
|
|
923
|
-
* 根据value从treeData中找出对象及父列表
|
|
924
|
-
* @param data
|
|
925
|
-
* @param value
|
|
926
|
-
* @param fieldNames
|
|
927
|
-
* @param cb
|
|
928
|
-
* @param parent
|
|
929
|
-
*/
|
|
930
|
-
declare const findTargetListInTree: (data: TData[], value: TOption["value"], fieldNames: FieldNames, cb: {
|
|
931
|
-
list?: TData[] | undefined;
|
|
932
|
-
} | ((list?: TData[] | undefined) => void), parent?: TData[]) => void;
|
|
933
|
-
|
|
934
920
|
/**
|
|
935
921
|
* 剔除showState或showStateRules规则为!true的值
|
|
936
922
|
* @param values
|
|
@@ -953,13 +939,9 @@ declare const convertPathToList: (path: undefined | string | number | (string |
|
|
|
953
939
|
*/
|
|
954
940
|
declare const mergeStateToList: (list: Record<string, any>[], listState: Record<string, any>, id: string | number | ((item: Record<string, any>) => string | number)) => Record<string, any>[];
|
|
955
941
|
|
|
956
|
-
/**
|
|
957
|
-
* 唯一id
|
|
958
|
-
*/
|
|
959
|
-
declare const generateId: () => string;
|
|
960
942
|
/**
|
|
961
943
|
* ref 传递
|
|
962
944
|
*/
|
|
963
945
|
declare const createExpose: (methods: string[], targetRef: Ref$1) => {};
|
|
964
946
|
|
|
965
|
-
export { BooleanObjType, BooleanRulesObjType, CurdAction, CurdAddAction, CurdCurrentMode, CurdMethods, CurdSubAction, FieldNames, FormItemProps, GridProps, ICurdAction, ICurdAddAction, ICurdCurrentMode, ICurdOperateOpts, ICurdState, ICurdSubAction, IElementConfig, IHighConfig, IListData, IOperateItem, IProCurdProvide, IProFormProvideExtra, IProModuleProvide, IProTableProvide, IProTableProvideExtra, IRequestOpts, ISearchMode, ITableOperate, InternalNamePath, NamePath, ProCurd, ProCurdAddOrEditProps, ProCurdListProps, ProCurdProps, ProFormItemProps, ProFormListProps, ProFormProps, ProModalCurd, ProModalCurdProps, ProModule, ProModuleProps, ProPageCurd, ProPageCurdProps, ProSearchFormProps, ProTableProps, RequestAction, SearchMode, TActionEvent, TActionState, TColumn, TColumns, TCurdActionEvent,
|
|
947
|
+
export { BooleanObjType, BooleanRulesObjType, CurdAction, CurdAddAction, CurdCurrentMode, CurdMethods, CurdSubAction, FieldNames, FormItemProps, GridProps, ICurdAction, ICurdAddAction, ICurdCurrentMode, ICurdOperateOpts, ICurdState, ICurdSubAction, IElementConfig, IHighConfig, IListData, IOperateItem, IProCurdProvide, IProFormProvideExtra, IProModuleProvide, IProTableProvide, IProTableProvideExtra, IRequestOpts, ISearchMode, ITableOperate, InternalNamePath, NamePath, ProCurd, ProCurdAddOrEditProps, ProCurdListProps, ProCurdProps, ProFormItemProps, ProFormListProps, ProFormProps, ProModalCurd, ProModalCurdProps, ProModule, ProModuleProps, ProPageCurd, ProPageCurdProps, ProSearchFormProps, ProTableProps, RequestAction, SearchMode, TActionEvent, TActionState, TColumn, TColumns, TCurdActionEvent, TDefaultValueType, TElementMap, TOption, TOptions, TPageState, TTableColumn, TTableColumns, TValueType, TreeOption, TreeOptions, Wrapper, convertPathToList, createCurdDesc, createCurdForm, createCurdList, createExpose, createForm, createFormItemCompFn, createFormList, createGrid, createSearchForm, createTable, defaultPage, getColumnFormItemName, getColumnValueType, getFirstPropName, getFormItemEl, getItemEl, getValidValues, mergeStateToList, provideProCurd, provideProFormList, provideProModule, renderElement, renderElements, useComposeRequestActor, useDoneRequestActor, useFailedRequestActor, useModuleEvent, useProCurd, useProForm, useProFormList, useProModule, useProTable };
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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,
|
|
2
|
+
import { map, isString, forEach, reduce, size, get, set, pick, omit, isArray, some, keys, isFunction, head, isObject, 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';
|
|
@@ -754,78 +754,6 @@ var CurdAddAction;
|
|
|
754
754
|
CurdAddAction["CONTINUE"] = "CONTINUE";
|
|
755
755
|
})(CurdAddAction || (CurdAddAction = {}));
|
|
756
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
757
|
/**
|
|
830
758
|
* 剔除showState或showStateRules规则为!true的值
|
|
831
759
|
* @param values
|
|
@@ -904,15 +832,8 @@ var mergeStateToList = function mergeStateToList(list, listState, id) {
|
|
|
904
832
|
});
|
|
905
833
|
};
|
|
906
834
|
|
|
907
|
-
/**
|
|
908
|
-
*
|
|
909
|
-
*/
|
|
910
|
-
|
|
911
|
-
var generateId = function generateId() {
|
|
912
|
-
return Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36);
|
|
913
|
-
};
|
|
914
|
-
/**
|
|
915
|
-
* ref 传递
|
|
835
|
+
/**
|
|
836
|
+
* ref 传递
|
|
916
837
|
*/
|
|
917
838
|
|
|
918
839
|
var createExpose = function createExpose(methods, targetRef) {
|
|
@@ -1281,7 +1202,7 @@ var ProCurd = defineComponent({
|
|
|
1281
1202
|
params[_key - 1] = arguments[_key];
|
|
1282
1203
|
}
|
|
1283
1204
|
|
|
1284
|
-
(_moduleRef$value2 = moduleRef.value) === null || _moduleRef$value2 === void 0 ? void 0 : _moduleRef$value2.
|
|
1205
|
+
(_moduleRef$value2 = moduleRef.value) === null || _moduleRef$value2 === void 0 ? void 0 : _moduleRef$value2.sendRequest.apply(_moduleRef$value2, [requestNameOrAction].concat(params));
|
|
1285
1206
|
}
|
|
1286
1207
|
});
|
|
1287
1208
|
return function () {
|
|
@@ -1744,6 +1665,11 @@ var proCurdAddOrEditProps = function proCurdAddOrEditProps() {
|
|
|
1744
1665
|
signName: {
|
|
1745
1666
|
type: String
|
|
1746
1667
|
},
|
|
1668
|
+
//form model 绑定的curdState中的对象
|
|
1669
|
+
modelName: {
|
|
1670
|
+
type: String,
|
|
1671
|
+
"default": "detailData"
|
|
1672
|
+
},
|
|
1747
1673
|
//是否使用operate bar
|
|
1748
1674
|
operateBar: {
|
|
1749
1675
|
type: Boolean,
|
|
@@ -1845,8 +1771,8 @@ var createCurdForm = function createCurdForm(Form, Button, convertFormProps, for
|
|
|
1845
1771
|
}, omit(attrs, "onFinish"), props, {
|
|
1846
1772
|
"elementMap": props.elementMap || elementMap,
|
|
1847
1773
|
"formElementMap": props.formElementMap || formElementMap,
|
|
1848
|
-
"columns": columns.value,
|
|
1849
|
-
"model": curdState.
|
|
1774
|
+
"columns": props.columns || columns.value,
|
|
1775
|
+
"model": props.model || curdState[props.modelName],
|
|
1850
1776
|
"readonly": curdState.mode === CurdCurrentMode.DETAIL,
|
|
1851
1777
|
"onFinish": handleFinish
|
|
1852
1778
|
}, convertFormProps === null || convertFormProps === void 0 ? void 0 : convertFormProps(curdState)), _objectSpread2({
|
|
@@ -1988,7 +1914,8 @@ var createCurdList = function createCurdList(SearchForm, Table) {
|
|
|
1988
1914
|
var tableProps = props.tableProps;
|
|
1989
1915
|
|
|
1990
1916
|
var rewriteTableProps = _objectSpread2(_objectSpread2({
|
|
1991
|
-
elementMap: elementMap
|
|
1917
|
+
elementMap: elementMap,
|
|
1918
|
+
columns: tableColumns.value
|
|
1992
1919
|
}, omit(tableProps, "slots", "operate")), {}, {
|
|
1993
1920
|
operate: mergeWith({
|
|
1994
1921
|
items: tableOperateItems
|
|
@@ -2001,7 +1928,6 @@ var createCurdList = function createCurdList(SearchForm, Table) {
|
|
|
2001
1928
|
page: pageState.page,
|
|
2002
1929
|
pageSize: pageState.pageSize
|
|
2003
1930
|
},
|
|
2004
|
-
columns: tableColumns.value,
|
|
2005
1931
|
loading: curdState.listLoading,
|
|
2006
1932
|
dataSource: (_curdState$listData = curdState.listData) === null || _curdState$listData === void 0 ? void 0 : _curdState$listData.dataSource
|
|
2007
1933
|
});
|
|
@@ -2012,9 +1938,9 @@ var createCurdList = function createCurdList(SearchForm, Table) {
|
|
|
2012
1938
|
return createVNode(Fragment, null, [(_slots$start = slots.start) === null || _slots$start === void 0 ? void 0 : _slots$start.call(slots), slots.search ? slots.search({
|
|
2013
1939
|
executeSearchWithResetPage: executeSearchWithResetPage
|
|
2014
1940
|
}) : createVNode(SearchForm, mergeProps({
|
|
2015
|
-
"formElementMap": formElementMap
|
|
1941
|
+
"formElementMap": formElementMap,
|
|
1942
|
+
"columns": searchColumns.value
|
|
2016
1943
|
}, omit(props.searchProps, "slots"), {
|
|
2017
|
-
"columns": searchColumns.value,
|
|
2018
1944
|
"onFinish": executeSearchWithResetPage
|
|
2019
1945
|
}), _objectSpread2({
|
|
2020
1946
|
"default": function _default() {
|
|
@@ -2749,4 +2675,4 @@ var createTable = function createTable(Table, Props, tableMethods) {
|
|
|
2749
2675
|
});
|
|
2750
2676
|
};
|
|
2751
2677
|
|
|
2752
|
-
export { CurdAction, CurdAddAction, CurdCurrentMode, CurdMethods, CurdSubAction, ProCurd, ProModalCurd, ProModule, ProPageCurd, RequestAction, SearchMode, Wrapper, convertPathToList, createCurdDesc, createCurdForm, createCurdList, createExpose, createForm, createFormItemCompFn, createFormList, createGrid, createSearchForm, createTable, defaultPage,
|
|
2678
|
+
export { CurdAction, CurdAddAction, CurdCurrentMode, CurdMethods, CurdSubAction, ProCurd, ProModalCurd, ProModule, ProPageCurd, RequestAction, SearchMode, Wrapper, convertPathToList, createCurdDesc, createCurdForm, createCurdList, createExpose, createForm, createFormItemCompFn, createFormList, createGrid, createSearchForm, createTable, defaultPage, getColumnFormItemName, getColumnValueType, getFirstPropName, getFormItemEl, getItemEl, getValidValues, mergeStateToList, provideProCurd, provideProFormList, provideProModule, renderElement, renderElements, useComposeRequestActor, useDoneRequestActor, useFailedRequestActor, useModuleEvent, useProCurd, useProForm, useProFormList, useProModule, useProTable };
|
package/dist/index.js
CHANGED
|
@@ -758,78 +758,6 @@ exports.CurdAddAction = void 0;
|
|
|
758
758
|
CurdAddAction["CONTINUE"] = "CONTINUE";
|
|
759
759
|
})(exports.CurdAddAction || (exports.CurdAddAction = {}));
|
|
760
760
|
|
|
761
|
-
var treeDefaultNames = {
|
|
762
|
-
children: "children",
|
|
763
|
-
label: "label",
|
|
764
|
-
value: "value"
|
|
765
|
-
};
|
|
766
|
-
/**
|
|
767
|
-
* 根据value从treeData中找到对象
|
|
768
|
-
* @param data
|
|
769
|
-
* @param value
|
|
770
|
-
* @param fieldNames
|
|
771
|
-
* @param cb 对象:同步 方法:回调,可以理解为异步
|
|
772
|
-
*/
|
|
773
|
-
|
|
774
|
-
var findTargetInTree = function findTargetInTree(data, value, fieldNames, cb) {
|
|
775
|
-
var index = lodash.findIndex(data, function (item) {
|
|
776
|
-
return lodash.get(item, (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value) || treeDefaultNames.value) === value;
|
|
777
|
-
});
|
|
778
|
-
|
|
779
|
-
if (index > -1) {
|
|
780
|
-
if (lodash.isFunction(cb)) {
|
|
781
|
-
cb(index, data[index], data);
|
|
782
|
-
} else {
|
|
783
|
-
cb.index = index;
|
|
784
|
-
cb.target = data[index];
|
|
785
|
-
cb.list = data;
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
return;
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
lodash.forEach(data, function (item) {
|
|
792
|
-
var children = lodash.get(item, (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || treeDefaultNames.children);
|
|
793
|
-
|
|
794
|
-
if (lodash.size(children) > 0) {
|
|
795
|
-
findTargetInTree(children, value, fieldNames, cb);
|
|
796
|
-
}
|
|
797
|
-
});
|
|
798
|
-
};
|
|
799
|
-
/**
|
|
800
|
-
* 根据value从treeData中找出对象及父列表
|
|
801
|
-
* @param data
|
|
802
|
-
* @param value
|
|
803
|
-
* @param fieldNames
|
|
804
|
-
* @param cb
|
|
805
|
-
* @param parent
|
|
806
|
-
*/
|
|
807
|
-
|
|
808
|
-
var findTargetListInTree = function findTargetListInTree(data, value, fieldNames, cb) {
|
|
809
|
-
var parent = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
|
|
810
|
-
var target = lodash.find(data, function (item) {
|
|
811
|
-
return lodash.get(item, (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value) || treeDefaultNames.value) === value;
|
|
812
|
-
});
|
|
813
|
-
|
|
814
|
-
if (target) {
|
|
815
|
-
if (lodash.isFunction(cb)) {
|
|
816
|
-
cb([].concat(_toConsumableArray(parent), [target]));
|
|
817
|
-
} else {
|
|
818
|
-
cb.list = [].concat(_toConsumableArray(parent), [target]);
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
return;
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
lodash.forEach(data, function (item) {
|
|
825
|
-
var children = lodash.get(item, (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || treeDefaultNames.children);
|
|
826
|
-
|
|
827
|
-
if (lodash.size(children) > 0) {
|
|
828
|
-
findTargetListInTree(children, value, fieldNames, cb, [].concat(_toConsumableArray(parent), [item]));
|
|
829
|
-
}
|
|
830
|
-
});
|
|
831
|
-
};
|
|
832
|
-
|
|
833
761
|
/**
|
|
834
762
|
* 剔除showState或showStateRules规则为!true的值
|
|
835
763
|
* @param values
|
|
@@ -908,15 +836,8 @@ var mergeStateToList = function mergeStateToList(list, listState, id) {
|
|
|
908
836
|
});
|
|
909
837
|
};
|
|
910
838
|
|
|
911
|
-
/**
|
|
912
|
-
*
|
|
913
|
-
*/
|
|
914
|
-
|
|
915
|
-
var generateId = function generateId() {
|
|
916
|
-
return Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36);
|
|
917
|
-
};
|
|
918
|
-
/**
|
|
919
|
-
* ref 传递
|
|
839
|
+
/**
|
|
840
|
+
* ref 传递
|
|
920
841
|
*/
|
|
921
842
|
|
|
922
843
|
var createExpose = function createExpose(methods, targetRef) {
|
|
@@ -1285,7 +1206,7 @@ var ProCurd = vue.defineComponent({
|
|
|
1285
1206
|
params[_key - 1] = arguments[_key];
|
|
1286
1207
|
}
|
|
1287
1208
|
|
|
1288
|
-
(_moduleRef$value2 = moduleRef.value) === null || _moduleRef$value2 === void 0 ? void 0 : _moduleRef$value2.
|
|
1209
|
+
(_moduleRef$value2 = moduleRef.value) === null || _moduleRef$value2 === void 0 ? void 0 : _moduleRef$value2.sendRequest.apply(_moduleRef$value2, [requestNameOrAction].concat(params));
|
|
1289
1210
|
}
|
|
1290
1211
|
});
|
|
1291
1212
|
return function () {
|
|
@@ -1748,6 +1669,11 @@ var proCurdAddOrEditProps = function proCurdAddOrEditProps() {
|
|
|
1748
1669
|
signName: {
|
|
1749
1670
|
type: String
|
|
1750
1671
|
},
|
|
1672
|
+
//form model 绑定的curdState中的对象
|
|
1673
|
+
modelName: {
|
|
1674
|
+
type: String,
|
|
1675
|
+
"default": "detailData"
|
|
1676
|
+
},
|
|
1751
1677
|
//是否使用operate bar
|
|
1752
1678
|
operateBar: {
|
|
1753
1679
|
type: Boolean,
|
|
@@ -1849,8 +1775,8 @@ var createCurdForm = function createCurdForm(Form, Button, convertFormProps, for
|
|
|
1849
1775
|
}, lodash.omit(attrs, "onFinish"), props, {
|
|
1850
1776
|
"elementMap": props.elementMap || elementMap,
|
|
1851
1777
|
"formElementMap": props.formElementMap || formElementMap,
|
|
1852
|
-
"columns": columns.value,
|
|
1853
|
-
"model": curdState.
|
|
1778
|
+
"columns": props.columns || columns.value,
|
|
1779
|
+
"model": props.model || curdState[props.modelName],
|
|
1854
1780
|
"readonly": curdState.mode === exports.CurdCurrentMode.DETAIL,
|
|
1855
1781
|
"onFinish": handleFinish
|
|
1856
1782
|
}, convertFormProps === null || convertFormProps === void 0 ? void 0 : convertFormProps(curdState)), _objectSpread2({
|
|
@@ -1992,7 +1918,8 @@ var createCurdList = function createCurdList(SearchForm, Table) {
|
|
|
1992
1918
|
var tableProps = props.tableProps;
|
|
1993
1919
|
|
|
1994
1920
|
var rewriteTableProps = _objectSpread2(_objectSpread2({
|
|
1995
|
-
elementMap: elementMap
|
|
1921
|
+
elementMap: elementMap,
|
|
1922
|
+
columns: tableColumns.value
|
|
1996
1923
|
}, lodash.omit(tableProps, "slots", "operate")), {}, {
|
|
1997
1924
|
operate: lodash.mergeWith({
|
|
1998
1925
|
items: tableOperateItems
|
|
@@ -2005,7 +1932,6 @@ var createCurdList = function createCurdList(SearchForm, Table) {
|
|
|
2005
1932
|
page: pageState.page,
|
|
2006
1933
|
pageSize: pageState.pageSize
|
|
2007
1934
|
},
|
|
2008
|
-
columns: tableColumns.value,
|
|
2009
1935
|
loading: curdState.listLoading,
|
|
2010
1936
|
dataSource: (_curdState$listData = curdState.listData) === null || _curdState$listData === void 0 ? void 0 : _curdState$listData.dataSource
|
|
2011
1937
|
});
|
|
@@ -2016,9 +1942,9 @@ var createCurdList = function createCurdList(SearchForm, Table) {
|
|
|
2016
1942
|
return vue.createVNode(vue.Fragment, null, [(_slots$start = slots.start) === null || _slots$start === void 0 ? void 0 : _slots$start.call(slots), slots.search ? slots.search({
|
|
2017
1943
|
executeSearchWithResetPage: executeSearchWithResetPage
|
|
2018
1944
|
}) : vue.createVNode(SearchForm, vue.mergeProps({
|
|
2019
|
-
"formElementMap": formElementMap
|
|
1945
|
+
"formElementMap": formElementMap,
|
|
1946
|
+
"columns": searchColumns.value
|
|
2020
1947
|
}, lodash.omit(props.searchProps, "slots"), {
|
|
2021
|
-
"columns": searchColumns.value,
|
|
2022
1948
|
"onFinish": executeSearchWithResetPage
|
|
2023
1949
|
}), _objectSpread2({
|
|
2024
1950
|
"default": function _default() {
|
|
@@ -2772,9 +2698,6 @@ exports.createGrid = createGrid;
|
|
|
2772
2698
|
exports.createSearchForm = createSearchForm;
|
|
2773
2699
|
exports.createTable = createTable;
|
|
2774
2700
|
exports.defaultPage = defaultPage;
|
|
2775
|
-
exports.findTargetInTree = findTargetInTree;
|
|
2776
|
-
exports.findTargetListInTree = findTargetListInTree;
|
|
2777
|
-
exports.generateId = generateId;
|
|
2778
2701
|
exports.getColumnFormItemName = getColumnFormItemName;
|
|
2779
2702
|
exports.getColumnValueType = getColumnValueType;
|
|
2780
2703
|
exports.getFirstPropName = getFirstPropName;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-start/pro",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.8",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "zx <zxpstudy@163.com>",
|
|
6
6
|
"homepage": "https://github.com/zxeryu/vue-start#readme",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"vue": ">=3.x",
|
|
33
33
|
"vue-router": ">=4.x"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "abed29975a9db75dcc076220d3ce0c6ba5df98b6"
|
|
36
36
|
}
|