最近自己在做小程序练习,分享一下我遇到的小坑data数据更新this.data.key = value
this.setData({
key: value
}) requireconst util = require('../../utils/util.js') background-image不能使用静态文件,只能使用base64和网络图片 可以用<img>解决
background: #fff url(data:image/jpeg;base64,***)
<image class="logo" src="/images/logo.png" mode="cover"></image> 组件样式app.wxss 的样式不能应用到组件内部 可以按需引用 import: “”
@import "/app.wxss"; textarea事件传参<view id="tapTest" data-hi="WeChat" bindtap="tapName"> Click me! </view>
Page({
tapName(event) {
console.log(event.currentTarget.dataset.hi)
}
}) animationanimation不能直接绑定中组件上 外面包裹一层<view>
<view animation={{animation}}>
<my-component></my-component>
</view> checkBox<checkbox-group bindchange="checkboxChange">
<view bindtap="bindTap">
<view catchtap='catchTap'">
<checkbox value="{{value}}" checked="{{checked}}"/>
</view>
</view>
</checkbox-group> 相关文章: 微信小程序 开发中遇到问题总结 微信小程序开发遇到的问题汇总 相关视频: 开发微信小程序视频教程 以上就是小结—在微信小程序开发中会遇到的一些问题的详细内容,更多请关注模板之家(www.mb5.com.cn)其它相关文章! |