Bladeren bron

fixed:bug修复

zhubo 3 jaren geleden
bovenliggende
commit
20c893e6ef
2 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. 3 3
      src/wxcomponents/image/index.vue
  2. 1 1
      src/wxcomponents/notify/index.vue

+ 3 - 3
src/wxcomponents/image/index.vue

@@ -1,6 +1,6 @@
 <template>
 <uni-shadow-root class="image-index"><view :style="computed.rootStyle({ width, height, radius })" :class="'custom-class '+(utils.bem('image', { round }))" @click="onClick">
-  <image v-if="(!error)" :src="src" :mode="computed.mode(fit)" :lazy-load="lazyLoad" class="image-class van-image__img" :show-menu-by-longpress="showMenuByLongpress" @load="onImageLoad" @error="onImageError"></image>
+  <image v-if="(!error)" :src="src" :mode="computed.mode(fit)" :lazy-load="lazyLoad" class="image-class van-image__img" :show-menu-by-longpress="showMenuByLongpress" @load="onLoad" @error="onError"></image>
 
   <view v-if="loading && showLoading" class="loading-class van-image__loading">
     <slot v-if="useLoadingSlot" name="loading"></slot>
@@ -62,13 +62,13 @@ VantComponent({
     viewStyle: '',
   },
   methods: {
-    onImageLoad(event) {
+    onLoad(event) {
       this.setData({
         loading: false,
       });
       this.$emit('load', event.detail);
     },
-    onImageError(event) {
+    onError(event) {
       this.setData({
         loading: false,
         error: true,

+ 1 - 1
src/wxcomponents/notify/index.vue

@@ -52,7 +52,7 @@ VantComponent({
     this.setData({ statusBarHeight });
   },
   methods: {
-    showNotify() {
+    show() {
       const { duration, onOpened } = this.data;
       clearTimeout(this.timer);
       this.setData({ show: true });