bill 3 veckor sedan
förälder
incheckning
45de598d6e
2 ändrade filer med 3 tillägg och 3 borttagningar
  1. 1 1
      src/example/components/header/actions.ts
  2. 2 2
      src/example/components/header/index.vue

+ 1 - 1
src/example/components/header/actions.ts

@@ -9,7 +9,7 @@ import { availableLocales, lang, langNameEum, ui18n } from "@/lang";
 export type Action = {
   handler?: (draw: Draw) => void;
   text?: string;
-  icon: string;
+  icon?: string;
   disabled?: boolean;
   children?: Omit<Action, "children">[];
 };

+ 2 - 2
src/example/components/header/index.vue

@@ -19,12 +19,12 @@
             @click="action.handler && action.handler(draw)"
             :class="{ disabled: action.disabled }"
           >
-            <Icon :name="action.icon" :tip="action.text" />
+            <Icon :name="action.icon" :tip="action.text" v-if="action.icon" />
           </span>
 
           <el-dropdown class="operate-dropdown" v-else>
             <span class="operate" :class="{ disabled: action.disabled }">
-              <Icon :name="action.icon" />
+              <Icon :name="action.icon" v-if="action.icon" />
             </span>
             <template #dropdown>
               <el-dropdown-menu>