diff --git a/packages/uni-app-plus/dist/index.js b/packages/uni-app-plus/dist/index.js index 7060d47f7509ce3ba26a9e80a75c3b9dbe00849e..27ecea6103610673ab851778d41ef492b33e2353 100644 --- a/packages/uni-app-plus/dist/index.js +++ b/packages/uni-app-plus/dist/index.js @@ -173,7 +173,7 @@ function processArgs (methodName, fromArgs, argsOption = {}, returnValue = {}, k } else if (isPlainObject(keyOption)) { // {name:newName,value:value}可重新指定参数 key:value toArgs[keyOption.name ? keyOption.name : key] = keyOption.value; } - } else if (CALLBACKS.includes(key)) { + } else if (CALLBACKS.indexOf(key) !== -1) { toArgs[key] = processCallback(methodName, fromArgs[key], returnValue); } else { if (!keepFromArgs) { @@ -345,10 +345,10 @@ function getData (vueOptions, context) { // 对 data 格式化 data = JSON.parse(JSON.stringify(data)); } catch (e) {} - } - - if (!isPlainObject(data)) { - data = {}; + } + + if (!isPlainObject(data)) { + data = {}; } Object.keys(methods).forEach(methodName => { @@ -426,13 +426,13 @@ function getProperties (props, isBehavior = false) { value = value(); } properties[key] = { - type: PROP_TYPES.includes(opts.type) ? opts.type : null, + type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null, value, observer: createObserver(key) }; } else { // content:String properties[key] = { - type: PROP_TYPES.includes(opts) ? opts : null, + type: PROP_TYPES.indexOf(opts) !== -1 ? opts : null, observer: createObserver(key) }; } diff --git a/packages/uni-app-plus/package.json b/packages/uni-app-plus/package.json index 2956a7d62a3f6f5f077d04d4a3e2b430bbed765b..4466e963db03a2cf6b8922aa710d27c1b107f55d 100644 --- a/packages/uni-app-plus/package.json +++ b/packages/uni-app-plus/package.json @@ -1,6 +1,6 @@ { "name": "@dcloudio/uni-app-plus", - "version": "0.0.222", + "version": "0.0.223", "description": "uni-app app-plus", "main": "dist/index.js", "scripts": { diff --git a/packages/uni-mp-baidu/dist/index.js b/packages/uni-mp-baidu/dist/index.js index 003f332cd96a37588b16aefa7ad8ae32d6be5954..356b036ae2e994a470b0dacadc337470cd9c5fa6 100644 --- a/packages/uni-mp-baidu/dist/index.js +++ b/packages/uni-mp-baidu/dist/index.js @@ -270,7 +270,7 @@ function processArgs (methodName, fromArgs, argsOption = {}, returnValue = {}, k } else if (isPlainObject(keyOption)) { // {name:newName,value:value}可重新指定参数 key:value toArgs[keyOption.name ? keyOption.name : key] = keyOption.value; } - } else if (CALLBACKS.includes(key)) { + } else if (CALLBACKS.indexOf(key) !== -1) { toArgs[key] = processCallback(methodName, fromArgs[key], returnValue); } else { if (!keepFromArgs) { @@ -480,10 +480,10 @@ function getData (vueOptions, context) { // 对 data 格式化 data = JSON.parse(JSON.stringify(data)); } catch (e) {} - } - - if (!isPlainObject(data)) { - data = {}; + } + + if (!isPlainObject(data)) { + data = {}; } Object.keys(methods).forEach(methodName => { @@ -561,13 +561,13 @@ function getProperties (props, isBehavior = false) { value = value(); } properties[key] = { - type: PROP_TYPES.includes(opts.type) ? opts.type : null, + type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null, value, observer: createObserver(key) }; } else { // content:String properties[key] = { - type: PROP_TYPES.includes(opts) ? opts : null, + type: PROP_TYPES.indexOf(opts) !== -1 ? opts : null, observer: createObserver(key) }; } diff --git a/packages/uni-mp-baidu/package.json b/packages/uni-mp-baidu/package.json index 63f4cb6f8db6639ae93f18eed689127c3ef4acbe..506159b0eae08cc88d2a525c713417f905eaaa71 100644 --- a/packages/uni-mp-baidu/package.json +++ b/packages/uni-mp-baidu/package.json @@ -1,6 +1,6 @@ { "name": "@dcloudio/uni-mp-baidu", - "version": "0.0.817", + "version": "0.0.818", "description": "uni-app mp-baidu", "main": "dist/index.js", "scripts": { diff --git a/packages/uni-mp-toutiao/dist/index.js b/packages/uni-mp-toutiao/dist/index.js index 9ce5941910f3fcec5cb80e88a21aee256cdffaf8..655b83ddbfdfe2b452038582055d094424617bdd 100644 --- a/packages/uni-mp-toutiao/dist/index.js +++ b/packages/uni-mp-toutiao/dist/index.js @@ -331,7 +331,7 @@ function processArgs (methodName, fromArgs, argsOption = {}, returnValue = {}, k } else if (isPlainObject(keyOption)) { // {name:newName,value:value}可重新指定参数 key:value toArgs[keyOption.name ? keyOption.name : key] = keyOption.value; } - } else if (CALLBACKS.includes(key)) { + } else if (CALLBACKS.indexOf(key) !== -1) { toArgs[key] = processCallback(methodName, fromArgs[key], returnValue); } else { if (!keepFromArgs) { @@ -525,10 +525,10 @@ function getData (vueOptions, context) { // 对 data 格式化 data = JSON.parse(JSON.stringify(data)); } catch (e) {} - } - - if (!isPlainObject(data)) { - data = {}; + } + + if (!isPlainObject(data)) { + data = {}; } Object.keys(methods).forEach(methodName => { @@ -606,13 +606,13 @@ function getProperties (props, isBehavior = false) { value = value(); } properties[key] = { - type: PROP_TYPES.includes(opts.type) ? opts.type : null, + type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null, value, observer: createObserver(key) }; } else { // content:String properties[key] = { - type: PROP_TYPES.includes(opts) ? opts : null, + type: PROP_TYPES.indexOf(opts) !== -1 ? opts : null, observer: createObserver(key) }; } diff --git a/packages/uni-mp-toutiao/package.json b/packages/uni-mp-toutiao/package.json index ec08f6faaf6a3a8cd6ed8acd9b324163dd094688..a01bb1a01fa8b6b7f63ef3a6b4b108be69129a66 100644 --- a/packages/uni-mp-toutiao/package.json +++ b/packages/uni-mp-toutiao/package.json @@ -1,6 +1,6 @@ { "name": "@dcloudio/uni-mp-toutiao", - "version": "0.0.317", + "version": "0.0.318", "description": "uni-app mp-toutiao", "main": "dist/index.js", "scripts": { diff --git a/packages/uni-mp-weixin/dist/index.js b/packages/uni-mp-weixin/dist/index.js index 938a0688c7beb976db80bc44088b5639a4e4a655..e688db42947164ec85d0891b717f34d38fddf657 100644 --- a/packages/uni-mp-weixin/dist/index.js +++ b/packages/uni-mp-weixin/dist/index.js @@ -173,7 +173,7 @@ function processArgs (methodName, fromArgs, argsOption = {}, returnValue = {}, k } else if (isPlainObject(keyOption)) { // {name:newName,value:value}可重新指定参数 key:value toArgs[keyOption.name ? keyOption.name : key] = keyOption.value; } - } else if (CALLBACKS.includes(key)) { + } else if (CALLBACKS.indexOf(key) !== -1) { toArgs[key] = processCallback(methodName, fromArgs[key], returnValue); } else { if (!keepFromArgs) { @@ -372,10 +372,10 @@ function getData (vueOptions, context) { // 对 data 格式化 data = JSON.parse(JSON.stringify(data)); } catch (e) {} - } - - if (!isPlainObject(data)) { - data = {}; + } + + if (!isPlainObject(data)) { + data = {}; } Object.keys(methods).forEach(methodName => { @@ -453,13 +453,13 @@ function getProperties (props, isBehavior = false) { value = value(); } properties[key] = { - type: PROP_TYPES.includes(opts.type) ? opts.type : null, + type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null, value, observer: createObserver(key) }; } else { // content:String properties[key] = { - type: PROP_TYPES.includes(opts) ? opts : null, + type: PROP_TYPES.indexOf(opts) !== -1 ? opts : null, observer: createObserver(key) }; } diff --git a/packages/uni-mp-weixin/package.json b/packages/uni-mp-weixin/package.json index bc3caa4a94e9ca0898f6007bc820b46148b09c43..8f96c5ab667f425cbb3fb25e68af07578d3a5508 100644 --- a/packages/uni-mp-weixin/package.json +++ b/packages/uni-mp-weixin/package.json @@ -1,6 +1,6 @@ { "name": "@dcloudio/uni-mp-weixin", - "version": "0.0.941", + "version": "0.0.942", "description": "uni-app mp-weixin", "main": "dist/index.js", "scripts": { diff --git a/src/core/runtime/wrapper.js b/src/core/runtime/wrapper.js index 8b33a4be53d48943dac58e9257c56aa13c7e48cc..f6a3e7e214fbccadaf75e147c9c625b5c80374b5 100644 --- a/src/core/runtime/wrapper.js +++ b/src/core/runtime/wrapper.js @@ -39,7 +39,7 @@ function processArgs (methodName, fromArgs, argsOption = {}, returnValue = {}, k } else if (isPlainObject(keyOption)) { // {name:newName,value:value}可重新指定参数 key:value toArgs[keyOption.name ? keyOption.name : key] = keyOption.value } - } else if (CALLBACKS.includes(key)) { + } else if (CALLBACKS.indexOf(key) !== -1) { toArgs[key] = processCallback(methodName, fromArgs[key], returnValue) } else { if (!keepFromArgs) { diff --git a/src/core/runtime/wrapper/util.js b/src/core/runtime/wrapper/util.js index 08e2e9c627b9b989dac1666e89d5f445eb9e16cd..937f86a6ae9cae183f8adf13d544476996fe10c2 100644 --- a/src/core/runtime/wrapper/util.js +++ b/src/core/runtime/wrapper/util.js @@ -41,10 +41,10 @@ export function getData (vueOptions, context) { // 对 data 格式化 data = JSON.parse(JSON.stringify(data)) } catch (e) {} - } - - if (!isPlainObject(data)) { - data = {} + } + + if (!isPlainObject(data)) { + data = {} } Object.keys(methods).forEach(methodName => { @@ -122,13 +122,13 @@ export function getProperties (props, isBehavior = false) { value = value() } properties[key] = { - type: PROP_TYPES.includes(opts.type) ? opts.type : null, + type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null, value, observer: createObserver(key) } } else { // content:String properties[key] = { - type: PROP_TYPES.includes(opts) ? opts : null, + type: PROP_TYPES.indexOf(opts) !== -1 ? opts : null, observer: createObserver(key) } }