瀏覽代碼

image desc 改成 text

y595705120 2 年之前
父節點
當前提交
c84447c89c
共有 1 個文件被更改,包括 4 次插入5 次删除
  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),
       }
     }
   },