Chameleon 里怎么在 Vue 页面中正确使用 cml-ui 组件?
我用 Chameleon 搭建了一个多端项目,想在 Vue 页面里引入 cml-ui 的按钮组件,但一直报错说找不到组件。是不是要额外注册?
我试过直接在 template 里写 <cml-button>,也试过在 components 里手动引入,都不行。控制台提示“Unknown custom element: <cml-button>”。
<template>
<view class="container">
<cml-button type="primary">点击</cml-button>
</view>
</template>
<script>
export default {
name: 'MyPage'
}
</script>
搞定