template/admin/src/components/mobilePageDiy/home_service.vue
data() {
return {
defaultConfig: {
name: 'customerService',
timestamp: this.num,
setUp: {
tabVal: 0,
},
logoConfig: {
title: '最多可添加1张图片,建议宽度100 * 100px',
url: '',
},
// 页面间距
topConfig: {
title: '距顶部比例',
val: 0,
min: 0,
},
isFeedback: {
title: '是否使用留言表单',
val: 0,
},
itemStyle: {
title: '显示类型',
name: 'itemSstyle',
type: 0,
list: [
{
val: '单列',
icon: 'iconzuoyoutuwen',
},
{
val: '两列',
icon: 'iconlianglie',
},
],
},
},
imgUrl: '',
pageData: {},
mTop: 0,
feedback: true,
itemStyle: 0,
};
},
methods: {
setConfig(data) {
if (!data) return;
if (data.topConfig) {
this.mTop = data.topConfig.val;
this.imgUrl = data.logoConfig.url;
// this.feedback = data.isFeedback.val;
this.itemStyle = data.itemStyle.type || 0;
}
},
},
template/admin/src/components/mobileConfigDiy/c_home_service.vue
'configObj.setUp.tabVal': {
handler(nVal, oVal) {
var arr = [this.rCom[0]];
if (nVal == 0) {
let tempArr = [
{
components: toolCom.c_upload_img,
configNme: 'logoConfig',
},
{
components: toolCom.c_is_show,
configNme: 'isFeedback',
},
];
this.rCom = arr.concat(tempArr);
} else {
let tempArr = [
{
components: toolCom.c_slider,
configNme: 'topConfig',
},
{
components: toolCom.c_txt_tab,
configNme: 'itemStyle',
},
];
this.rCom = arr.concat(tempArr);
}
},
deep: true,
},
为什么添加了没有作用的呢,还需要再哪里添加的呢?????主要是,在线留言的表单,需要单独出来加到页面上。。。。