Commit 374b31bf by hank

添加显示控制

parent ee71765f
......@@ -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: 300 * 1000, // 请求超时时间, 30秒
withCredentials: true
});
......
......@@ -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;
......
......@@ -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
}
})
......
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