WXML
<view class="echarts_box">
<ec-canvas id="mychart-dom-line" canvas-id="mychart" ec="{{ ec }}"></ec-canvas>
</view>
JS
onReady: function () {
// 获取组件
this.ecComponent = this.selectComponent('#mychart');
// this.init()
console.log('this.ecComponent', this.ecComponent)
},
JSON
{
"usingComponents": {
"ec-canvas": "../../ec-canvas/ec-canvas",
"van-popup": "@vant/weapp/popup/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-picker": "@vant/weapp/picker/index"
}
}
不管我怎么写 返回的都是null