chore: 禁止普通用户使用不安全插件,比如复制到本机、自定义js脚本等

This commit is contained in:
xiaojunnuo
2024-09-29 01:14:21 +08:00
parent 5aa06f5b07
commit 4fcaab5feb
10 changed files with 70 additions and 27 deletions
@@ -4,11 +4,19 @@
<div class="title">权限管理</div>
</template>
<fs-crud ref="crudRef" v-bind="crudBinding">
<a-button v-permission="'sys:auth:per:add'" style="margin-left: 20px" @click="addHandle({})">
<a-button v-permission="'1sys:auth:per:add'" style="margin-left: 20px" @click="addHandle({})">
<fs-icon :icon="ui.icons.add"></fs-icon>
添加
</a-button>
<fs-permission-tree class="permission-tree mt-10" :tree="crudBinding.data" :checkable="false" :actions="permission" @add="addHandle" @edit="editHandle" @remove="removeHandle"></fs-permission-tree>
<fs-permission-tree
class="permission-tree mt-10"
:tree="crudBinding.data"
:checkable="false"
:actions="permission"
@add="addHandle"
@edit="editHandle"
@remove="removeHandle"
></fs-permission-tree>
</fs-crud>
</fs-page>
</template>
@@ -49,9 +57,9 @@ export default defineComponent({
const { hasPermissions } = usePermission();
const permission = ref({
add: hasPermissions("sys:auth:per:add"),
edit: hasPermissions("sys:auth:per:edit"),
remove: hasPermissions("sys:auth:per:remove")
add: hasPermissions("1sys:auth:per:add"),
edit: hasPermissions("1sys:auth:per:edit"),
remove: hasPermissions("1sys:auth:per:remove")
});
return {