s***@qq.com
s***@qq.com
  • 发布:2020-03-30 12:39
  • 更新:2020-03-30 12:39
  • 阅读:1012

renderJS中使用创建vue对象

分类:uni-app

需要在renderJS中引入vue-easeTable,
该插件的声明方式这样的:
new Vue({
el: '#app',
data: function() {
return {
tableData: [
{"name":"赵伟","tel":"1561987","hobby":"钢琴、书法、唱歌","address":"上海市黄浦区金陵东路569号17楼"},
{"name":"李伟","tel":"182
1538","hobby":"钢琴、书法、唱歌","address":"上海市奉贤区南桥镇立新路12号2楼"},
{"name":"孙伟","tel":"1610097","hobby":"钢琴、书法、唱歌","address":"上海市崇明县城桥镇八一路739号"},
{"name":"周伟","tel":"197
1123","hobby":"钢琴、书法、唱歌","address":"上海市青浦区青浦镇章浜路24号"},
{"name":"吴伟","tel":"183*****6678","hobby":"钢琴、书法、唱歌","address":"上海市松江区乐都西路867-871号"}
],
columns: [
{field: 'name', title:'姓名', width: 100, titleAlign: 'center',columnAlign:'center'},
{field: 'tel', title: '手机号码', width: 260, titleAlign: 'center',columnAlign:'center'},
{field: 'hobby', title: '爱好', width: 330, titleAlign: 'center',columnAlign:'center'},
{field: 'address', title: '地址', titleAlign: 'center',columnAlign:'left'}
]
}
}
})

在模板化之后
// import css
import 'vue-easytable/libs/themes-base/index.css'

// import table and pagination comp
import {VTable,VPagination} from 'vue-easytable'

// Register to global
Vue.component(VTable.name, VTable)
Vue.component(VPagination.name, VPagination)

现在我需要在App端使用renderJS将该插件引入,可是怎么测试都有问题,请教一下,我具体应该怎么声明以及使用,谢谢!

2020-03-30 12:39 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复