在根路径中找到 app.config.ts
文件
在里面的属性中定义需要引入的第三方组件
如:
usingComponents: {
// 定义需要引入的第三方组件,如:
'wux-calendar': './components/Calendar/index',
myQrcode: './components/TestQrcode/index',
},
之后在页面中直接使用即可
如:
<View>
<wux-calendar
id="x_calendar"
config={{
showLunar: true,
theme: 'default',
defaultDate: date,
autoChoosedWhenJump: true,
onlyShowCurrentMonth: true,
disableMode: {
type: 'before',
date: dateCollection.today,
},
afterTapDate: handleAfterTapDate,
}}
/>
</View>