提交 4c8bf949 编写于 作者: fxy060608's avatar fxy060608

feat(runtime): uni-mp-weixin 增加最低版本检查

上级 4e6071cd
...@@ -589,7 +589,13 @@ function createApp (vm) { ...@@ -589,7 +589,13 @@ function createApp (vm) {
}); });
const appOptions = { const appOptions = {
onLaunch (args) { onLaunch (args) {
{
if (!wx.canIUse('nextTick')) { // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
}
}
this.$vm = vm; this.$vm = vm;
this.$vm._isMounted = true; this.$vm._isMounted = true;
......
{ {
"name": "@dcloudio/uni-mp-weixin", "name": "@dcloudio/uni-mp-weixin",
"version": "0.0.924", "version": "0.0.925",
"description": "uni-app mp-weixin", "description": "uni-app mp-weixin",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
......
...@@ -40,7 +40,13 @@ export function createApp (vm) { ...@@ -40,7 +40,13 @@ export function createApp (vm) {
}) })
const appOptions = { const appOptions = {
onLaunch (args) { onLaunch (args) {
if (__PLATFORM__ === 'mp-weixin') {
if (!wx.canIUse('nextTick')) { // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上')
}
}
this.$vm = vm this.$vm = vm
this.$vm._isMounted = true this.$vm._isMounted = true
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册