12345678910111213141516171819202122232425262728293031323334 |
- const util = require("../../utils/util.js");
- Component({
- properties: {
- show:{
- type: Boolean,
- observer: function(newVal, oldVal) {
- this.setData({ show: newVal })
- }
- },
- _CONFIG_: {
- type: Object,
- observer: function(newVal, oldVal) {
- if (!util.isObjEmpty(newVal) && typeof (newVal.score) != 'undefined') newVal.score = newVal.score.toString();
- this.setData({ _CONFIG_: newVal });
- }
- }
- },
- data: {
- config: util.config,
- _CONFIG_: {
- title: '',
- content: '',
- status: 0,
- score: '',
- icon: 'read-ok'
- }
- },
- methods: {
- close(){
- this.setData({show:false});
- this.triggerEvent("close", { show: this.data.show})
- }
- }
- })
|