12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- const util = require('../../utils/util.js');
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- data:{
- type:Object,
- value:null,
- observer: function(newVal, oldVal, changedPath) {
- var that = this;
- const {textTag} = newVal
- for(var i = 0,n = textTag.length; i < n; i ++) {
- var obj = textTag[i];
- obj.bgColor = util.colorToRgba(obj.bgColor);
- obj.color = util.colorToRgba(obj.color);
- textTag[i] = obj;
- }
- newVal.textTag = textTag;
- that.setData({
- data:newVal
- });
- }
- }
- },
- /**
- * 组件的初始数据
- */
- data: {
-
- },
- /**
- * 组件的方法列表
- */
- methods: {
- tapItemAction() {
- const id = this.properties.data.id;
- this.triggerEvent('action',{
- id:id
- });
- wx.navigateTo({
- url: `/pages/houseDetail/houseDetail?id=${id}`
- });
- },
- }
- })
|