feat: 打包构建添加可选 gzipbrotli 压缩模式

This commit is contained in:
xiaoxian521
2022-10-27 02:19:23 +08:00
parent 49cdcf216f
commit fdf12660c1
11 changed files with 124 additions and 27 deletions

View File

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

View File

@@ -8,9 +8,10 @@ defineOptions({
name: "PermissionPage"
});
let width = computed((): CSSProperties => {
let elStyle = computed((): CSSProperties => {
return {
width: "85vw"
width: "85vw",
justifyContent: "start"
};
});
@@ -41,10 +42,10 @@ function onChange() {
<template>
<el-space direction="vertical" size="large">
<el-tag :style="width" size="large" effect="dark">
<el-tag :style="elStyle" size="large" effect="dark">
模拟后台根据不同角色返回对应路由具体参考完整版pure-admin代码
</el-tag>
<el-card shadow="never" :style="width">
<el-card shadow="never" :style="elStyle">
<template #header>
<div class="card-header">
<span>当前角色{{ username }}</span>
@@ -61,9 +62,3 @@ function onChange() {
</el-card>
</el-space>
</template>
<style lang="scss" scoped>
:deep(.el-tag) {
justify-content: start;
}
</style>