Parcourir la source

image desc 改成 text

y595705120 il y a 2 ans
Parent
commit
c84447c89c
1 fichiers modifiés avec 4 ajouts et 5 suppressions
  1. 4 5
      src/components/image.vue

+ 4 - 5
src/components/image.vue

@@ -1,5 +1,5 @@
 <template>
-  <div v-if="!options.desc" @click="click" class="image mb-6 last:mb-0 mx-auto">
+  <div v-if="!options.text" @click="click" class="image mb-6 last:mb-0 mx-auto">
     <img :style="options.style" :src="options.image" />
     <div v-if="options.marks" class="mark flex justify-center items-center">
       <span :style="options.marksStyle" v-html="options.marks"></span>
@@ -19,13 +19,12 @@ export default {
   extends: Base,
   computed: {
     descOptions(){
-      const { desc, text} = this.options;
-      let title = desc||text;
-      if(!title) return;
+      const {text} = this.options;
+      if(!text) return;
       return {
         color: '#333',
         size: 0.9,
-        ...(typeof title === 'string' ? { text: title } : title),
+        ...(typeof text === 'string' ? { text: text } : text),
       }
     }
   },