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
48418ef9
Commit
48418ef9
authored
Sep 27, 2020
by
yyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DataType 增加视频,音频
parent
4ad99be5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
31 deletions
+27
-31
enum.ts
src/const/enum.ts
+2
-0
Add.vue
src/views/template/Add.vue
+1
-11
AddOption.vue
src/views/template/components/AddOption.vue
+9
-10
WordsManager.vue
src/views/template/components/WordsManager.vue
+15
-10
No files found.
src/const/enum.ts
View file @
48418ef9
...
@@ -39,6 +39,8 @@ export enum DataType {
...
@@ -39,6 +39,8 @@ export enum DataType {
Unit
=
3
,
// 有下级
Unit
=
3
,
// 有下级
Select
=
5
,
// 选择 单选
Select
=
5
,
// 选择 单选
Date
=
6
,
// 时间戳
Date
=
6
,
// 时间戳
Video
=
8
,
// 视频
Audio
=
9
,
// 音频
}
}
export
enum
AuthStatus
{
export
enum
AuthStatus
{
...
...
src/views/template/Add.vue
View file @
48418ef9
<
template
>
<
template
>
<div
class=
"template"
>
<div>
<base-info
:showBaseInfo
.
sync=
"showBaseInfo"
@
next=
"baseInfoNext"
@
cancel=
"cancelCreateTempl"
></base-info>
<base-info
:showBaseInfo
.
sync=
"showBaseInfo"
@
next=
"baseInfoNext"
@
cancel=
"cancelCreateTempl"
></base-info>
<words-manager
:data
.
sync=
"words"
@
show-preview=
"showPreview= true;"
@
confirm-words=
"confirm"
></words-manager>
<words-manager
:data
.
sync=
"words"
@
show-preview=
"showPreview= true;"
@
confirm-words=
"confirm"
></words-manager>
<transition
name=
"van-slide-up"
>
<transition
name=
"van-slide-up"
>
...
@@ -68,13 +68,3 @@ export default class Add extends Vue {
...
@@ -68,13 +68,3 @@ export default class Add extends Vue {
}
}
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
.template
{
position
:
relative
;
.tip
{
font-size
:
12px
;
color
:
#737582
;
margin-bottom
:
100px
;
}
}
</
style
>
src/views/template/components/AddOption.vue
View file @
48418ef9
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<common-svg
name=
"zidingyimoban-duigou"
class=
"active"
v-show=
"activeName === item.type"
></common-svg>
<common-svg
name=
"zidingyimoban-duigou"
class=
"active"
v-show=
"activeName === item.type"
></common-svg>
</div>
</div>
<div
<div
v-if=
"activeName ===
5 && item.type === 5
"
v-if=
"activeName ===
DataType.Select && item.type === DataType.Select
"
style=
"background:rgba(246,249,255,1);margin:0 -17px;"
>
style=
"background:rgba(246,249,255,1);margin:0 -17px;"
>
<van-swipe-cell
<van-swipe-cell
v-for=
"(option,index) in options"
v-for=
"(option,index) in options"
...
@@ -57,16 +57,17 @@ export default class AddOption extends Vue {
...
@@ -57,16 +57,17 @@ export default class AddOption extends Vue {
})
})
private
show
!
:
boolean
;
private
show
!
:
boolean
;
private
activeName
:
number
=
0
;
private
activeName
:
number
=
0
;
private
readonly
DataType
:
any
=
DataType
;
private
data
=
[
private
data
=
[
{
{
title
:
'单行文本'
,
title
:
'单行文本'
,
desc
:
'只能输入一行,适合文字少的内容'
,
desc
:
'只能输入一行,适合文字少的内容'
,
type
:
0
,
type
:
DataType
.
Input
,
},
},
{
{
title
:
'上传图片'
,
title
:
'上传图片'
,
desc
:
'可以上传多个图片,但只能选择一项'
,
desc
:
'可以上传多个图片,但只能选择一项'
,
type
:
1
,
type
:
DataType
.
Image
,
},
},
// {
// {
// title: '多行文本',
// title: '多行文本',
...
@@ -75,27 +76,27 @@ export default class AddOption extends Vue {
...
@@ -75,27 +76,27 @@ export default class AddOption extends Vue {
{
{
title
:
'PDF文件'
,
title
:
'PDF文件'
,
desc
:
'选择PDF文件'
,
desc
:
'选择PDF文件'
,
type
:
2
,
type
:
DataType
.
File
,
},
},
{
{
title
:
'多选框'
,
title
:
'多选框'
,
desc
:
'可以定义多个选择项,但只能选择一项'
,
desc
:
'可以定义多个选择项,但只能选择一项'
,
type
:
5
,
type
:
DataType
.
Select
,
},
},
{
{
title
:
'日期'
,
title
:
'日期'
,
desc
:
'选择单个日期时间'
,
desc
:
'选择单个日期时间'
,
type
:
6
,
type
:
DataType
.
Date
,
},
},
{
{
title
:
'上传视频'
,
title
:
'上传视频'
,
desc
:
'上传视频'
,
desc
:
'上传视频'
,
type
:
8
,
type
:
DataType
.
Video
,
},
},
{
{
title
:
'上传音频'
,
title
:
'上传音频'
,
desc
:
'上传音频'
,
desc
:
'上传音频'
,
type
:
9
,
type
:
DataType
.
Audio
,
},
},
];
];
private
options
:
string
[]
=
[];
private
options
:
string
[]
=
[];
...
@@ -125,8 +126,6 @@ export default class AddOption extends Vue {
...
@@ -125,8 +126,6 @@ export default class AddOption extends Vue {
background
:
#ffffff
;
background
:
#ffffff
;
.item
{
.item
{
padding
:
0
17px
;
padding
:
0
17px
;
// border-top: 1px solid rgba(239,239,239,1);
// border-bottom: 1px solid rgba(239,239,239,1);
.item-inner
{
.item-inner
{
display
:
grid
;
display
:
grid
;
grid-template-columns
:
auto
27px
;
grid-template-columns
:
auto
27px
;
...
...
src/views/template/components/WordsManager.vue
View file @
48418ef9
...
@@ -50,7 +50,7 @@ export default class Add extends Vue {
...
@@ -50,7 +50,7 @@ export default class Add extends Vue {
})
})
private
words
!
:
any
[];
private
words
!
:
any
[];
private
wordType
:
number
=
DataType
.
Unit
;
private
wordType
:
number
=
DataType
.
Unit
;
private
DataType
:
any
=
DataType
;
private
readonly
DataType
:
any
=
DataType
;
private
wordName
:
string
=
''
;
private
wordName
:
string
=
''
;
private
flag
:
string
=
''
;
private
flag
:
string
=
''
;
private
options
:
string
[]
=
[];
private
options
:
string
[]
=
[];
...
@@ -81,15 +81,15 @@ export default class Add extends Vue {
...
@@ -81,15 +81,15 @@ export default class Add extends Vue {
action
:
this
.
delWord
.
bind
(
this
),
action
:
this
.
delWord
.
bind
(
this
),
},
},
];
];
private
typeObj
:
any
=
{
private
readonly
typeObj
:
any
=
{
0
:
'单行文本'
,
[
DataType
.
Input
]
:
'单行文本'
,
1
:
'图片'
,
[
DataType
.
Image
]
:
'图片'
,
2
:
'pdf文件'
,
[
DataType
.
File
]
:
'pdf文件'
,
3
:
'一级标题'
,
[
DataType
.
Unit
]
:
'一级标题'
,
5
:
'选择'
,
[
DataType
.
Select
]
:
'选择'
,
6
:
'日期'
,
[
DataType
.
Date
]
:
'日期'
,
8
:
'视频'
,
[
DataType
.
Video
]
:
'视频'
,
9
:
'音频'
,
[
DataType
.
Audio
]
:
'音频'
,
};
};
private
typeValue
:
any
=
{
private
typeValue
:
any
=
{
0
:
{
0
:
{
...
@@ -265,6 +265,11 @@ export default class Add extends Vue {
...
@@ -265,6 +265,11 @@ export default class Add extends Vue {
border-radius
:
6px
;
border-radius
:
6px
;
border
:
1px
dashed
rgba
(
63
,
121
,
254
,
1
);
border
:
1px
dashed
rgba
(
63
,
121
,
254
,
1
);
}
}
.tip
{
font-size
:
12px
;
color
:
#737582
;
margin-bottom
:
100px
;
}
.btn-group
{
.btn-group
{
.preview
{
.preview
{
align-self
:
center
;
align-self
:
center
;
...
...
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