微信小程序组件 模块化错和叹号

wxml 页面
<import src="/pages/lianxi/lianxi.wxml" />  //引入文件
<view style='position:fixed;left:0;top:0;'>
<template is="showToastMyTan">
<text>haha</text>
</template>
</view>
 
//模板
<template name="showToastCuo">
<view class='showToast-box'>
<view class='showToast-all'>
<view class='showToast-img'>
<image src='../../imgs/towast/icon_1.png'></image>
</view>
<view class=' showToast-text'>
<text>失败</text>
</view>
</view>
</view>
</template>
<template name="showToastMyTan">
<view class='showToast-box'>
<view class='showToast-all'>
<view class='showToast-img'>
<image src='../../imgs/towast/icon_2.png'></image>
</view>
<view class=' showToast-text'>
<text>失败</text>
</view>
</view>
</view>
</template>
 
 
/* 弹出框 */
.showToast-box{
width: 100%;
height: 100%;
position: fixed;
z-index: 1000;
}
.showToast-all{
width:180rpx;
height:220rpx;
background:rgb(90,90,90);
border-radius:13rpx;
overflow:hidden;
box-sizing:border-box;
margin: 0 auto;
margin-top: 50%;
}
.showToast-img{
width:45%;
height:45%;
margin:0 auto;
margin-top:40rpx;
}
.showToast-img image{
width:100%;
height:100%;
}
.showToast-text{
padding:5rpx;
width:100%;
margin-top:5rpx;
color:#fff;
font-size:31rpx;
box-sizing:border-box;
overflow:hidden;
display: flex;
justify-content: center;
align-items: center;
}
 
 
 

转载于:https://www.cnblogs.com/dianzan/p/7872274.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值