瀏覽代碼

feat: 组件优化

zhangyuhan 4 年之前
父節點
當前提交
cbe1f919cb
共有 1 個文件被更改,包括 14 次插入1 次删除
  1. 14 1
      jydocs-pc/src/components/Search.vue

+ 14 - 1
jydocs-pc/src/components/Search.vue

@@ -1,14 +1,27 @@
 <template>
     <div class="search-input">
-        <input type="text" placeholder="公用顶部输入框"/>
+        <el-input
+                placeholder="搜索文档"
+                v-model="input"
+                clearable>
+        </el-input>
     </div>
 </template>
 
 <script>
+  import { Input } from 'element-ui'
   export default {
     name: 'Search-Input',
     props: {
       msg: String
+    },
+    components: {
+      [Input.name]: Input
+    },
+    data() {
+      return {
+        input: ''
+      }
     }
   }
 </script>