Some issues in DingTalk development (continuously updated)
Less than 1 minute
2020-10
- DingTalk does not support the use of
in thetext
tag. Please replace the spaces with Chinese full-width spaces{{' '}}
. - The
dd.switchTab
method in DingTalk has some issues. It neither throws an error nor provides any prompts. The current solution is to usedd.reLaunch
instead. - In DingTalk (and Alipay, not tested), the
<swiper>
component can only contain<swiper-item>
components. Wrapping<swiper-item>
components with aview
may cause display issues.
Example of using the swiper component
<swiper
:indicator-dots="{{indicatorDots}}"
:autoplay="{{autoplay}}"
:interval="{{interval}}"
:duration="{{duration}}"
:circular="{{circular}}"
style="height:auto"
>
<swiper-item a:for="{{banners}}">
<view onTap="goToPage" class="banner">
<image
src="{{item.picUrl||'http://bing.getlove.cn/bingImage'}}"
mode="widthFix"
class="banner-image"
/>
</view>
</swiper-item>
</swiper>
Option component m-picker
- Use
setColumnValues
to achieve multiple linkage effects. Please refer tobrand-add.js
for details. - In the
onConfirm
event,detail.value
represents the index array of the selected options, anddetail.detail
represents the value array of the selected options.
2020-11
- Very important: Do not call functions to assign values during data initialization, otherwise the page will not be able to find them.
Negative example
data: {
a: getProjectName();
}
Positive example
data:{
a:''
}
onLoad() {
this.setData({
a:getProjectName()
})
}
This post is translated using ChatGPT, please feedback if any omissions.