<template>
|
<div class="layui-row">
|
<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="showMain">
|
<router-link to="/tagInfo">关于我 »</router-link>
|
</a-col>
|
<a-col v-bind="showMain">
|
<a-auto-complete v-bind="search" @select="onSelect" @search="onSearch" @change="onChange">
|
<a-input>
|
<a-icon slot="suffix" type="search" class="certain-category-icon" />
|
</a-input>
|
</a-auto-complete>
|
</a-col>
|
|
</a-row>
|
|
<!-- <ul class="layui-nav ">
|
<li class="layui-nav-item blog-displayIn-minScreen">
|
<i class="layui-icon layui-icon-spread-left">Home</i>
|
</li>
|
<li class="layui-nav-item blog-displayIn-BidScreen">
|
<legend> Home</legend>
|
</li>
|
<li class="layui-nav-item">
|
<a href="javascript:;">文章<span class="layui-nav-more"></span></a>
|
<dl class="layui-nav-child layui-anim layui-anim-upbit">
|
<dd><a href="#">按时间线</a></dd>
|
<dd><a href="#">按Tag</a></dd>
|
<dd><a href="#">按热度</a></dd>
|
</dl>
|
</li>
|
<li class="layui-nav-item"><a href="#">曲谱/曲库</a></li>
|
<li class="layui-nav-item">
|
<a href="javascript:;">动漫<span class="layui-nav-more"></span></a>
|
<dl class="layui-nav-child layui-anim layui-anim-upbit">
|
<dd><a href="#">番</a></dd>
|
<dd><a href="#">电影</a></dd>
|
<dd><a href="#">声优</a></dd>
|
</dl>
|
</li>
|
<li class="layui-nav-item blog-displayIn-BidScreen"><a href="#">第九艺术</a></li>
|
</ul>
|
<ul class="layui-nav layui-layout-right">
|
<li class="layui-nav-item blog-displayIn-BidScreen">
|
<input type="text" placeholder="搜索一下" value="" class="layui-input">
|
</li>
|
<li class="layui-nav-item">
|
<a href="javascript:;">
|
<img src="http://t.inleft.com/share/media_photo/xigong.png" class="layui-nav-img">
|
inleft
|
</a>
|
<dl class="layui-nav-child">
|
<dd><a href="#">About</a></dd>
|
<dd><a href="#">时间轴</a></dd>
|
</dl>
|
</li>
|
</ul> -->
|
</div>
|
|
</template>
|
|
<script>
|
export default {
|
|
data() {
|
return {
|
search: {
|
placeholder: "全局搜索..",
|
allowClear: true,
|
// autoFocus: true,
|
backfill: true,
|
dataSource: [],
|
},
|
showSmall: {
|
xs: 6,
|
sm: 6,
|
md: 6,
|
lg: 6,
|
xl: 6,
|
xxl: 6,
|
},
|
showMain: {
|
xs: 0,
|
sm: 0,
|
md: 2,
|
lg: 2,
|
xl: 2,
|
xxl: 2,
|
}
|
}
|
|
},
|
watch: {
|
value(val) {
|
console.log('值:', val);
|
},
|
},
|
methods: {
|
onSearch(searchText) {
|
this.dataSource = !searchText ? [] : [searchText, searchText.repeat(2), searchText.repeat(3)];
|
console.log("补全..");
|
},
|
onSelect(value) {
|
console.log('回车', value);
|
},
|
onChange(value) {
|
console.log('修改', value);
|
},
|
keyListener(value) {
|
console.log('ref', this.$refs.mySearch);
|
console.log('键盘', value);
|
},
|
},
|
}
|
</script>
|
|
</script>
|
|
<style lang="less">
|
|
</style>
|