Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
quantum-blocks
Commits
46862ff1
Commit
46862ff1
authored
May 19, 2022
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 类目组件选择器增加删除功能,增加类目及品牌搜索
parent
d3effdea
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
9 deletions
+75
-9
index.vue
...omponent/DynamicForm/component/CategorySelector/index.vue
+75
-9
No files found.
app/web/page/editor/component/DynamicForm/component/CategorySelector/index.vue
View file @
46862ff1
...
@@ -7,23 +7,35 @@
...
@@ -7,23 +7,35 @@
<Input
v-model=
"item.name"
placeholder=
""
/>
<Input
v-model=
"item.name"
placeholder=
""
/>
</FormItem>
</FormItem>
<FormItem
label=
"素材图片"
prop=
"img"
>
<FormItem
label=
"素材图片"
prop=
"img"
>
<Upload
v-model=
"item.img"
@
change=
"updateStyle($event, 'tagBg', item)"
></Upload>
<Upload
v-model=
"item.img"
></Upload>
</FormItem>
</FormItem>
<FormItem
label=
"利益点"
prop=
"text"
>
<FormItem
label=
"利益点"
prop=
"text"
>
<Input
v-model=
"item.text"
placeholder=
""
/>
<Input
v-model=
"item.text"
placeholder=
""
/>
</FormItem>
</FormItem>
<FormItem
label=
"logo图"
prop=
"logoUrl"
>
<FormItem
label=
"logo图"
prop=
"logoUrl"
>
<Upload
v-model=
"item.logoUrl"
@
change=
"updateStyle($event, 'tagBg', item)"
></Upload>
<Upload
v-model=
"item.logoUrl"
></Upload>
</FormItem>
</FormItem>
<FormItem
label=
"跳转链接"
prop=
"link"
>
<FormItem
label=
"跳转链接"
prop=
"link"
>
<Input
v-model=
"item.link"
placeholder=
""
/>
<Input
v-model=
"item.link"
placeholder=
""
/>
</FormItem>
</FormItem>
</Form>
</Form>
<Button
long
type=
"error"
@
click=
"del(index)"
>
删除
</Button>
</div>
</div>
<Button
type=
"ghost"
@
click=
"add"
>
添加项目
</Button>
<Button
type=
"ghost"
@
click=
"add"
>
添加项目
</Button>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
title=
"选择品类/品牌"
width=
"700"
>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
title=
"选择品类/品牌"
width=
"700"
>
<Tabs
:value=
"type"
@
on-click=
"selectType"
>
<Tabs
:value=
"type"
@
on-click=
"selectType"
>
<TabPane
label=
"品类"
name=
"1"
>
<TabPane
label=
"品类"
name=
"1"
>
<div
class=
"search"
>
<Form
class=
"searchFormStyle"
inline
>
<FormItem
label=
"类目名称"
prop=
"name"
>
<Input
v-model=
"searchParams.name"
placeholder=
""
/>
</FormItem>
<FormItem
label=
"类目编码"
prop=
"name"
>
<Input
v-model=
"searchParams.sceneId"
placeholder=
""
/>
</FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</Form>
</div>
<Table
<Table
:columns=
"tableColumn"
:columns=
"tableColumn"
:data=
"tableData"
:data=
"tableData"
...
@@ -33,6 +45,17 @@
...
@@ -33,6 +45,17 @@
<Page
class=
"page"
:total=
"total"
@
on-change=
"changePageNo"
show-total
></Page>
<Page
class=
"page"
:total=
"total"
@
on-change=
"changePageNo"
show-total
></Page>
</TabPane>
</TabPane>
<TabPane
label=
"品牌"
name=
"2"
>
<TabPane
label=
"品牌"
name=
"2"
>
<div
class=
"search"
>
<Form
class=
"searchFormStyle"
inline
>
<FormItem
label=
"品牌名称"
prop=
"name"
>
<Input
v-model=
"searchParams.name"
placeholder=
""
/>
</FormItem>
<FormItem
label=
"品牌编码"
prop=
"name"
>
<Input
v-model=
"searchParams.sceneId"
placeholder=
""
/>
</FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</Form>
</div>
<Table
<Table
:columns=
"tableColumn"
:columns=
"tableColumn"
:data=
"tableData"
:data=
"tableData"
...
@@ -89,8 +112,8 @@ const categoryCol = function() {
...
@@ -89,8 +112,8 @@ const categoryCol = function() {
h
(
'
img
'
,
{
h
(
'
img
'
,
{
attrs
:
{
attrs
:
{
src
:
row
.
imgUrl
,
src
:
row
.
imgUrl
,
width
:
10
0
,
width
:
8
0
,
height
:
10
0
height
:
8
0
},
},
})
})
]
]
...
@@ -100,7 +123,7 @@ const categoryCol = function() {
...
@@ -100,7 +123,7 @@ const categoryCol = function() {
},
},
{
{
align
:
'
center
'
,
align
:
'
center
'
,
title
:
'
选择
'
,
title
:
'
操作
'
,
width
:
120
,
width
:
120
,
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
const
row
=
params
.
row
;
const
row
=
params
.
row
;
...
@@ -130,6 +153,12 @@ const brandCol = function() {
...
@@ -130,6 +153,12 @@ const brandCol = function() {
title
:
'
品牌名称
'
,
title
:
'
品牌名称
'
,
key
:
'
brandName
'
,
key
:
'
brandName
'
,
},
},
{
align
:
'
center
'
,
title
:
'
品牌编码
'
,
key
:
'
sceneId
'
,
width
:
120
},
{
{
align
:
'
center
'
,
align
:
'
center
'
,
title
:
'
logo
'
,
title
:
'
logo
'
,
...
@@ -143,8 +172,8 @@ const brandCol = function() {
...
@@ -143,8 +172,8 @@ const brandCol = function() {
h
(
'
img
'
,
{
h
(
'
img
'
,
{
attrs
:
{
attrs
:
{
src
:
row
.
imgUrl
,
src
:
row
.
imgUrl
,
width
:
10
0
,
width
:
8
0
,
height
:
10
0
height
:
8
0
},
},
})
})
]
]
...
@@ -154,7 +183,7 @@ const brandCol = function() {
...
@@ -154,7 +183,7 @@ const brandCol = function() {
},
},
{
{
align
:
'
center
'
,
align
:
'
center
'
,
title
:
'
选择
'
,
title
:
'
操作
'
,
width
:
120
,
width
:
120
,
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
const
row
=
params
.
row
;
const
row
=
params
.
row
;
...
@@ -193,11 +222,18 @@ export default {
...
@@ -193,11 +222,18 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
updateStyle
()
{},
search
()
{
this
.
searchParams
.
pageNo
=
1
;
this
.
searchParams
.
pageSize
=
10
;
this
.
getData
();
},
add
()
{
add
()
{
this
.
showModal
=
true
;
this
.
showModal
=
true
;
this
.
getData
();
this
.
getData
();
},
},
del
(
index
)
{
this
.
categoryData
.
splice
(
index
,
1
)
},
changePageNo
(
val
)
{
changePageNo
(
val
)
{
this
.
searchParams
.
pageNo
=
val
;
this
.
searchParams
.
pageNo
=
val
;
this
.
getData
();
this
.
getData
();
...
@@ -288,4 +324,34 @@ export default {
...
@@ -288,4 +324,34 @@ export default {
}
}
}
}
.inline {
display: inline-block;
}
.searchFormStyle {
text-align: left;
clear: both;
background-color: #fff;
padding: 4px;
min-height: 70px;
font-size: 0;
display: flex;
align-items: center;
.btnGroupStyle{
button{
margin-right: 6px;
}
}
/deep/ .ivu-form-item{
margin-bottom: 0;
}
/deep/ .ivu-form-item-label {
font-weight: bold;
display: inline-block;
}
/deep/.ivu-form-item-content {
display: inline-block;
}
}
</
style
>
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment