Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
visualcloud
/
Vmatrix-client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
83c3a523
authored
Dec 16, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
91e678b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
34 deletions
+36
-34
src/views/tempaltes/editMenu.vue
+36
-34
No files found.
src/views/tempaltes/editMenu.vue
View file @
83c3a523
...
...
@@ -46,37 +46,39 @@
<div
class=
"btn-con"
>
<span
class=
"index"
>
序号
{{
index2
}}
</span>
</div>
<div
class=
"list-item-list"
v-for=
"(item3, index3) in item2"
:key=
"index3"
>
<div
v-if=
"(index3 != 'schemaIndex' && index3 != 'index')"
>
<input
v-if=
"item.modelSchema[isSchemaIndex(item2)][index3].type === 'text'"
:placeholder=
"item.modelSchema[isSchemaIndex(item2)][index3].description"
class=
"edit-input edit-input-list-item"
type=
"text"
@
blur=
"onBlur"
v-model=
"item2[index3]"
@
keyup=
"valueChange2()"
/>
<div>
<van-uploader
result-type=
"dataUrl"
v-if=
"item.modelSchema[isSchemaIndex(item2)][index3].type == 'image' || item.modelSchema[isSchemaIndex(item2)][index3].type == 'video'"
:accept=
"item.modelSchema[isSchemaIndex(item2)][index3].type == 'image' ? 'image/*' : 'video/*'"
@
click
.
native=
"uploadListItem(item.dataKey,index2, index3)"
:after-read=
"uploadAfter"
>
<!--
<van-button
type=
"info"
>
上传
</van-button>
-->
<img
v-if=
"item.modelSchema[isSchemaIndex(item2)][index3].type === 'image'"
:src=
"getHostUrl(item2[index3])"
class=
"edit-input edit-input-image"
/>
<video
class=
"edit-input-video"
:src=
"getHostUrl(item2[index3])"
v-if=
"item.modelSchema[isSchemaIndex(item2)][index3].type === 'video'"
></video>
</van-uploader>
<div
class=
"list-item-list"
>
<div
class=
"list-item-list-item"
v-for=
"(item3, index3) in item2"
:key=
"index3"
>
<div
v-if=
"(index3 != 'schemaIndex' && index3 != 'index')"
>
<input
v-if=
"item.modelSchema[isSchemaIndex(item2)][index3].type === 'text'"
:placeholder=
"item.modelSchema[isSchemaIndex(item2)][index3].description"
class=
"edit-input edit-input-list-item"
type=
"text"
@
blur=
"onBlur"
v-model=
"item2[index3]"
@
keyup=
"valueChange2()"
/>
<div>
<van-uploader
result-type=
"dataUrl"
v-if=
"item.modelSchema[isSchemaIndex(item2)][index3].type == 'image' || item.modelSchema[isSchemaIndex(item2)][index3].type == 'video'"
:accept=
"item.modelSchema[isSchemaIndex(item2)][index3].type == 'image' ? 'image/*' : 'video/*'"
@
click
.
native=
"uploadListItem(item.dataKey,index2, index3)"
:after-read=
"uploadAfter"
>
<!--
<van-button
type=
"info"
>
上传
</van-button>
-->
<img
v-if=
"item.modelSchema[isSchemaIndex(item2)][index3].type === 'image'"
:src=
"getHostUrl(item2[index3])"
class=
"edit-input edit-input-image"
/>
<video
class=
"edit-input-video"
:src=
"getHostUrl(item2[index3])"
v-if=
"item.modelSchema[isSchemaIndex(item2)][index3].type === 'video'"
></video>
</van-uploader>
</div>
</div>
</div>
<div
class=
"list-item-delete"
>
...
...
@@ -163,7 +165,7 @@ export default {
components
:
{
selectDataCom
,
VueCropper
},
},
created
()
{
console
.
log
(
this
.
schemaData
);
},
...
...
@@ -252,7 +254,7 @@ export default {
uploadAfter
(
file
)
{
// console.log(file);
if
(
String
(
file
.
file
.
type
).
indexOf
(
"image"
)
!==
-
1
)
{
this
.
$emit
(
"setClipImg"
,
true
)
this
.
$emit
(
"setClipImg"
,
true
)
;
this
.
VueCropperOption
.
img
=
file
.
content
;
}
else
{
this
.
uploadFile
(
file
.
file
);
...
...
@@ -275,7 +277,7 @@ export default {
this
.
$emit
(
"setList"
,
this
.
schemaData
);
},
saveCropper
()
{
this
.
$emit
(
"setClipImg"
,
false
)
this
.
$emit
(
"setClipImg"
,
false
)
;
this
.
VueCropperOption
.
img
=
""
;
this
.
$refs
.
cropper
.
getCropBlob
(
data
=>
{
console
.
log
(
data
);
...
...
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