Browse Source

fix: 修复Taro组件文档右侧demo箭头跳转问题

yangjinjun3 3 years ago
parent
commit
2a182f204b
1 changed files with 6 additions and 4 deletions
  1. 6 4
      src/sites/mobile-taro/vue/src/components/header.vue

+ 6 - 4
src/sites/mobile-taro/vue/src/components/header.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="applets-demo-header">
     <div class="back" @click="navigateTo">
-      <Left />
+      <Home />
     </div>
     <div class="applets-icon">
       <img
@@ -14,17 +14,19 @@
 <script lang="ts">
 import { defineComponent, computed } from 'vue';
 import Taro from '@tarojs/taro';
-import { Left } from '@nutui/icons-vue';
+import { Home } from '@nutui/icons-vue';
 import config from '../../../../../config.json';
 export default defineComponent({
   name: 'header',
   components: {
-    Left
+    Home
   },
   setup() {
     //返回demo页
     const navigateTo = () => {
-      Taro.navigateBack();
+      Taro.navigateBack({
+        delta: 1
+      });
     };
 
     const compName = computed(() => {