提交 7d54165c 编写于 作者: fxy060608's avatar fxy060608

build uni runtime

上级 f445b13a
...@@ -501,6 +501,15 @@ function processEventExtra (vm, extra) { ...@@ -501,6 +501,15 @@ function processEventExtra (vm, extra) {
return extraObj return extraObj
} }
function getObjByArray (arr) {
const obj = {};
for (let i = 1; i < arr.length; i++) {
const element = arr[i];
obj[element[0]] = element[1];
}
return obj
}
function processEventArgs (vm, event, args = [], extra = [], isCustom, methodName) { function processEventArgs (vm, event, args = [], extra = [], isCustom, methodName) {
let isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象 let isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
if (isCustom) { // 自定义事件 if (isCustom) { // 自定义事件
...@@ -530,7 +539,9 @@ function processEventArgs (vm, event, args = [], extra = [], isCustom, methodNam ...@@ -530,7 +539,9 @@ function processEventArgs (vm, event, args = [], extra = [], isCustom, methodNam
} }
} }
} else { } else {
if (typeof arg === 'string' && hasOwn(extraObj, arg)) { if (Array.isArray(arg) && arg[0] === 'o') {
ret.push(getObjByArray(arg));
} else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
ret.push(extraObj[arg]); ret.push(extraObj[arg]);
} else { } else {
ret.push(arg); ret.push(arg);
......
{ {
"name": "@dcloudio/uni-app-plus", "name": "@dcloudio/uni-app-plus",
"version": "0.0.218", "version": "0.0.219",
"description": "uni-app app-plus", "description": "uni-app app-plus",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
......
...@@ -646,6 +646,15 @@ function processEventExtra (vm, extra) { ...@@ -646,6 +646,15 @@ function processEventExtra (vm, extra) {
return extraObj return extraObj
} }
function getObjByArray (arr) {
const obj = {};
for (let i = 1; i < arr.length; i++) {
const element = arr[i];
obj[element[0]] = element[1];
}
return obj
}
function processEventArgs (vm, event, args = [], extra = [], isCustom, methodName) { function processEventArgs (vm, event, args = [], extra = [], isCustom, methodName) {
let isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象 let isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
if (isCustom) { // 自定义事件 if (isCustom) { // 自定义事件
...@@ -675,7 +684,9 @@ function processEventArgs (vm, event, args = [], extra = [], isCustom, methodNam ...@@ -675,7 +684,9 @@ function processEventArgs (vm, event, args = [], extra = [], isCustom, methodNam
} }
} }
} else { } else {
if (typeof arg === 'string' && hasOwn(extraObj, arg)) { if (Array.isArray(arg) && arg[0] === 'o') {
ret.push(getObjByArray(arg));
} else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
ret.push(extraObj[arg]); ret.push(extraObj[arg]);
} else { } else {
ret.push(arg); ret.push(arg);
......
{ {
"name": "@dcloudio/uni-mp-baidu", "name": "@dcloudio/uni-mp-baidu",
"version": "0.0.813", "version": "0.0.814",
"description": "uni-app mp-baidu", "description": "uni-app mp-baidu",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
......
...@@ -681,6 +681,15 @@ function processEventExtra (vm, extra) { ...@@ -681,6 +681,15 @@ function processEventExtra (vm, extra) {
return extraObj return extraObj
} }
function getObjByArray (arr) {
const obj = {};
for (let i = 1; i < arr.length; i++) {
const element = arr[i];
obj[element[0]] = element[1];
}
return obj
}
function processEventArgs (vm, event, args = [], extra = [], isCustom, methodName) { function processEventArgs (vm, event, args = [], extra = [], isCustom, methodName) {
let isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象 let isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
if (isCustom) { // 自定义事件 if (isCustom) { // 自定义事件
...@@ -710,7 +719,9 @@ function processEventArgs (vm, event, args = [], extra = [], isCustom, methodNam ...@@ -710,7 +719,9 @@ function processEventArgs (vm, event, args = [], extra = [], isCustom, methodNam
} }
} }
} else { } else {
if (typeof arg === 'string' && hasOwn(extraObj, arg)) { if (Array.isArray(arg) && arg[0] === 'o') {
ret.push(getObjByArray(arg));
} else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
ret.push(extraObj[arg]); ret.push(extraObj[arg]);
} else { } else {
ret.push(arg); ret.push(arg);
......
{ {
"name": "@dcloudio/uni-mp-toutiao", "name": "@dcloudio/uni-mp-toutiao",
"version": "0.0.313", "version": "0.0.314",
"description": "uni-app mp-toutiao", "description": "uni-app mp-toutiao",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
......
...@@ -528,6 +528,15 @@ function processEventExtra (vm, extra) { ...@@ -528,6 +528,15 @@ function processEventExtra (vm, extra) {
return extraObj return extraObj
} }
function getObjByArray (arr) {
const obj = {};
for (let i = 1; i < arr.length; i++) {
const element = arr[i];
obj[element[0]] = element[1];
}
return obj
}
function processEventArgs (vm, event, args = [], extra = [], isCustom, methodName) { function processEventArgs (vm, event, args = [], extra = [], isCustom, methodName) {
let isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象 let isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
if (isCustom) { // 自定义事件 if (isCustom) { // 自定义事件
...@@ -557,7 +566,9 @@ function processEventArgs (vm, event, args = [], extra = [], isCustom, methodNam ...@@ -557,7 +566,9 @@ function processEventArgs (vm, event, args = [], extra = [], isCustom, methodNam
} }
} }
} else { } else {
if (typeof arg === 'string' && hasOwn(extraObj, arg)) { if (Array.isArray(arg) && arg[0] === 'o') {
ret.push(getObjByArray(arg));
} else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
ret.push(extraObj[arg]); ret.push(extraObj[arg]);
} else { } else {
ret.push(arg); ret.push(arg);
......
{ {
"name": "@dcloudio/uni-mp-weixin", "name": "@dcloudio/uni-mp-weixin",
"version": "0.0.937", "version": "0.0.938",
"description": "uni-app mp-weixin", "description": "uni-app mp-weixin",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
......
...@@ -207,6 +207,15 @@ function processEventExtra (vm, extra) { ...@@ -207,6 +207,15 @@ function processEventExtra (vm, extra) {
return extraObj return extraObj
} }
function getObjByArray (arr) {
const obj = {}
for (let i = 1; i < arr.length; i++) {
const element = arr[i]
obj[element[0]] = element[1]
}
return obj
}
function processEventArgs (vm, event, args = [], extra = [], isCustom, methodName) { function processEventArgs (vm, event, args = [], extra = [], isCustom, methodName) {
let isCustomMPEvent = false // wxcomponent 组件,传递原始 event 对象 let isCustomMPEvent = false // wxcomponent 组件,传递原始 event 对象
if (isCustom) { // 自定义事件 if (isCustom) { // 自定义事件
...@@ -236,7 +245,9 @@ function processEventArgs (vm, event, args = [], extra = [], isCustom, methodNam ...@@ -236,7 +245,9 @@ function processEventArgs (vm, event, args = [], extra = [], isCustom, methodNam
} }
} }
} else { } else {
if (typeof arg === 'string' && hasOwn(extraObj, arg)) { if (Array.isArray(arg) && arg[0] === 'o') {
ret.push(getObjByArray(arg))
} else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
ret.push(extraObj[arg]) ret.push(extraObj[arg])
} else { } else {
ret.push(arg) ret.push(arg)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册