matrix_components 2.0.304 → 2.0.306
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/README.md +15 -0
- package/dist/matrix_components.css +1 -1
- package/dist/matrix_components.js +45 -13
- package/dist/matrix_components.umd.cjs +1 -1
- package/package.json +3 -2
|
@@ -7239,10 +7239,30 @@ function registerDirective(app2) {
|
|
|
7239
7239
|
});
|
|
7240
7240
|
app2.directive("permission", {
|
|
7241
7241
|
mounted(el, binding) {
|
|
7242
|
-
var _a2, _b, _c;
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7242
|
+
var _a2, _b, _c, _d, _e, _f;
|
|
7243
|
+
let btnsPermission = [];
|
|
7244
|
+
try {
|
|
7245
|
+
if (sessionStorage.getItem("btnsPermission")) {
|
|
7246
|
+
Array.isArray(JSON.parse(sessionStorage.getItem("btnsPermission"))) ? btnsPermission = JSON.parse(sessionStorage.getItem("btnsPermission")) : null;
|
|
7247
|
+
} else if (localStorage.getItem("btnsPermission")) {
|
|
7248
|
+
Array.isArray(JSON.parse(localStorage.getItem("btnsPermission"))) ? btnsPermission = JSON.parse(localStorage.getItem("btnsPermission")) : null;
|
|
7249
|
+
}
|
|
7250
|
+
} catch (e) {
|
|
7251
|
+
btnsPermission = [];
|
|
7252
|
+
}
|
|
7253
|
+
if (btnsPermission.length === 0) {
|
|
7254
|
+
if (app2.config.globalProperties.$btnsPermission) {
|
|
7255
|
+
btnsPermission = app2.config.globalProperties.$btnsPermission;
|
|
7256
|
+
} else if (binding.instance && binding.instance.$.appContext.app.config.globalProperties.$btnsPermission) {
|
|
7257
|
+
btnsPermission = binding.instance.$.appContext.app.config.globalProperties.$btnsPermission;
|
|
7258
|
+
} else if (binding.instance && ((_a2 = binding.instance.$.provides) == null ? void 0 : _a2.btnsPermission)) {
|
|
7259
|
+
btnsPermission = binding.instance.$.provides.btnsPermission;
|
|
7260
|
+
} else if (binding.instance && ((_c = (_b = binding.instance.$.parent) == null ? void 0 : _b.provides) == null ? void 0 : _c.btnsPermission)) {
|
|
7261
|
+
btnsPermission = binding.instance.$.parent.provides.btnsPermission;
|
|
7262
|
+
}
|
|
7263
|
+
}
|
|
7264
|
+
const selector = ((_d = binding.modifiers) == null ? void 0 : _d["class"]) ? "class" : ((_e = binding.modifiers) == null ? void 0 : _e["id"]) ? "id" : "id";
|
|
7265
|
+
const isDisplayNone = (_f = binding.modifiers) == null ? void 0 : _f["display"];
|
|
7246
7266
|
if (selector === "id") {
|
|
7247
7267
|
if (!(btnsPermission == null ? void 0 : btnsPermission.includes(el.getAttribute(selector)))) {
|
|
7248
7268
|
if (isDisplayNone) {
|
|
@@ -47183,13 +47203,13 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
47183
47203
|
},
|
|
47184
47204
|
setup(__props) {
|
|
47185
47205
|
useCssVars((_ctx) => ({
|
|
47186
|
-
"
|
|
47187
|
-
"
|
|
47188
|
-
"
|
|
47189
|
-
"
|
|
47190
|
-
"
|
|
47191
|
-
"
|
|
47192
|
-
"
|
|
47206
|
+
"03d1e268": __props.modalColor,
|
|
47207
|
+
"66b60ff0": _height.value,
|
|
47208
|
+
"82142824": dialogPosition.value.left,
|
|
47209
|
+
"6941dc8e": dialogPosition.value.top,
|
|
47210
|
+
"31dbe626": tbPadding.value,
|
|
47211
|
+
"79fd3a56": lrPadding.value,
|
|
47212
|
+
"212479e5": _centerHeight.value
|
|
47193
47213
|
}));
|
|
47194
47214
|
const asyncDom = computed(() => {
|
|
47195
47215
|
var _a2;
|
|
@@ -47221,6 +47241,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
47221
47241
|
const props = __props;
|
|
47222
47242
|
const componentRef = ref$1(null);
|
|
47223
47243
|
const currentOption = reactive({ ...props.option });
|
|
47244
|
+
const currentTitle = ref$1(props.title);
|
|
47224
47245
|
const currentWidth = ref$1(props.width);
|
|
47225
47246
|
const currentHeight = ref$1(props.height);
|
|
47226
47247
|
const currentX = ref$1(props.x);
|
|
@@ -47311,11 +47332,22 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
47311
47332
|
},
|
|
47312
47333
|
{ deep: true }
|
|
47313
47334
|
);
|
|
47335
|
+
watch(
|
|
47336
|
+
() => props.title,
|
|
47337
|
+
(newVal) => {
|
|
47338
|
+
currentTitle.value = newVal;
|
|
47339
|
+
},
|
|
47340
|
+
{ immediate: true }
|
|
47341
|
+
);
|
|
47314
47342
|
onMounted(() => {
|
|
47315
47343
|
if (props.dialogInstance) {
|
|
47316
47344
|
const instance = props.dialogInstance;
|
|
47317
47345
|
instance.updateOption = (newOption) => {
|
|
47318
|
-
|
|
47346
|
+
if (newOption.title !== void 0) {
|
|
47347
|
+
currentTitle.value = newOption.title;
|
|
47348
|
+
}
|
|
47349
|
+
const { title, ...otherOptions } = newOption;
|
|
47350
|
+
Object.assign(currentOption, otherOptions);
|
|
47319
47351
|
};
|
|
47320
47352
|
instance.close = () => {
|
|
47321
47353
|
closeDialog();
|
|
@@ -47453,7 +47485,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
47453
47485
|
...props.headerEvents,
|
|
47454
47486
|
close: closeDialog
|
|
47455
47487
|
})), null, 16)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
47456
|
-
createTextVNode(toDisplayString(
|
|
47488
|
+
createTextVNode(toDisplayString(currentTitle.value), 1)
|
|
47457
47489
|
], 64))
|
|
47458
47490
|
]),
|
|
47459
47491
|
createElementVNode("div", _hoisted_4$1, [
|