matrix_components 2.0.305 → 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 +7 -0
- package/dist/matrix_components.js +24 -4
- package/dist/matrix_components.umd.cjs +1 -1
- package/package.json +3 -2
- package/dist/ComponentDemo/DialogDemo.vue +0 -210
- package/dist/ComponentDemo/ExampleFormConfig.js +0 -270
- package/dist/ComponentDemo/ExcelDemo.vue +0 -263
- package/dist/ComponentDemo/FormDemo.vue +0 -400
- package/dist/ComponentDemo/OfficeDemo.vue +0 -189
- package/dist/ComponentDemo/PdfDemo.vue +0 -207
- package/dist/ComponentDemo/SaturationLineDemo.vue +0 -155
- package/dist/ComponentDemo/SimpleFormConfig.json +0 -97
- package/dist/ComponentDemo/Test.vue +0 -79
- package/dist/ComponentDemo/TestFormConfig.js +0 -129
- package/dist/ComponentDemo/VideoDemo.vue +0 -264
- package/dist/ComponentDemo/WordDemo.vue +0 -191
package/README.md
CHANGED
|
@@ -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) {
|