Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
traceSourceMb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yanyanhong
traceSourceMb
Commits
46e2ea18
Commit
46e2ea18
authored
Dec 31, 2020
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 按照UI的意见修改样式
parent
1f964c54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
31 deletions
+38
-31
AddOption.vue
src/views/template/components/AddOption.vue
+38
-31
No files found.
src/views/template/components/AddOption.vue
View file @
46e2ea18
...
...
@@ -5,36 +5,38 @@
title=
"选择字段类型"
left-arrow
@
click-left=
"onClickLeft"
></van-nav-bar>
<div
v-for=
"(item, index) in data"
:key=
"index"
class=
"item van-hairline--bottom van-hairline--top"
@
click=
"activeName = item.type"
>
<div
class=
"item-inner"
>
<div
class=
"title"
>
{{
item
.
title
}}
</div>
<div
class=
"desc"
>
{{
item
.
desc
}}
</div>
<common-svg
name=
"zidingyimoban-duigou"
class=
"active"
v-show=
"activeName === item.type"
></common-svg>
</div>
<div
class=
"content-wrapper"
>
<div
v-if=
"activeName === DataType.Select && item.type === DataType.Select"
style=
"background:rgba(246,249,255,1);margin:0 -17px;"
>
<van-swipe-cell
v-for=
"(option,index) in options"
:key=
"index"
ref=
"swipeCell"
:stop-propagation=
"true"
>
<div
style=
"display:flex;flex-direction:row;align-items:center;"
>
<common-svg
name=
"zidingyimoban-shanchu"
@
click
.
native
.
stop=
"openSwipeCellRight(index)"
style=
"margin:17px;"
></common-svg>
<van-field
v-model=
"options[index]"
label=
""
placeholder=
"输入选项名称"
></van-field>
</div>
<template
#
right
>
<van-button
square
type=
"danger"
text=
"删除"
@
click=
"delOption(index)"
/>
</
template
>
</van-swipe-cell>
<div
@
click=
"addOption"
style=
"color:#3F79FE;padding:17px;"
><common-svg
name=
"tianjia"
style=
"margin-right:10px;"
></common-svg>
添加选项
</div>
v-for=
"(item, index) in data"
:key=
"index"
class=
"item van-hairline--bottom van-hairline--top"
@
click=
"activeName = item.type"
>
<div
class=
"item-inner"
>
<div
class=
"title"
>
{{
item
.
title
}}
</div>
<div
class=
"desc"
>
{{
item
.
desc
}}
</div>
<common-svg
name=
"zidingyimoban-duigou"
class=
"active"
v-show=
"activeName === item.type"
></common-svg>
</div>
<div
v-if=
"activeName === DataType.Select && item.type === DataType.Select"
style=
"background:rgba(246,249,255,1);margin:0 -17px;"
>
<van-swipe-cell
v-for=
"(option,index) in options"
:key=
"index"
ref=
"swipeCell"
:stop-propagation=
"true"
>
<div
style=
"display:flex;flex-direction:row;align-items:center;"
>
<common-svg
name=
"zidingyimoban-shanchu"
@
click
.
native
.
stop=
"openSwipeCellRight(index)"
style=
"margin:17px;"
></common-svg>
<van-field
v-model=
"options[index]"
label=
""
placeholder=
"输入选项名称"
></van-field>
</div>
<template
#
right
>
<van-button
square
type=
"danger"
text=
"删除"
@
click=
"delOption(index)"
/>
</
template
>
</van-swipe-cell>
<div
@
click=
"addOption"
style=
"color:#3F79FE;padding:17px;"
><common-svg
name=
"tianjia"
style=
"margin-right:10px;"
></common-svg>
添加选项
</div>
</div>
</div>
</div>
<div
class=
"btn-group"
>
...
...
@@ -130,12 +132,16 @@ export default class AddOption extends Vue {
.add-word1
{
text-align
:
left
;
background
:
#ffffff
;
.content-wrapper
{
height
:
calc
(
100vh
-
46px
);
overflow
:
auto
;
}
.item
{
padding
:
0
17px
;
padding
:
15px
17px
;
.item-inner
{
display
:
grid
;
grid-template-columns
:
auto
27px
;
grid-template-rows
:
repeat
(
2
,
30px
);
grid-template-rows
:
repeat
(
2
,
auto
);
grid-auto-flow
:
column
dense
;
place-items
:
center
start
;
.active
{
...
...
@@ -145,6 +151,7 @@ export default class AddOption extends Vue {
}
.title
{
color
:
#353535
;
margin-bottom
:
7px
;
font-size
:
15px
;
}
.desc
{
...
...
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