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
374b31bf
authored
Oct 16, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加显示控制
parent
ee71765f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
3 deletions
+39
-3
src/utils/request.js
+1
-1
src/views/tempaltes/editMenu.vue
+33
-1
src/views/tempaltes/index.vue
+5
-1
No files found.
src/utils/request.js
View file @
374b31bf
...
...
@@ -7,7 +7,7 @@ import { getToken, removeToken } from "@/utils/auth";
// console.log(process.env)
const
service
=
axios
.
create
({
baseURL
:
process
.
env
.
VUE_APP_BASE_API
,
// api 的 base_url
timeout
:
30
*
1000
,
// 请求超时时间, 30秒
timeout
:
30
0
*
1000
,
// 请求超时时间, 30秒
withCredentials
:
true
});
...
...
src/views/tempaltes/editMenu.vue
View file @
374b31bf
...
...
@@ -12,12 +12,23 @@
</edit-menu>
-->
<div>
<!--
<div>
{{
schemaData
[
item
.
dataKey
]
}}
{{
item
.
dataKey
}}
</div>
-->
<video
v-if=
"item.type === 'video'"
class=
"image"
:src=
"getHostUrl(schemaData[item.dataKey].value)"
alt
/>
<img
v-if=
"item.type === 'image'"
class=
"image"
:src=
"getHostUrl(schemaData[item.dataKey].value)"
alt
/>
<div
class=
"checkbox"
>
<label
v-if=
"item.enableDisplay"
>
<input
type=
"checkbox"
style=
"display: inline;"
v-model=
"schemaData[item.dataKey].visbility"
@
change=
"checkboxChange"
/>
是否隐藏
</label>
</div>
<input
v-if=
"item.type === 'text'"
class=
"edit-input"
...
...
@@ -52,7 +63,10 @@
:src=
"getHostUrl(item2[index3])"
class=
"edit-input"
/>
<video
:src=
"getHostUrl(item2[index3])"
v-if=
"item.modelSchema[isSchemaIndex(item2)][index3].type === 'video'"
></video>
<video
:src=
"getHostUrl(item2[index3])"
v-if=
"item.modelSchema[isSchemaIndex(item2)][index3].type === 'video'"
></video>
<van-uploader
result-type=
"dataUrl"
v-if=
"item.modelSchema[isSchemaIndex(item2)][index3].type == 'image' || item.modelSchema[isSchemaIndex(item2)][index3].type == 'video'"
...
...
@@ -176,6 +190,9 @@ export default {
this
.
$toast
(
"上传失败"
);
});
},
checkboxChange
(
value
)
{
console
.
log
(
this
.
schemaData
,
value
)
},
setSchemaData
(
value
)
{
this
.
schemaData
[
this
.
dataKey
].
value
=
value
;
this
.
valueChange2
();
...
...
@@ -236,6 +253,21 @@ input {
padding-left
:
8px
;
border
:
none
;
}
.checkbox
{
display
:
flex
;
align-items
:
center
;
height
:
30px
;
label
{
display
:
flex
;
align-items
:
center
;
height
:
30px
;
input
{
margin
:
0
;
height
:
20px
;
width
:
20px
;
}
}
}
.edit-input
{
width
:
97%
;
border
:
1px
solid
#d0d0d0
;
...
...
src/views/tempaltes/index.vue
View file @
374b31bf
...
...
@@ -92,8 +92,12 @@ export default {
}
this
.
list
=
this
.
list
.
concat
(
res
.
data
.
list
);
console
.
log
(
res
.
data
.
list
.
length
,
10
)
if
(
res
.
data
.
list
.
length
<
10
)
{
this
.
finished
=
true
;
this
.
finished
=
false
;
this
.
loading
=
true
}
else
{
this
.
finished
=
false
;
this
.
loading
=
false
}
})
...
...
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