|
@@ -6,20 +6,21 @@ defineOptions({
|
|
name: "PermissionButton"
|
|
name: "PermissionButton"
|
|
});
|
|
});
|
|
|
|
|
|
-let width = computed((): CSSProperties => {
|
|
|
|
|
|
+let elStyle = computed((): CSSProperties => {
|
|
return {
|
|
return {
|
|
- width: "85vw"
|
|
|
|
|
|
+ width: "85vw",
|
|
|
|
+ justifyContent: "start"
|
|
};
|
|
};
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
<el-space direction="vertical" size="large">
|
|
<el-space direction="vertical" size="large">
|
|
- <el-tag :style="width" size="large" effect="dark">
|
|
|
|
|
|
+ <el-tag :style="elStyle" size="large" effect="dark">
|
|
当前拥有的code列表:{{ getAuths() }}
|
|
当前拥有的code列表:{{ getAuths() }}
|
|
</el-tag>
|
|
</el-tag>
|
|
|
|
|
|
- <el-card shadow="never" :style="width">
|
|
|
|
|
|
+ <el-card shadow="never" :style="elStyle">
|
|
<template #header>
|
|
<template #header>
|
|
<div class="card-header">组件方式判断权限</div>
|
|
<div class="card-header">组件方式判断权限</div>
|
|
</template>
|
|
</template>
|
|
@@ -36,7 +37,7 @@ let width = computed((): CSSProperties => {
|
|
</Auth>
|
|
</Auth>
|
|
</el-card>
|
|
</el-card>
|
|
|
|
|
|
- <el-card shadow="never" :style="width">
|
|
|
|
|
|
+ <el-card shadow="never" :style="elStyle">
|
|
<template #header>
|
|
<template #header>
|
|
<div class="card-header">函数方式判断权限</div>
|
|
<div class="card-header">函数方式判断权限</div>
|
|
</template>
|
|
</template>
|
|
@@ -54,7 +55,7 @@ let width = computed((): CSSProperties => {
|
|
</el-button>
|
|
</el-button>
|
|
</el-card>
|
|
</el-card>
|
|
|
|
|
|
- <el-card shadow="never" :style="width">
|
|
|
|
|
|
+ <el-card shadow="never" :style="elStyle">
|
|
<template #header>
|
|
<template #header>
|
|
<div class="card-header">
|
|
<div class="card-header">
|
|
指令方式判断权限(该方式不能动态修改权限)
|
|
指令方式判断权限(该方式不能动态修改权限)
|
|
@@ -72,9 +73,3 @@ let width = computed((): CSSProperties => {
|
|
</el-card>
|
|
</el-card>
|
|
</el-space>
|
|
</el-space>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
-<style lang="scss" scoped>
|
|
|
|
-:deep(.el-tag) {
|
|
|
|
- justify-content: start;
|
|
|
|
-}
|
|
|
|
-</style>
|
|
|