新增TagSelect组件
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-card style="" :bordered="false">
|
||||
bbb
|
||||
<search-form />
|
||||
<a-card :bordered="false">
|
||||
contentB
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ACard from 'vue-antd-ui/es/card/Card'
|
||||
import SearchForm from './SearchForm'
|
||||
export default {
|
||||
name: 'ApplicationList',
|
||||
components: {ACard}
|
||||
components: {SearchForm, ACard}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-card style="" :bordered="false">
|
||||
aaaa
|
||||
<search-form />
|
||||
<a-card :bordered="false">
|
||||
contentA
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ACard from 'vue-antd-ui/es/card/Card'
|
||||
import SearchForm from './SearchForm'
|
||||
export default {
|
||||
name: 'ArticleList',
|
||||
components: {ACard}
|
||||
components: {SearchForm, ACard}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-card style="" :bordered="false">
|
||||
ccc
|
||||
<search-form />
|
||||
<a-card :bordered="false">
|
||||
contentC
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ACard from 'vue-antd-ui/es/card/Card'
|
||||
import SearchForm from './SearchForm'
|
||||
export default {
|
||||
name: 'ProjectList',
|
||||
components: {ACard}
|
||||
components: {SearchForm, ACard}
|
||||
}
|
||||
</script>
|
||||
|
||||
46
src/components/list/Search/SearchForm.vue
Normal file
46
src/components/list/Search/SearchForm.vue
Normal file
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<a-card :bordered="false" class="search-form">
|
||||
<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>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ACard from 'vue-antd-ui/es/card/Card'
|
||||
import AForm from 'vue-antd-ui/es/form/Form'
|
||||
import AFormItem from 'vue-antd-ui/es/form/FormItem'
|
||||
import AInput from 'vue-antd-ui/es/input/Input'
|
||||
import TagSelect from '../../tool/TagSelect'
|
||||
|
||||
const TagSelectOption = TagSelect.Option
|
||||
|
||||
export default {
|
||||
name: 'SearchForm',
|
||||
components: {TagSelectOption, TagSelect, AInput, AFormItem, AForm, ACard}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.search-form{
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
</style>
|
||||
@@ -32,11 +32,11 @@ export default {
|
||||
components: {ATabPane, ATabs, AInputSearch, AButton, AInputGroup, AInput},
|
||||
data () {
|
||||
return {
|
||||
activeKey: ''
|
||||
activeKey: '1'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$route': (val) => {
|
||||
'$route': function (val) {
|
||||
switch (val.path) {
|
||||
case '/list/search/article':
|
||||
this.activeKey = '1'
|
||||
@@ -48,12 +48,13 @@ export default {
|
||||
this.activeKey = '3'
|
||||
break
|
||||
default:
|
||||
this.activeKey = '1'
|
||||
this.activeKey = '2'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navigate (key) {
|
||||
this.activeKey = key
|
||||
switch (key) {
|
||||
case '1':
|
||||
this.$router.push('/list/search/article')
|
||||
Reference in New Issue
Block a user