请问一下
做表格表格不显示 也没有报错 然后把template标签删了 问题解决了 请问这是因为什么呀?是我后续的代码写的有问题吗?我感觉后续代码顶多关联里面动态的数据,和表头没有关系的 这个是整个表格都没有了 也没有报错 我都不知道如何在网上查相关的问题 请问有研究过elmentUI吗?知道这是为啥吗?
<div id="app">
<el-table :data="chs" border style="width: 860px;">
<el-table-column fixed prop="fwId" label="房屋编号" width="150">
</el-table-column>
<el-table-column prop="fwtype.typeName" label="房屋类型" width="120">
</el-table-column>
<el-table-column prop="price" label="房屋价格" width="120">
</el-table-column>
<el-table-column prop="area" label="房屋面积" width="120">
</el-table-column>
<el-table-column prop="address" label="房屋地址" width="120">
</el-table-column>
<el-table-column prop="publisher.nickName" label="房屋主人" width="120">
</el-table-column>
<el-table-column fixed="right" label="操作" width="100">
<template #default="scope">
<el-button type="primary" size='small' @click='hdel(scope.row.fwId)'>删除</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination layout="prev, pager, next" :total="count" :page-size='size' @current-change='currentpage'>
</el-pagination>
</div>
</div>
<script type="text/javascript">
loadData();
function loadData() {
const App = {
data() {
return {
hs: [],
count: 0,
size: 4,
chs: []
};
},
created: function() {
this.getHouseData();
},
methods: {
getHouseData: function() {
axios.get(BASEURLFWGL + '/fw/find.action')
.then((response) => {
console.log(response);
this.hs = response.data.result.fws;
console.log(this.hs);
this.count = this.hs.length;
this.currentpage(1);
});
},
};
const app = Vue.createApp(App);
app.use(ElementPlus); //这个vue使用elmentPlus
app.mount('#app'); //这个vue作用对哪个标签范围内
}
</script>