@vue-start/pro 0.4.2 → 0.4.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/dist/index.d.ts +6 -5
- package/dist/index.es.js +85 -69
- package/dist/index.js +85 -68
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -382,7 +382,7 @@ declare const proTableProps: () => {
|
|
|
382
382
|
};
|
|
383
383
|
};
|
|
384
384
|
declare type ProTableProps = Partial<ExtractPropTypes<ReturnType<typeof proTableProps>>>;
|
|
385
|
-
declare const createTable: (Table: any, Props?: any) => any;
|
|
385
|
+
declare const createTable: (Table: any, Props?: any, tableMethods?: string[] | undefined) => any;
|
|
386
386
|
|
|
387
387
|
declare type TPageState = {
|
|
388
388
|
page: number;
|
|
@@ -464,6 +464,7 @@ declare const proCurdProps: () => {
|
|
|
464
464
|
};
|
|
465
465
|
};
|
|
466
466
|
declare type CurdProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdProps>>>;
|
|
467
|
+
declare const CurdMethods: string[];
|
|
467
468
|
declare type ProCurdProps = CurdProps & Omit<ProModuleProps, "state" | "requests"> & {
|
|
468
469
|
curdState?: UnwrapNestedRefs<ICurdState>;
|
|
469
470
|
};
|
|
@@ -585,7 +586,7 @@ declare const proCurdAddOrEditProps: () => {
|
|
|
585
586
|
};
|
|
586
587
|
};
|
|
587
588
|
declare type ProCurdAddOrEditProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdAddOrEditProps>>>;
|
|
588
|
-
declare const createCurdForm: (Form: any, Button: any, convertFormProps?: ((curdState: ICurdState) => Record<string, any>) | undefined) => any;
|
|
589
|
+
declare const createCurdForm: (Form: any, Button: any, convertFormProps?: ((curdState: ICurdState) => Record<string, any>) | undefined, formMethods?: string[] | undefined) => any;
|
|
589
590
|
|
|
590
591
|
declare const proCurdListProps: () => {
|
|
591
592
|
/**
|
|
@@ -733,7 +734,7 @@ declare const proFormProps: () => {
|
|
|
733
734
|
};
|
|
734
735
|
};
|
|
735
736
|
declare type ProFormProps = Partial<ExtractPropTypes<ReturnType<typeof proFormProps>>>;
|
|
736
|
-
declare const createForm: (Form: any, Grid: any) => any;
|
|
737
|
+
declare const createForm: (Form: any, Grid: any, formMethods: string[]) => any;
|
|
737
738
|
|
|
738
739
|
declare enum SearchMode {
|
|
739
740
|
AUTO = "AUTO",
|
|
@@ -788,7 +789,7 @@ declare type ProSearchFormProps = Partial<ExtractPropTypes<ReturnType<typeof pro
|
|
|
788
789
|
* 该组件只是个模式,最终返回null,不做任何渲染,应配合着ProForm的包装类一起使用
|
|
789
790
|
* 针对传入的model(监听对象)做相应的finish(回调)处理
|
|
790
791
|
*/
|
|
791
|
-
declare const createSearchForm: (Form: any, Props: any) => any;
|
|
792
|
+
declare const createSearchForm: (Form: any, Props: any, formMethods: string[]) => any;
|
|
792
793
|
|
|
793
794
|
interface FormItemProps {
|
|
794
795
|
name?: string | number | (string | number)[];
|
|
@@ -961,4 +962,4 @@ declare const generateId: () => string;
|
|
|
961
962
|
*/
|
|
962
963
|
declare const createExpose: (methods: string[], targetRef: Ref$1) => {};
|
|
963
964
|
|
|
964
|
-
export { BooleanObjType, BooleanRulesObjType, CurdAction, CurdAddAction, CurdCurrentMode, 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, TData, TDefaultValueType, TElementMap, TOption, TOptions, TPageState, TTableColumn, TTableColumns, TValueType, 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 };
|
|
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, TData, TDefaultValueType, TElementMap, TOption, TOptions, TPageState, TTableColumn, TTableColumns, TValueType, 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 };
|
package/dist/index.es.js
CHANGED
|
@@ -989,6 +989,7 @@ var proCurdProps = function proCurdProps() {
|
|
|
989
989
|
};
|
|
990
990
|
};
|
|
991
991
|
|
|
992
|
+
var CurdMethods = ["sendCurdEvent", "refreshList", "sendEvent", "sendRequest"];
|
|
992
993
|
var Curd = defineComponent({
|
|
993
994
|
props: _objectSpread2({}, proCurdProps()),
|
|
994
995
|
setup: function setup(props, _ref) {
|
|
@@ -1168,7 +1169,6 @@ var Curd = defineComponent({
|
|
|
1168
1169
|
});
|
|
1169
1170
|
expose({
|
|
1170
1171
|
sendCurdEvent: sendCurdEvent,
|
|
1171
|
-
getOperate: getOperate,
|
|
1172
1172
|
refreshList: handleSearch
|
|
1173
1173
|
});
|
|
1174
1174
|
return function () {
|
|
@@ -1250,8 +1250,30 @@ var ProCurd = defineComponent({
|
|
|
1250
1250
|
});
|
|
1251
1251
|
var moduleKeys = keys(omit(ProModule.props, "state", "requests"));
|
|
1252
1252
|
expose({
|
|
1253
|
-
|
|
1254
|
-
|
|
1253
|
+
sendCurdEvent: function sendCurdEvent(event) {
|
|
1254
|
+
var _curdRef$value;
|
|
1255
|
+
|
|
1256
|
+
(_curdRef$value = curdRef.value) === null || _curdRef$value === void 0 ? void 0 : _curdRef$value.sendCurdEvent(event);
|
|
1257
|
+
},
|
|
1258
|
+
refreshList: function refreshList(extra) {
|
|
1259
|
+
var _curdRef$value2;
|
|
1260
|
+
|
|
1261
|
+
(_curdRef$value2 = curdRef.value) === null || _curdRef$value2 === void 0 ? void 0 : _curdRef$value2.refreshList(extra);
|
|
1262
|
+
},
|
|
1263
|
+
sendEvent: function sendEvent(action) {
|
|
1264
|
+
var _moduleRef$value;
|
|
1265
|
+
|
|
1266
|
+
(_moduleRef$value = moduleRef.value) === null || _moduleRef$value === void 0 ? void 0 : _moduleRef$value.sendEvent(action);
|
|
1267
|
+
},
|
|
1268
|
+
sendRequest: function sendRequest(requestNameOrAction) {
|
|
1269
|
+
var _moduleRef$value2;
|
|
1270
|
+
|
|
1271
|
+
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1272
|
+
params[_key - 1] = arguments[_key];
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
(_moduleRef$value2 = moduleRef.value) === null || _moduleRef$value2 === void 0 ? void 0 : _moduleRef$value2.sendEvent.apply(_moduleRef$value2, [requestNameOrAction].concat(params));
|
|
1276
|
+
}
|
|
1255
1277
|
});
|
|
1256
1278
|
return function () {
|
|
1257
1279
|
return createVNode(ProModule, mergeProps({
|
|
@@ -1280,8 +1302,8 @@ var modalCurdProps = function modalCurdProps() {
|
|
|
1280
1302
|
};
|
|
1281
1303
|
};
|
|
1282
1304
|
|
|
1283
|
-
/**
|
|
1284
|
-
* 事件处理
|
|
1305
|
+
/**
|
|
1306
|
+
* 事件处理
|
|
1285
1307
|
*/
|
|
1286
1308
|
var ModalCurd = defineComponent({
|
|
1287
1309
|
props: _objectSpread2({}, modalCurdProps()),
|
|
@@ -1437,7 +1459,10 @@ var ModalCurd = defineComponent({
|
|
|
1437
1459
|
var ProModalCurd = defineComponent({
|
|
1438
1460
|
props: _objectSpread2(_objectSpread2({}, ProCurd.props), ModalCurd.props),
|
|
1439
1461
|
setup: function setup(props, _ref4) {
|
|
1440
|
-
var slots = _ref4.slots
|
|
1462
|
+
var slots = _ref4.slots,
|
|
1463
|
+
expose = _ref4.expose;
|
|
1464
|
+
var curdRef = ref();
|
|
1465
|
+
expose(createExpose(CurdMethods, curdRef));
|
|
1441
1466
|
var invalidKeys = keys(ModalCurd.props);
|
|
1442
1467
|
return function () {
|
|
1443
1468
|
var _slots$default;
|
|
@@ -1609,12 +1634,17 @@ var PageCurd = defineComponent({
|
|
|
1609
1634
|
var ProPageCurd = defineComponent({
|
|
1610
1635
|
props: _objectSpread2(_objectSpread2({}, ProCurd.props), PageCurd.props),
|
|
1611
1636
|
setup: function setup(props, _ref4) {
|
|
1612
|
-
var slots = _ref4.slots
|
|
1637
|
+
var slots = _ref4.slots,
|
|
1638
|
+
expose = _ref4.expose;
|
|
1639
|
+
var curdRef = ref();
|
|
1640
|
+
expose(createExpose(CurdMethods, curdRef));
|
|
1613
1641
|
var invalidKeys = keys(PageCurd.props);
|
|
1614
1642
|
return function () {
|
|
1615
1643
|
var _slots$default;
|
|
1616
1644
|
|
|
1617
|
-
return createVNode(ProCurd,
|
|
1645
|
+
return createVNode(ProCurd, mergeProps({
|
|
1646
|
+
"ref": curdRef
|
|
1647
|
+
}, omit(props, invalidKeys)), {
|
|
1618
1648
|
"default": function _default() {
|
|
1619
1649
|
return [createVNode(PageCurd, pick(props, invalidKeys), null), (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)];
|
|
1620
1650
|
}
|
|
@@ -1720,7 +1750,7 @@ var proCurdAddOrEditProps = function proCurdAddOrEditProps() {
|
|
|
1720
1750
|
};
|
|
1721
1751
|
};
|
|
1722
1752
|
|
|
1723
|
-
var createCurdForm = function createCurdForm(Form, Button, convertFormProps) {
|
|
1753
|
+
var createCurdForm = function createCurdForm(Form, Button, convertFormProps, formMethods) {
|
|
1724
1754
|
return defineComponent({
|
|
1725
1755
|
inheritAttrs: false,
|
|
1726
1756
|
props: _objectSpread2(_objectSpread2({}, Form.props), proCurdAddOrEditProps()),
|
|
@@ -1783,13 +1813,7 @@ var createCurdForm = function createCurdForm(Form, Button, convertFormProps) {
|
|
|
1783
1813
|
(_formRef$value2 = formRef.value) === null || _formRef$value2 === void 0 ? void 0 : _formRef$value2.submit();
|
|
1784
1814
|
};
|
|
1785
1815
|
|
|
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
|
-
});
|
|
1816
|
+
expose(createExpose(formMethods, formRef));
|
|
1793
1817
|
return function () {
|
|
1794
1818
|
var _slots$divide, _slots$operateStart, _slots$operateCenter, _slots$operateEnd, _slots$default;
|
|
1795
1819
|
|
|
@@ -1832,8 +1856,8 @@ var createCurdForm = function createCurdForm(Form, Button, convertFormProps) {
|
|
|
1832
1856
|
|
|
1833
1857
|
var proCurdListProps = function proCurdListProps() {
|
|
1834
1858
|
return {
|
|
1835
|
-
/**
|
|
1836
|
-
* extra 是否放到SearchForm中
|
|
1859
|
+
/**
|
|
1860
|
+
* extra 是否放到SearchForm中
|
|
1837
1861
|
*/
|
|
1838
1862
|
extraInSearch: {
|
|
1839
1863
|
type: Boolean,
|
|
@@ -1936,9 +1960,29 @@ var createCurdList = function createCurdList(SearchForm, Table) {
|
|
|
1936
1960
|
};
|
|
1937
1961
|
|
|
1938
1962
|
return function () {
|
|
1939
|
-
var _props$searchProps, _slots$divide,
|
|
1963
|
+
var _curdState$listData, _props$searchProps, _slots$divide, _slots$divide2, _slots$footerStart, _slots$pagination, _curdState$listData2, _slots$footerEnd;
|
|
1940
1964
|
|
|
1941
1965
|
var tableProps = props.tableProps;
|
|
1966
|
+
|
|
1967
|
+
var rewriteTableProps = _objectSpread2(_objectSpread2({
|
|
1968
|
+
elementMap: elementMap
|
|
1969
|
+
}, omit(tableProps, "slots", "operate")), {}, {
|
|
1970
|
+
operate: mergeWith({
|
|
1971
|
+
items: tableOperateItems
|
|
1972
|
+
}, tableProps === null || tableProps === void 0 ? void 0 : tableProps.operate, function (objValue, srcValue) {
|
|
1973
|
+
if (isArray(objValue) && isArray(srcValue)) {
|
|
1974
|
+
return concat(objValue, convertOperateItems(srcValue));
|
|
1975
|
+
}
|
|
1976
|
+
}),
|
|
1977
|
+
paginationState: {
|
|
1978
|
+
page: pageState.page,
|
|
1979
|
+
pageSize: pageState.pageSize
|
|
1980
|
+
},
|
|
1981
|
+
columns: tableColumns.value,
|
|
1982
|
+
loading: curdState.listLoading,
|
|
1983
|
+
dataSource: (_curdState$listData = curdState.listData) === null || _curdState$listData === void 0 ? void 0 : _curdState$listData.dataSource
|
|
1984
|
+
});
|
|
1985
|
+
|
|
1942
1986
|
var extra = slots.extra ? createVNode("div", {
|
|
1943
1987
|
"class": "pro-curd-list-extra"
|
|
1944
1988
|
}, [slots.extra()]) : null;
|
|
@@ -1951,24 +1995,7 @@ var createCurdList = function createCurdList(SearchForm, Table) {
|
|
|
1951
1995
|
"default": function _default() {
|
|
1952
1996
|
return [props.extraInSearch && extra];
|
|
1953
1997
|
}
|
|
1954
|
-
}, (_props$searchProps = props.searchProps) === null || _props$searchProps === void 0 ? void 0 : _props$searchProps.slots)), (_slots$divide = slots.divide) === null || _slots$divide === void 0 ? void 0 : _slots$divide.call(slots), !props.extraInSearch && extra, slots.table ? slots.table() : createVNode(Table,
|
|
1955
|
-
"elementMap": elementMap
|
|
1956
|
-
}, omit(tableProps, "slots", "operate"), {
|
|
1957
|
-
"operate": mergeWith({
|
|
1958
|
-
items: tableOperateItems
|
|
1959
|
-
}, tableProps === null || tableProps === void 0 ? void 0 : tableProps.operate, function (objValue, srcValue) {
|
|
1960
|
-
if (isArray(objValue) && isArray(srcValue)) {
|
|
1961
|
-
return concat(objValue, convertOperateItems(srcValue));
|
|
1962
|
-
}
|
|
1963
|
-
}),
|
|
1964
|
-
"paginationState": {
|
|
1965
|
-
page: pageState.page,
|
|
1966
|
-
pageSize: pageState.pageSize
|
|
1967
|
-
},
|
|
1968
|
-
"columns": tableColumns.value,
|
|
1969
|
-
"loading": curdState.listLoading,
|
|
1970
|
-
"dataSource": (_curdState$listData = curdState.listData) === null || _curdState$listData === void 0 ? void 0 : _curdState$listData.dataSource
|
|
1971
|
-
}), tableProps === null || tableProps === void 0 ? void 0 : tableProps.slots), (_slots$divide2 = slots.divide2) === null || _slots$divide2 === void 0 ? void 0 : _slots$divide2.call(slots), createVNode("div", {
|
|
1998
|
+
}, (_props$searchProps = props.searchProps) === null || _props$searchProps === void 0 ? void 0 : _props$searchProps.slots)), (_slots$divide = slots.divide) === null || _slots$divide === void 0 ? void 0 : _slots$divide.call(slots), !props.extraInSearch && extra, slots.table ? slots.table(rewriteTableProps) : createVNode(Table, rewriteTableProps, tableProps === null || tableProps === void 0 ? void 0 : tableProps.slots), (_slots$divide2 = slots.divide2) === null || _slots$divide2 === void 0 ? void 0 : _slots$divide2.call(slots), createVNode("div", {
|
|
1972
1999
|
"class": "pro-curd-list-footer"
|
|
1973
2000
|
}, [(_slots$footerStart = slots.footerStart) === null || _slots$footerStart === void 0 ? void 0 : _slots$footerStart.call(slots), (_slots$pagination = slots.pagination) === null || _slots$pagination === void 0 ? void 0 : _slots$pagination.call(slots, pageState, (_curdState$listData2 = curdState.listData) === null || _curdState$listData2 === void 0 ? void 0 : _curdState$listData2.total, handleSearch), (_slots$footerEnd = slots.footerEnd) === null || _slots$footerEnd === void 0 ? void 0 : _slots$footerEnd.call(slots)])]);
|
|
1974
2001
|
};
|
|
@@ -2182,7 +2209,7 @@ var proFormProps = function proFormProps() {
|
|
|
2182
2209
|
};
|
|
2183
2210
|
};
|
|
2184
2211
|
|
|
2185
|
-
var createForm = function createForm(Form, Grid) {
|
|
2212
|
+
var createForm = function createForm(Form, Grid, formMethods) {
|
|
2186
2213
|
return defineComponent({
|
|
2187
2214
|
inheritAttrs: false,
|
|
2188
2215
|
props: _objectSpread2(_objectSpread2(_objectSpread2({}, Form.props), proFormProps()), omit(Grid.props, "items")),
|
|
@@ -2234,22 +2261,7 @@ var createForm = function createForm(Form, Grid) {
|
|
|
2234
2261
|
};
|
|
2235
2262
|
|
|
2236
2263
|
var formRef = ref();
|
|
2237
|
-
expose(
|
|
2238
|
-
submit: function submit() {
|
|
2239
|
-
var _formRef$value;
|
|
2240
|
-
|
|
2241
|
-
(_formRef$value = formRef.value) === null || _formRef$value === void 0 ? void 0 : _formRef$value.submit();
|
|
2242
|
-
},
|
|
2243
|
-
resetFields: function resetFields() {
|
|
2244
|
-
var _formRef$value2;
|
|
2245
|
-
|
|
2246
|
-
for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2247
|
-
params[_key] = arguments[_key];
|
|
2248
|
-
}
|
|
2249
|
-
|
|
2250
|
-
(_formRef$value2 = formRef.value) === null || _formRef$value2 === void 0 ? void 0 : _formRef$value2.resetFields.apply(_formRef$value2, params);
|
|
2251
|
-
}
|
|
2252
|
-
});
|
|
2264
|
+
expose(createExpose(formMethods, formRef));
|
|
2253
2265
|
provideProForm(_objectSpread2({
|
|
2254
2266
|
formState: formState,
|
|
2255
2267
|
showState: showState,
|
|
@@ -2361,11 +2373,12 @@ var proSearchFormProps = function proSearchFormProps() {
|
|
|
2361
2373
|
* 该组件只是个模式,最终返回null,不做任何渲染,应配合着ProForm的包装类一起使用
|
|
2362
2374
|
* 针对传入的model(监听对象)做相应的finish(回调)处理
|
|
2363
2375
|
*/
|
|
2364
|
-
var createSearchForm = function createSearchForm(Form, Props) {
|
|
2376
|
+
var createSearchForm = function createSearchForm(Form, Props, formMethods) {
|
|
2365
2377
|
return defineComponent({
|
|
2366
2378
|
props: _objectSpread2(_objectSpread2(_objectSpread2({}, Form.props), Props), proSearchFormProps()),
|
|
2367
2379
|
setup: function setup(props, _ref) {
|
|
2368
|
-
var slots = _ref.slots
|
|
2380
|
+
var slots = _ref.slots,
|
|
2381
|
+
expose = _ref.expose;
|
|
2369
2382
|
var formState = props.model || reactive({});
|
|
2370
2383
|
var valueTypeSet = new Set(props.debounceTypes); //根据column valueType 算出默认需要debounce处理的属性集合
|
|
2371
2384
|
|
|
@@ -2377,6 +2390,7 @@ var createSearchForm = function createSearchForm(Form, Props) {
|
|
|
2377
2390
|
return getColumnFormItemName(column);
|
|
2378
2391
|
});
|
|
2379
2392
|
var formRef = ref();
|
|
2393
|
+
expose(createExpose(formMethods, formRef));
|
|
2380
2394
|
|
|
2381
2395
|
var handleFinish = function handleFinish() {
|
|
2382
2396
|
var _formRef$value;
|
|
@@ -2533,8 +2547,8 @@ var proTableProps = function proTableProps() {
|
|
|
2533
2547
|
type: String
|
|
2534
2548
|
},
|
|
2535
2549
|
|
|
2536
|
-
/**
|
|
2537
|
-
* 公共column,会merge到columns item中
|
|
2550
|
+
/**
|
|
2551
|
+
* 公共column,会merge到columns item中
|
|
2538
2552
|
*/
|
|
2539
2553
|
column: {
|
|
2540
2554
|
type: Object
|
|
@@ -2547,29 +2561,29 @@ var proTableProps = function proTableProps() {
|
|
|
2547
2561
|
type: Object
|
|
2548
2562
|
},
|
|
2549
2563
|
|
|
2550
|
-
/**
|
|
2551
|
-
* 展示控件集合,readonly模式下使用这些组件渲染
|
|
2564
|
+
/**
|
|
2565
|
+
* 展示控件集合,readonly模式下使用这些组件渲染
|
|
2552
2566
|
*/
|
|
2553
2567
|
elementMap: {
|
|
2554
2568
|
type: Object
|
|
2555
2569
|
},
|
|
2556
2570
|
|
|
2557
|
-
/**
|
|
2558
|
-
* 序号
|
|
2571
|
+
/**
|
|
2572
|
+
* 序号
|
|
2559
2573
|
*/
|
|
2560
2574
|
serialNumber: {
|
|
2561
2575
|
type: Boolean
|
|
2562
2576
|
},
|
|
2563
2577
|
|
|
2564
|
-
/**
|
|
2565
|
-
* 分页
|
|
2578
|
+
/**
|
|
2579
|
+
* 分页
|
|
2566
2580
|
*/
|
|
2567
2581
|
paginationState: {
|
|
2568
2582
|
type: Object
|
|
2569
2583
|
},
|
|
2570
2584
|
|
|
2571
|
-
/**
|
|
2572
|
-
* provide传递
|
|
2585
|
+
/**
|
|
2586
|
+
* provide传递
|
|
2573
2587
|
*/
|
|
2574
2588
|
provideExtra: {
|
|
2575
2589
|
type: Object
|
|
@@ -2577,11 +2591,12 @@ var proTableProps = function proTableProps() {
|
|
|
2577
2591
|
};
|
|
2578
2592
|
};
|
|
2579
2593
|
|
|
2580
|
-
var createTable = function createTable(Table, Props) {
|
|
2594
|
+
var createTable = function createTable(Table, Props, tableMethods) {
|
|
2581
2595
|
return defineComponent({
|
|
2582
2596
|
props: _objectSpread2(_objectSpread2(_objectSpread2({}, Table.props), Props), proTableProps()),
|
|
2583
2597
|
setup: function setup(props, _ref) {
|
|
2584
|
-
var slots = _ref.slots
|
|
2598
|
+
var slots = _ref.slots,
|
|
2599
|
+
expose = _ref.expose;
|
|
2585
2600
|
|
|
2586
2601
|
var createNumberColumn = function createNumberColumn() {
|
|
2587
2602
|
return _objectSpread2(_objectSpread2({
|
|
@@ -2696,6 +2711,7 @@ var createTable = function createTable(Table, Props) {
|
|
|
2696
2711
|
columns: columns,
|
|
2697
2712
|
tableRef: tableRef
|
|
2698
2713
|
}, props.provideExtra));
|
|
2714
|
+
expose(createExpose(tableMethods || [], tableRef));
|
|
2699
2715
|
var invalidKeys = keys(proTableProps());
|
|
2700
2716
|
return function () {
|
|
2701
2717
|
return createVNode(Table, mergeProps({
|
|
@@ -2708,4 +2724,4 @@ var createTable = function createTable(Table, Props) {
|
|
|
2708
2724
|
});
|
|
2709
2725
|
};
|
|
2710
2726
|
|
|
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 };
|
|
2727
|
+
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, findTargetInTree, findTargetListInTree, generateId, 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
|
@@ -993,6 +993,7 @@ var proCurdProps = function proCurdProps() {
|
|
|
993
993
|
};
|
|
994
994
|
};
|
|
995
995
|
|
|
996
|
+
var CurdMethods = ["sendCurdEvent", "refreshList", "sendEvent", "sendRequest"];
|
|
996
997
|
var Curd = vue.defineComponent({
|
|
997
998
|
props: _objectSpread2({}, proCurdProps()),
|
|
998
999
|
setup: function setup(props, _ref) {
|
|
@@ -1172,7 +1173,6 @@ var Curd = vue.defineComponent({
|
|
|
1172
1173
|
});
|
|
1173
1174
|
expose({
|
|
1174
1175
|
sendCurdEvent: sendCurdEvent,
|
|
1175
|
-
getOperate: getOperate,
|
|
1176
1176
|
refreshList: handleSearch
|
|
1177
1177
|
});
|
|
1178
1178
|
return function () {
|
|
@@ -1254,8 +1254,30 @@ var ProCurd = vue.defineComponent({
|
|
|
1254
1254
|
});
|
|
1255
1255
|
var moduleKeys = lodash.keys(lodash.omit(ProModule.props, "state", "requests"));
|
|
1256
1256
|
expose({
|
|
1257
|
-
|
|
1258
|
-
|
|
1257
|
+
sendCurdEvent: function sendCurdEvent(event) {
|
|
1258
|
+
var _curdRef$value;
|
|
1259
|
+
|
|
1260
|
+
(_curdRef$value = curdRef.value) === null || _curdRef$value === void 0 ? void 0 : _curdRef$value.sendCurdEvent(event);
|
|
1261
|
+
},
|
|
1262
|
+
refreshList: function refreshList(extra) {
|
|
1263
|
+
var _curdRef$value2;
|
|
1264
|
+
|
|
1265
|
+
(_curdRef$value2 = curdRef.value) === null || _curdRef$value2 === void 0 ? void 0 : _curdRef$value2.refreshList(extra);
|
|
1266
|
+
},
|
|
1267
|
+
sendEvent: function sendEvent(action) {
|
|
1268
|
+
var _moduleRef$value;
|
|
1269
|
+
|
|
1270
|
+
(_moduleRef$value = moduleRef.value) === null || _moduleRef$value === void 0 ? void 0 : _moduleRef$value.sendEvent(action);
|
|
1271
|
+
},
|
|
1272
|
+
sendRequest: function sendRequest(requestNameOrAction) {
|
|
1273
|
+
var _moduleRef$value2;
|
|
1274
|
+
|
|
1275
|
+
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1276
|
+
params[_key - 1] = arguments[_key];
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
(_moduleRef$value2 = moduleRef.value) === null || _moduleRef$value2 === void 0 ? void 0 : _moduleRef$value2.sendEvent.apply(_moduleRef$value2, [requestNameOrAction].concat(params));
|
|
1280
|
+
}
|
|
1259
1281
|
});
|
|
1260
1282
|
return function () {
|
|
1261
1283
|
return vue.createVNode(ProModule, vue.mergeProps({
|
|
@@ -1284,8 +1306,8 @@ var modalCurdProps = function modalCurdProps() {
|
|
|
1284
1306
|
};
|
|
1285
1307
|
};
|
|
1286
1308
|
|
|
1287
|
-
/**
|
|
1288
|
-
* 事件处理
|
|
1309
|
+
/**
|
|
1310
|
+
* 事件处理
|
|
1289
1311
|
*/
|
|
1290
1312
|
var ModalCurd = vue.defineComponent({
|
|
1291
1313
|
props: _objectSpread2({}, modalCurdProps()),
|
|
@@ -1441,7 +1463,10 @@ var ModalCurd = vue.defineComponent({
|
|
|
1441
1463
|
var ProModalCurd = vue.defineComponent({
|
|
1442
1464
|
props: _objectSpread2(_objectSpread2({}, ProCurd.props), ModalCurd.props),
|
|
1443
1465
|
setup: function setup(props, _ref4) {
|
|
1444
|
-
var slots = _ref4.slots
|
|
1466
|
+
var slots = _ref4.slots,
|
|
1467
|
+
expose = _ref4.expose;
|
|
1468
|
+
var curdRef = vue.ref();
|
|
1469
|
+
expose(createExpose(CurdMethods, curdRef));
|
|
1445
1470
|
var invalidKeys = lodash.keys(ModalCurd.props);
|
|
1446
1471
|
return function () {
|
|
1447
1472
|
var _slots$default;
|
|
@@ -1613,12 +1638,17 @@ var PageCurd = vue.defineComponent({
|
|
|
1613
1638
|
var ProPageCurd = vue.defineComponent({
|
|
1614
1639
|
props: _objectSpread2(_objectSpread2({}, ProCurd.props), PageCurd.props),
|
|
1615
1640
|
setup: function setup(props, _ref4) {
|
|
1616
|
-
var slots = _ref4.slots
|
|
1641
|
+
var slots = _ref4.slots,
|
|
1642
|
+
expose = _ref4.expose;
|
|
1643
|
+
var curdRef = vue.ref();
|
|
1644
|
+
expose(createExpose(CurdMethods, curdRef));
|
|
1617
1645
|
var invalidKeys = lodash.keys(PageCurd.props);
|
|
1618
1646
|
return function () {
|
|
1619
1647
|
var _slots$default;
|
|
1620
1648
|
|
|
1621
|
-
return vue.createVNode(ProCurd,
|
|
1649
|
+
return vue.createVNode(ProCurd, vue.mergeProps({
|
|
1650
|
+
"ref": curdRef
|
|
1651
|
+
}, lodash.omit(props, invalidKeys)), {
|
|
1622
1652
|
"default": function _default() {
|
|
1623
1653
|
return [vue.createVNode(PageCurd, lodash.pick(props, invalidKeys), null), (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)];
|
|
1624
1654
|
}
|
|
@@ -1724,7 +1754,7 @@ var proCurdAddOrEditProps = function proCurdAddOrEditProps() {
|
|
|
1724
1754
|
};
|
|
1725
1755
|
};
|
|
1726
1756
|
|
|
1727
|
-
var createCurdForm = function createCurdForm(Form, Button, convertFormProps) {
|
|
1757
|
+
var createCurdForm = function createCurdForm(Form, Button, convertFormProps, formMethods) {
|
|
1728
1758
|
return vue.defineComponent({
|
|
1729
1759
|
inheritAttrs: false,
|
|
1730
1760
|
props: _objectSpread2(_objectSpread2({}, Form.props), proCurdAddOrEditProps()),
|
|
@@ -1787,13 +1817,7 @@ var createCurdForm = function createCurdForm(Form, Button, convertFormProps) {
|
|
|
1787
1817
|
(_formRef$value2 = formRef.value) === null || _formRef$value2 === void 0 ? void 0 : _formRef$value2.submit();
|
|
1788
1818
|
};
|
|
1789
1819
|
|
|
1790
|
-
expose(
|
|
1791
|
-
submit: function submit() {
|
|
1792
|
-
var _formRef$value3;
|
|
1793
|
-
|
|
1794
|
-
(_formRef$value3 = formRef.value) === null || _formRef$value3 === void 0 ? void 0 : _formRef$value3.submit();
|
|
1795
|
-
}
|
|
1796
|
-
});
|
|
1820
|
+
expose(createExpose(formMethods, formRef));
|
|
1797
1821
|
return function () {
|
|
1798
1822
|
var _slots$divide, _slots$operateStart, _slots$operateCenter, _slots$operateEnd, _slots$default;
|
|
1799
1823
|
|
|
@@ -1836,8 +1860,8 @@ var createCurdForm = function createCurdForm(Form, Button, convertFormProps) {
|
|
|
1836
1860
|
|
|
1837
1861
|
var proCurdListProps = function proCurdListProps() {
|
|
1838
1862
|
return {
|
|
1839
|
-
/**
|
|
1840
|
-
* extra 是否放到SearchForm中
|
|
1863
|
+
/**
|
|
1864
|
+
* extra 是否放到SearchForm中
|
|
1841
1865
|
*/
|
|
1842
1866
|
extraInSearch: {
|
|
1843
1867
|
type: Boolean,
|
|
@@ -1940,9 +1964,29 @@ var createCurdList = function createCurdList(SearchForm, Table) {
|
|
|
1940
1964
|
};
|
|
1941
1965
|
|
|
1942
1966
|
return function () {
|
|
1943
|
-
var _props$searchProps, _slots$divide,
|
|
1967
|
+
var _curdState$listData, _props$searchProps, _slots$divide, _slots$divide2, _slots$footerStart, _slots$pagination, _curdState$listData2, _slots$footerEnd;
|
|
1944
1968
|
|
|
1945
1969
|
var tableProps = props.tableProps;
|
|
1970
|
+
|
|
1971
|
+
var rewriteTableProps = _objectSpread2(_objectSpread2({
|
|
1972
|
+
elementMap: elementMap
|
|
1973
|
+
}, lodash.omit(tableProps, "slots", "operate")), {}, {
|
|
1974
|
+
operate: lodash.mergeWith({
|
|
1975
|
+
items: tableOperateItems
|
|
1976
|
+
}, tableProps === null || tableProps === void 0 ? void 0 : tableProps.operate, function (objValue, srcValue) {
|
|
1977
|
+
if (lodash.isArray(objValue) && lodash.isArray(srcValue)) {
|
|
1978
|
+
return lodash.concat(objValue, convertOperateItems(srcValue));
|
|
1979
|
+
}
|
|
1980
|
+
}),
|
|
1981
|
+
paginationState: {
|
|
1982
|
+
page: pageState.page,
|
|
1983
|
+
pageSize: pageState.pageSize
|
|
1984
|
+
},
|
|
1985
|
+
columns: tableColumns.value,
|
|
1986
|
+
loading: curdState.listLoading,
|
|
1987
|
+
dataSource: (_curdState$listData = curdState.listData) === null || _curdState$listData === void 0 ? void 0 : _curdState$listData.dataSource
|
|
1988
|
+
});
|
|
1989
|
+
|
|
1946
1990
|
var extra = slots.extra ? vue.createVNode("div", {
|
|
1947
1991
|
"class": "pro-curd-list-extra"
|
|
1948
1992
|
}, [slots.extra()]) : null;
|
|
@@ -1955,24 +1999,7 @@ var createCurdList = function createCurdList(SearchForm, Table) {
|
|
|
1955
1999
|
"default": function _default() {
|
|
1956
2000
|
return [props.extraInSearch && extra];
|
|
1957
2001
|
}
|
|
1958
|
-
}, (_props$searchProps = props.searchProps) === null || _props$searchProps === void 0 ? void 0 : _props$searchProps.slots)), (_slots$divide = slots.divide) === null || _slots$divide === void 0 ? void 0 : _slots$divide.call(slots), !props.extraInSearch && extra, slots.table ? slots.table() : vue.createVNode(Table, vue.
|
|
1959
|
-
"elementMap": elementMap
|
|
1960
|
-
}, lodash.omit(tableProps, "slots", "operate"), {
|
|
1961
|
-
"operate": lodash.mergeWith({
|
|
1962
|
-
items: tableOperateItems
|
|
1963
|
-
}, tableProps === null || tableProps === void 0 ? void 0 : tableProps.operate, function (objValue, srcValue) {
|
|
1964
|
-
if (lodash.isArray(objValue) && lodash.isArray(srcValue)) {
|
|
1965
|
-
return lodash.concat(objValue, convertOperateItems(srcValue));
|
|
1966
|
-
}
|
|
1967
|
-
}),
|
|
1968
|
-
"paginationState": {
|
|
1969
|
-
page: pageState.page,
|
|
1970
|
-
pageSize: pageState.pageSize
|
|
1971
|
-
},
|
|
1972
|
-
"columns": tableColumns.value,
|
|
1973
|
-
"loading": curdState.listLoading,
|
|
1974
|
-
"dataSource": (_curdState$listData = curdState.listData) === null || _curdState$listData === void 0 ? void 0 : _curdState$listData.dataSource
|
|
1975
|
-
}), 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", {
|
|
2002
|
+
}, (_props$searchProps = props.searchProps) === null || _props$searchProps === void 0 ? void 0 : _props$searchProps.slots)), (_slots$divide = slots.divide) === null || _slots$divide === void 0 ? void 0 : _slots$divide.call(slots), !props.extraInSearch && extra, slots.table ? slots.table(rewriteTableProps) : vue.createVNode(Table, rewriteTableProps, 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", {
|
|
1976
2003
|
"class": "pro-curd-list-footer"
|
|
1977
2004
|
}, [(_slots$footerStart = slots.footerStart) === null || _slots$footerStart === void 0 ? void 0 : _slots$footerStart.call(slots), (_slots$pagination = slots.pagination) === null || _slots$pagination === void 0 ? void 0 : _slots$pagination.call(slots, pageState, (_curdState$listData2 = curdState.listData) === null || _curdState$listData2 === void 0 ? void 0 : _curdState$listData2.total, handleSearch), (_slots$footerEnd = slots.footerEnd) === null || _slots$footerEnd === void 0 ? void 0 : _slots$footerEnd.call(slots)])]);
|
|
1978
2005
|
};
|
|
@@ -2186,7 +2213,7 @@ var proFormProps = function proFormProps() {
|
|
|
2186
2213
|
};
|
|
2187
2214
|
};
|
|
2188
2215
|
|
|
2189
|
-
var createForm = function createForm(Form, Grid) {
|
|
2216
|
+
var createForm = function createForm(Form, Grid, formMethods) {
|
|
2190
2217
|
return vue.defineComponent({
|
|
2191
2218
|
inheritAttrs: false,
|
|
2192
2219
|
props: _objectSpread2(_objectSpread2(_objectSpread2({}, Form.props), proFormProps()), lodash.omit(Grid.props, "items")),
|
|
@@ -2238,22 +2265,7 @@ var createForm = function createForm(Form, Grid) {
|
|
|
2238
2265
|
};
|
|
2239
2266
|
|
|
2240
2267
|
var formRef = vue.ref();
|
|
2241
|
-
expose(
|
|
2242
|
-
submit: function submit() {
|
|
2243
|
-
var _formRef$value;
|
|
2244
|
-
|
|
2245
|
-
(_formRef$value = formRef.value) === null || _formRef$value === void 0 ? void 0 : _formRef$value.submit();
|
|
2246
|
-
},
|
|
2247
|
-
resetFields: function resetFields() {
|
|
2248
|
-
var _formRef$value2;
|
|
2249
|
-
|
|
2250
|
-
for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2251
|
-
params[_key] = arguments[_key];
|
|
2252
|
-
}
|
|
2253
|
-
|
|
2254
|
-
(_formRef$value2 = formRef.value) === null || _formRef$value2 === void 0 ? void 0 : _formRef$value2.resetFields.apply(_formRef$value2, params);
|
|
2255
|
-
}
|
|
2256
|
-
});
|
|
2268
|
+
expose(createExpose(formMethods, formRef));
|
|
2257
2269
|
provideProForm(_objectSpread2({
|
|
2258
2270
|
formState: formState,
|
|
2259
2271
|
showState: showState,
|
|
@@ -2365,11 +2377,12 @@ var proSearchFormProps = function proSearchFormProps() {
|
|
|
2365
2377
|
* 该组件只是个模式,最终返回null,不做任何渲染,应配合着ProForm的包装类一起使用
|
|
2366
2378
|
* 针对传入的model(监听对象)做相应的finish(回调)处理
|
|
2367
2379
|
*/
|
|
2368
|
-
var createSearchForm = function createSearchForm(Form, Props) {
|
|
2380
|
+
var createSearchForm = function createSearchForm(Form, Props, formMethods) {
|
|
2369
2381
|
return vue.defineComponent({
|
|
2370
2382
|
props: _objectSpread2(_objectSpread2(_objectSpread2({}, Form.props), Props), proSearchFormProps()),
|
|
2371
2383
|
setup: function setup(props, _ref) {
|
|
2372
|
-
var slots = _ref.slots
|
|
2384
|
+
var slots = _ref.slots,
|
|
2385
|
+
expose = _ref.expose;
|
|
2373
2386
|
var formState = props.model || vue.reactive({});
|
|
2374
2387
|
var valueTypeSet = new Set(props.debounceTypes); //根据column valueType 算出默认需要debounce处理的属性集合
|
|
2375
2388
|
|
|
@@ -2381,6 +2394,7 @@ var createSearchForm = function createSearchForm(Form, Props) {
|
|
|
2381
2394
|
return getColumnFormItemName(column);
|
|
2382
2395
|
});
|
|
2383
2396
|
var formRef = vue.ref();
|
|
2397
|
+
expose(createExpose(formMethods, formRef));
|
|
2384
2398
|
|
|
2385
2399
|
var handleFinish = function handleFinish() {
|
|
2386
2400
|
var _formRef$value;
|
|
@@ -2537,8 +2551,8 @@ var proTableProps = function proTableProps() {
|
|
|
2537
2551
|
type: String
|
|
2538
2552
|
},
|
|
2539
2553
|
|
|
2540
|
-
/**
|
|
2541
|
-
* 公共column,会merge到columns item中
|
|
2554
|
+
/**
|
|
2555
|
+
* 公共column,会merge到columns item中
|
|
2542
2556
|
*/
|
|
2543
2557
|
column: {
|
|
2544
2558
|
type: Object
|
|
@@ -2551,29 +2565,29 @@ var proTableProps = function proTableProps() {
|
|
|
2551
2565
|
type: Object
|
|
2552
2566
|
},
|
|
2553
2567
|
|
|
2554
|
-
/**
|
|
2555
|
-
* 展示控件集合,readonly模式下使用这些组件渲染
|
|
2568
|
+
/**
|
|
2569
|
+
* 展示控件集合,readonly模式下使用这些组件渲染
|
|
2556
2570
|
*/
|
|
2557
2571
|
elementMap: {
|
|
2558
2572
|
type: Object
|
|
2559
2573
|
},
|
|
2560
2574
|
|
|
2561
|
-
/**
|
|
2562
|
-
* 序号
|
|
2575
|
+
/**
|
|
2576
|
+
* 序号
|
|
2563
2577
|
*/
|
|
2564
2578
|
serialNumber: {
|
|
2565
2579
|
type: Boolean
|
|
2566
2580
|
},
|
|
2567
2581
|
|
|
2568
|
-
/**
|
|
2569
|
-
* 分页
|
|
2582
|
+
/**
|
|
2583
|
+
* 分页
|
|
2570
2584
|
*/
|
|
2571
2585
|
paginationState: {
|
|
2572
2586
|
type: Object
|
|
2573
2587
|
},
|
|
2574
2588
|
|
|
2575
|
-
/**
|
|
2576
|
-
* provide传递
|
|
2589
|
+
/**
|
|
2590
|
+
* provide传递
|
|
2577
2591
|
*/
|
|
2578
2592
|
provideExtra: {
|
|
2579
2593
|
type: Object
|
|
@@ -2581,11 +2595,12 @@ var proTableProps = function proTableProps() {
|
|
|
2581
2595
|
};
|
|
2582
2596
|
};
|
|
2583
2597
|
|
|
2584
|
-
var createTable = function createTable(Table, Props) {
|
|
2598
|
+
var createTable = function createTable(Table, Props, tableMethods) {
|
|
2585
2599
|
return vue.defineComponent({
|
|
2586
2600
|
props: _objectSpread2(_objectSpread2(_objectSpread2({}, Table.props), Props), proTableProps()),
|
|
2587
2601
|
setup: function setup(props, _ref) {
|
|
2588
|
-
var slots = _ref.slots
|
|
2602
|
+
var slots = _ref.slots,
|
|
2603
|
+
expose = _ref.expose;
|
|
2589
2604
|
|
|
2590
2605
|
var createNumberColumn = function createNumberColumn() {
|
|
2591
2606
|
return _objectSpread2(_objectSpread2({
|
|
@@ -2700,6 +2715,7 @@ var createTable = function createTable(Table, Props) {
|
|
|
2700
2715
|
columns: columns,
|
|
2701
2716
|
tableRef: tableRef
|
|
2702
2717
|
}, props.provideExtra));
|
|
2718
|
+
expose(createExpose(tableMethods || [], tableRef));
|
|
2703
2719
|
var invalidKeys = lodash.keys(proTableProps());
|
|
2704
2720
|
return function () {
|
|
2705
2721
|
return vue.createVNode(Table, vue.mergeProps({
|
|
@@ -2712,6 +2728,7 @@ var createTable = function createTable(Table, Props) {
|
|
|
2712
2728
|
});
|
|
2713
2729
|
};
|
|
2714
2730
|
|
|
2731
|
+
exports.CurdMethods = CurdMethods;
|
|
2715
2732
|
exports.ProCurd = ProCurd;
|
|
2716
2733
|
exports.ProModalCurd = ProModalCurd;
|
|
2717
2734
|
exports.ProModule = ProModule;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-start/pro",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
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": "27924381a78de86f608be261da28b77c720f7b6e"
|
|
36
36
|
}
|