mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	perf: Review所有演示页,修复开发环境下可避免的警告以及保持所有演示页风格大致统一
				
					
				
			This commit is contained in:
		
							parent
							
								
									3873699370
								
							
						
					
					
						commit
						c48291130c
					
				@ -46,7 +46,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    <div v-if="layout === 'vertical'" class="vertical-header-right">
 | 
					    <div v-if="layout === 'vertical'" class="vertical-header-right">
 | 
				
			||||||
      <!-- 菜单搜索 -->
 | 
					      <!-- 菜单搜索 -->
 | 
				
			||||||
      <Search />
 | 
					      <Search id="header-search" />
 | 
				
			||||||
      <!-- 通知 -->
 | 
					      <!-- 通知 -->
 | 
				
			||||||
      <Notice id="header-notice" />
 | 
					      <Notice id="header-notice" />
 | 
				
			||||||
      <!-- 国际化 -->
 | 
					      <!-- 国际化 -->
 | 
				
			||||||
 | 
				
			|||||||
@ -9,6 +9,7 @@ function handleSearch() {
 | 
				
			|||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
 | 
					  <div>
 | 
				
			||||||
    <div
 | 
					    <div
 | 
				
			||||||
      class="search-container w-[40px] h-[48px] flex-c cursor-pointer navbar-bg-hover"
 | 
					      class="search-container w-[40px] h-[48px] flex-c cursor-pointer navbar-bg-hover"
 | 
				
			||||||
      @click="handleSearch"
 | 
					      @click="handleSearch"
 | 
				
			||||||
@ -16,4 +17,5 @@ function handleSearch() {
 | 
				
			|||||||
      <IconifyIconOffline icon="search" />
 | 
					      <IconifyIconOffline icon="search" />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <SearchModal v-model:value="show" />
 | 
					    <SearchModal v-model:value="show" />
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
				
			|||||||
@ -64,7 +64,7 @@ nextTick(() => {
 | 
				
			|||||||
    </el-menu>
 | 
					    </el-menu>
 | 
				
			||||||
    <div class="horizontal-header-right">
 | 
					    <div class="horizontal-header-right">
 | 
				
			||||||
      <!-- 菜单搜索 -->
 | 
					      <!-- 菜单搜索 -->
 | 
				
			||||||
      <Search />
 | 
					      <Search id="header-search" />
 | 
				
			||||||
      <!-- 通知 -->
 | 
					      <!-- 通知 -->
 | 
				
			||||||
      <Notice id="header-notice" />
 | 
					      <Notice id="header-notice" />
 | 
				
			||||||
      <!-- 国际化 -->
 | 
					      <!-- 国际化 -->
 | 
				
			||||||
 | 
				
			|||||||
@ -97,7 +97,7 @@ watch(
 | 
				
			|||||||
    </el-menu>
 | 
					    </el-menu>
 | 
				
			||||||
    <div class="horizontal-header-right">
 | 
					    <div class="horizontal-header-right">
 | 
				
			||||||
      <!-- 菜单搜索 -->
 | 
					      <!-- 菜单搜索 -->
 | 
				
			||||||
      <Search />
 | 
					      <Search id="header-search" />
 | 
				
			||||||
      <!-- 通知 -->
 | 
					      <!-- 通知 -->
 | 
				
			||||||
      <Notice id="header-notice" />
 | 
					      <Notice id="header-notice" />
 | 
				
			||||||
      <!-- 国际化 -->
 | 
					      <!-- 国际化 -->
 | 
				
			||||||
 | 
				
			|||||||
@ -13,10 +13,10 @@ const home = 0, // 平台规定只有 home 路由的 rank 才能为 0 ,所以
 | 
				
			|||||||
  system = 10,
 | 
					  system = 10,
 | 
				
			||||||
  tabs = 11,
 | 
					  tabs = 11,
 | 
				
			||||||
  about = 12,
 | 
					  about = 12,
 | 
				
			||||||
  formdesign = 13,
 | 
					  editor = 13,
 | 
				
			||||||
  flowchart = 14,
 | 
					  flowchart = 14,
 | 
				
			||||||
  ppt = 15,
 | 
					  formdesign = 15,
 | 
				
			||||||
  editor = 16,
 | 
					  ppt = 16,
 | 
				
			||||||
  guide = 17,
 | 
					  guide = 17,
 | 
				
			||||||
  menuoverflow = 18;
 | 
					  menuoverflow = 18;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -36,7 +36,7 @@ onBeforeUnmount(() => {
 | 
				
			|||||||
    <template #header>
 | 
					    <template #header>
 | 
				
			||||||
      <div class="card-header">
 | 
					      <div class="card-header">
 | 
				
			||||||
        <span class="font-medium">
 | 
					        <span class="font-medium">
 | 
				
			||||||
          页面水印菜单树结构
 | 
					          页面水印
 | 
				
			||||||
          <el-link
 | 
					          <el-link
 | 
				
			||||||
            href="https://pure-admin-utils.netlify.app/hooks/useWatermark/useWatermark"
 | 
					            href="https://pure-admin-utils.netlify.app/hooks/useWatermark/useWatermark"
 | 
				
			||||||
            target="_blank"
 | 
					            target="_blank"
 | 
				
			||||||
@ -55,12 +55,11 @@ onBeforeUnmount(() => {
 | 
				
			|||||||
    </el-space>
 | 
					    </el-space>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <el-space wrap>
 | 
					    <el-space wrap>
 | 
				
			||||||
      <el-button bg text @click="setWatermark(value, { color })">
 | 
					      <el-button plain @click="setWatermark(value, { color })">
 | 
				
			||||||
        创建整页水印
 | 
					        创建整页水印
 | 
				
			||||||
      </el-button>
 | 
					      </el-button>
 | 
				
			||||||
      <el-button
 | 
					      <el-button
 | 
				
			||||||
        bg
 | 
					        plain
 | 
				
			||||||
        text
 | 
					 | 
				
			||||||
        @click="
 | 
					        @click="
 | 
				
			||||||
          setWatermark(value, {
 | 
					          setWatermark(value, {
 | 
				
			||||||
            gradient: [
 | 
					            gradient: [
 | 
				
			||||||
@ -74,8 +73,7 @@ onBeforeUnmount(() => {
 | 
				
			|||||||
        创建整页渐变水印
 | 
					        创建整页渐变水印
 | 
				
			||||||
      </el-button>
 | 
					      </el-button>
 | 
				
			||||||
      <el-button
 | 
					      <el-button
 | 
				
			||||||
        bg
 | 
					        plain
 | 
				
			||||||
        text
 | 
					 | 
				
			||||||
        @click="
 | 
					        @click="
 | 
				
			||||||
          setWatermark(value, {
 | 
					          setWatermark(value, {
 | 
				
			||||||
            rotate: 0,
 | 
					            rotate: 0,
 | 
				
			||||||
@ -90,8 +88,7 @@ onBeforeUnmount(() => {
 | 
				
			|||||||
        创建整页渐变且水平90度的水印
 | 
					        创建整页渐变且水平90度的水印
 | 
				
			||||||
      </el-button>
 | 
					      </el-button>
 | 
				
			||||||
      <el-button
 | 
					      <el-button
 | 
				
			||||||
        bg
 | 
					        plain
 | 
				
			||||||
        text
 | 
					 | 
				
			||||||
        @click="
 | 
					        @click="
 | 
				
			||||||
          setWatermark(value, {
 | 
					          setWatermark(value, {
 | 
				
			||||||
            gradient: [
 | 
					            gradient: [
 | 
				
			||||||
@ -106,8 +103,7 @@ onBeforeUnmount(() => {
 | 
				
			|||||||
        创建整页渐变且有阴影的水印
 | 
					        创建整页渐变且有阴影的水印
 | 
				
			||||||
      </el-button>
 | 
					      </el-button>
 | 
				
			||||||
      <el-button
 | 
					      <el-button
 | 
				
			||||||
        bg
 | 
					        plain
 | 
				
			||||||
        text
 | 
					 | 
				
			||||||
        @click="
 | 
					        @click="
 | 
				
			||||||
          setWatermark(value, {
 | 
					          setWatermark(value, {
 | 
				
			||||||
            globalAlpha: 0.15, // 值越低越透明
 | 
					            globalAlpha: 0.15, // 值越低越透明
 | 
				
			||||||
@ -121,7 +117,7 @@ onBeforeUnmount(() => {
 | 
				
			|||||||
      >
 | 
					      >
 | 
				
			||||||
        创建整页高透明渐变水印
 | 
					        创建整页高透明渐变水印
 | 
				
			||||||
      </el-button>
 | 
					      </el-button>
 | 
				
			||||||
      <el-button bg text @click="clear">清除整页水印</el-button>
 | 
					      <el-button plain @click="clear">清除整页水印</el-button>
 | 
				
			||||||
    </el-space>
 | 
					    </el-space>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <el-divider />
 | 
					    <el-divider />
 | 
				
			||||||
@ -130,8 +126,7 @@ onBeforeUnmount(() => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    <el-space wrap class="mt-6">
 | 
					    <el-space wrap class="mt-6">
 | 
				
			||||||
      <el-button
 | 
					      <el-button
 | 
				
			||||||
        bg
 | 
					        plain
 | 
				
			||||||
        text
 | 
					 | 
				
			||||||
        @click="
 | 
					        @click="
 | 
				
			||||||
          setLocalWatermark('局部水印', {
 | 
					          setLocalWatermark('局部水印', {
 | 
				
			||||||
            color,
 | 
					            color,
 | 
				
			||||||
@ -143,8 +138,7 @@ onBeforeUnmount(() => {
 | 
				
			|||||||
        创建局部水印
 | 
					        创建局部水印
 | 
				
			||||||
      </el-button>
 | 
					      </el-button>
 | 
				
			||||||
      <el-button
 | 
					      <el-button
 | 
				
			||||||
        bg
 | 
					        plain
 | 
				
			||||||
        text
 | 
					 | 
				
			||||||
        @click="
 | 
					        @click="
 | 
				
			||||||
          setLocalWatermark('局部水印', {
 | 
					          setLocalWatermark('局部水印', {
 | 
				
			||||||
            width: 140,
 | 
					            width: 140,
 | 
				
			||||||
@ -160,8 +154,7 @@ onBeforeUnmount(() => {
 | 
				
			|||||||
        创建局部渐变水印
 | 
					        创建局部渐变水印
 | 
				
			||||||
      </el-button>
 | 
					      </el-button>
 | 
				
			||||||
      <el-button
 | 
					      <el-button
 | 
				
			||||||
        bg
 | 
					        plain
 | 
				
			||||||
        text
 | 
					 | 
				
			||||||
        @click="
 | 
					        @click="
 | 
				
			||||||
          setLocalWatermark('局部水印', {
 | 
					          setLocalWatermark('局部水印', {
 | 
				
			||||||
            width: 140,
 | 
					            width: 140,
 | 
				
			||||||
@ -178,8 +171,7 @@ onBeforeUnmount(() => {
 | 
				
			|||||||
        创建局部渐变且水平90度的水印
 | 
					        创建局部渐变且水平90度的水印
 | 
				
			||||||
      </el-button>
 | 
					      </el-button>
 | 
				
			||||||
      <el-button
 | 
					      <el-button
 | 
				
			||||||
        bg
 | 
					        plain
 | 
				
			||||||
        text
 | 
					 | 
				
			||||||
        @click="
 | 
					        @click="
 | 
				
			||||||
          setLocalWatermark('局部水印', {
 | 
					          setLocalWatermark('局部水印', {
 | 
				
			||||||
            width: 140,
 | 
					            width: 140,
 | 
				
			||||||
@ -195,7 +187,7 @@ onBeforeUnmount(() => {
 | 
				
			|||||||
      >
 | 
					      >
 | 
				
			||||||
        创建局部渐变且有阴影的水印
 | 
					        创建局部渐变且有阴影的水印
 | 
				
			||||||
      </el-button>
 | 
					      </el-button>
 | 
				
			||||||
      <el-button bg text @click="clearLocal">清除局部水印</el-button>
 | 
					      <el-button plain @click="clearLocal">清除局部水印</el-button>
 | 
				
			||||||
    </el-space>
 | 
					    </el-space>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <el-divider />
 | 
					    <el-divider />
 | 
				
			||||||
 | 
				
			|||||||
@ -100,8 +100,9 @@ Object.keys(devDependencies).forEach(key => {
 | 
				
			|||||||
            <span
 | 
					            <span
 | 
				
			||||||
              :class="getMainLabel(item.label)"
 | 
					              :class="getMainLabel(item.label)"
 | 
				
			||||||
              style="color: var(--el-color-primary)"
 | 
					              style="color: var(--el-color-primary)"
 | 
				
			||||||
              >{{ item.field }}</span
 | 
					 | 
				
			||||||
            >
 | 
					            >
 | 
				
			||||||
 | 
					              {{ item.field }}
 | 
				
			||||||
 | 
					            </span>
 | 
				
			||||||
          </a>
 | 
					          </a>
 | 
				
			||||||
        </el-descriptions-item>
 | 
					        </el-descriptions-item>
 | 
				
			||||||
      </el-descriptions>
 | 
					      </el-descriptions>
 | 
				
			||||||
@ -129,8 +130,9 @@ Object.keys(devDependencies).forEach(key => {
 | 
				
			|||||||
            <span
 | 
					            <span
 | 
				
			||||||
              :class="getMainLabel(item.label)"
 | 
					              :class="getMainLabel(item.label)"
 | 
				
			||||||
              style="color: var(--el-color-primary)"
 | 
					              style="color: var(--el-color-primary)"
 | 
				
			||||||
              >{{ item.field }}</span
 | 
					 | 
				
			||||||
            >
 | 
					            >
 | 
				
			||||||
 | 
					              {{ item.field }}
 | 
				
			||||||
 | 
					            </span>
 | 
				
			||||||
          </a>
 | 
					          </a>
 | 
				
			||||||
        </el-descriptions-item>
 | 
					        </el-descriptions-item>
 | 
				
			||||||
      </el-descriptions>
 | 
					      </el-descriptions>
 | 
				
			||||||
 | 
				
			|||||||
@ -3,8 +3,6 @@ import { ref, onMounted } from "vue";
 | 
				
			|||||||
import Sortable, { Swap } from "sortablejs";
 | 
					import Sortable, { Swap } from "sortablejs";
 | 
				
			||||||
import draggable from "vuedraggable/src/vuedraggable";
 | 
					import draggable from "vuedraggable/src/vuedraggable";
 | 
				
			||||||
import { useAppStoreHook } from "@/store/modules/app";
 | 
					import { useAppStoreHook } from "@/store/modules/app";
 | 
				
			||||||
import { useRenderIcon } from "@/components/ReIcon/src/hooks";
 | 
					 | 
				
			||||||
import Rank from "@iconify-icons/ep/rank";
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
defineOptions({
 | 
					defineOptions({
 | 
				
			||||||
  name: "Draggable"
 | 
					  name: "Draggable"
 | 
				
			||||||
@ -64,7 +62,6 @@ onMounted(() => {
 | 
				
			|||||||
          <el-link
 | 
					          <el-link
 | 
				
			||||||
            href="https://sortablejs.github.io/vue.draggable.next/#/simple"
 | 
					            href="https://sortablejs.github.io/vue.draggable.next/#/simple"
 | 
				
			||||||
            target="_blank"
 | 
					            target="_blank"
 | 
				
			||||||
            :icon="useRenderIcon(Rank)"
 | 
					 | 
				
			||||||
            style="margin: 0 4px 5px; font-size: 16px"
 | 
					            style="margin: 0 4px 5px; font-size: 16px"
 | 
				
			||||||
          >
 | 
					          >
 | 
				
			||||||
            vuedraggable
 | 
					            vuedraggable
 | 
				
			||||||
 | 
				
			|||||||
@ -179,6 +179,5 @@ function onChange({ index, option }) {
 | 
				
			|||||||
    <el-divider />
 | 
					    <el-divider />
 | 
				
			||||||
    <p class="mb-2">change事件</p>
 | 
					    <p class="mb-2">change事件</p>
 | 
				
			||||||
    <Segmented :options="optionsChange" @change="onChange" />
 | 
					    <Segmented :options="optionsChange" @change="onChange" />
 | 
				
			||||||
    <el-divider />
 | 
					 | 
				
			||||||
  </el-card>
 | 
					  </el-card>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
				
			|||||||
@ -92,7 +92,7 @@ onMounted(() => {
 | 
				
			|||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <el-scrollbar height="87vh" class="content">
 | 
					  <el-scrollbar max-height="calc(100vh - 90px)" class="content">
 | 
				
			||||||
    <Waterfall :list="list" v-bind="options">
 | 
					    <Waterfall :list="list" v-bind="options">
 | 
				
			||||||
      <template #item="{ item, url, index }">
 | 
					      <template #item="{ item, url, index }">
 | 
				
			||||||
        <div
 | 
					        <div
 | 
				
			||||||
@ -149,3 +149,13 @@ onMounted(() => {
 | 
				
			|||||||
    <InfiniteLoading :firstload="false" @infinite="handleLoadMore" />
 | 
					    <InfiniteLoading :firstload="false" @infinite="handleLoadMore" />
 | 
				
			||||||
  </el-scrollbar>
 | 
					  </el-scrollbar>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					.main-content {
 | 
				
			||||||
 | 
					  margin: 0 !important;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					:deep(.el-loading-spinner .el-loading-text) {
 | 
				
			||||||
 | 
					  font-size: 24px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
 | 
				
			|||||||
@ -6,7 +6,7 @@ defineOptions({
 | 
				
			|||||||
  name: "Editor"
 | 
					  name: "Editor"
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const activeNames = ref(["1"]);
 | 
					const activeNames = ref("1");
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@ -27,13 +27,13 @@ const activeNames = ref(["1"]);
 | 
				
			|||||||
    </template>
 | 
					    </template>
 | 
				
			||||||
    <el-collapse v-model="activeNames" accordion>
 | 
					    <el-collapse v-model="activeNames" accordion>
 | 
				
			||||||
      <el-collapse-item title="基础用法" name="1">
 | 
					      <el-collapse-item title="基础用法" name="1">
 | 
				
			||||||
        <Base />
 | 
					        <Base v-if="activeNames === '1'" />
 | 
				
			||||||
      </el-collapse-item>
 | 
					      </el-collapse-item>
 | 
				
			||||||
      <el-collapse-item title="多个富文本" name="2">
 | 
					      <el-collapse-item title="多个富文本" name="2">
 | 
				
			||||||
        <Multi />
 | 
					        <Multi v-if="activeNames === '2'" />
 | 
				
			||||||
      </el-collapse-item>
 | 
					      </el-collapse-item>
 | 
				
			||||||
      <el-collapse-item title="自定义图片上传" name="3">
 | 
					      <el-collapse-item title="自定义图片上传" name="3">
 | 
				
			||||||
        <PicUpload />
 | 
					        <PicUpload v-if="activeNames === '3'" />
 | 
				
			||||||
      </el-collapse-item>
 | 
					      </el-collapse-item>
 | 
				
			||||||
    </el-collapse>
 | 
					    </el-collapse>
 | 
				
			||||||
  </el-card>
 | 
					  </el-card>
 | 
				
			||||||
 | 
				
			|||||||
@ -87,7 +87,7 @@ onMounted(() => {
 | 
				
			|||||||
        @catData="catData"
 | 
					        @catData="catData"
 | 
				
			||||||
      />
 | 
					      />
 | 
				
			||||||
      <!-- 节点面板 -->
 | 
					      <!-- 节点面板 -->
 | 
				
			||||||
      <NodePanel :lf="lf" :nodeList="nodeList" />
 | 
					      <NodePanel v-if="lf" :lf="lf" :nodeList="nodeList" />
 | 
				
			||||||
      <!-- 画布 -->
 | 
					      <!-- 画布 -->
 | 
				
			||||||
      <div id="turbo" />
 | 
					      <div id="turbo" />
 | 
				
			||||||
      <!-- 数据查看面板 -->
 | 
					      <!-- 数据查看面板 -->
 | 
				
			||||||
 | 
				
			|||||||
@ -6,10 +6,26 @@ defineOptions({
 | 
				
			|||||||
  name: "Guide"
 | 
					  name: "Guide"
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const guide = () => {
 | 
					const onGuide = () => {
 | 
				
			||||||
  intro()
 | 
					  intro()
 | 
				
			||||||
    .setOptions({
 | 
					    .setOptions({
 | 
				
			||||||
      steps: [
 | 
					      steps: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          element: document.querySelector(".sidebar-logo-container") as
 | 
				
			||||||
 | 
					            | string
 | 
				
			||||||
 | 
					            | HTMLElement,
 | 
				
			||||||
 | 
					          title: "项目名称和Logo",
 | 
				
			||||||
 | 
					          intro: "您可以在这里设置项目名称和Logo",
 | 
				
			||||||
 | 
					          position: "left"
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          element: document.querySelector("#header-search") as
 | 
				
			||||||
 | 
					            | string
 | 
				
			||||||
 | 
					            | HTMLElement,
 | 
				
			||||||
 | 
					          title: "搜索菜单",
 | 
				
			||||||
 | 
					          intro: "您可以在这里搜索想要查看的菜单",
 | 
				
			||||||
 | 
					          position: "left"
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          element: document.querySelector("#header-notice") as
 | 
					          element: document.querySelector("#header-notice") as
 | 
				
			||||||
            | string
 | 
					            | string
 | 
				
			||||||
@ -49,12 +65,10 @@ const guide = () => {
 | 
				
			|||||||
    <template #header>
 | 
					    <template #header>
 | 
				
			||||||
      <div class="card-header">
 | 
					      <div class="card-header">
 | 
				
			||||||
        <span class="font-medium">
 | 
					        <span class="font-medium">
 | 
				
			||||||
          引导页对于一些第一次进入项目的人很有用,你可以简单介绍下项目的功能
 | 
					          引导页常用于引导式介绍项目的基本功能或亮点
 | 
				
			||||||
        </span>
 | 
					        </span>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </template>
 | 
					    </template>
 | 
				
			||||||
    <el-button type="primary" class="mt-[10px]" @click="guide">
 | 
					    <el-button @click="onGuide"> 打开引导页 </el-button>
 | 
				
			||||||
      打开引导页
 | 
					 | 
				
			||||||
    </el-button>
 | 
					 | 
				
			||||||
  </el-card>
 | 
					  </el-card>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
				
			|||||||
@ -16,17 +16,17 @@ defineOptions({
 | 
				
			|||||||
      </template>
 | 
					      </template>
 | 
				
			||||||
      <el-space wrap>
 | 
					      <el-space wrap>
 | 
				
			||||||
        <Auth value="btn_add">
 | 
					        <Auth value="btn_add">
 | 
				
			||||||
          <el-button text bg type="warning">
 | 
					          <el-button plain type="warning">
 | 
				
			||||||
            拥有code:'btn_add' 权限可见
 | 
					            拥有code:'btn_add' 权限可见
 | 
				
			||||||
          </el-button>
 | 
					          </el-button>
 | 
				
			||||||
        </Auth>
 | 
					        </Auth>
 | 
				
			||||||
        <Auth :value="['btn_edit']">
 | 
					        <Auth :value="['btn_edit']">
 | 
				
			||||||
          <el-button text bg type="primary">
 | 
					          <el-button plain type="primary">
 | 
				
			||||||
            拥有code:['btn_edit'] 权限可见
 | 
					            拥有code:['btn_edit'] 权限可见
 | 
				
			||||||
          </el-button>
 | 
					          </el-button>
 | 
				
			||||||
        </Auth>
 | 
					        </Auth>
 | 
				
			||||||
        <Auth :value="['btn_add', 'btn_edit', 'btn_delete']">
 | 
					        <Auth :value="['btn_add', 'btn_edit', 'btn_delete']">
 | 
				
			||||||
          <el-button text bg type="danger">
 | 
					          <el-button plain type="danger">
 | 
				
			||||||
            拥有code:['btn_add', 'btn_edit', 'btn_delete'] 权限可见
 | 
					            拥有code:['btn_add', 'btn_edit', 'btn_delete'] 权限可见
 | 
				
			||||||
          </el-button>
 | 
					          </el-button>
 | 
				
			||||||
        </Auth>
 | 
					        </Auth>
 | 
				
			||||||
@ -38,16 +38,15 @@ defineOptions({
 | 
				
			|||||||
        <div class="card-header">函数方式判断权限</div>
 | 
					        <div class="card-header">函数方式判断权限</div>
 | 
				
			||||||
      </template>
 | 
					      </template>
 | 
				
			||||||
      <el-space wrap>
 | 
					      <el-space wrap>
 | 
				
			||||||
        <el-button v-if="hasAuth('btn_add')" text bg type="warning">
 | 
					        <el-button v-if="hasAuth('btn_add')" plain type="warning">
 | 
				
			||||||
          拥有code:'btn_add' 权限可见
 | 
					          拥有code:'btn_add' 权限可见
 | 
				
			||||||
        </el-button>
 | 
					        </el-button>
 | 
				
			||||||
        <el-button v-if="hasAuth(['btn_edit'])" text bg type="primary">
 | 
					        <el-button v-if="hasAuth(['btn_edit'])" plain type="primary">
 | 
				
			||||||
          拥有code:['btn_edit'] 权限可见
 | 
					          拥有code:['btn_edit'] 权限可见
 | 
				
			||||||
        </el-button>
 | 
					        </el-button>
 | 
				
			||||||
        <el-button
 | 
					        <el-button
 | 
				
			||||||
          v-if="hasAuth(['btn_add', 'btn_edit', 'btn_delete'])"
 | 
					          v-if="hasAuth(['btn_add', 'btn_edit', 'btn_delete'])"
 | 
				
			||||||
          text
 | 
					          plain
 | 
				
			||||||
          bg
 | 
					 | 
				
			||||||
          type="danger"
 | 
					          type="danger"
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
          拥有code:['btn_add', 'btn_edit', 'btn_delete'] 权限可见
 | 
					          拥有code:['btn_add', 'btn_edit', 'btn_delete'] 权限可见
 | 
				
			||||||
@ -62,16 +61,15 @@ defineOptions({
 | 
				
			|||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </template>
 | 
					      </template>
 | 
				
			||||||
      <el-space wrap>
 | 
					      <el-space wrap>
 | 
				
			||||||
        <el-button v-auth="'btn_add'" text bg type="warning">
 | 
					        <el-button v-auth="'btn_add'" plain type="warning">
 | 
				
			||||||
          拥有code:'btn_add' 权限可见
 | 
					          拥有code:'btn_add' 权限可见
 | 
				
			||||||
        </el-button>
 | 
					        </el-button>
 | 
				
			||||||
        <el-button v-auth="['btn_edit']" text bg type="primary">
 | 
					        <el-button v-auth="['btn_edit']" plain type="primary">
 | 
				
			||||||
          拥有code:['btn_edit'] 权限可见
 | 
					          拥有code:['btn_edit'] 权限可见
 | 
				
			||||||
        </el-button>
 | 
					        </el-button>
 | 
				
			||||||
        <el-button
 | 
					        <el-button
 | 
				
			||||||
          v-auth="['btn_add', 'btn_edit', 'btn_delete']"
 | 
					          v-auth="['btn_add', 'btn_edit', 'btn_delete']"
 | 
				
			||||||
          text
 | 
					          plain
 | 
				
			||||||
          bg
 | 
					 | 
				
			||||||
          type="danger"
 | 
					          type="danger"
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
          拥有code:['btn_add', 'btn_edit', 'btn_delete'] 权限可见
 | 
					          拥有code:['btn_add', 'btn_edit', 'btn_delete'] 权限可见
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user