在plugin目录下新建一个package.json文件
{
"dependencies": {
"tb-shop-picture": "*",
"tb-shop-video": "*"
}
}
进入到plugin目录下,执行npm i命令
cd ./plugin
npm i
在 projectRootPath/plugin/components/index/index.json引入
{
"component": true,
"usingComponents": {
"tb-shop-picture": "tb-shop-picture",
"tb-shop-video": "tb-shop-video"
}
}
图片组件
<tb-shop-picture source="{{ uri:image}}" style="{{width: `${logoWidth}rpx`, height:`${logoHeight}rpx` }}"/>
版权声明:本文为HuYiMin1998原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。