第一步

<tr><td style=" width: 20%;font-weight:bold;text-align:left;">ΔX:</td>
<td :title="basedata" style="text-align:left;width:45%;word-break:keep-all;white-space:nowrap;
overflow:hidden;text-overflow:ellipsis;">{{basedata[0].createDate}}</td></tr>
<tr><td style=" font-weight:bold;text-align:left;">ΔY:</td>

首先是上面这段代码,下面是取数据

Vue项目中得到数据并且渲染到html页面上_sed

初始化

 data() {
return {
basedata:[{
"X": 0,
"Y": 0,
"Z": 0,
"createDate": "1"}],//条件封装对象

};
},

方法

mounted() {
this.loadMap();
// this.orientClick();
window.openshow=this.openshow;
window.opendata=this.opendata;
window.openwarn=this.openwarn;
window.orientClick=this.orientClick;



},

关键代码

Vue项目中得到数据并且渲染到html页面上_html_02

methods: {
loadMap () {

//标注中的
var qs = require('qs');
// 传递参数
axios.post("/seata",qs.stringify({
"id":1,
"beginDate":"2019-04-26 10:00:00",
"endDate":"2021-04-21 10:00:00",
"version":3,
"sign":"07a36e4"}))
.then((response) => {
this.basedata=response.data.basedata;
// this.membe## 标题rList = response.data.data;

})
},

关键代码

Vue项目中得到数据并且渲染到html页面上_vue.js_03

可以在页面中看到已经渲染上了

Vue项目中得到数据并且渲染到html页面上_初始化_04


新创建一个公众号 Rockey小何同学 想相互交流的同学可以关注一下哈! 感谢支持!