Skip to content

Commit 8b88af4

Browse files
committed
fix: table dataSource
1 parent ee3b6e4 commit 8b88af4

File tree

3 files changed

+63
-2
lines changed

3 files changed

+63
-2
lines changed

src/components/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import STable from '@/components/Table'
2424
import MultiTab from '@/components/MultiTab'
2525
import Result from '@/components/Result'
2626
import IconSelector from '@/components/IconSelector'
27+
import TagSelect from '@/components/TagSelect'
2728
import ExceptionPage from '@/components/Exception'
2829

2930
export {
@@ -52,5 +53,6 @@ export {
5253
MultiTab,
5354
Result,
5455
ExceptionPage,
55-
IconSelector
56+
IconSelector,
57+
TagSelect
5658
}

src/config/router.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export const asyncRouterMap = [
105105
{
106106
path: '/list/search/article',
107107
name: 'SearchArticles',
108-
component: () => import('../views/list/TableList'),
108+
component: () => import('../views/list/search/Article'),
109109
meta: { title: '搜索列表(文章)', permission: [ 'table' ] }
110110
},
111111
{

src/views/list/search/Article.vue

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<template>
2+
<a-card :bordered="false" class="ant-pro-components-tag-select">
3+
<a-form layout="inline">
4+
<a-form-item label="所属类目">
5+
<tag-select>
6+
<tag-select-option value="Category1">类目一</tag-select-option>
7+
<tag-select-option value="Category2">类目二</tag-select-option>
8+
<tag-select-option value="Category3">类目三</tag-select-option>
9+
<tag-select-option value="Category4">类目四</tag-select-option>
10+
<tag-select-option value="Category5">类目五</tag-select-option>
11+
<tag-select-option value="Category6">类目六</tag-select-option>
12+
<tag-select-option value="Category7">类目七</tag-select-option>
13+
<tag-select-option value="Category8">类目八</tag-select-option>
14+
<tag-select-option value="Category9">类目九</tag-select-option>
15+
<tag-select-option value="Category10">类目十</tag-select-option>
16+
</tag-select>
17+
</a-form-item>
18+
<a-divider dashed />
19+
<a-form-item label="owner">
20+
<a-row>
21+
<a-col :md="24">
22+
<a-select style="max-width: 268px; width: 100%;" mode="multiple" :defaultValue="['a1', 'b2']" @change="handleChange" placeholder="Please select">
23+
<a-select-option v-for="i in 25" :key="(i + 9).toString(36) + i">{{ (i + 9).toString(36) + i }}</a-select-option>
24+
</a-select>
25+
<a>只看自己的</a>
26+
</a-col>
27+
</a-row>
28+
</a-form-item>
29+
</a-form>
30+
31+
</a-card>
32+
</template>
33+
34+
<script>
35+
import { TagSelect } from '@/components'
36+
const TagSelectOption = TagSelect.Option
37+
38+
export default {
39+
components: {
40+
TagSelect,
41+
TagSelectOption
42+
},
43+
methods: {
44+
handleChange (value) {
45+
console.log(`selected ${value}`)
46+
}
47+
}
48+
}
49+
</script>
50+
51+
<style lang="less" scoped>
52+
.ant-pro-components-tag-select {
53+
/deep/ .ant-pro-tag-select .ant-tag {
54+
margin-right: 24px;
55+
padding: 0 8px;
56+
font-size: 14px;
57+
}
58+
}
59+
</style>

0 commit comments

Comments
 (0)