Browse Source

Merge branch 'next' of https://github.com/jdf2e/nutui into next

Drjnigfubo 3 years ago
parent
commit
58fa6824ce
2 changed files with 37 additions and 31 deletions
  1. 24 22
      src/packages/__VUE/popup/index.taro.vue
  2. 13 9
      src/packages/__VUE/signature/doc.taro.md

+ 24 - 22
src/packages/__VUE/popup/index.taro.vue

@@ -1,27 +1,29 @@
 <template>
-  <nut-overlay
-    v-if="overlay"
-    :visible="visible"
-    :close-on-click-overlay="closeOnClickOverlay"
-    :z-index="zIndex"
-    :lock-scroll="lockScroll"
-    :duration="duration"
-    @click="onClickOverlay"
-    v-bind="$attrs"
-  />
-  <Transition :name="transitionName" @after-enter="onOpened" @after-leave="onClosed">
-    <view v-show="visible" :class="classes" :style="popStyle" @click="onClick">
-      <slot v-if="showSlot"></slot>
-      <view
-        v-if="closed"
-        @click="onClickCloseIcon"
-        class="nut-popup__close-icon"
-        :class="'nut-popup__close-icon--' + closeIconPosition"
-      >
-        <nut-icon v-bind="$attrs" :name="closeIcon" size="12px" />
+  <div>
+    <nut-overlay
+      v-if="overlay"
+      :visible="visible"
+      :close-on-click-overlay="closeOnClickOverlay"
+      :z-index="zIndex"
+      :lock-scroll="lockScroll"
+      :duration="duration"
+      @click="onClickOverlay"
+      v-bind="$attrs"
+    />
+    <Transition :name="transitionName" @after-enter="onOpened" @after-leave="onClosed">
+      <view v-show="visible" :class="classes" :style="popStyle" @click="onClick">
+        <slot v-if="showSlot"></slot>
+        <view
+          v-if="closed"
+          @click="onClickCloseIcon"
+          class="nut-popup__close-icon"
+          :class="'nut-popup__close-icon--' + closeIconPosition"
+        >
+          <nut-icon v-bind="$attrs" :name="closeIcon" size="12px" />
+        </view>
       </view>
-    </view>
-  </Transition>
+    </Transition>
+  </div>
 </template>
 <script lang="ts">
 import { createComponent } from '@/packages/utils/create';

+ 13 - 9
src/packages/__VUE/signature/doc.taro.md

@@ -9,7 +9,7 @@
 ``` javascript
 import { createApp } from 'vue';
 // vue
-import { Signature} from '@nutui/nutui';
+import { Signature} from '@nutui/nutui-taro';
 
 const app = createApp();
 app.use(Signature);
@@ -22,14 +22,16 @@ app.use(Signature);
 
 ```html
 <div class="demo">
-    <nut-signature
-      :lineWidth="lineWidth"
-      :strokeStyle="strokeStyle"
-      @confirm="confirm"
-      @clear="clear"
-    />
-  </div>
-setup() {
+  <nut-signature
+    :lineWidth="lineWidth"
+    :strokeStyle="strokeStyle"
+    @confirm="confirm"
+    @clear="clear"
+  ></nut-signature>
+</div>
+<script>
+export default {
+  setup() {
     const state = reactive({
       lineWidth: 4,
       strokeStyle: 'green',
@@ -56,6 +58,8 @@ setup() {
     };
     return { ...state, confirm, clear };
   }
+}
+</script>
 ```
     
 ## API