完善TagSelect组件

This commit is contained in:
iczer
2018-08-05 15:17:34 +08:00
parent 9a4afee5c2
commit 0b80b9268e
5 changed files with 82 additions and 38 deletions

View File

@@ -3,21 +3,22 @@
<a-form>
<a-form-item
label="所属类目"
:labelCol="{span: 1}"
:wrapperCol="{span: 23}"
>
<tag-select>
<tag-select-option>目一</tag-select-option>
<tag-select-option>科目一</tag-select-option>
<tag-select-option>科目一</tag-select-option>
<tag-select-option>科目一</tag-select-option>
<tag-select-option>科目一</tag-select-option>
<tag-select-option>科目一</tag-select-option>
<tag-select-option>科目一</tag-select-option>
<tag-select-option>科目一</tag-select-option>
<tag-select-option>科目一</tag-select-option>
<tag-select-option>科目一</tag-select-option>
<tag-select-option>科目</tag-select-option>
<tag-select-option>目一</tag-select-option>
<tag-select-option>类目二</tag-select-option>
<tag-select-option>类目三</tag-select-option>
<tag-select-option>类目四</tag-select-option>
<tag-select-option>类目五</tag-select-option>
<tag-select-option>类目六</tag-select-option>
<tag-select-option>类目七</tag-select-option>
<tag-select-option>类目八</tag-select-option>
<tag-select-option>类目九</tag-select-option>
<tag-select-option>类目十</tag-select-option>
<tag-select-option>类目十</tag-select-option>
<tag-select-option>类目十二</tag-select-option>
<tag-select-option>类目十三</tag-select-option>
<tag-select-option>类目十四</tag-select-option>
</tag-select>
</a-form-item>
</a-form>

View File

@@ -30,25 +30,17 @@ const ATabPane = ATabs.TabPane
export default {
name: 'SearchLayout',
components: {ATabPane, ATabs, AInputSearch, AButton, AInputGroup, AInput},
data () {
return {
activeKey: '1'
}
},
watch: {
'$route': function (val) {
switch (val.path) {
computed: {
activeKey () {
switch (this.$route.path) {
case '/list/search/article':
this.activeKey = '1'
break
return '1'
case '/list/search/application':
this.activeKey = '2'
break
return '2'
case '/list/search/project':
this.activeKey = '3'
break
return '3'
default:
this.activeKey = '2'
return '1'
}
}
},