提交 5a069e50 编写于 作者: fxy060608's avatar fxy060608

build uni runtime (includes=>indexOf)

上级 6f5accca
......@@ -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)
};
}
......
{
"name": "@dcloudio/uni-app-plus",
"version": "0.0.222",
"version": "0.0.223",
"description": "uni-app app-plus",
"main": "dist/index.js",
"scripts": {
......
......@@ -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)
};
}
......
{
"name": "@dcloudio/uni-mp-baidu",
"version": "0.0.817",
"version": "0.0.818",
"description": "uni-app mp-baidu",
"main": "dist/index.js",
"scripts": {
......
......@@ -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)
};
}
......
{
"name": "@dcloudio/uni-mp-toutiao",
"version": "0.0.317",
"version": "0.0.318",
"description": "uni-app mp-toutiao",
"main": "dist/index.js",
"scripts": {
......
......@@ -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)
};
}
......
{
"name": "@dcloudio/uni-mp-weixin",
"version": "0.0.941",
"version": "0.0.942",
"description": "uni-app mp-weixin",
"main": "dist/index.js",
"scripts": {
......
......@@ -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) {
......
......@@ -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)
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册