From 4b854c29227ef08ea178a3bba527a40ca2f84674 Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Mon, 21 Feb 2022 02:03:17 +0800 Subject: [PATCH] 统计接口对接,列表接口参数对接 --- src/components/fixed/header.vue | 66 ++++++++++++++++++++------------ 1 files changed, 41 insertions(+), 25 deletions(-) diff --git a/src/components/fixed/header.vue b/src/components/fixed/header.vue index 8011ac1..a657d5f 100644 --- a/src/components/fixed/header.vue +++ b/src/components/fixed/header.vue @@ -1,19 +1,17 @@ <template> <a-row type="flex" justify="start"> <a-col v-bind="showSmall"> - <router-link to="/main1">Home »</router-link> - </a-col> - <a-col v-bind="showSmall"> - <router-link to="/main2">乐谱搜索 »</router-link> - </a-col> - <a-col v-bind="showSmall"> - <router-link to="/main3">我的网盘 »</router-link> - </a-col> - <a-col v-bind="showSmall"> - <router-link to="/main4">友人帐 »</router-link> + <div class="menu"> + <router-link to="/">Home</router-link> + <router-link to="/main2">乐谱搜索</router-link> + <router-link to="/main3">我的网盘</router-link> + <router-link to="/main4">友人帐</router-link> + <router-link to="/login">登录</router-link> + </div> </a-col> <a-col v-bind="showMain"> - <a-auto-complete ref="mySearch" v-bind="search" @select="onSelect" @search="onSearch" @change="onChange"> + <a-auto-complete v-model="search.value" :data-source="search.dataSource" ref="mySearch" v-bind="search" + @select="onSelect" @search="onSearch" @change="onChange"> <a-input @keydown.enter="onSelect"> <a-icon slot="suffix" type="search" class="certain-category-icon" /> </a-input> @@ -68,26 +66,36 @@ return { search: { placeholder: "ctrl+shift+f/enter", - allowClear: true, + // allowClear: true, // autoFocus: true, backfill: true, + value: '', dataSource: [], }, showSmall: { - xs: 6, - sm: 4, - md: 4, - lg: 4, - xl: 4, - xxl: 4, + xs: 24, + sm: 18, + md: 18, + lg: 18, + xl: 18, + xxl: 18, }, showMain: { xs: 0, - sm: 0, - md: 2, - lg: 2, - xl: 2, - xxl: 2, + sm: 6, + md: 6, + lg: { + span: 3, + offset: 3 + }, + xl: { + span: 3, + offset: 3 + }, + xxl: { + span: 3, + offset: 3 + }, } } @@ -103,12 +111,12 @@ console.log(e); }, onSearch(searchText) { - this.dataSource = !searchText ? [] : [searchText, searchText.repeat(2), searchText.repeat(3)]; + this.search.dataSource = !searchText ? [] : [searchText, searchText.repeat(2), searchText.repeat(3)]; console.log("补全.."); }, onSelect(value) { console.log('回车', value); - this.$message.info("回车") + this.$message.info("回车,内容为" + value) }, onChange(value) { console.log('修改', value); @@ -120,3 +128,11 @@ }, } </script> +<style lang="less" scoped> + .menu { + a { + margin-left: 10px; + } + + } +</style> -- Gitblit v1.9.1