m-eleplus-crud 0.0.7 → 0.0.9
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.full.js +48 -20
- package/dist/index.full.min.js +9 -9
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +8 -8
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +48 -20
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/es/components/crud/src/crud.d.ts +8 -0
- package/es/components/form/src/form.d.ts +4 -0
- package/es/index.mjs +5 -5
- package/es/packages/components/crud/src/crud.mjs.map +1 -1
- package/es/packages/components/crud/src/crud2.mjs +17 -4
- package/es/packages/components/crud/src/crud2.mjs.map +1 -1
- package/es/packages/components/form/index.mjs +2 -2
- package/es/packages/components/form/src/form.mjs +640 -25
- package/es/packages/components/form/src/form.mjs.map +1 -1
- package/es/packages/components/form/src/form2.mjs +25 -633
- package/es/packages/components/form/src/form2.mjs.map +1 -1
- package/es/packages/components/index.mjs +5 -5
- package/es/packages/components/picture/index.mjs +2 -2
- package/es/packages/components/picture/src/picture.mjs +19 -26
- package/es/packages/components/picture/src/picture.mjs.map +1 -1
- package/es/packages/components/picture/src/picture2.mjs +26 -19
- package/es/packages/components/picture/src/picture2.mjs.map +1 -1
- package/es/packages/components/qrcode/index.mjs +2 -2
- package/es/packages/components/qrcode/src/qrcode.mjs +22 -62
- package/es/packages/components/qrcode/src/qrcode.mjs.map +1 -1
- package/es/packages/components/qrcode/src/qrcode2.mjs +62 -22
- package/es/packages/components/qrcode/src/qrcode2.mjs.map +1 -1
- package/es/packages/components/search/index.mjs +2 -2
- package/es/packages/components/search/src/search.mjs +431 -25
- package/es/packages/components/search/src/search.mjs.map +1 -1
- package/es/packages/components/search/src/search2.mjs +25 -423
- package/es/packages/components/search/src/search2.mjs.map +1 -1
- package/es/packages/components/table/index.mjs +2 -2
- package/es/packages/components/table/src/table.mjs +419 -37
- package/es/packages/components/table/src/table.mjs.map +1 -1
- package/es/packages/components/table/src/table2.mjs +37 -419
- package/es/packages/components/table/src/table2.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/crud/src/crud.d.ts +8 -0
- package/lib/components/form/src/form.d.ts +4 -0
- package/lib/index.js +5 -5
- package/lib/packages/components/crud/src/crud.js.map +1 -1
- package/lib/packages/components/crud/src/crud2.js +16 -3
- package/lib/packages/components/crud/src/crud2.js.map +1 -1
- package/lib/packages/components/form/index.js +2 -2
- package/lib/packages/components/form/src/form.js +640 -26
- package/lib/packages/components/form/src/form.js.map +1 -1
- package/lib/packages/components/form/src/form2.js +26 -633
- package/lib/packages/components/form/src/form2.js.map +1 -1
- package/lib/packages/components/index.js +5 -5
- package/lib/packages/components/picture/index.js +2 -2
- package/lib/packages/components/picture/src/picture.js +20 -26
- package/lib/packages/components/picture/src/picture.js.map +1 -1
- package/lib/packages/components/picture/src/picture2.js +26 -20
- package/lib/packages/components/picture/src/picture2.js.map +1 -1
- package/lib/packages/components/qrcode/index.js +2 -2
- package/lib/packages/components/qrcode/src/qrcode.js +23 -66
- package/lib/packages/components/qrcode/src/qrcode.js.map +1 -1
- package/lib/packages/components/qrcode/src/qrcode2.js +66 -23
- package/lib/packages/components/qrcode/src/qrcode2.js.map +1 -1
- package/lib/packages/components/search/index.js +2 -2
- package/lib/packages/components/search/src/search.js +431 -26
- package/lib/packages/components/search/src/search.js.map +1 -1
- package/lib/packages/components/search/src/search2.js +26 -423
- package/lib/packages/components/search/src/search2.js.map +1 -1
- package/lib/packages/components/table/index.js +2 -2
- package/lib/packages/components/table/src/table.js +424 -38
- package/lib/packages/components/table/src/table.js.map +1 -1
- package/lib/packages/components/table/src/table2.js +38 -424
- package/lib/packages/components/table/src/table2.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
package/dist/index.full.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! M ElePlus Crud v0.0.
|
|
1
|
+
/*! M ElePlus Crud v0.0.7 */
|
|
2
2
|
|
|
3
3
|
import { shallowRef, watchEffect, readonly, getCurrentScope, onScopeDispose, unref, getCurrentInstance, onMounted, nextTick, watch, ref, defineComponent, openBlock, createElementBlock, createElementVNode, warn, inject, computed, isRef, provide, renderSlot, useSlots, resolveComponent, createVNode, withModifiers, withCtx, Fragment, renderList, createBlock, createCommentVNode, mergeProps, withKeys, createTextVNode, toDisplayString, normalizeStyle, toHandlers, toRef, onUnmounted, useAttrs as useAttrs$1, normalizeClass, resolveDynamicComponent, onBeforeUnmount, Text, reactive, h, markRaw, toRefs, Transition, withDirectives, vShow, isVNode, render as render$1, createSlots, normalizeProps, guardReactiveProps, resolveDirective } from 'vue';
|
|
4
4
|
|
|
@@ -7501,7 +7501,7 @@ var ConfigProvider$1 = ConfigProvider;
|
|
|
7501
7501
|
|
|
7502
7502
|
const MConfigProvider = withInstall$1(ConfigProvider$1);
|
|
7503
7503
|
|
|
7504
|
-
const version$1 = "0.0.
|
|
7504
|
+
const version$1 = "0.0.7";
|
|
7505
7505
|
|
|
7506
7506
|
const makeInstaller = (components = []) => {
|
|
7507
7507
|
const install = (app, options) => {
|
|
@@ -11916,14 +11916,21 @@ const _sfc_main$e = defineComponent({
|
|
|
11916
11916
|
};
|
|
11917
11917
|
const search = (page = 1) => {
|
|
11918
11918
|
var _a;
|
|
11919
|
-
(
|
|
11920
|
-
|
|
11921
|
-
if (
|
|
11922
|
-
proxys.page
|
|
11919
|
+
if (searchOption.value.column && searchOption.value.column.length) {
|
|
11920
|
+
(_a = formRef.value) == null ? void 0 : _a.validate((valid) => {
|
|
11921
|
+
if (valid) {
|
|
11922
|
+
if (proxys.page) {
|
|
11923
|
+
proxys.page = page;
|
|
11924
|
+
}
|
|
11925
|
+
emit("search", proxys);
|
|
11923
11926
|
}
|
|
11924
|
-
|
|
11927
|
+
});
|
|
11928
|
+
} else {
|
|
11929
|
+
if (proxys.page) {
|
|
11930
|
+
proxys.page = page;
|
|
11925
11931
|
}
|
|
11926
|
-
|
|
11932
|
+
emit("search", proxys);
|
|
11933
|
+
}
|
|
11927
11934
|
};
|
|
11928
11935
|
const reset = () => {
|
|
11929
11936
|
var _a;
|
|
@@ -12053,6 +12060,7 @@ const _sfc_main$e = defineComponent({
|
|
|
12053
12060
|
default: withCtx(() => [
|
|
12054
12061
|
createVNode(_component_el_form_item, {
|
|
12055
12062
|
style: { "width": "100%" },
|
|
12063
|
+
"label-width": column.labelWidth || searchOption.value.labelWidth,
|
|
12056
12064
|
label: column.label + ":",
|
|
12057
12065
|
prop: column.prop,
|
|
12058
12066
|
rules: column.rules
|
|
@@ -12142,7 +12150,7 @@ const _sfc_main$e = defineComponent({
|
|
|
12142
12150
|
)) : createCommentVNode("v-if", true)
|
|
12143
12151
|
]),
|
|
12144
12152
|
_: 2
|
|
12145
|
-
}, 1032, ["label", "prop", "rules"])
|
|
12153
|
+
}, 1032, ["label-width", "label", "prop", "rules"])
|
|
12146
12154
|
]),
|
|
12147
12155
|
_: 2
|
|
12148
12156
|
}, 1032, ["span"])) : createCommentVNode("v-if", true)
|
|
@@ -12975,8 +12983,9 @@ const _sfc_main$9 = defineComponent({
|
|
|
12975
12983
|
maxlength: column.maxlength,
|
|
12976
12984
|
"show-word-limit": column.showWordLimit,
|
|
12977
12985
|
"show-password": column.showPassword,
|
|
12986
|
+
disabled: column.disabled || false,
|
|
12978
12987
|
type: !column.type || column.type === "input" ? "text" : column.type
|
|
12979
|
-
}, toHandlers(getFormItemEventBind(column))), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "maxlength", "show-word-limit", "show-password", "type"])
|
|
12988
|
+
}, toHandlers(getFormItemEventBind(column))), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "maxlength", "show-word-limit", "show-password", "disabled", "type"])
|
|
12980
12989
|
],
|
|
12981
12990
|
2112
|
|
12982
12991
|
)) : column.type === "select" ? (openBlock(), createElementBlock(
|
|
@@ -12990,6 +12999,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
12990
12999
|
"onUpdate:modelValue": ($event) => unref(proxys)[column.prop || ""] = $event,
|
|
12991
13000
|
modelModifiers: { trim: true },
|
|
12992
13001
|
style: { "width": "100%" },
|
|
13002
|
+
disabled: column.disabled || false,
|
|
12993
13003
|
placeholder: column.placeholder,
|
|
12994
13004
|
multiple: column.multiple,
|
|
12995
13005
|
clearable: column.clearable,
|
|
@@ -13014,7 +13024,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
13014
13024
|
))
|
|
13015
13025
|
]),
|
|
13016
13026
|
_: 2
|
|
13017
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "clearable", "filterable", "filter-method", "remote", "remote-method", "loading"])
|
|
13027
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled", "placeholder", "multiple", "clearable", "filterable", "filter-method", "remote", "remote-method", "loading"])
|
|
13018
13028
|
],
|
|
13019
13029
|
2112
|
|
13020
13030
|
)) : column.type === "radio" ? (openBlock(), createElementBlock(
|
|
@@ -13026,6 +13036,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
13026
13036
|
createVNode(_component_el_radio_group, mergeProps({
|
|
13027
13037
|
modelValue: unref(proxys)[column.prop || ""],
|
|
13028
13038
|
"onUpdate:modelValue": ($event) => unref(proxys)[column.prop || ""] = $event,
|
|
13039
|
+
disabled: column.disabled || false,
|
|
13029
13040
|
style: { "width": "100%" }
|
|
13030
13041
|
}, toHandlers(getFormItemEventBind(column))), {
|
|
13031
13042
|
default: withCtx(() => [
|
|
@@ -13051,7 +13062,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
13051
13062
|
))
|
|
13052
13063
|
]),
|
|
13053
13064
|
_: 2
|
|
13054
|
-
}, 1040, ["modelValue", "onUpdate:modelValue"])
|
|
13065
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
13055
13066
|
],
|
|
13056
13067
|
2112
|
|
13057
13068
|
)) : column.type === "checkbox" ? (openBlock(), createElementBlock(
|
|
@@ -13063,7 +13074,8 @@ const _sfc_main$9 = defineComponent({
|
|
|
13063
13074
|
createVNode(_component_el_checkbox_group, mergeProps({
|
|
13064
13075
|
modelValue: unref(proxys)[column.prop || ""],
|
|
13065
13076
|
"onUpdate:modelValue": ($event) => unref(proxys)[column.prop || ""] = $event,
|
|
13066
|
-
style: { "width": "100%" }
|
|
13077
|
+
style: { "width": "100%" },
|
|
13078
|
+
disabled: column.disabled || false
|
|
13067
13079
|
}, toHandlers(getFormItemEventBind(column))), {
|
|
13068
13080
|
default: withCtx(() => [
|
|
13069
13081
|
(openBlock(true), createElementBlock(
|
|
@@ -13080,7 +13092,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
13080
13092
|
))
|
|
13081
13093
|
]),
|
|
13082
13094
|
_: 2
|
|
13083
|
-
}, 1040, ["modelValue", "onUpdate:modelValue"])
|
|
13095
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
13084
13096
|
],
|
|
13085
13097
|
2112
|
|
13086
13098
|
)) : column.type === "switch" ? (openBlock(), createElementBlock(
|
|
@@ -13099,9 +13111,10 @@ const _sfc_main$9 = defineComponent({
|
|
|
13099
13111
|
createVNode(_component_el_switch, mergeProps({
|
|
13100
13112
|
modelValue: unref(proxys)[column.prop || ""],
|
|
13101
13113
|
"onUpdate:modelValue": ($event) => unref(proxys)[column.prop || ""] = $event,
|
|
13114
|
+
disabled: column.disabled || false,
|
|
13102
13115
|
"active-value": column.dicData[0].value,
|
|
13103
13116
|
"inactive-value": column.dicData[1].value
|
|
13104
|
-
}, toHandlers(getFormItemEventBind(column))), null, 16, ["modelValue", "onUpdate:modelValue", "active-value", "inactive-value"]),
|
|
13117
|
+
}, toHandlers(getFormItemEventBind(column))), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "active-value", "inactive-value"]),
|
|
13105
13118
|
createElementVNode(
|
|
13106
13119
|
"span",
|
|
13107
13120
|
{ style: { "font-size": "var(--el-font-size-base)", "color": "var(--el-text-color-regular)", "margin-left": "6px" } },
|
|
@@ -13125,20 +13138,22 @@ const _sfc_main$9 = defineComponent({
|
|
|
13125
13138
|
"onUpdate:modelValue": ($event) => unref(proxys)[column.prop || ""] = $event,
|
|
13126
13139
|
type: column.type,
|
|
13127
13140
|
clearable: column.clearable,
|
|
13141
|
+
disabled: column.disabled || false,
|
|
13128
13142
|
"start-placeholder": column.startPlaceholder,
|
|
13129
13143
|
"end-placeholder": column.endPlaceholder,
|
|
13130
13144
|
format: column.format,
|
|
13131
13145
|
"value-format": column.valueFormat || getValueFormatByType(column.type)
|
|
13132
|
-
}, toHandlers(getFormItemEventBind(column))), null, 16, ["modelValue", "onUpdate:modelValue", "type", "clearable", "start-placeholder", "end-placeholder", "format", "value-format"])) : (openBlock(), createBlock(_component_el_time_picker, mergeProps({
|
|
13146
|
+
}, toHandlers(getFormItemEventBind(column))), null, 16, ["modelValue", "onUpdate:modelValue", "type", "clearable", "disabled", "start-placeholder", "end-placeholder", "format", "value-format"])) : (openBlock(), createBlock(_component_el_time_picker, mergeProps({
|
|
13133
13147
|
key: 1,
|
|
13134
13148
|
modelValue: unref(proxys)[column.prop || ""],
|
|
13135
13149
|
"onUpdate:modelValue": ($event) => unref(proxys)[column.prop || ""] = $event,
|
|
13150
|
+
disabled: column.disabled || false,
|
|
13136
13151
|
"is-range": column.type === "timerange",
|
|
13137
13152
|
clearable: column.clearable,
|
|
13138
13153
|
"start-placeholder": column.startPlaceholder,
|
|
13139
13154
|
"end-placeholder": column.endPlaceholder,
|
|
13140
13155
|
"value-format": column.valueFormat || getValueFormatByType(column.type)
|
|
13141
|
-
}, toHandlers(getFormItemEventBind(column))), null, 16, ["modelValue", "onUpdate:modelValue", "is-range", "clearable", "start-placeholder", "end-placeholder", "value-format"]))
|
|
13156
|
+
}, toHandlers(getFormItemEventBind(column))), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "is-range", "clearable", "start-placeholder", "end-placeholder", "value-format"]))
|
|
13142
13157
|
],
|
|
13143
13158
|
64
|
|
13144
13159
|
)) : column.type === "picture" ? (openBlock(), createElementBlock(
|
|
@@ -17533,6 +17548,13 @@ const _sfc_main$2 = defineComponent({
|
|
|
17533
17548
|
} else {
|
|
17534
17549
|
delete result.span;
|
|
17535
17550
|
}
|
|
17551
|
+
if (column.addDisabled || column.editDisabled) {
|
|
17552
|
+
if (dialogType.value === "add" && column.addDisabled) {
|
|
17553
|
+
result.disabled = column.addDisabled;
|
|
17554
|
+
} else if (dialogType.value === "edit" && column.editDisabled) {
|
|
17555
|
+
result.disabled = column.editDisabled;
|
|
17556
|
+
}
|
|
17557
|
+
}
|
|
17536
17558
|
return result;
|
|
17537
17559
|
};
|
|
17538
17560
|
const transSearchOption = (option) => {
|
|
@@ -17731,11 +17753,14 @@ const _sfc_main$2 = defineComponent({
|
|
|
17731
17753
|
})
|
|
17732
17754
|
]), 1032, ["model", "option", "size", "permission"]),
|
|
17733
17755
|
createCommentVNode("\u9876\u90E8\u64CD\u4F5C\u533A\u57DF"),
|
|
17734
|
-
crudOption.value.addBtn || unref(slots).topLeft ? (openBlock(), createElementBlock("div", {
|
|
17756
|
+
crudOption.value.addBtn || unref(slots).topLeft || unref(slots).topRight ? (openBlock(), createElementBlock("div", {
|
|
17735
17757
|
key: 0,
|
|
17736
17758
|
class: "m-search-top"
|
|
17737
17759
|
}, [
|
|
17738
|
-
|
|
17760
|
+
crudOption.value.addBtn || unref(slots).topLeft ? (openBlock(), createElementBlock("div", {
|
|
17761
|
+
key: 0,
|
|
17762
|
+
class: "m-search-left"
|
|
17763
|
+
}, [
|
|
17739
17764
|
crudOption.value.addBtn && !unref(slots).addBtn && _ctx.permission["add"] !== false ? (openBlock(), createBlock(_component_el_button, {
|
|
17740
17765
|
key: 0,
|
|
17741
17766
|
size: _ctx.size || unref(globalConfig).size,
|
|
@@ -17753,7 +17778,10 @@ const _sfc_main$2 = defineComponent({
|
|
|
17753
17778
|
}, 8, ["size", "icon", "onClick"])) : createCommentVNode("v-if", true),
|
|
17754
17779
|
_ctx.permission["add"] !== false ? renderSlot(_ctx.$slots, "addBtn", normalizeProps(mergeProps({ key: 1 }, { size: _ctx.size || unref(globalConfig).size }))) : createCommentVNode("v-if", true),
|
|
17755
17780
|
renderSlot(_ctx.$slots, "topLeft", normalizeProps(guardReactiveProps({ size: _ctx.size || unref(globalConfig).size })))
|
|
17756
|
-
]),
|
|
17781
|
+
])) : (openBlock(), createElementBlock("div", {
|
|
17782
|
+
key: 1,
|
|
17783
|
+
class: "m-search-left"
|
|
17784
|
+
})),
|
|
17757
17785
|
createElementVNode("div", { class: "m-search-right" }, [
|
|
17758
17786
|
renderSlot(_ctx.$slots, "topRight", normalizeProps(guardReactiveProps({ size: _ctx.size || unref(globalConfig).size })))
|
|
17759
17787
|
])
|
package/dist/locale/en.js
CHANGED
package/dist/locale/en.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! M ElePlus Crud v0.0.
|
|
1
|
+
/*! M ElePlus Crud v0.0.7 */(function(e,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis!="undefined"?globalThis:e||self,e.MElePlusCrudLocaleEn=t())})(this,function(){"use strict";var e={name:"en",m:{table:{menuTitle:"Action",preview:"Preview"},dialog:{cancelText:"Cancel",confirmText:"Confirm"},search:{searchBtnText:"Search",resetBtnText:"Reset",expandBtn:"Expand",colBtn:"Collapse"},crud:{addBtnText:"Add",editBtnText:"Edit",delBtnText:"Delete",addDialogTitle:"Add",editDialogTitle:"Edit",viewDialogTitle:"View",dialogSaveBtnText:"Save",dialogCancelBtnText:"Cancel"}}};return e});
|
|
2
2
|
//# sourceMappingURL=en.min.js.map
|
package/dist/locale/en.min.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! M ElePlus Crud v0.0.
|
|
1
|
+
/*! M ElePlus Crud v0.0.7 */var e={name:"en",m:{table:{menuTitle:"Action",preview:"Preview"},dialog:{cancelText:"Cancel",confirmText:"Confirm"},search:{searchBtnText:"Search",resetBtnText:"Reset",expandBtn:"Expand",colBtn:"Collapse"},crud:{addBtnText:"Add",editBtnText:"Edit",delBtnText:"Delete",addDialogTitle:"Add",editDialogTitle:"Edit",viewDialogTitle:"View",dialogSaveBtnText:"Save",dialogCancelBtnText:"Cancel"}}};export{e as default};
|
|
2
2
|
//# sourceMappingURL=en.min.mjs.map
|
package/dist/locale/en.mjs
CHANGED
package/dist/locale/zh-cn.js
CHANGED
package/dist/locale/zh-cn.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! M ElePlus Crud v0.0.
|
|
1
|
+
/*! M ElePlus Crud v0.0.7 */(function(e,u){typeof exports=="object"&&typeof module!="undefined"?module.exports=u():typeof define=="function"&&define.amd?define(u):(e=typeof globalThis!="undefined"?globalThis:e||self,e.MElePlusCrudLocaleZhCn=u())})(this,function(){"use strict";var e={name:"zh-cn",m:{table:{menuTitle:"\u64CD\u4F5C",preview:"\u9884\u89C8"},dialog:{cancelText:"\u53D6 \u6D88",confirmText:"\u786E \u8BA4"},search:{searchBtnText:"\u641C \u7D22",resetBtnText:"\u6E05 \u7A7A",expandBtn:"\u5C55 \u5F00",colBtn:"\u6536 \u7F29"},crud:{addBtnText:"\u65B0 \u589E",editBtnText:"\u7F16\u8F91",delBtnText:"\u5220\u9664",addDialogTitle:"\u65B0\u589E",editDialogTitle:"\u7F16\u8F91",viewDialogTitle:"\u67E5\u770B",dialogSaveBtnText:"\u4FDD \u5B58",dialogCancelBtnText:"\u53D6 \u6D88"}}};return e});
|
|
2
2
|
//# sourceMappingURL=zh-cn.min.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! M ElePlus Crud v0.0.
|
|
1
|
+
/*! M ElePlus Crud v0.0.7 */var u={name:"zh-cn",m:{table:{menuTitle:"\u64CD\u4F5C",preview:"\u9884\u89C8"},dialog:{cancelText:"\u53D6 \u6D88",confirmText:"\u786E \u8BA4"},search:{searchBtnText:"\u641C \u7D22",resetBtnText:"\u6E05 \u7A7A",expandBtn:"\u5C55 \u5F00",colBtn:"\u6536 \u7F29"},crud:{addBtnText:"\u65B0 \u589E",editBtnText:"\u7F16\u8F91",delBtnText:"\u5220\u9664",addDialogTitle:"\u65B0\u589E",editDialogTitle:"\u7F16\u8F91",viewDialogTitle:"\u67E5\u770B",dialogSaveBtnText:"\u4FDD \u5B58",dialogCancelBtnText:"\u53D6 \u6D88"}}};export{u as default};
|
|
2
2
|
//# sourceMappingURL=zh-cn.min.mjs.map
|
package/dist/locale/zh-cn.mjs
CHANGED
|
@@ -87,6 +87,14 @@ export interface ICrudCommonColumn extends ICommonColumn, ITableCommonColumn, Wi
|
|
|
87
87
|
* @description 表单项框栅列
|
|
88
88
|
*/
|
|
89
89
|
formSpan?: number;
|
|
90
|
+
/**
|
|
91
|
+
* @description 新增表单禁用
|
|
92
|
+
*/
|
|
93
|
+
addDisabled?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* @description 编辑表单禁用
|
|
96
|
+
*/
|
|
97
|
+
editDisabled?: boolean;
|
|
90
98
|
}
|
|
91
99
|
export interface ICrudColumn extends ICrudCommonColumn {
|
|
92
100
|
type?: ColumnType | 'index' | 'single' | 'selection';
|
|
@@ -44,6 +44,10 @@ export interface IFormCommonColumn extends EventHandlers {
|
|
|
44
44
|
* @description 占位文本
|
|
45
45
|
*/
|
|
46
46
|
placeholder?: string;
|
|
47
|
+
/**
|
|
48
|
+
* @description 表单禁用
|
|
49
|
+
*/
|
|
50
|
+
disabled?: boolean;
|
|
47
51
|
}
|
|
48
52
|
export interface IFormColumn extends ICommonColumn, IFormCommonColumn {
|
|
49
53
|
/**
|
package/es/index.mjs
CHANGED
|
@@ -5,19 +5,19 @@ export { configProviderProps } from './packages/components/config-provider/src/c
|
|
|
5
5
|
export { configProviderContextKey } from './packages/components/config-provider/src/constants.mjs';
|
|
6
6
|
export { provideGlobalConfig, useGlobalComponentSettings, useGlobalConfig } from './packages/components/config-provider/src/hooks/use-global-config.mjs';
|
|
7
7
|
export { MConfigProvider } from './packages/components/config-provider/index.mjs';
|
|
8
|
-
export { tableEmits, tableProps } from './packages/components/table/src/
|
|
8
|
+
export { tableEmits, tableProps } from './packages/components/table/src/table2.mjs';
|
|
9
9
|
export { MTable } from './packages/components/table/index.mjs';
|
|
10
|
-
export { searchEmits, searchProps } from './packages/components/search/src/
|
|
10
|
+
export { searchEmits, searchProps } from './packages/components/search/src/search2.mjs';
|
|
11
11
|
export { MSearch } from './packages/components/search/index.mjs';
|
|
12
|
-
export { pictureEmits, pictureProps } from './packages/components/picture/src/
|
|
12
|
+
export { pictureEmits, pictureProps } from './packages/components/picture/src/picture.mjs';
|
|
13
13
|
export { MPicture } from './packages/components/picture/index.mjs';
|
|
14
14
|
export { dialogEmits, dialogProps } from './packages/components/dialog/src/dialog.mjs';
|
|
15
15
|
export { MDialog } from './packages/components/dialog/index.mjs';
|
|
16
|
-
export { qrcodeEmits, qrcodeProps } from './packages/components/qrcode/src/
|
|
16
|
+
export { qrcodeEmits, qrcodeProps } from './packages/components/qrcode/src/qrcode.mjs';
|
|
17
17
|
export { MQrcode } from './packages/components/qrcode/index.mjs';
|
|
18
18
|
export { barcodeEmits, barcodeProps } from './packages/components/barcode/src/barcode.mjs';
|
|
19
19
|
export { MBarcode } from './packages/components/barcode/index.mjs';
|
|
20
|
-
export { formEmits, formProps } from './packages/components/form/src/
|
|
20
|
+
export { formEmits, formProps } from './packages/components/form/src/form2.mjs';
|
|
21
21
|
export { MForm } from './packages/components/form/index.mjs';
|
|
22
22
|
export { crudEmits, crudProps } from './packages/components/crud/src/crud.mjs';
|
|
23
23
|
export { MCrud } from './packages/components/crud/index.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crud.mjs","sources":["../../../../../../../packages/components/crud/src/crud.ts"],"sourcesContent":["import {\r\n buildProps,\r\n definePropType,\r\n isArray,\r\n isFunction,\r\n isNumber,\r\n isObject,\r\n isString,\r\n} from '@m-eleplus-crud/utils'\r\nimport { useSizeProp } from '@m-eleplus-crud/hooks'\r\nimport { ColumnType, ICommonColumn } from '../../common'\r\nimport type { ExtractPropTypes } from 'vue'\r\nimport type { FormItemRule } from 'element-plus'\r\nimport type { ITableCommonColumn, ITableCommonOption } from '../../table'\r\nimport type { ISearchCommonColumn, ISearchCommonOption } from '../../search'\r\nimport type { IFormCommonColumn, IFormCommonOption } from '../../form'\r\n\r\n// crud不需要继承form的column属性\r\ntype WithoutFormColumn = Omit<\r\n IFormCommonColumn,\r\n 'order' | 'value' | 'placeholder' | 'rules' | 'span' | 'labelWidth'\r\n>\r\n// crud不需要继承search的column属性\r\ntype WithoutSearchColumn = Omit<\r\n ISearchCommonColumn,\r\n 'order' | 'value' | 'placeholder' | 'rules' | 'span' | 'labelWidth'\r\n>\r\n\r\nexport interface ICrudCommonColumn\r\n extends ICommonColumn,\r\n
|
|
1
|
+
{"version":3,"file":"crud.mjs","sources":["../../../../../../../packages/components/crud/src/crud.ts"],"sourcesContent":["import {\r\n buildProps,\r\n definePropType,\r\n isArray,\r\n isFunction,\r\n isNumber,\r\n isObject,\r\n isString,\r\n} from '@m-eleplus-crud/utils'\r\nimport { useSizeProp } from '@m-eleplus-crud/hooks'\r\nimport { ColumnType, ICommonColumn } from '../../common'\r\nimport type { ExtractPropTypes } from 'vue'\r\nimport type { FormItemRule } from 'element-plus'\r\nimport type { ITableCommonColumn, ITableCommonOption } from '../../table'\r\nimport type { ISearchCommonColumn, ISearchCommonOption } from '../../search'\r\nimport type { IFormCommonColumn, IFormCommonOption } from '../../form'\r\n\r\n// crud不需要继承form的column属性\r\ntype WithoutFormColumn = Omit<\r\n IFormCommonColumn,\r\n 'order' | 'value' | 'placeholder' | 'rules' | 'span' | 'labelWidth'\r\n>\r\n// crud不需要继承search的column属性\r\ntype WithoutSearchColumn = Omit<\r\n ISearchCommonColumn,\r\n 'order' | 'value' | 'placeholder' | 'rules' | 'span' | 'labelWidth'\r\n>\r\n\r\nexport interface ICrudCommonColumn\r\n extends ICommonColumn,\r\n ITableCommonColumn,\r\n // IFormCommonColumn,\r\n // ISearchCommonColumn,\r\n WithoutFormColumn,\r\n WithoutSearchColumn {\r\n /**\r\n * @description 搜索排序\r\n */\r\n searchOrder?: number\r\n /**\r\n * @description 表单排序\r\n */\r\n formOrder?: number\r\n /**\r\n * @description 是否开启搜索\r\n */\r\n search?: boolean\r\n /**\r\n * @description 搜索默认值\r\n */\r\n searchValue?: any\r\n /**\r\n * @description 表单默认值\r\n */\r\n formValue?: any\r\n /**\r\n * @description 搜索占位文本\r\n */\r\n searchPlaceholder?: string\r\n /**\r\n * @description 表单占位文本\r\n */\r\n formPlaceholder?: string\r\n /**\r\n * @description 搜索标签宽度\r\n */\r\n searchLabelWidth?: string\r\n /**\r\n * @description 表单标签宽度\r\n */\r\n formLabelWidth?: string\r\n /**\r\n * @description 搜索校验规则\r\n */\r\n searchRules?: FormItemRule[]\r\n /**\r\n * @description 表单校验规则\r\n */\r\n formRules?: FormItemRule[]\r\n /**\r\n * @description 列表是否显示\r\n */\r\n hide?: boolean\r\n /**\r\n * @description 新增对话框是否显示\r\n */\r\n addHide?: boolean\r\n /**\r\n * @description 查看对话框是否显示\r\n */\r\n viewHide?: boolean\r\n /**\r\n * @description 编辑对话框是否显示\r\n */\r\n editHide?: boolean\r\n /**\r\n * @description 搜索项框栅列\r\n */\r\n searchSpan?: number\r\n /**\r\n * @description 新增项框栅列\r\n */\r\n addSpan?: number\r\n /**\r\n * @description 编辑项框栅列\r\n */\r\n editSpan?: number\r\n /**\r\n * @description 查看项框栅列\r\n */\r\n viewSpan?: number\r\n /**\r\n * @description 表单项框栅列\r\n */\r\n formSpan?: number\r\n /**\r\n * @description 新增表单禁用\r\n */\r\n addDisabled?: boolean\r\n /**\r\n * @description 编辑表单禁用\r\n */\r\n editDisabled?: boolean\r\n}\r\n\r\nexport interface ICrudColumn extends ICrudCommonColumn {\r\n type?: ColumnType | 'index' | 'single' | 'selection'\r\n}\r\n\r\n/**\r\n * @description crud配置\r\n */\r\nexport interface ICrudOption\r\n extends ITableCommonOption,\r\n IFormCommonOption,\r\n ISearchCommonOption {\r\n /**\r\n * @description 新增按钮是否需要\r\n */\r\n addBtn?: boolean\r\n /**\r\n * @description 编辑按钮是否需要\r\n */\r\n editBtn?: boolean\r\n /**\r\n * @description 删除按钮是否需要\r\n */\r\n delBtn?: boolean\r\n /**\r\n * @description 新增按钮文字\r\n */\r\n addBtnText?: string\r\n /**\r\n * @description 新增按钮图标\r\n */\r\n addBtnIcon?: string\r\n /**\r\n * @description 搜索label宽度\r\n */\r\n searchLabelWidth?: string\r\n /**\r\n * @description 表单label宽度\r\n */\r\n formLabelWidth?: string\r\n /**\r\n * @description 新增弹窗标题\r\n */\r\n addDialogTitle?: string\r\n /**\r\n * @description 编辑弹窗标题\r\n */\r\n editDialogTitle?: string\r\n /**\r\n * @description 查看弹窗标题\r\n */\r\n viewDialogTitle?: string\r\n /**\r\n * @description 弹窗宽度\r\n */\r\n dialogWidth?: string\r\n /**\r\n * @description 表格高度\r\n */\r\n height?: string\r\n /**\r\n * @description 表格最大高度\r\n */\r\n maxHeight?: string\r\n /**\r\n * @description 表格高度调节(px)\r\n */\r\n calcHeight?: number\r\n /**\r\n * @description crud列配置\r\n */\r\n column: ICrudColumn[]\r\n}\r\n\r\nexport const crudProps = buildProps({\r\n /**\r\n * @description 组件尺寸大小\r\n */\r\n size: useSizeProp,\r\n /**\r\n * @description 加载状态\r\n */\r\n loading: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n /**\r\n * @description 表格数据\r\n */\r\n data: {\r\n type: Array,\r\n required: true,\r\n },\r\n /**\r\n * @description 搜索参数\r\n */\r\n search: {\r\n type: Object,\r\n default: () => ({}),\r\n },\r\n /**\r\n * @description 数据总数\r\n */\r\n total: {\r\n type: Number,\r\n default: 0,\r\n },\r\n /**\r\n * @description 表单绑定的值\r\n */\r\n modelValue: {\r\n type: Object,\r\n required: true,\r\n },\r\n /**\r\n * @description 权限配置\r\n */\r\n permission: {\r\n type: Object,\r\n default: () => ({\r\n // 新增按钮权限\r\n addBtn: true,\r\n // 编辑按钮权限\r\n editBtn: true,\r\n // 删除按钮权限\r\n delBtn: true,\r\n }),\r\n },\r\n /**\r\n * @description 选择的数据\r\n */\r\n select: {\r\n type: Array,\r\n default: () => [],\r\n },\r\n /**\r\n * @description 表单提交前\r\n */\r\n beforeEnter: {\r\n type: Function,\r\n },\r\n /**\r\n * @description crud配置项\r\n */\r\n option: {\r\n type: definePropType<ICrudOption>(Object),\r\n required: false,\r\n },\r\n} as const)\r\nexport type CrudProps = ExtractPropTypes<typeof crudProps>\r\n\r\nexport const crudEmits = {\r\n /**\r\n * @description 更新选择数据\r\n * @param arr 选择的数据\r\n * @returns\r\n */\r\n 'update:select': (arr: any[]) => isArray(arr),\r\n /**\r\n * @description 更新表单数据\r\n * @param value 表单数据\r\n * @returns\r\n */\r\n 'update:modelValue': (value: any) => isObject(value),\r\n /**\r\n * 查询事件触发\r\n * @param form 查询表单数据\r\n * @returns\r\n */\r\n search: (form: any) => isObject(form),\r\n /**\r\n * 重置事件触发\r\n * @returns\r\n */\r\n reset: () => true,\r\n /**\r\n * 新增\r\n * @param form 表单数据\r\n * @param done 完成\r\n * @param loading 加载\r\n * @returns\r\n */\r\n rowSave: (form: any, done: () => void, loading: () => void) =>\r\n isObject(form) && isFunction(done) && isFunction(loading),\r\n /**\r\n * 编辑\r\n * @param form 表单数据\r\n * @param done 完成\r\n * @param loading 加载\r\n * @returns\r\n */\r\n rowEdit: (form: any, done: () => void, loading: () => void) =>\r\n isObject(form) && isFunction(done) && isFunction(loading),\r\n\r\n /**\r\n * 取消\r\n * @param form 表单数据\r\n * @param index 索引\r\n * @param type 类型\r\n * @returns\r\n */\r\n rowCancel: (form: any, index: number, type: 'add' | 'edit' | 'view') =>\r\n isObject(form) && isNumber(index) && isString(type),\r\n\r\n /**\r\n * 删除\r\n * @param row 行数据\r\n * @param index 索引\r\n * @returns\r\n */\r\n rowDel: (row: any, index: number) => isObject(row) && isNumber(index),\r\n}\r\nexport type CrudEmits = typeof crudEmits\r\n"],"names":[],"mappings":";;;;;AAsMO,MAAM,YAAY,UAAW,CAAA;AAAA,EAIlC,IAAM,EAAA,WAAA;AAAA,EAIN,OAAS,EAAA;AAAA,IACP,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA,EAIA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,KAAA;AAAA,IACN,QAAU,EAAA,IAAA;AAAA,GACZ;AAAA,EAIA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAA,EAAS,OAAO,EAAC,CAAA;AAAA,GACnB;AAAA,EAIA,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,EAIA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,IACN,QAAU,EAAA,IAAA;AAAA,GACZ;AAAA,EAIA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,IACN,SAAS,OAAO;AAAA,MAEd,MAAQ,EAAA,IAAA;AAAA,MAER,OAAS,EAAA,IAAA;AAAA,MAET,MAAQ,EAAA,IAAA;AAAA,KACV,CAAA;AAAA,GACF;AAAA,EAIA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,KAAA;AAAA,IACN,OAAA,EAAS,MAAM,EAAC;AAAA,GAClB;AAAA,EAIA,WAAa,EAAA;AAAA,IACX,IAAM,EAAA,QAAA;AAAA,GACR;AAAA,EAIA,MAAQ,EAAA;AAAA,IACN,IAAA,EAAM,eAA4B,MAAM,CAAA;AAAA,IACxC,QAAU,EAAA,KAAA;AAAA,GACZ;AACF,CAAU,EAAA;AAGH,MAAM,SAAY,GAAA;AAAA,EAMvB,eAAiB,EAAA,CAAC,GAAe,KAAA,OAAA,CAAQ,GAAG,CAAA;AAAA,EAM5C,mBAAqB,EAAA,CAAC,KAAe,KAAA,QAAA,CAAS,KAAK,CAAA;AAAA,EAMnD,MAAQ,EAAA,CAAC,IAAc,KAAA,QAAA,CAAS,IAAI,CAAA;AAAA,EAKpC,OAAO,MAAM,IAAA;AAAA,EAQb,OAAS,EAAA,CAAC,IAAW,EAAA,IAAA,EAAkB,OACrC,KAAA,QAAA,CAAS,IAAI,CAAA,IAAK,UAAW,CAAA,IAAI,CAAK,IAAA,UAAA,CAAW,OAAO,CAAA;AAAA,EAQ1D,OAAS,EAAA,CAAC,IAAW,EAAA,IAAA,EAAkB,OACrC,KAAA,QAAA,CAAS,IAAI,CAAA,IAAK,UAAW,CAAA,IAAI,CAAK,IAAA,UAAA,CAAW,OAAO,CAAA;AAAA,EAS1D,SAAW,EAAA,CAAC,IAAW,EAAA,KAAA,EAAe,IACpC,KAAA,QAAA,CAAS,IAAI,CAAA,IAAK,QAAS,CAAA,KAAK,CAAK,IAAA,QAAA,CAAS,IAAI,CAAA;AAAA,EAQpD,MAAA,EAAQ,CAAC,GAAU,EAAA,KAAA,KAAkB,SAAS,GAAG,CAAA,IAAK,SAAS,KAAK,CAAA;AACtE;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useSlots, computed, ref, watch, onMounted, resolveComponent, openBlock, createElementBlock, createVNode, unref, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, createCommentVNode,
|
|
1
|
+
import { defineComponent, useSlots, computed, ref, watch, onMounted, resolveComponent, openBlock, createElementBlock, createVNode, unref, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, createCommentVNode, createBlock, createTextVNode, toDisplayString, mergeProps, createElementVNode, nextTick } from 'vue';
|
|
2
2
|
import { cloneDeep, get, set } from 'lodash-unified';
|
|
3
3
|
import { crudProps, crudEmits } from './crud.mjs';
|
|
4
4
|
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';
|
|
@@ -218,6 +218,13 @@ const _sfc_main = defineComponent({
|
|
|
218
218
|
} else {
|
|
219
219
|
delete result.span;
|
|
220
220
|
}
|
|
221
|
+
if (column.addDisabled || column.editDisabled) {
|
|
222
|
+
if (dialogType.value === "add" && column.addDisabled) {
|
|
223
|
+
result.disabled = column.addDisabled;
|
|
224
|
+
} else if (dialogType.value === "edit" && column.editDisabled) {
|
|
225
|
+
result.disabled = column.editDisabled;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
221
228
|
return result;
|
|
222
229
|
};
|
|
223
230
|
const transSearchOption = (option) => {
|
|
@@ -416,11 +423,14 @@ const _sfc_main = defineComponent({
|
|
|
416
423
|
})
|
|
417
424
|
]), 1032, ["model", "option", "size", "permission"]),
|
|
418
425
|
createCommentVNode("\u9876\u90E8\u64CD\u4F5C\u533A\u57DF"),
|
|
419
|
-
crudOption.value.addBtn || unref(slots).topLeft ? (openBlock(), createElementBlock("div", {
|
|
426
|
+
crudOption.value.addBtn || unref(slots).topLeft || unref(slots).topRight ? (openBlock(), createElementBlock("div", {
|
|
420
427
|
key: 0,
|
|
421
428
|
class: "m-search-top"
|
|
422
429
|
}, [
|
|
423
|
-
|
|
430
|
+
crudOption.value.addBtn || unref(slots).topLeft ? (openBlock(), createElementBlock("div", {
|
|
431
|
+
key: 0,
|
|
432
|
+
class: "m-search-left"
|
|
433
|
+
}, [
|
|
424
434
|
crudOption.value.addBtn && !unref(slots).addBtn && _ctx.permission["add"] !== false ? (openBlock(), createBlock(_component_el_button, {
|
|
425
435
|
key: 0,
|
|
426
436
|
size: _ctx.size || unref(globalConfig).size,
|
|
@@ -438,7 +448,10 @@ const _sfc_main = defineComponent({
|
|
|
438
448
|
}, 8, ["size", "icon", "onClick"])) : createCommentVNode("v-if", true),
|
|
439
449
|
_ctx.permission["add"] !== false ? renderSlot(_ctx.$slots, "addBtn", normalizeProps(mergeProps({ key: 1 }, { size: _ctx.size || unref(globalConfig).size }))) : createCommentVNode("v-if", true),
|
|
440
450
|
renderSlot(_ctx.$slots, "topLeft", normalizeProps(guardReactiveProps({ size: _ctx.size || unref(globalConfig).size })))
|
|
441
|
-
]),
|
|
451
|
+
])) : (openBlock(), createElementBlock("div", {
|
|
452
|
+
key: 1,
|
|
453
|
+
class: "m-search-left"
|
|
454
|
+
})),
|
|
442
455
|
createElementVNode("div", { class: "m-search-right" }, [
|
|
443
456
|
renderSlot(_ctx.$slots, "topRight", normalizeProps(guardReactiveProps({ size: _ctx.size || unref(globalConfig).size })))
|
|
444
457
|
])
|