mirror of
https://github.com/dataease/dataease.git
synced 2026-05-23 22:08:34 +08:00
fix: 嵌入式权限
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
import { ElMessage, ElMessageBox } from 'element-plus-secondary'
|
||||
|
||||
export const check = (data, id?: string) => {
|
||||
export const check = (data, id?: string, weight?: number) => {
|
||||
if (!weight) {
|
||||
weight = 1
|
||||
}
|
||||
if (!id) {
|
||||
ElMessage.error('资源ID不能为空')
|
||||
return false
|
||||
}
|
||||
const node = getNode(data, id)
|
||||
if (!node) {
|
||||
if (!node || node < weight) {
|
||||
showMsg('无权访问当前资源,是否离开当前页面?系统将不保存您所做的更改', id)
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user