Commit a26ddf25 by 袁成

fix: 通知公告标题设置

parent f9300f4a
......@@ -2,7 +2,7 @@
<div class="newsList">
<div class="newsList-title">
<span class="newsList-title-side"></span>
通知公告
{{fileTitle}}
<span class="newsList-title-more" @click="handleMore">
<span>更多</span>
<Icon type="ios-arrow-forward" class="more-icon" />
......@@ -37,16 +37,18 @@ export default {
newsList: [1,2,3],
fileWidth: '100%',
modalShow: false,
list: []
list: [],
fileTitle: '通知公告'
}
},
created() {
// let prop = this.itemSetting.properties
// if (prop && Array.isArray(prop)) {
// let num = prop[0] ? prop[0].num : 2
// let str = Math.floor(100 / num) + '%'
// this.fileWidth = `calc(${str} - 10px)`
// }
let prop = this.itemSetting.properties
if (prop) {
let num = prop.num? prop.num: 2
let str = Math.floor(100 / num) + '%'
this.fileTitle = prop.fileTitle
this.fileWidth = `calc(${str} - 10px)`
}
},
mounted() {
},
......
......@@ -7,6 +7,9 @@
<FormItem label="每行个数">
<Input v-model="config.num" type="number"></Input>
</FormItem>
<FormItem label="标题">
<Input v-model="config.fileTitle"></Input>
</FormItem>
</Form>
</div>
</Panel>
......@@ -34,14 +37,17 @@ export default {
value1: '1',
config: {
num: 1,
fileTitle: '通知公告'
}
}
},
created() {
let prop = this.itemSetting.properties[0]
let prop = this.itemSetting.properties
if (prop) {
this.config = prop
}
} else {
this.itemSetting.properties = this.config
}
},
}
</script>
......
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 to comment