Commit 374b31bf by hank

添加显示控制

parent ee71765f
...@@ -7,7 +7,7 @@ import { getToken, removeToken } from "@/utils/auth"; ...@@ -7,7 +7,7 @@ import { getToken, removeToken } from "@/utils/auth";
// console.log(process.env) // console.log(process.env)
const service = axios.create({ const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // api 的 base_url baseURL: process.env.VUE_APP_BASE_API, // api 的 base_url
timeout: 30 * 1000, // 请求超时时间, 30秒 timeout: 300 * 1000, // 请求超时时间, 30秒
withCredentials: true withCredentials: true
}); });
......
...@@ -12,12 +12,23 @@ ...@@ -12,12 +12,23 @@
</edit-menu>--> </edit-menu>-->
<div> <div>
<!-- <div>{{schemaData[item.dataKey]}} {{item.dataKey}}</div> --> <!-- <div>{{schemaData[item.dataKey]}} {{item.dataKey}}</div> -->
<video
v-if="item.type === 'video'"
class="image"
:src="getHostUrl(schemaData[item.dataKey].value)"
alt
/>
<img <img
v-if="item.type === 'image'" v-if="item.type === 'image'"
class="image" class="image"
:src="getHostUrl(schemaData[item.dataKey].value)" :src="getHostUrl(schemaData[item.dataKey].value)"
alt 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 <input
v-if="item.type === 'text'" v-if="item.type === 'text'"
class="edit-input" class="edit-input"
...@@ -52,7 +63,10 @@ ...@@ -52,7 +63,10 @@
:src="getHostUrl(item2[index3])" :src="getHostUrl(item2[index3])"
class="edit-input" 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 <van-uploader
result-type="dataUrl" result-type="dataUrl"
v-if="item.modelSchema[isSchemaIndex(item2)][index3].type == 'image' || item.modelSchema[isSchemaIndex(item2)][index3].type == 'video'" v-if="item.modelSchema[isSchemaIndex(item2)][index3].type == 'image' || item.modelSchema[isSchemaIndex(item2)][index3].type == 'video'"
...@@ -176,6 +190,9 @@ export default { ...@@ -176,6 +190,9 @@ export default {
this.$toast("上传失败"); this.$toast("上传失败");
}); });
}, },
checkboxChange(value) {
console.log( this.schemaData, value)
},
setSchemaData(value) { setSchemaData(value) {
this.schemaData[this.dataKey].value = value; this.schemaData[this.dataKey].value = value;
this.valueChange2(); this.valueChange2();
...@@ -236,6 +253,21 @@ input { ...@@ -236,6 +253,21 @@ input {
padding-left: 8px; padding-left: 8px;
border: none; 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 { .edit-input {
width: 97%; width: 97%;
border: 1px solid #d0d0d0; border: 1px solid #d0d0d0;
......
...@@ -92,8 +92,12 @@ export default { ...@@ -92,8 +92,12 @@ export default {
} }
this.list = this.list.concat(res.data.list); this.list = this.list.concat(res.data.list);
console.log(res.data.list.length ,10)
if (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 this.loading = false
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment