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
e87ef81b
Commit
e87ef81b
authored
Jul 24, 2020
by
yyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能开发
parent
7f36fd2c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
50 deletions
+62
-50
TypeEight.vue
src/components/template/TypeEight.vue
+29
-24
TypeNine.vue
src/components/template/TypeNine.vue
+26
-14
SelectTemplate.vue
src/views/template/components/SelectTemplate.vue
+6
-6
AccountNum.vue
src/views/userCenter/AccountNum.vue
+1
-6
No files found.
src/components/template/TypeEight.vue
View file @
e87ef81b
...
@@ -2,11 +2,13 @@
...
@@ -2,11 +2,13 @@
<div
class=
"van-hairline--bottom type-two"
>
<div
class=
"van-hairline--bottom type-two"
>
<div
class=
"title"
style=
"margin-bottom: 10px;"
>
{{
proofSubItem
.
label
}}
</div>
<div
class=
"title"
style=
"margin-bottom: 10px;"
>
{{
proofSubItem
.
label
}}
</div>
<div
v-for=
"(file,index) in fileList"
:key=
"index"
style=
"margin-bottom: 10px;"
>
<div
v-for=
"(file,index) in fileList"
:key=
"index"
style=
"margin-bottom: 10px;"
>
<video
controls
:src=
"file.url"
style=
"margin-bottom: 10px;width: 100%;"
>
<video
controls
disablePictureInPicture
style=
"margin-bottom: 10px;width: 100%;"
>
<source
:src=
"file.url"
>
你的浏览器不支持Video标签
</video>
</video>
<div
style=
"text-align:right;color:#3175FF;"
@
click=
"del(index)"
>
删除
</div>
<div
style=
"text-align:right;color:#3175FF;"
@
click=
"del(index)"
>
删除
</div>
</div>
</div>
<input
type=
"file"
@
change=
"handleFileChange"
id=
"uploader2"
accept=
"video/*"
:value=
"file"
style=
"display:none;"
>
<input
type=
"file"
@
change=
"handleFileChange"
id=
"uploader2"
accept=
"video/*"
style=
"display:none;"
>
<label
for=
"uploader2"
class=
"uploader"
>
<label
for=
"uploader2"
class=
"uploader"
>
<common-svg
name=
"shipin"
width=
"32px"
height=
"32px"
></common-svg>
<common-svg
name=
"shipin"
width=
"32px"
height=
"32px"
></common-svg>
<div
class=
"title"
>
上传视频
</div>
<div
class=
"title"
>
上传视频
</div>
...
@@ -31,7 +33,6 @@ export default class TypeEight extends Vue {
...
@@ -31,7 +33,6 @@ export default class TypeEight extends Vue {
@
Prop
()
@
Prop
()
private
value
!
:
[];
private
value
!
:
[];
private
fileList
:
any
[]
=
[];
private
fileList
:
any
[]
=
[];
private
file
:
any
=
''
;
private
loaded
:
number
=
0
;
private
loaded
:
number
=
0
;
private
total
:
number
=
0
;
private
total
:
number
=
0
;
@
Watch
(
'valHash'
,
{
immediate
:
true
,
deep
:
true
})
@
Watch
(
'valHash'
,
{
immediate
:
true
,
deep
:
true
})
...
@@ -58,32 +59,36 @@ export default class TypeEight extends Vue {
...
@@ -58,32 +59,36 @@ export default class TypeEight extends Vue {
this
.
$emit
(
'update:value'
,
value
);
this
.
$emit
(
'update:value'
,
value
);
}
}
private
handleFileChange
(
e
:
any
)
{
private
handleFileChange
(
e
:
any
)
{
const
input
=
e
.
target
;
const
[
file
]
=
e
.
target
.
files
;
const
files
=
input
.
files
;
if
(
!
file
)
{
return
;
}
console
.
log
(
file
.
size
);
if
(
file
.
size
>
10
*
1024
*
1024
)
{
this
.
$toast
(
'文件太大'
);
return
;
}
const
toast
=
this
.
$toast
({
const
toast
=
this
.
$toast
({
message
:
'0%'
,
message
:
'0%'
,
duration
:
0
,
// 持续展示 toast
duration
:
0
,
// 持续展示 toast
forbidClick
:
true
,
forbidClick
:
true
,
});
});
if
(
files
&&
files
[
0
])
{
this
.
$api
.
file
.
upload
(
file
,
(
process
:
any
)
=>
{
this
.
$api
.
file
.
upload
(
files
[
0
],
(
process
:
any
)
=>
{
const
{
loaded
,
total
}
=
process
;
const
{
loaded
,
total
}
=
process
;
const
percent
=
Math
.
floor
(
loaded
/
total
*
100
);
const
percent
=
Math
.
floor
(
loaded
/
total
*
100
);
toast
.
message
=
`
${
percent
}
%`
;
toast
.
message
=
`
${
percent
}
%`
;
if
(
percent
===
100
)
{
if
(
percent
===
100
)
{
toast
.
clear
();
toast
.
clear
();
}
}
}).
then
((
res
:
any
)
=>
{
}).
then
((
res
:
any
)
=>
{
e
.
target
.
value
=
''
;
e
.
target
.
value
=
''
;
const
temp
:
any
=
Array
.
isArray
(
this
.
value
)
?
this
.
value
:
[];
this
.
file
=
''
;
this
.
$emit
(
'update:value'
,
[...
temp
,
{
const
temp
:
any
=
Array
.
isArray
(
this
.
value
)
?
this
.
value
:
[];
type
:
'media'
,
this
.
$emit
(
'update:value'
,
[...
temp
,
{
format
:
'hash'
,
type
:
'media'
,
value
:
res
.
hash
,
format
:
'hash'
,
}]);
value
:
res
.
hash
,
}).
catch
((
err
:
any
)
=>
{
}]);
toast
.
clear
();
});
});
}
}
}
}
}
</
script
>
</
script
>
...
...
src/components/template/TypeNine.vue
View file @
e87ef81b
...
@@ -56,20 +56,32 @@ export default class TypeNine extends Vue {
...
@@ -56,20 +56,32 @@ export default class TypeNine extends Vue {
this
.
$emit
(
'update:value'
,
value
);
this
.
$emit
(
'update:value'
,
value
);
}
}
private
handleFileChange
(
e
:
any
)
{
private
handleFileChange
(
e
:
any
)
{
const
input
=
e
.
target
;
const
[
file
]
=
e
.
target
.
files
;
const
files
=
input
.
files
;
if
(
!
file
)
{
return
;
}
if
(
files
&&
files
[
0
])
{
const
toast
=
this
.
$toast
({
this
.
$api
.
file
.
upload
(
files
[
0
]).
then
((
res
:
any
)
=>
{
message
:
'0%'
,
e
.
target
.
value
=
''
;
duration
:
0
,
// 持续展示 toast
this
.
file
=
''
;
forbidClick
:
true
,
const
temp
:
any
=
Array
.
isArray
(
this
.
value
)
?
this
.
value
:
[];
});
this
.
$emit
(
'update:value'
,
[...
temp
,
{
this
.
$api
.
file
.
upload
(
file
,
(
process
:
any
)
=>
{
type
:
'media'
,
const
{
loaded
,
total
}
=
process
;
format
:
'hash'
,
const
percent
=
Math
.
floor
(
loaded
/
total
*
100
);
value
:
res
.
hash
,
toast
.
message
=
`
${
percent
}
%`
;
}]);
if
(
percent
===
100
)
{
});
toast
.
clear
();
}
}
}).
then
((
res
:
any
)
=>
{
e
.
target
.
value
=
''
;
this
.
file
=
''
;
const
temp
:
any
=
Array
.
isArray
(
this
.
value
)
?
this
.
value
:
[];
this
.
$emit
(
'update:value'
,
[...
temp
,
{
type
:
'media'
,
format
:
'hash'
,
value
:
res
.
hash
,
}]);
}).
catch
((
err
:
any
)
=>
{
toast
.
clear
();
});
}
}
}
}
</
script
>
</
script
>
...
...
src/views/template/components/SelectTemplate.vue
View file @
e87ef81b
...
@@ -258,12 +258,12 @@ export default class SelectTemplate extends Vue {
...
@@ -258,12 +258,12 @@ export default class SelectTemplate extends Vue {
place-items
:
center
;
place-items
:
center
;
}
}
.btn-group
{
.btn-group
{
position
:
fixed
;
//
position: fixed;
left
:
0
;
//
left: 0;
right
:
0
;
//
right: 0;
bottom
:
0
;
//
bottom: 0;
display
:
flex
;
//
display: flex;
padding
:
10px
17px
;
//
padding: 10px 17px;
.left
,
.right
{
.left
,
.right
{
border-radius
:
4px
;
border-radius
:
4px
;
height
:
40px
;
height
:
40px
;
...
...
src/views/userCenter/AccountNum.vue
View file @
e87ef81b
...
@@ -21,19 +21,14 @@
...
@@ -21,19 +21,14 @@
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Component
,
Prop
,
Vue
}
from
'vue-property-decorator'
;
import
{
Component
,
Prop
,
Vue
}
from
'vue-property-decorator'
;
import
{
Cell
,
Form
,
Field
,
CellGroup
,
Button
,
Image
,
RadioGroup
,
Radio
}
from
'vant'
;
import
{
Button
,
Image
}
from
'vant'
;
import
{
State
,
Getter
,
Action
,
Mutation
}
from
'vuex-class'
;
import
{
State
,
Getter
,
Action
,
Mutation
}
from
'vuex-class'
;
import
{
Route
}
from
'vue-router'
;
import
{
Route
}
from
'vue-router'
;
import
H5Cropper
from
'vue-cropper-h5'
;
import
H5Cropper
from
'vue-cropper-h5'
;
@
Component
({
@
Component
({
components
:
{
components
:
{
[
Form
.
name
]:
Form
,
[
Field
.
name
]:
Field
,
[
Button
.
name
]:
Button
,
[
Button
.
name
]:
Button
,
[
Image
.
name
]:
Image
,
[
Image
.
name
]:
Image
,
[
Cell
.
name
]:
Cell
,
[
RadioGroup
.
name
]:
RadioGroup
,
[
Radio
.
name
]:
Radio
,
H5Cropper
,
H5Cropper
,
},
},
})
})
...
...
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