ソースを参照

docs: 水印组件文档修改

lkjh3214 3 年 前
コミット
ae78ad5658

+ 5 - 3
src/packages/__VUE/watermark/doc.en-US.md

@@ -23,18 +23,19 @@ app.use(Watermark);
   <nut-cell class="wrap">
     <nut-button @click="showTextMark">Text Watermark</nut-button>
     <nut-button @click="showImageMark">Image Watermark</nut-button>
-    <nut-watermark v-if="!flag" class="mark1" z-index="1" content="nut-ui-water-mark"></nut-watermark>
+    <nut-watermark v-if="!flag" class="mark1" :z-index="1" content="nut-ui-water-mark"></nut-watermark>
     <nut-watermark
       v-if="flag"
       class="mark1"
       :image-width="60"
       :image-height="23"
-      z-index="1"
+      :z-index="1"
       :image="imgSrc"
     ></nut-watermark>
   </nut-cell>
 </template>
 <script lang="ts">
+  import { ref } from "vue";
   export default {
     setup() {
       const imgSrc = ref('//img11.360buyimg.com/imagetools/jfs/t1/57345/6/20069/8019/62b995cdEd96fef03/51d3302dfeccd1d2.png');
@@ -45,7 +46,7 @@ app.use(Watermark);
       const showImageMark = () => {
         flag.value = true;
       };
-      return { translate, imgSrc, showTextMark, showImageMark, flag };
+      return { imgSrc, showTextMark, showImageMark, flag };
     }
   };
 </script>
@@ -81,6 +82,7 @@ app.use(Watermark);
   </nut-cell>
 </template>
 <script lang="ts">
+  import { ref } from "vue";
   export default {
     setup() {
      const src = ref('//img10.360buyimg.com/ling/jfs/t1/181258/24/10385/53029/60d04978Ef21f2d42/92baeb21f907cd24.jpg');

+ 5 - 3
src/packages/__VUE/watermark/doc.md

@@ -25,18 +25,19 @@ app.use(Watermark);
   <nut-cell class="wrap">
     <nut-button @click="showTextMark">文字水印</nut-button>
     <nut-button @click="showImageMark">图片水印</nut-button>
-    <nut-watermark v-if="!flag" class="mark1" z-index="1" content="nut-ui-water-mark"></nut-watermark>
+    <nut-watermark v-if="!flag" class="mark1" :z-index="1" content="nut-ui-water-mark"></nut-watermark>
     <nut-watermark
       v-if="flag"
       class="mark1"
       :image-width="60"
       :image-height="23"
-      z-index="1"
+      :z-index="1"
       :image="imgSrc"
     ></nut-watermark>
   </nut-cell>
 </template>
 <script lang="ts">
+  import { ref } from "vue";
   export default {
     setup() {
       const imgSrc = ref('//img11.360buyimg.com/imagetools/jfs/t1/57345/6/20069/8019/62b995cdEd96fef03/51d3302dfeccd1d2.png');
@@ -47,7 +48,7 @@ app.use(Watermark);
       const showImageMark = () => {
         flag.value = true;
       };
-      return { translate, imgSrc, showTextMark, showImageMark, flag };
+      return { imgSrc, showTextMark, showImageMark, flag };
     }
   };
 </script>
@@ -84,6 +85,7 @@ app.use(Watermark);
   </nut-cell>
 </template>
 <script lang="ts">
+  import { ref } from "vue";
   export default {
     setup() {
      const src = ref('//img10.360buyimg.com/ling/jfs/t1/181258/24/10385/53029/60d04978Ef21f2d42/92baeb21f907cd24.jpg');

+ 5 - 3
src/packages/__VUE/watermark/doc.taro.md

@@ -25,18 +25,19 @@ app.use(Watermark);
   <nut-cell class="wrap">
     <nut-button @click="showTextMark">文字水印</nut-button>
     <nut-button @click="showImageMark">图片水印</nut-button>
-    <nut-watermark v-if="!flag" class="mark1" z-index="1" content="nut-ui-water-mark"></nut-watermark>
+    <nut-watermark v-if="!flag" class="mark1" :z-index="1" content="nut-ui-water-mark"></nut-watermark>
     <nut-watermark
       v-if="flag"
       class="mark1"
       :image-width="60"
       :image-height="23"
-      z-index="1"
+      :z-index="1"
       :image="imgSrc"
     ></nut-watermark>
   </nut-cell>
 </template>
 <script lang="ts">
+  import { ref } from "vue";
   export default {
     setup() {
       const imgSrc = ref('//img11.360buyimg.com/imagetools/jfs/t1/57345/6/20069/8019/62b995cdEd96fef03/51d3302dfeccd1d2.png');
@@ -47,7 +48,7 @@ app.use(Watermark);
       const showImageMark = () => {
         flag.value = true;
       };
-      return { translate, imgSrc, showTextMark, showImageMark, flag };
+      return { imgSrc, showTextMark, showImageMark, flag };
     }
   };
 </script>
@@ -84,6 +85,7 @@ app.use(Watermark);
   </nut-cell>
 </template>
 <script lang="ts">
+  import { ref } from "vue";
   export default {
     setup() {
      const src = ref('//img10.360buyimg.com/ling/jfs/t1/181258/24/10385/53029/60d04978Ef21f2d42/92baeb21f907cd24.jpg');