vue中对象的用法

if(this.data){
  var newValue = this.data.showContent;
  console.log(newValue);
  if(data) {
    for (var i in data) {
      newValue = newValue.replace("${" + i + "}", data[i]);
    }
    for(var i in data){
      this.completeTask = i;
      break;
    }

  }
  console.log(newValue);
  if(newValue)

this.render(document.getElementById(this.data.id),newValue);

render(dom,content){
  if(dom){
    dom.innerHTML = content;
  }
},
//log的内容
 
<div style="display: inline-block;vertical-align: middle;color:#666">

          <p style=" font-size:18px">${num}</p>
          <p style=" font-size:14px;margin-top:7px">待办事项</p>
        </div>
        <div style=" height: 100%;width: 0px;display: inline-block;vertical-align: middle;"></div>
info-template.vue?9f0e:99 <div style="display: inline-block;vertical-align: middle;color:#666">
          <p style=" font-size:18px">0</p>
          <p style=" font-size:14px;margin-top:7px">待办事项</p>
        </div>
        <div style=" height: 100%;width: 0px;display: inline-block;vertical-align: middle;"></div>

猜你喜欢

转载自blog.csdn.net/qq_39692513/article/details/80856562
今日推荐