lw-cdp-ui 1.2.53 → 1.2.54
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.
|
@@ -207,6 +207,19 @@ export default {
|
|
|
207
207
|
}) || []
|
|
208
208
|
)
|
|
209
209
|
},
|
|
210
|
+
/**
|
|
211
|
+
* 检查权限
|
|
212
|
+
*/
|
|
213
|
+
checkAuth(auth) {
|
|
214
|
+
const { menus = [], authorities = [] } = JSON.parse(localStorage.getItem('userAuthInfo') || '{}')
|
|
215
|
+
const allPermissions = [...menus, ...authorities]
|
|
216
|
+
|
|
217
|
+
if (!auth) return true
|
|
218
|
+
if (Array.isArray(auth)) {
|
|
219
|
+
return auth.some((permission) => allPermissions.includes(permission))
|
|
220
|
+
}
|
|
221
|
+
return allPermissions.includes(auth)
|
|
222
|
+
},
|
|
210
223
|
}
|
|
211
224
|
}
|
|
212
225
|
</script>
|
|
@@ -47,7 +47,7 @@ export default {
|
|
|
47
47
|
|
|
48
48
|
data() {
|
|
49
49
|
return {
|
|
50
|
-
|
|
50
|
+
empty,
|
|
51
51
|
// 表格基础状态
|
|
52
52
|
tableHeaders: [], // 表格列配置
|
|
53
53
|
localTableSize: this.tableSize, // 表格大小
|
|
@@ -244,20 +244,6 @@ export default {
|
|
|
244
244
|
this.isFullscreen = false
|
|
245
245
|
}
|
|
246
246
|
},
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* 检查权限
|
|
250
|
-
*/
|
|
251
|
-
checkAuth(auth) {
|
|
252
|
-
const { menus = [], authorities = [] } = JSON.parse(localStorage.getItem('userAuthInfo') || '{}')
|
|
253
|
-
const allPermissions = [...menus, ...authorities]
|
|
254
|
-
|
|
255
|
-
if (!auth) return true
|
|
256
|
-
if (Array.isArray(auth)) {
|
|
257
|
-
return auth.some((permission) => allPermissions.includes(permission))
|
|
258
|
-
}
|
|
259
|
-
return allPermissions.includes(auth)
|
|
260
|
-
},
|
|
261
247
|
// 拖动选中
|
|
262
248
|
onSelect({ selected }) {
|
|
263
249
|
let list = []
|
|
@@ -271,6 +257,12 @@ export default {
|
|
|
271
257
|
}
|
|
272
258
|
})
|
|
273
259
|
this.$emit('multipleSelection', list)
|
|
260
|
+
},
|
|
261
|
+
toggleRowSelection(row, selected) {
|
|
262
|
+
if (!this.isCard) {
|
|
263
|
+
this.$refs.multipleTable.toggleRowSelection(row, selected)
|
|
264
|
+
} else {
|
|
265
|
+
}
|
|
274
266
|
}
|
|
275
267
|
}
|
|
276
268
|
}
|
package/dist/lw-cdp-ui.esm.js
CHANGED
|
@@ -4651,6 +4651,13 @@ const rc = /* @__PURE__ */ fe(ec, [["render", ac], ["__scopeId", "data-v-096dbd6
|
|
|
4651
4651
|
const r = !t.auth || this.checkAuth(t.auth), a = !t.isShow || t.isShow(n);
|
|
4652
4652
|
return r && a;
|
|
4653
4653
|
})) || [];
|
|
4654
|
+
},
|
|
4655
|
+
/**
|
|
4656
|
+
* 检查权限
|
|
4657
|
+
*/
|
|
4658
|
+
checkAuth(e) {
|
|
4659
|
+
const { menus: n = [], authorities: t = [] } = JSON.parse(localStorage.getItem("userAuthInfo") || "{}"), r = [...n, ...t];
|
|
4660
|
+
return e ? Array.isArray(e) ? e.some((a) => r.includes(a)) : r.includes(e) : !0;
|
|
4654
4661
|
}
|
|
4655
4662
|
}
|
|
4656
4663
|
}, cc = { style: { "max-width": "300px", display: "inline-block" } }, dc = {
|
|
@@ -4896,7 +4903,7 @@ function pc(e, n, t, r, a, o) {
|
|
|
4896
4903
|
_: 3
|
|
4897
4904
|
}, 8, ["prop", "label", "width", "min-width", "align", "fixed", "sortable", "show-overflow-tooltip"]));
|
|
4898
4905
|
}
|
|
4899
|
-
const mc = /* @__PURE__ */ fe(uc, [["render", pc], ["__scopeId", "data-v-
|
|
4906
|
+
const mc = /* @__PURE__ */ fe(uc, [["render", pc], ["__scopeId", "data-v-7253f555"]]), gc = {
|
|
4900
4907
|
name: "lwTable",
|
|
4901
4908
|
components: { VueSelecto: bu, TableColumn: mc },
|
|
4902
4909
|
props: {
|
|
@@ -5107,13 +5114,6 @@ const mc = /* @__PURE__ */ fe(uc, [["render", pc], ["__scopeId", "data-v-c9f22b5
|
|
|
5107
5114
|
handleResize() {
|
|
5108
5115
|
document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement || (this.$bus.$emit("tableFullScreen", !1), this.isFullscreen = !1);
|
|
5109
5116
|
},
|
|
5110
|
-
/**
|
|
5111
|
-
* 检查权限
|
|
5112
|
-
*/
|
|
5113
|
-
checkAuth(e) {
|
|
5114
|
-
const { menus: n = [], authorities: t = [] } = JSON.parse(localStorage.getItem("userAuthInfo") || "{}"), r = [...n, ...t];
|
|
5115
|
-
return e ? Array.isArray(e) ? e.some((a) => r.includes(a)) : r.includes(e) : !0;
|
|
5116
|
-
},
|
|
5117
5117
|
// 拖动选中
|
|
5118
5118
|
onSelect({ selected: e }) {
|
|
5119
5119
|
let n = [];
|
|
@@ -5124,6 +5124,9 @@ const mc = /* @__PURE__ */ fe(uc, [["render", pc], ["__scopeId", "data-v-c9f22b5
|
|
|
5124
5124
|
n.push(a);
|
|
5125
5125
|
}
|
|
5126
5126
|
}), this.$emit("multipleSelection", n);
|
|
5127
|
+
},
|
|
5128
|
+
toggleRowSelection(e, n) {
|
|
5129
|
+
this.isCard || this.$refs.multipleTable.toggleRowSelection(e, n);
|
|
5127
5130
|
}
|
|
5128
5131
|
}
|
|
5129
5132
|
}, Ac = { class: "baseTablePage-wrap" }, vc = ["data-item"], yc = {
|