Browse Source

fix: 官网顶部搜索栏回车跳转报错修复 #591 (#592)

* fix: taro drag

* feat: v3 progress taro

* feat: progress 百分比不同尺寸样式增加

* feat: circleProgress taro

* fix: avatar圆角修复

* fix: shortpassword 键盘弹起优化

* fix: progress cricleprogress taro 适配

* fix: 官网搜索栏回车跳转修复
Drjingfubo 4 years ago
parent
commit
7ba1f9aad5
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/sites/doc/components/Search.vue

+ 3 - 1
src/sites/doc/components/Search.vue

@@ -27,9 +27,11 @@
 <script>
 import { defineComponent, reactive, onMounted, watch } from 'vue';
 import { nav } from '@/config.json';
+import { useRouter } from 'vue-router';
 export default defineComponent({
   name: 'search',
   setup() {
+    const router = useRouter();
     const data = reactive({
       nav,
       navList: [],
@@ -99,7 +101,7 @@ export default defineComponent({
           data.searchCurName = cName;
           data.searchIndex = searchIndex;
           if (e.keyCode == 13) {
-            data.$router.push({
+            router.push({
               path: '/' + searchList[searchIndex].name
             });
             data.searchCurName = '';