@epie/bi-crud 2.0.17 → 2.0.22
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/lib/bi-crud.esm.js +152 -35
- package/lib/bi-crud.umd.js +153 -34
- package/lib/components/add-btn.d.ts +1 -1
- package/lib/components/adv-btn.d.ts +1 -1
- package/lib/components/context-menu/index.d.ts +1 -1
- package/lib/components/crud/index.d.ts +1 -1
- package/lib/components/descriptions/descriptions.d.ts +1 -1
- package/lib/components/error-message.d.ts +1 -1
- package/lib/components/export-btn.d.ts +1 -1
- package/lib/components/filter-group.d.ts +1 -1
- package/lib/components/filter.d.ts +1 -1
- package/lib/components/flex1.d.ts +1 -1
- package/lib/components/form/form.d.ts +2 -2
- package/lib/components/form/index.d.ts +1 -1
- package/lib/components/inline-search/inlinesearch.d.ts +2 -2
- package/lib/components/multi-delete-btn.d.ts +1 -1
- package/lib/components/pagination.d.ts +1 -1
- package/lib/components/refresh-btn.d.ts +1 -1
- package/lib/hooks/core.d.ts +3 -0
- package/lib/types/base/crud.d.ts +11 -1
- package/lib/types/base/render.d.ts +3 -6
- package/lib/types/base/table.d.ts +1 -1
- package/lib/utils/form.d.ts +7 -0
- package/package.json +3 -2
package/lib/bi-crud.esm.js
CHANGED
|
@@ -9153,14 +9153,13 @@ var Crud$1 = defineComponent({
|
|
|
9153
9153
|
}
|
|
9154
9154
|
},
|
|
9155
9155
|
// 权限
|
|
9156
|
-
permission: {
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
export: true
|
|
9156
|
+
permission: {// update: true,
|
|
9157
|
+
// page: true,
|
|
9158
|
+
// info: true,
|
|
9159
|
+
// list: true,
|
|
9160
|
+
// add: true,
|
|
9161
|
+
// delete: true,
|
|
9162
|
+
// export: true,
|
|
9164
9163
|
}
|
|
9165
9164
|
}, global?.crud)); // 集合
|
|
9166
9165
|
|
|
@@ -9225,6 +9224,7 @@ function useCrud(options, cb) {
|
|
|
9225
9224
|
} = options || {};
|
|
9226
9225
|
const Crud = ref();
|
|
9227
9226
|
useParent("epie-crud", Crud);
|
|
9227
|
+
const allPermission = usePermission();
|
|
9228
9228
|
watch(() => Crud.value, val => {
|
|
9229
9229
|
if (val) {
|
|
9230
9230
|
if (options) {
|
|
@@ -9234,7 +9234,27 @@ function useCrud(options, cb) {
|
|
|
9234
9234
|
});
|
|
9235
9235
|
val.set("dict", dict);
|
|
9236
9236
|
val.set("service", service);
|
|
9237
|
-
|
|
9237
|
+
|
|
9238
|
+
if (permission !== undefined) {
|
|
9239
|
+
const permToSet = {};
|
|
9240
|
+
|
|
9241
|
+
for (let key in permission) {
|
|
9242
|
+
permToSet[key] = allPermission.indexOf(permission[key]) > 0;
|
|
9243
|
+
}
|
|
9244
|
+
|
|
9245
|
+
val.set("permission", permToSet);
|
|
9246
|
+
} else {
|
|
9247
|
+
const permToSet = {
|
|
9248
|
+
update: true,
|
|
9249
|
+
page: true,
|
|
9250
|
+
info: true,
|
|
9251
|
+
list: true,
|
|
9252
|
+
add: true,
|
|
9253
|
+
delete: true,
|
|
9254
|
+
export: true
|
|
9255
|
+
};
|
|
9256
|
+
val.set("permission", permToSet);
|
|
9257
|
+
}
|
|
9238
9258
|
}
|
|
9239
9259
|
|
|
9240
9260
|
if (cb && Crud.value) {
|
|
@@ -9335,6 +9355,14 @@ function useCore() {
|
|
|
9335
9355
|
crud,
|
|
9336
9356
|
mitt
|
|
9337
9357
|
};
|
|
9358
|
+
} // 设置权限
|
|
9359
|
+
|
|
9360
|
+
function useSetPermission(app, permissions) {
|
|
9361
|
+
app.provide("epie-permission", permissions);
|
|
9362
|
+
}
|
|
9363
|
+
function usePermission() {
|
|
9364
|
+
const permissions = inject("epie-permission");
|
|
9365
|
+
return permissions;
|
|
9338
9366
|
}
|
|
9339
9367
|
|
|
9340
9368
|
function useBrowser(app) {
|
|
@@ -9539,6 +9567,16 @@ var AdvBtn = defineComponent({
|
|
|
9539
9567
|
|
|
9540
9568
|
});
|
|
9541
9569
|
|
|
9570
|
+
const getLabel = src => {
|
|
9571
|
+
if (isString(src)) {
|
|
9572
|
+
return {
|
|
9573
|
+
text: src
|
|
9574
|
+
};
|
|
9575
|
+
}
|
|
9576
|
+
|
|
9577
|
+
return src;
|
|
9578
|
+
};
|
|
9579
|
+
|
|
9542
9580
|
const Regs = new Map();
|
|
9543
9581
|
/**
|
|
9544
9582
|
* 解析节点
|
|
@@ -9578,18 +9616,19 @@ function parseNode(vnode, options) {
|
|
|
9578
9616
|
|
|
9579
9617
|
Regs.set(vnode.name, { ...vnode.vm
|
|
9580
9618
|
});
|
|
9581
|
-
}
|
|
9619
|
+
}
|
|
9582
9620
|
|
|
9621
|
+
let vnodeProps = vnode.props; // 处理 props
|
|
9583
9622
|
|
|
9584
9623
|
if (isFunction(vnode.props)) {
|
|
9585
|
-
|
|
9624
|
+
vnodeProps = vnode.props({
|
|
9586
9625
|
scope,
|
|
9587
9626
|
...options._data
|
|
9588
9627
|
});
|
|
9589
9628
|
} // 组件参数
|
|
9590
9629
|
|
|
9591
9630
|
|
|
9592
|
-
const props = { ...
|
|
9631
|
+
const props = { ...vnodeProps,
|
|
9593
9632
|
..._data,
|
|
9594
9633
|
scope
|
|
9595
9634
|
}; // 添加双向绑定
|
|
@@ -9665,7 +9704,7 @@ function renderNode(vnode, options) {
|
|
|
9665
9704
|
|
|
9666
9705
|
if (placeholder) {
|
|
9667
9706
|
if (!item.component.props.placeholder) {
|
|
9668
|
-
item.component.props.placeholder = placeholder + item.label;
|
|
9707
|
+
item.component.props.placeholder = placeholder + getLabel(item.label).text;
|
|
9669
9708
|
}
|
|
9670
9709
|
}
|
|
9671
9710
|
}
|
|
@@ -9720,6 +9759,12 @@ function renderNode(vnode, options) {
|
|
|
9720
9759
|
|
|
9721
9760
|
if (isArray(vnode.options)) {
|
|
9722
9761
|
list = vnode.options;
|
|
9762
|
+
}
|
|
9763
|
+
|
|
9764
|
+
if (scope[prop] !== undefined || scope[prop] !== null) {
|
|
9765
|
+
if (!isArray(scope[prop]) && list.filter(item => item.value === scope[prop]).length == 0) {
|
|
9766
|
+
delete scope[prop];
|
|
9767
|
+
}
|
|
9723
9768
|
} // 设置内容
|
|
9724
9769
|
|
|
9725
9770
|
|
|
@@ -10030,35 +10075,62 @@ function useRender$3(ctx) {
|
|
|
10030
10075
|
function renderForm() {
|
|
10031
10076
|
// 表单项列表
|
|
10032
10077
|
const children = ctx.conf.items.map(e => {
|
|
10078
|
+
// 是否隐藏
|
|
10079
|
+
e._hidden = Parse("hidden", {
|
|
10080
|
+
value: e.hidden,
|
|
10081
|
+
scope: ctx.form,
|
|
10082
|
+
data: ctx.conf._data
|
|
10083
|
+
}); // 隐藏
|
|
10084
|
+
|
|
10085
|
+
if (e._hidden) {
|
|
10086
|
+
return null;
|
|
10087
|
+
}
|
|
10088
|
+
|
|
10033
10089
|
if (e.type == "tabs") {
|
|
10034
10090
|
return createVNode(resolveComponent("epie-form-tabs"), mergeProps({
|
|
10035
10091
|
"modelValue": ctx.tabActive,
|
|
10036
10092
|
"onUpdate:modelValue": $event => ctx.tabActive = $event
|
|
10037
10093
|
}, e.props), null);
|
|
10038
|
-
}
|
|
10039
|
-
|
|
10094
|
+
} else if (e.type == "divider") {
|
|
10095
|
+
return createVNode(resolveComponent("el-divider"), mergeProps(e.props, {
|
|
10096
|
+
"content-position": "left"
|
|
10097
|
+
}), {
|
|
10098
|
+
default: () => [e.label]
|
|
10099
|
+
});
|
|
10100
|
+
}
|
|
10040
10101
|
|
|
10041
|
-
|
|
10042
|
-
value: e.hidden,
|
|
10043
|
-
scope: ctx.form,
|
|
10044
|
-
data: ctx.conf._data
|
|
10045
|
-
}); // 分组显示
|
|
10102
|
+
let label = getLabel(e.label); // 分组显示
|
|
10046
10103
|
|
|
10047
10104
|
const inGroup = isEmpty(ctx.tabActive) || isEmpty(e.group) ? true : e.group === ctx.tabActive; // 表单项
|
|
10048
10105
|
|
|
10049
10106
|
const FormItem = e.component ? h(withDirectives(createVNode(resolveComponent("el-form-item"), {
|
|
10050
10107
|
"label-width": ctx.inline ? "auto" : "",
|
|
10051
|
-
"label":
|
|
10108
|
+
"label": label.text,
|
|
10052
10109
|
"prop": e.prop,
|
|
10053
10110
|
"rules": e.rules
|
|
10054
10111
|
}, null), [[vShow, inGroup]]), e.props, {
|
|
10055
10112
|
label() {
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10113
|
+
let _slot;
|
|
10114
|
+
|
|
10115
|
+
return createVNode(resolveComponent("el-tooltip"), {
|
|
10116
|
+
"effect": "dark",
|
|
10117
|
+
"placement": "top",
|
|
10118
|
+
"content": label.tip,
|
|
10119
|
+
"disabled": !label.tip
|
|
10120
|
+
}, {
|
|
10121
|
+
default: () => [createVNode("span", {
|
|
10122
|
+
"style": "vertical-align: middle"
|
|
10123
|
+
}, [label.text, label.icon && createVNode(resolveComponent("el-icon"), {
|
|
10124
|
+
"class": "el-icon--right"
|
|
10125
|
+
}, _isSlot$5(_slot = h(label.icon, {})) ? _slot : {
|
|
10126
|
+
default: () => [_slot]
|
|
10127
|
+
})])]
|
|
10128
|
+
}); // return renderNode(e.label, {
|
|
10129
|
+
// scope: ctx.form,
|
|
10130
|
+
// render: "slot",
|
|
10131
|
+
// slots: ctx.$slots,
|
|
10132
|
+
// _data: ctx.conf._data
|
|
10133
|
+
// });
|
|
10062
10134
|
},
|
|
10063
10135
|
|
|
10064
10136
|
default() {
|
|
@@ -10760,8 +10832,31 @@ var Form = defineComponent({
|
|
|
10760
10832
|
conf.items.map(e => {
|
|
10761
10833
|
if (e.prop) {
|
|
10762
10834
|
// 解析 prop
|
|
10835
|
+
// 先不处理
|
|
10836
|
+
const oldProp = e.prop;
|
|
10837
|
+
e.origProp = e.prop;
|
|
10838
|
+
|
|
10763
10839
|
if (e.prop.includes(".")) {
|
|
10764
10840
|
e.prop = e.prop.replace(/\./g, "-");
|
|
10841
|
+
let lastScope = form;
|
|
10842
|
+
let lastKey = oldProp;
|
|
10843
|
+
|
|
10844
|
+
if (oldProp.indexOf(".") > 0) {
|
|
10845
|
+
const keys = oldProp.split(".");
|
|
10846
|
+
lastKey = keys.pop();
|
|
10847
|
+
keys.forEach(sec => {
|
|
10848
|
+
lastScope[sec] = isObject(lastScope[sec]) ? lastScope[sec] : {};
|
|
10849
|
+
lastScope = lastScope[sec];
|
|
10850
|
+
});
|
|
10851
|
+
} else {
|
|
10852
|
+
lastScope = form;
|
|
10853
|
+
lastKey = oldProp;
|
|
10854
|
+
}
|
|
10855
|
+
|
|
10856
|
+
form[e.prop] = lastScope[lastKey]; // props.modelValue = lastScope[lastKey];
|
|
10857
|
+
//props["onUpdate:modelValue"] = function (val: any) {
|
|
10858
|
+
// lastScope[lastKey] = val;
|
|
10859
|
+
//};
|
|
10765
10860
|
} // prop 合并
|
|
10766
10861
|
|
|
10767
10862
|
|
|
@@ -10782,7 +10877,7 @@ var Form = defineComponent({
|
|
|
10782
10877
|
if (e.required) {
|
|
10783
10878
|
e.rules = {
|
|
10784
10879
|
required: true,
|
|
10785
|
-
message: `${e.label}不能为空`
|
|
10880
|
+
message: `${getLabel(e.label).text}不能为空`
|
|
10786
10881
|
};
|
|
10787
10882
|
}
|
|
10788
10883
|
} // 设置 tabs 默认值
|
|
@@ -10809,10 +10904,29 @@ var Form = defineComponent({
|
|
|
10809
10904
|
function bindForm(data) {
|
|
10810
10905
|
const d = {};
|
|
10811
10906
|
conf.items.forEach(e => {
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10907
|
+
if (e.prop) {
|
|
10908
|
+
let lastScope = data;
|
|
10909
|
+
let lastKey = e.origProp;
|
|
10910
|
+
|
|
10911
|
+
if ((e.origProp || e.prop).indexOf(".") > 0) {
|
|
10912
|
+
const keys = e.origProp.split(".");
|
|
10913
|
+
lastKey = keys.pop();
|
|
10914
|
+
keys.forEach(sec => {
|
|
10915
|
+
lastScope[sec] = isObject(lastScope[sec]) ? lastScope[sec] : {};
|
|
10916
|
+
lastScope = lastScope[sec];
|
|
10917
|
+
});
|
|
10918
|
+
} else {
|
|
10919
|
+
lastScope = data;
|
|
10920
|
+
lastKey = e.origProp || e.prop;
|
|
10921
|
+
}
|
|
10922
|
+
|
|
10923
|
+
data[e.prop] = lastScope[lastKey];
|
|
10924
|
+
d[e.prop] = e.hook ? FormHook.bind({
|
|
10925
|
+
hook: e.hook,
|
|
10926
|
+
value: data[e.prop],
|
|
10927
|
+
form: data
|
|
10928
|
+
}) : data[e.prop];
|
|
10929
|
+
}
|
|
10816
10930
|
});
|
|
10817
10931
|
Object.assign(form, data, d);
|
|
10818
10932
|
} // 切换 epie-form-tab
|
|
@@ -12227,6 +12341,8 @@ function useRender$2({
|
|
|
12227
12341
|
return h(ElTag, d, {
|
|
12228
12342
|
default: () => d.label
|
|
12229
12343
|
});
|
|
12344
|
+
} else if (isVNode(d?.label)) {
|
|
12345
|
+
return h(d?.label);
|
|
12230
12346
|
} else if (d) {
|
|
12231
12347
|
return createVNode(resolveComponent("el-tag"), {
|
|
12232
12348
|
"style": "margin: 0 2px"
|
|
@@ -12703,7 +12819,6 @@ var Upsert = defineComponent({
|
|
|
12703
12819
|
await crud.service[reqName]({
|
|
12704
12820
|
id: data.id
|
|
12705
12821
|
}).then(res => {
|
|
12706
|
-
done(res.data);
|
|
12707
12822
|
resolve(res.data);
|
|
12708
12823
|
}).catch(err => {
|
|
12709
12824
|
ElMessage.error(err.msg);
|
|
@@ -12722,7 +12837,9 @@ var Upsert = defineComponent({
|
|
|
12722
12837
|
done
|
|
12723
12838
|
});
|
|
12724
12839
|
} else {
|
|
12725
|
-
next(data)
|
|
12840
|
+
next(data).then(newdata => {
|
|
12841
|
+
done(newdata);
|
|
12842
|
+
});
|
|
12726
12843
|
}
|
|
12727
12844
|
} // 返回值
|
|
12728
12845
|
|
|
@@ -13948,4 +14065,4 @@ const Crud = {
|
|
|
13948
14065
|
};
|
|
13949
14066
|
// export { ContextMenu } from "./components/context-menu";
|
|
13950
14067
|
|
|
13951
|
-
export { EpieDescriptions, EpieInlineSearch, components, crudList, Crud as default, emitter$1 as emitter, epieDescriptionsProps, epieInlineSearchProps, useAdvSearch, useBrowser, useComponent, useCore, useCrud, useDescriptions, useDialog, useForm, useProxy, useRefs, useTable, useTools, useUpsert };
|
|
14068
|
+
export { EpieDescriptions, EpieInlineSearch, components, crudList, Crud as default, emitter$1 as emitter, epieDescriptionsProps, epieInlineSearchProps, useAdvSearch, useBrowser, useComponent, useCore, useCrud, useDescriptions, useDialog, useForm, usePermission, useProxy, useRefs, useSetPermission, useTable, useTools, useUpsert };
|
package/lib/bi-crud.umd.js
CHANGED
|
@@ -9156,14 +9156,13 @@
|
|
|
9156
9156
|
}
|
|
9157
9157
|
},
|
|
9158
9158
|
// 权限
|
|
9159
|
-
permission: {
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9165
|
-
|
|
9166
|
-
export: true
|
|
9159
|
+
permission: {// update: true,
|
|
9160
|
+
// page: true,
|
|
9161
|
+
// info: true,
|
|
9162
|
+
// list: true,
|
|
9163
|
+
// add: true,
|
|
9164
|
+
// delete: true,
|
|
9165
|
+
// export: true,
|
|
9167
9166
|
}
|
|
9168
9167
|
}, global?.crud)); // 集合
|
|
9169
9168
|
|
|
@@ -9228,6 +9227,7 @@
|
|
|
9228
9227
|
} = options || {};
|
|
9229
9228
|
const Crud = vue.ref();
|
|
9230
9229
|
useParent("epie-crud", Crud);
|
|
9230
|
+
const allPermission = usePermission();
|
|
9231
9231
|
vue.watch(() => Crud.value, val => {
|
|
9232
9232
|
if (val) {
|
|
9233
9233
|
if (options) {
|
|
@@ -9237,7 +9237,27 @@
|
|
|
9237
9237
|
});
|
|
9238
9238
|
val.set("dict", dict);
|
|
9239
9239
|
val.set("service", service);
|
|
9240
|
-
|
|
9240
|
+
|
|
9241
|
+
if (permission !== undefined) {
|
|
9242
|
+
const permToSet = {};
|
|
9243
|
+
|
|
9244
|
+
for (let key in permission) {
|
|
9245
|
+
permToSet[key] = allPermission.indexOf(permission[key]) > 0;
|
|
9246
|
+
}
|
|
9247
|
+
|
|
9248
|
+
val.set("permission", permToSet);
|
|
9249
|
+
} else {
|
|
9250
|
+
const permToSet = {
|
|
9251
|
+
update: true,
|
|
9252
|
+
page: true,
|
|
9253
|
+
info: true,
|
|
9254
|
+
list: true,
|
|
9255
|
+
add: true,
|
|
9256
|
+
delete: true,
|
|
9257
|
+
export: true
|
|
9258
|
+
};
|
|
9259
|
+
val.set("permission", permToSet);
|
|
9260
|
+
}
|
|
9241
9261
|
}
|
|
9242
9262
|
|
|
9243
9263
|
if (cb && Crud.value) {
|
|
@@ -9338,6 +9358,14 @@
|
|
|
9338
9358
|
crud,
|
|
9339
9359
|
mitt
|
|
9340
9360
|
};
|
|
9361
|
+
} // 设置权限
|
|
9362
|
+
|
|
9363
|
+
function useSetPermission(app, permissions) {
|
|
9364
|
+
app.provide("epie-permission", permissions);
|
|
9365
|
+
}
|
|
9366
|
+
function usePermission() {
|
|
9367
|
+
const permissions = vue.inject("epie-permission");
|
|
9368
|
+
return permissions;
|
|
9341
9369
|
}
|
|
9342
9370
|
|
|
9343
9371
|
function useBrowser(app) {
|
|
@@ -9542,6 +9570,16 @@
|
|
|
9542
9570
|
|
|
9543
9571
|
});
|
|
9544
9572
|
|
|
9573
|
+
const getLabel = src => {
|
|
9574
|
+
if (isString(src)) {
|
|
9575
|
+
return {
|
|
9576
|
+
text: src
|
|
9577
|
+
};
|
|
9578
|
+
}
|
|
9579
|
+
|
|
9580
|
+
return src;
|
|
9581
|
+
};
|
|
9582
|
+
|
|
9545
9583
|
const Regs = new Map();
|
|
9546
9584
|
/**
|
|
9547
9585
|
* 解析节点
|
|
@@ -9581,18 +9619,19 @@
|
|
|
9581
9619
|
|
|
9582
9620
|
Regs.set(vnode.name, { ...vnode.vm
|
|
9583
9621
|
});
|
|
9584
|
-
}
|
|
9622
|
+
}
|
|
9585
9623
|
|
|
9624
|
+
let vnodeProps = vnode.props; // 处理 props
|
|
9586
9625
|
|
|
9587
9626
|
if (isFunction(vnode.props)) {
|
|
9588
|
-
|
|
9627
|
+
vnodeProps = vnode.props({
|
|
9589
9628
|
scope,
|
|
9590
9629
|
...options._data
|
|
9591
9630
|
});
|
|
9592
9631
|
} // 组件参数
|
|
9593
9632
|
|
|
9594
9633
|
|
|
9595
|
-
const props = { ...
|
|
9634
|
+
const props = { ...vnodeProps,
|
|
9596
9635
|
..._data,
|
|
9597
9636
|
scope
|
|
9598
9637
|
}; // 添加双向绑定
|
|
@@ -9668,7 +9707,7 @@
|
|
|
9668
9707
|
|
|
9669
9708
|
if (placeholder) {
|
|
9670
9709
|
if (!item.component.props.placeholder) {
|
|
9671
|
-
item.component.props.placeholder = placeholder + item.label;
|
|
9710
|
+
item.component.props.placeholder = placeholder + getLabel(item.label).text;
|
|
9672
9711
|
}
|
|
9673
9712
|
}
|
|
9674
9713
|
}
|
|
@@ -9723,6 +9762,12 @@
|
|
|
9723
9762
|
|
|
9724
9763
|
if (isArray(vnode.options)) {
|
|
9725
9764
|
list = vnode.options;
|
|
9765
|
+
}
|
|
9766
|
+
|
|
9767
|
+
if (scope[prop] !== undefined || scope[prop] !== null) {
|
|
9768
|
+
if (!isArray(scope[prop]) && list.filter(item => item.value === scope[prop]).length == 0) {
|
|
9769
|
+
delete scope[prop];
|
|
9770
|
+
}
|
|
9726
9771
|
} // 设置内容
|
|
9727
9772
|
|
|
9728
9773
|
|
|
@@ -10033,35 +10078,62 @@
|
|
|
10033
10078
|
function renderForm() {
|
|
10034
10079
|
// 表单项列表
|
|
10035
10080
|
const children = ctx.conf.items.map(e => {
|
|
10081
|
+
// 是否隐藏
|
|
10082
|
+
e._hidden = Parse("hidden", {
|
|
10083
|
+
value: e.hidden,
|
|
10084
|
+
scope: ctx.form,
|
|
10085
|
+
data: ctx.conf._data
|
|
10086
|
+
}); // 隐藏
|
|
10087
|
+
|
|
10088
|
+
if (e._hidden) {
|
|
10089
|
+
return null;
|
|
10090
|
+
}
|
|
10091
|
+
|
|
10036
10092
|
if (e.type == "tabs") {
|
|
10037
10093
|
return vue.createVNode(vue.resolveComponent("epie-form-tabs"), vue.mergeProps({
|
|
10038
10094
|
"modelValue": ctx.tabActive,
|
|
10039
10095
|
"onUpdate:modelValue": $event => ctx.tabActive = $event
|
|
10040
10096
|
}, e.props), null);
|
|
10041
|
-
}
|
|
10042
|
-
|
|
10097
|
+
} else if (e.type == "divider") {
|
|
10098
|
+
return vue.createVNode(vue.resolveComponent("el-divider"), vue.mergeProps(e.props, {
|
|
10099
|
+
"content-position": "left"
|
|
10100
|
+
}), {
|
|
10101
|
+
default: () => [e.label]
|
|
10102
|
+
});
|
|
10103
|
+
}
|
|
10043
10104
|
|
|
10044
|
-
|
|
10045
|
-
value: e.hidden,
|
|
10046
|
-
scope: ctx.form,
|
|
10047
|
-
data: ctx.conf._data
|
|
10048
|
-
}); // 分组显示
|
|
10105
|
+
let label = getLabel(e.label); // 分组显示
|
|
10049
10106
|
|
|
10050
10107
|
const inGroup = isEmpty(ctx.tabActive) || isEmpty(e.group) ? true : e.group === ctx.tabActive; // 表单项
|
|
10051
10108
|
|
|
10052
10109
|
const FormItem = e.component ? vue.h(vue.withDirectives(vue.createVNode(vue.resolveComponent("el-form-item"), {
|
|
10053
10110
|
"label-width": ctx.inline ? "auto" : "",
|
|
10054
|
-
"label":
|
|
10111
|
+
"label": label.text,
|
|
10055
10112
|
"prop": e.prop,
|
|
10056
10113
|
"rules": e.rules
|
|
10057
10114
|
}, null), [[vue.vShow, inGroup]]), e.props, {
|
|
10058
10115
|
label() {
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10116
|
+
let _slot;
|
|
10117
|
+
|
|
10118
|
+
return vue.createVNode(vue.resolveComponent("el-tooltip"), {
|
|
10119
|
+
"effect": "dark",
|
|
10120
|
+
"placement": "top",
|
|
10121
|
+
"content": label.tip,
|
|
10122
|
+
"disabled": !label.tip
|
|
10123
|
+
}, {
|
|
10124
|
+
default: () => [vue.createVNode("span", {
|
|
10125
|
+
"style": "vertical-align: middle"
|
|
10126
|
+
}, [label.text, label.icon && vue.createVNode(vue.resolveComponent("el-icon"), {
|
|
10127
|
+
"class": "el-icon--right"
|
|
10128
|
+
}, _isSlot$5(_slot = vue.h(label.icon, {})) ? _slot : {
|
|
10129
|
+
default: () => [_slot]
|
|
10130
|
+
})])]
|
|
10131
|
+
}); // return renderNode(e.label, {
|
|
10132
|
+
// scope: ctx.form,
|
|
10133
|
+
// render: "slot",
|
|
10134
|
+
// slots: ctx.$slots,
|
|
10135
|
+
// _data: ctx.conf._data
|
|
10136
|
+
// });
|
|
10065
10137
|
},
|
|
10066
10138
|
|
|
10067
10139
|
default() {
|
|
@@ -10763,8 +10835,31 @@
|
|
|
10763
10835
|
conf.items.map(e => {
|
|
10764
10836
|
if (e.prop) {
|
|
10765
10837
|
// 解析 prop
|
|
10838
|
+
// 先不处理
|
|
10839
|
+
const oldProp = e.prop;
|
|
10840
|
+
e.origProp = e.prop;
|
|
10841
|
+
|
|
10766
10842
|
if (e.prop.includes(".")) {
|
|
10767
10843
|
e.prop = e.prop.replace(/\./g, "-");
|
|
10844
|
+
let lastScope = form;
|
|
10845
|
+
let lastKey = oldProp;
|
|
10846
|
+
|
|
10847
|
+
if (oldProp.indexOf(".") > 0) {
|
|
10848
|
+
const keys = oldProp.split(".");
|
|
10849
|
+
lastKey = keys.pop();
|
|
10850
|
+
keys.forEach(sec => {
|
|
10851
|
+
lastScope[sec] = isObject(lastScope[sec]) ? lastScope[sec] : {};
|
|
10852
|
+
lastScope = lastScope[sec];
|
|
10853
|
+
});
|
|
10854
|
+
} else {
|
|
10855
|
+
lastScope = form;
|
|
10856
|
+
lastKey = oldProp;
|
|
10857
|
+
}
|
|
10858
|
+
|
|
10859
|
+
form[e.prop] = lastScope[lastKey]; // props.modelValue = lastScope[lastKey];
|
|
10860
|
+
//props["onUpdate:modelValue"] = function (val: any) {
|
|
10861
|
+
// lastScope[lastKey] = val;
|
|
10862
|
+
//};
|
|
10768
10863
|
} // prop 合并
|
|
10769
10864
|
|
|
10770
10865
|
|
|
@@ -10785,7 +10880,7 @@
|
|
|
10785
10880
|
if (e.required) {
|
|
10786
10881
|
e.rules = {
|
|
10787
10882
|
required: true,
|
|
10788
|
-
message: `${e.label}不能为空`
|
|
10883
|
+
message: `${getLabel(e.label).text}不能为空`
|
|
10789
10884
|
};
|
|
10790
10885
|
}
|
|
10791
10886
|
} // 设置 tabs 默认值
|
|
@@ -10812,10 +10907,29 @@
|
|
|
10812
10907
|
function bindForm(data) {
|
|
10813
10908
|
const d = {};
|
|
10814
10909
|
conf.items.forEach(e => {
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
10818
|
-
|
|
10910
|
+
if (e.prop) {
|
|
10911
|
+
let lastScope = data;
|
|
10912
|
+
let lastKey = e.origProp;
|
|
10913
|
+
|
|
10914
|
+
if ((e.origProp || e.prop).indexOf(".") > 0) {
|
|
10915
|
+
const keys = e.origProp.split(".");
|
|
10916
|
+
lastKey = keys.pop();
|
|
10917
|
+
keys.forEach(sec => {
|
|
10918
|
+
lastScope[sec] = isObject(lastScope[sec]) ? lastScope[sec] : {};
|
|
10919
|
+
lastScope = lastScope[sec];
|
|
10920
|
+
});
|
|
10921
|
+
} else {
|
|
10922
|
+
lastScope = data;
|
|
10923
|
+
lastKey = e.origProp || e.prop;
|
|
10924
|
+
}
|
|
10925
|
+
|
|
10926
|
+
data[e.prop] = lastScope[lastKey];
|
|
10927
|
+
d[e.prop] = e.hook ? FormHook.bind({
|
|
10928
|
+
hook: e.hook,
|
|
10929
|
+
value: data[e.prop],
|
|
10930
|
+
form: data
|
|
10931
|
+
}) : data[e.prop];
|
|
10932
|
+
}
|
|
10819
10933
|
});
|
|
10820
10934
|
Object.assign(form, data, d);
|
|
10821
10935
|
} // 切换 epie-form-tab
|
|
@@ -12230,6 +12344,8 @@
|
|
|
12230
12344
|
return vue.h(ElTag, d, {
|
|
12231
12345
|
default: () => d.label
|
|
12232
12346
|
});
|
|
12347
|
+
} else if (vue.isVNode(d?.label)) {
|
|
12348
|
+
return vue.h(d?.label);
|
|
12233
12349
|
} else if (d) {
|
|
12234
12350
|
return vue.createVNode(vue.resolveComponent("el-tag"), {
|
|
12235
12351
|
"style": "margin: 0 2px"
|
|
@@ -12706,7 +12822,6 @@
|
|
|
12706
12822
|
await crud.service[reqName]({
|
|
12707
12823
|
id: data.id
|
|
12708
12824
|
}).then(res => {
|
|
12709
|
-
done(res.data);
|
|
12710
12825
|
resolve(res.data);
|
|
12711
12826
|
}).catch(err => {
|
|
12712
12827
|
elementPlus.ElMessage.error(err.msg);
|
|
@@ -12725,7 +12840,9 @@
|
|
|
12725
12840
|
done
|
|
12726
12841
|
});
|
|
12727
12842
|
} else {
|
|
12728
|
-
next(data)
|
|
12843
|
+
next(data).then(newdata => {
|
|
12844
|
+
done(newdata);
|
|
12845
|
+
});
|
|
12729
12846
|
}
|
|
12730
12847
|
} // 返回值
|
|
12731
12848
|
|
|
@@ -13967,8 +14084,10 @@
|
|
|
13967
14084
|
exports.useDescriptions = useDescriptions;
|
|
13968
14085
|
exports.useDialog = useDialog;
|
|
13969
14086
|
exports.useForm = useForm;
|
|
14087
|
+
exports.usePermission = usePermission;
|
|
13970
14088
|
exports.useProxy = useProxy;
|
|
13971
14089
|
exports.useRefs = useRefs;
|
|
14090
|
+
exports.useSetPermission = useSetPermission;
|
|
13972
14091
|
exports.useTable = useTable;
|
|
13973
14092
|
exports.useTools = useTools;
|
|
13974
14093
|
exports.useUpsert = useUpsert;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, () => false | JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => false | JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -33,7 +33,7 @@ declare const EpieContextMenu: import("vue").DefineComponent<{
|
|
|
33
33
|
close: () => void;
|
|
34
34
|
rowClick: (e: any, item: any, id: string) => any;
|
|
35
35
|
stopDefault: (e: any) => void;
|
|
36
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
36
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
37
|
show: BooleanConstructor;
|
|
38
38
|
options: {
|
|
39
39
|
type: ObjectConstructor;
|
|
@@ -89,7 +89,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
89
89
|
size?: number | undefined;
|
|
90
90
|
} | undefined;
|
|
91
91
|
}>;
|
|
92
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
92
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
93
93
|
name: StringConstructor;
|
|
94
94
|
border: BooleanConstructor;
|
|
95
95
|
padding: {
|
|
@@ -61,7 +61,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
61
|
}, {
|
|
62
62
|
show: import("vue").Ref<boolean>;
|
|
63
63
|
data: import("vue").Ref<any>;
|
|
64
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
64
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
65
65
|
border: {
|
|
66
66
|
type: BooleanConstructor;
|
|
67
67
|
default: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
title: StringConstructor;
|
|
3
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
3
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
4
4
|
title: StringConstructor;
|
|
5
5
|
}>>, {}>;
|
|
6
6
|
export default _default;
|
|
@@ -9,7 +9,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9
9
|
slots: Readonly<{
|
|
10
10
|
[name: string]: import("vue").Slot | undefined;
|
|
11
11
|
}>;
|
|
12
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
12
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
13
|
onExport: FunctionConstructor;
|
|
14
14
|
}>>, {}>;
|
|
15
15
|
export default _default;
|
|
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
19
19
|
loading: import("vue").Ref<boolean>;
|
|
20
20
|
search: () => void;
|
|
21
21
|
reset: () => void;
|
|
22
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
22
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
23
|
data: {
|
|
24
24
|
type: ObjectConstructor;
|
|
25
25
|
default: () => {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
label: StringConstructor;
|
|
3
|
-
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
3
|
+
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
4
4
|
label: StringConstructor;
|
|
5
5
|
}>>, {}>;
|
|
6
6
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fun, Hook, Render } from "../../types/base";
|
|
2
2
|
export declare namespace EpieForm {
|
|
3
3
|
interface Item {
|
|
4
|
-
type?: "tabs";
|
|
4
|
+
type?: "tabs" | "divider";
|
|
5
5
|
prop?: string;
|
|
6
6
|
props?: {
|
|
7
7
|
labels?: Array<{
|
|
@@ -25,7 +25,7 @@ export declare namespace EpieForm {
|
|
|
25
25
|
value?: any;
|
|
26
26
|
label?: string | {
|
|
27
27
|
text?: string;
|
|
28
|
-
icon?: string;
|
|
28
|
+
icon?: string | JSX.Element;
|
|
29
29
|
tip?: string;
|
|
30
30
|
};
|
|
31
31
|
span?: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
inner: BooleanConstructor;
|
|
3
3
|
inline: BooleanConstructor;
|
|
4
|
-
}, any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
4
|
+
}, any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
5
5
|
inner: BooleanConstructor;
|
|
6
6
|
inline: BooleanConstructor;
|
|
7
7
|
}>>, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropType, ExtractPropTypes } from "vue";
|
|
2
2
|
import { EpieForm } from "../form/form";
|
|
3
3
|
export interface EpieInlineSearchItem extends EpieForm.Item {
|
|
4
|
-
hide
|
|
4
|
+
hide?: boolean;
|
|
5
5
|
}
|
|
6
6
|
export declare const epieInlineSearchProps: () => {
|
|
7
7
|
data: {
|
|
@@ -44,7 +44,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
44
44
|
reset: () => void;
|
|
45
45
|
loading: import("vue").Ref<boolean>;
|
|
46
46
|
search: () => void;
|
|
47
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
47
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
48
48
|
data: {
|
|
49
49
|
type: ObjectConstructor;
|
|
50
50
|
default: () => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, () => false | JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => false | JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -5,5 +5,5 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
5
5
|
onCurrentChange: (index: number) => void;
|
|
6
6
|
onSizeChange: (size: number) => void;
|
|
7
7
|
setPagination: (res: any) => void;
|
|
8
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
8
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
9
9
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
2
|
export default _default;
|
package/lib/hooks/core.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EpieCrud, Emitter } from "../types";
|
|
2
|
+
import { App } from "vue";
|
|
2
3
|
export declare function useRefs(): {
|
|
3
4
|
refs: any;
|
|
4
5
|
setRefs: (index: number) => (el: HTMLElement) => void;
|
|
@@ -11,3 +12,5 @@ export declare function useCore(): {
|
|
|
11
12
|
crud: EpieCrud.Provide;
|
|
12
13
|
mitt: Emitter;
|
|
13
14
|
};
|
|
15
|
+
export declare function useSetPermission(app: App, permissions: string[]): void;
|
|
16
|
+
export declare function usePermission(): string[];
|
package/lib/types/base/crud.d.ts
CHANGED
|
@@ -41,6 +41,16 @@ export declare namespace EpieCrud {
|
|
|
41
41
|
info?: boolean;
|
|
42
42
|
[key: string]: any;
|
|
43
43
|
}
|
|
44
|
+
interface PermissionMap {
|
|
45
|
+
page?: string;
|
|
46
|
+
list?: string;
|
|
47
|
+
add?: string;
|
|
48
|
+
delete?: string;
|
|
49
|
+
update?: string;
|
|
50
|
+
info?: string;
|
|
51
|
+
export?: string;
|
|
52
|
+
[key: string]: string | undefined;
|
|
53
|
+
}
|
|
44
54
|
interface ServiceApi {
|
|
45
55
|
page?(params?: any): Promise<any>;
|
|
46
56
|
list?(params?: any): Promise<any>;
|
|
@@ -94,7 +104,7 @@ export declare namespace EpieCrud {
|
|
|
94
104
|
}
|
|
95
105
|
interface Props {
|
|
96
106
|
service: ServiceApi;
|
|
97
|
-
permission?:
|
|
107
|
+
permission?: PermissionMap;
|
|
98
108
|
dict?: Dict;
|
|
99
109
|
onRefresh?(params: Service["page"]["params"], event: {
|
|
100
110
|
done: fun;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ref } from "vue";
|
|
2
|
+
import { EpieDict, fun } from ".";
|
|
2
3
|
export declare namespace Render {
|
|
3
4
|
type OpButton = `slot-${string}` | {
|
|
4
5
|
label: string;
|
|
@@ -6,11 +7,7 @@ export declare namespace Render {
|
|
|
6
7
|
};
|
|
7
8
|
interface Options {
|
|
8
9
|
name?: string;
|
|
9
|
-
options?: Array<
|
|
10
|
-
label: string;
|
|
11
|
-
value?: any;
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
}> | fun;
|
|
10
|
+
options?: Ref<Array<EpieDict>> | Array<EpieDict> | fun;
|
|
14
11
|
props?: any;
|
|
15
12
|
vm?: any;
|
|
16
13
|
[key: string]: any;
|
|
@@ -2,7 +2,7 @@ import { Ref } from "vue";
|
|
|
2
2
|
import { fun, NSEpieContextMenu, Render } from ".";
|
|
3
3
|
import { EpieSchema } from "./base";
|
|
4
4
|
export declare type EpieDict = {
|
|
5
|
-
label: string;
|
|
5
|
+
label: string | JSX.Element;
|
|
6
6
|
value?: any;
|
|
7
7
|
type?: "success" | "warning" | "info" | "danger";
|
|
8
8
|
size?: "medium" | "default" | "small";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epie/bi-crud",
|
|
3
3
|
"simpleName": "bi-crud",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.22",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "lib/bi-crud.umd.js",
|
|
7
7
|
"module": "lib/bi-crud.esm.js",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@element-plus/icons-vue": "^2.0.6",
|
|
26
|
+
"@epie/bi-crud": "^2.0.20",
|
|
26
27
|
"array.prototype.flat": "^1.2.4",
|
|
27
28
|
"clone-deep": "^4.0.1",
|
|
28
29
|
"core-js": "^3.21.1",
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
"merge": "^2.1.1",
|
|
31
32
|
"mitt": "^3.0.0",
|
|
32
33
|
"rollup": "^2.76.0",
|
|
33
|
-
"vue": "^3.2.
|
|
34
|
+
"vue": "^3.2.45"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
36
37
|
"@babel/preset-typescript": "^7.18.6",
|