From bcde6e1b0f423c9e9dc624e1ce8217d0d496f74e Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Fri, 3 Jan 2025 21:03:45 +0800 Subject: [PATCH] chore: build --- .../uni-app-harmony/dist/uni.runtime.esm.js | 6 +- .../uni-app-plus/dist/uni.x.runtime.esm.js | 66 +++++++++++++++-- .../uni-app-vue/dist/uvue.runtime.esm.dev.js | 71 ++++++++++--------- .../uni-app-vue/dist/uvue.runtime.esm.prod.js | 71 ++++++++++--------- packages/uni-mp-alipay/dist/uni.api.esm.js | 32 ++++----- packages/uni-mp-baidu/dist/uni.api.esm.js | 32 ++++----- packages/uni-mp-jd/dist/uni.api.esm.js | 32 ++++----- packages/uni-mp-kuaishou/dist/uni.api.esm.js | 32 ++++----- packages/uni-mp-lark/dist/uni.api.esm.js | 32 ++++----- packages/uni-mp-qq/dist/uni.api.esm.js | 32 ++++----- packages/uni-mp-toutiao/dist-x/uni.api.esm.js | 32 ++++----- packages/uni-mp-toutiao/dist/uni.api.esm.js | 32 ++++----- packages/uni-mp-vue/dist-x/vue.runtime.esm.js | 4 +- packages/uni-mp-vue/dist/vue.runtime.esm.js | 4 +- packages/uni-mp-weixin/dist-x/uni.api.esm.js | 32 ++++----- packages/uni-mp-weixin/dist/uni.api.esm.js | 32 ++++----- packages/uni-mp-xhs/dist/uni.api.esm.js | 32 ++++----- .../uni-quickapp-webview/dist/uni.api.esm.js | 32 ++++----- 18 files changed, 339 insertions(+), 267 deletions(-) diff --git a/packages/uni-app-harmony/dist/uni.runtime.esm.js b/packages/uni-app-harmony/dist/uni.runtime.esm.js index 5c174cfaec2..580339fdeee 100644 --- a/packages/uni-app-harmony/dist/uni.runtime.esm.js +++ b/packages/uni-app-harmony/dist/uni.runtime.esm.js @@ -12634,7 +12634,7 @@ const $navigateTo = (args, { resolve, reject }) => { const [aniType, aniDuration] = initAnimation(path, animationType, animationDuration); navigate(path, () => { _navigateTo({ - url, + url: url, path, query, events, @@ -12775,7 +12775,7 @@ const redirectTo = defineAsyncApi(API_REDIRECT_TO, ({ url }, { resolve, reject } const { path, query } = parseUrl(url); navigate(path, () => { _redirectTo({ - url, + url: url, path, query, }) @@ -12860,7 +12860,7 @@ const $switchTab = (args, { resolve, reject }) => { const { path, query } = parseUrl(url); navigate(path, () => { _switchTab({ - url, + url: url, path, query, }) diff --git a/packages/uni-app-plus/dist/uni.x.runtime.esm.js b/packages/uni-app-plus/dist/uni.x.runtime.esm.js index baecc82104b..8f171ce73f1 100644 --- a/packages/uni-app-plus/dist/uni.x.runtime.esm.js +++ b/packages/uni-app-plus/dist/uni.x.runtime.esm.js @@ -7099,14 +7099,32 @@ const _style_0$1 = { "bottom": 0, "right": 10, "width": "auto", + "borderTopWidth": 1, + "borderRightWidth": 1, "borderBottomWidth": 1, + "borderLeftWidth": 1, + "borderTopStyle": "solid", + "borderRightStyle": "solid", "borderBottomStyle": "solid", - "borderBottomColor": "#f8f8f8" + "borderLeftStyle": "solid", + "borderTopColor": "#f8f8f8", + "borderRightColor": "#f8f8f8", + "borderBottomColor": "#f8f8f8", + "borderLeftColor": "#f8f8f8" }, ".uni-choose-location-dark ": { + "borderTopWidth": 1, + "borderRightWidth": 1, "borderBottomWidth": 1, + "borderLeftWidth": 1, + "borderTopStyle": "solid", + "borderRightStyle": "solid", "borderBottomStyle": "solid", - "borderBottomColor": "#1e1e1e" + "borderLeftStyle": "solid", + "borderTopColor": "#1e1e1e", + "borderRightColor": "#1e1e1e", + "borderBottomColor": "#1e1e1e", + "borderLeftColor": "#1e1e1e" } }, "uni-choose-location-search-icon": { @@ -7550,14 +7568,32 @@ const _style_0 = { "paddingRight": 16, "paddingBottom": 16, "paddingLeft": 16, + "borderTopWidth": 1, + "borderRightWidth": 1, "borderBottomWidth": 1, + "borderLeftWidth": 1, + "borderTopStyle": "solid", + "borderRightStyle": "solid", "borderBottomStyle": "solid", - "borderBottomColor": "#e5e5e5" + "borderLeftStyle": "solid", + "borderTopColor": "#e5e5e5", + "borderRightColor": "#e5e5e5", + "borderBottomColor": "#e5e5e5", + "borderLeftColor": "#e5e5e5" }, ".uni-action-sheet_dark__mode": { + "borderTopWidth": 1, + "borderRightWidth": 1, "borderBottomWidth": 1, + "borderLeftWidth": 1, + "borderTopStyle": "solid", + "borderRightStyle": "solid", "borderBottomStyle": "solid", - "borderBottomColor": "#2F3131" + "borderLeftStyle": "solid", + "borderTopColor": "#2F3131", + "borderRightColor": "#2F3131", + "borderBottomColor": "#2F3131", + "borderLeftColor": "#2F3131" }, ".uni-action-sheet_landscape__mode": { "paddingTop": 10, @@ -7573,13 +7609,31 @@ const _style_0 = { "paddingBottom": 16, "paddingLeft": 16, "borderTopWidth": 1, + "borderRightWidth": 1, + "borderBottomWidth": 1, + "borderLeftWidth": 1, "borderTopStyle": "solid", - "borderTopColor": "#e5e5e5" + "borderRightStyle": "solid", + "borderBottomStyle": "solid", + "borderLeftStyle": "solid", + "borderTopColor": "#e5e5e5", + "borderRightColor": "#e5e5e5", + "borderBottomColor": "#e5e5e5", + "borderLeftColor": "#e5e5e5" }, ".uni-action-sheet_dark__mode": { "borderTopWidth": 1, + "borderRightWidth": 1, + "borderBottomWidth": 1, + "borderLeftWidth": 1, "borderTopStyle": "solid", - "borderTopColor": "#2F3131" + "borderRightStyle": "solid", + "borderBottomStyle": "solid", + "borderLeftStyle": "solid", + "borderTopColor": "#2F3131", + "borderRightColor": "#2F3131", + "borderBottomColor": "#2F3131", + "borderLeftColor": "#2F3131" }, ".uni-action-sheet_landscape__mode": { "paddingTop": 10, diff --git a/packages/uni-app-vue/dist/uvue.runtime.esm.dev.js b/packages/uni-app-vue/dist/uvue.runtime.esm.dev.js index 4ad18b01560..9fd03286edd 100644 --- a/packages/uni-app-vue/dist/uvue.runtime.esm.dev.js +++ b/packages/uni-app-vue/dist/uvue.runtime.esm.dev.js @@ -1855,6 +1855,39 @@ function createTransformBackground(options) { } }; } +var borderTop = 'borderTop'; +var borderRight = 'borderRight'; +var borderBottom = 'borderBottom'; +var borderLeft = 'borderLeft'; +var transformBorderColor = decl => { + var { + prop, + value, + important, + raws, + source + } = decl; + var _splitResult = hyphenate(prop).split('-'); + var property = _splitResult[_splitResult.length - 1]; + { + property = capitalize(property); + } + var splitResult = value.replace(/\s*,\s*/g, ',').split(/\s+/); + switch (splitResult.length) { + case 1: + splitResult.push(splitResult[0], splitResult[0], splitResult[0]); + break; + case 2: + splitResult.push(splitResult[0], splitResult[1]); + break; + case 3: + splitResult.push(splitResult[1]); + break; + } + return [createDecl(borderTop + property, splitResult[0], important, raws, source), createDecl(borderRight + property, splitResult[1], important, raws, source), createDecl(borderBottom + property, splitResult[2], important, raws, source), createDecl(borderLeft + property, splitResult[3], important, raws, source)]; +}; +var transformBorderStyle = transformBorderColor; +var transformBorderWidth = transformBorderColor; var borderWidth = 'Width'; var borderStyle = 'Style'; var borderColor = 'Color'; @@ -1883,38 +1916,14 @@ function createTransformBorder(options) { return [decl]; } } - return [createDecl(prop + borderWidth, (result[0] || (options.type === 'uvue' ? 'medium' : '0')).trim(), important, raws, source), createDecl(prop + borderStyle, (result[1] || (options.type === 'uvue' ? 'none' : 'solid')).trim(), important, raws, source), createDecl(prop + borderColor, (result[2] || '#000000').trim(), important, raws, source)]; + if (isUvuePlatform) { + return [...transformBorderWidth(createDecl(prop + borderWidth, (result[0] || (options.type === 'uvue' ? 'medium' : '0')).trim(), important, raws, source)), ...transformBorderStyle(createDecl(prop + borderStyle, (result[1] || (options.type === 'uvue' ? 'none' : 'solid')).trim(), important, raws, source)), ...transformBorderColor(createDecl(prop + borderColor, (result[2] || '#000000').trim(), important, raws, source))]; + } else { + // nvue 维持不变 + return [createDecl(prop + borderWidth, (result[0] || (options.type === 'uvue' ? 'medium' : '0')).trim(), important, raws, source), createDecl(prop + borderStyle, (result[1] || (options.type === 'uvue' ? 'none' : 'solid')).trim(), important, raws, source), createDecl(prop + borderColor, (result[2] || '#000000').trim(), important, raws, source)]; + } }; } -var borderTop = 'borderTop'; -var borderRight = 'borderRight'; -var borderBottom = 'borderBottom'; -var borderLeft = 'borderLeft'; -var transformBorderColor = decl => { - var { - prop, - value, - important, - raws, - source - } = decl; - var property = hyphenate(prop).split('-')[1]; - { - property = capitalize(property); - } - var splitResult = value.replace(/\s*,\s*/g, ',').split(/\s+/); - switch (splitResult.length) { - case 1: - return [decl]; - case 2: - splitResult.push(splitResult[0], splitResult[1]); - break; - case 3: - splitResult.push(splitResult[1]); - break; - } - return [createDecl(borderTop + property, splitResult[0], important, raws, source), createDecl(borderRight + property, splitResult[1], important, raws, source), createDecl(borderBottom + property, splitResult[2], important, raws, source), createDecl(borderLeft + property, splitResult[3], important, raws, source)]; -}; var borderTopLeftRadius = 'borderTopLeftRadius'; var borderTopRightRadius = 'borderTopRightRadius'; var borderBottomRightRadius = 'borderBottomRightRadius'; @@ -1942,8 +1951,6 @@ var transformBorderRadius = decl => { } return [createDecl(borderTopLeftRadius, splitResult[0], important, raws, source), createDecl(borderTopRightRadius, splitResult[1], important, raws, source), createDecl(borderBottomRightRadius, splitResult[2], important, raws, source), createDecl(borderBottomLeftRadius, splitResult[3], important, raws, source)]; }; -var transformBorderStyle = transformBorderColor; -var transformBorderWidth = transformBorderColor; var flexDirection = 'flexDirection'; var flexWrap = 'flexWrap'; var transformFlexFlow = decl => { diff --git a/packages/uni-app-vue/dist/uvue.runtime.esm.prod.js b/packages/uni-app-vue/dist/uvue.runtime.esm.prod.js index 5d833f6f530..88ccd951da9 100644 --- a/packages/uni-app-vue/dist/uvue.runtime.esm.prod.js +++ b/packages/uni-app-vue/dist/uvue.runtime.esm.prod.js @@ -1746,6 +1746,39 @@ function createTransformBackground(options) { } }; } +var borderTop = 'borderTop'; +var borderRight = 'borderRight'; +var borderBottom = 'borderBottom'; +var borderLeft = 'borderLeft'; +var transformBorderColor = decl => { + var { + prop, + value, + important, + raws, + source + } = decl; + var _splitResult = hyphenate(prop).split('-'); + var property = _splitResult[_splitResult.length - 1]; + { + property = capitalize(property); + } + var splitResult = value.replace(/\s*,\s*/g, ',').split(/\s+/); + switch (splitResult.length) { + case 1: + splitResult.push(splitResult[0], splitResult[0], splitResult[0]); + break; + case 2: + splitResult.push(splitResult[0], splitResult[1]); + break; + case 3: + splitResult.push(splitResult[1]); + break; + } + return [createDecl(borderTop + property, splitResult[0], important, raws, source), createDecl(borderRight + property, splitResult[1], important, raws, source), createDecl(borderBottom + property, splitResult[2], important, raws, source), createDecl(borderLeft + property, splitResult[3], important, raws, source)]; +}; +var transformBorderStyle = transformBorderColor; +var transformBorderWidth = transformBorderColor; var borderWidth = 'Width'; var borderStyle = 'Style'; var borderColor = 'Color'; @@ -1774,38 +1807,14 @@ function createTransformBorder(options) { return [decl]; } } - return [createDecl(prop + borderWidth, (result[0] || (options.type === 'uvue' ? 'medium' : '0')).trim(), important, raws, source), createDecl(prop + borderStyle, (result[1] || (options.type === 'uvue' ? 'none' : 'solid')).trim(), important, raws, source), createDecl(prop + borderColor, (result[2] || '#000000').trim(), important, raws, source)]; + if (isUvuePlatform) { + return [...transformBorderWidth(createDecl(prop + borderWidth, (result[0] || (options.type === 'uvue' ? 'medium' : '0')).trim(), important, raws, source)), ...transformBorderStyle(createDecl(prop + borderStyle, (result[1] || (options.type === 'uvue' ? 'none' : 'solid')).trim(), important, raws, source)), ...transformBorderColor(createDecl(prop + borderColor, (result[2] || '#000000').trim(), important, raws, source))]; + } else { + // nvue 维持不变 + return [createDecl(prop + borderWidth, (result[0] || (options.type === 'uvue' ? 'medium' : '0')).trim(), important, raws, source), createDecl(prop + borderStyle, (result[1] || (options.type === 'uvue' ? 'none' : 'solid')).trim(), important, raws, source), createDecl(prop + borderColor, (result[2] || '#000000').trim(), important, raws, source)]; + } }; } -var borderTop = 'borderTop'; -var borderRight = 'borderRight'; -var borderBottom = 'borderBottom'; -var borderLeft = 'borderLeft'; -var transformBorderColor = decl => { - var { - prop, - value, - important, - raws, - source - } = decl; - var property = hyphenate(prop).split('-')[1]; - { - property = capitalize(property); - } - var splitResult = value.replace(/\s*,\s*/g, ',').split(/\s+/); - switch (splitResult.length) { - case 1: - return [decl]; - case 2: - splitResult.push(splitResult[0], splitResult[1]); - break; - case 3: - splitResult.push(splitResult[1]); - break; - } - return [createDecl(borderTop + property, splitResult[0], important, raws, source), createDecl(borderRight + property, splitResult[1], important, raws, source), createDecl(borderBottom + property, splitResult[2], important, raws, source), createDecl(borderLeft + property, splitResult[3], important, raws, source)]; -}; var borderTopLeftRadius = 'borderTopLeftRadius'; var borderTopRightRadius = 'borderTopRightRadius'; var borderBottomRightRadius = 'borderBottomRightRadius'; @@ -1833,8 +1842,6 @@ var transformBorderRadius = decl => { } return [createDecl(borderTopLeftRadius, splitResult[0], important, raws, source), createDecl(borderTopRightRadius, splitResult[1], important, raws, source), createDecl(borderBottomRightRadius, splitResult[2], important, raws, source), createDecl(borderBottomLeftRadius, splitResult[3], important, raws, source)]; }; -var transformBorderStyle = transformBorderColor; -var transformBorderWidth = transformBorderColor; var flexDirection = 'flexDirection'; var flexWrap = 'flexWrap'; var transformFlexFlow = decl => { diff --git a/packages/uni-mp-alipay/dist/uni.api.esm.js b/packages/uni-mp-alipay/dist/uni.api.esm.js index c8c5d58aaeb..5bad133a4b6 100644 --- a/packages/uni-mp-alipay/dist/uni.api.esm.js +++ b/packages/uni-mp-alipay/dist/uni.api.esm.js @@ -848,27 +848,27 @@ function initWrapper(protocols) { return processArgs(methodName, res, returnValue, {}, realKeepReturnValue); } return function wrapper(methodName, method) { - if ((isContextApi(methodName) || isTaskApi(methodName)) && method) { - const oldMethod = method; - method = function (...args) { - const contextOrTask = oldMethod.apply(this, args); - if (contextOrTask) { - contextOrTask.__v_skip = true; - } - return contextOrTask; - }; - } - if ((!hasOwn(protocols, methodName) && !isFunction(protocols.returnValue)) || - !isFunction(method)) { - return method; - } - const protocol = protocols[methodName]; - if (!protocol && !isFunction(protocols.returnValue)) { + /** + * 注意: + * - 此处method为原始全局对象上的uni方法名对应的属性值,比如method值可能为my.login,即undefined + * - uni.env并非方法,但是也会被传入wrapper + */ + const hasProtocol = hasOwn(protocols, methodName); + const needWrapper = hasProtocol || + isFunction(protocols.returnValue) || + isContextApi(methodName) || + isTaskApi(methodName); + const hasMethod = hasProtocol || isFunction(method); + if (!hasProtocol && !method) { // 暂不支持的 api return function () { console.error(`支付宝小程序 暂不支持${methodName}`); }; } + if (!needWrapper || !hasMethod) { + return method; + } + const protocol = protocols[methodName]; return function (arg1, arg2) { // 目前 api 最多两个参数 let options = protocol || {}; diff --git a/packages/uni-mp-baidu/dist/uni.api.esm.js b/packages/uni-mp-baidu/dist/uni.api.esm.js index 9821aabbd5d..0a32b82a274 100644 --- a/packages/uni-mp-baidu/dist/uni.api.esm.js +++ b/packages/uni-mp-baidu/dist/uni.api.esm.js @@ -848,27 +848,27 @@ function initWrapper(protocols) { return processArgs(methodName, res, returnValue, {}, realKeepReturnValue); } return function wrapper(methodName, method) { - if ((isContextApi(methodName) || isTaskApi(methodName)) && method) { - const oldMethod = method; - method = function (...args) { - const contextOrTask = oldMethod.apply(this, args); - if (contextOrTask) { - contextOrTask.__v_skip = true; - } - return contextOrTask; - }; - } - if ((!hasOwn(protocols, methodName) && !isFunction(protocols.returnValue)) || - !isFunction(method)) { - return method; - } - const protocol = protocols[methodName]; - if (!protocol && !isFunction(protocols.returnValue)) { + /** + * 注意: + * - 此处method为原始全局对象上的uni方法名对应的属性值,比如method值可能为my.login,即undefined + * - uni.env并非方法,但是也会被传入wrapper + */ + const hasProtocol = hasOwn(protocols, methodName); + const needWrapper = hasProtocol || + isFunction(protocols.returnValue) || + isContextApi(methodName) || + isTaskApi(methodName); + const hasMethod = hasProtocol || isFunction(method); + if (!hasProtocol && !method) { // 暂不支持的 api return function () { console.error(`百度小程序 暂不支持${methodName}`); }; } + if (!needWrapper || !hasMethod) { + return method; + } + const protocol = protocols[methodName]; return function (arg1, arg2) { // 目前 api 最多两个参数 let options = protocol || {}; diff --git a/packages/uni-mp-jd/dist/uni.api.esm.js b/packages/uni-mp-jd/dist/uni.api.esm.js index e7c604677c5..4a8b3d7373e 100644 --- a/packages/uni-mp-jd/dist/uni.api.esm.js +++ b/packages/uni-mp-jd/dist/uni.api.esm.js @@ -848,27 +848,27 @@ function initWrapper(protocols) { return processArgs(methodName, res, returnValue, {}, realKeepReturnValue); } return function wrapper(methodName, method) { - if ((isContextApi(methodName) || isTaskApi(methodName)) && method) { - const oldMethod = method; - method = function (...args) { - const contextOrTask = oldMethod.apply(this, args); - if (contextOrTask) { - contextOrTask.__v_skip = true; - } - return contextOrTask; - }; - } - if ((!hasOwn(protocols, methodName) && !isFunction(protocols.returnValue)) || - !isFunction(method)) { - return method; - } - const protocol = protocols[methodName]; - if (!protocol && !isFunction(protocols.returnValue)) { + /** + * 注意: + * - 此处method为原始全局对象上的uni方法名对应的属性值,比如method值可能为my.login,即undefined + * - uni.env并非方法,但是也会被传入wrapper + */ + const hasProtocol = hasOwn(protocols, methodName); + const needWrapper = hasProtocol || + isFunction(protocols.returnValue) || + isContextApi(methodName) || + isTaskApi(methodName); + const hasMethod = hasProtocol || isFunction(method); + if (!hasProtocol && !method) { // 暂不支持的 api return function () { console.error(`京东小程序 暂不支持${methodName}`); }; } + if (!needWrapper || !hasMethod) { + return method; + } + const protocol = protocols[methodName]; return function (arg1, arg2) { // 目前 api 最多两个参数 let options = protocol || {}; diff --git a/packages/uni-mp-kuaishou/dist/uni.api.esm.js b/packages/uni-mp-kuaishou/dist/uni.api.esm.js index 1dc9773fde5..eba32dfc27a 100644 --- a/packages/uni-mp-kuaishou/dist/uni.api.esm.js +++ b/packages/uni-mp-kuaishou/dist/uni.api.esm.js @@ -848,27 +848,27 @@ function initWrapper(protocols) { return processArgs(methodName, res, returnValue, {}, realKeepReturnValue); } return function wrapper(methodName, method) { - if ((isContextApi(methodName) || isTaskApi(methodName)) && method) { - const oldMethod = method; - method = function (...args) { - const contextOrTask = oldMethod.apply(this, args); - if (contextOrTask) { - contextOrTask.__v_skip = true; - } - return contextOrTask; - }; - } - if ((!hasOwn(protocols, methodName) && !isFunction(protocols.returnValue)) || - !isFunction(method)) { - return method; - } - const protocol = protocols[methodName]; - if (!protocol && !isFunction(protocols.returnValue)) { + /** + * 注意: + * - 此处method为原始全局对象上的uni方法名对应的属性值,比如method值可能为my.login,即undefined + * - uni.env并非方法,但是也会被传入wrapper + */ + const hasProtocol = hasOwn(protocols, methodName); + const needWrapper = hasProtocol || + isFunction(protocols.returnValue) || + isContextApi(methodName) || + isTaskApi(methodName); + const hasMethod = hasProtocol || isFunction(method); + if (!hasProtocol && !method) { // 暂不支持的 api return function () { console.error(`快手小程序 暂不支持${methodName}`); }; } + if (!needWrapper || !hasMethod) { + return method; + } + const protocol = protocols[methodName]; return function (arg1, arg2) { // 目前 api 最多两个参数 let options = protocol || {}; diff --git a/packages/uni-mp-lark/dist/uni.api.esm.js b/packages/uni-mp-lark/dist/uni.api.esm.js index 6c708d0bd9f..71a6491ea1e 100644 --- a/packages/uni-mp-lark/dist/uni.api.esm.js +++ b/packages/uni-mp-lark/dist/uni.api.esm.js @@ -848,27 +848,27 @@ function initWrapper(protocols) { return processArgs(methodName, res, returnValue, {}, realKeepReturnValue); } return function wrapper(methodName, method) { - if ((isContextApi(methodName) || isTaskApi(methodName)) && method) { - const oldMethod = method; - method = function (...args) { - const contextOrTask = oldMethod.apply(this, args); - if (contextOrTask) { - contextOrTask.__v_skip = true; - } - return contextOrTask; - }; - } - if ((!hasOwn(protocols, methodName) && !isFunction(protocols.returnValue)) || - !isFunction(method)) { - return method; - } - const protocol = protocols[methodName]; - if (!protocol && !isFunction(protocols.returnValue)) { + /** + * 注意: + * - 此处method为原始全局对象上的uni方法名对应的属性值,比如method值可能为my.login,即undefined + * - uni.env并非方法,但是也会被传入wrapper + */ + const hasProtocol = hasOwn(protocols, methodName); + const needWrapper = hasProtocol || + isFunction(protocols.returnValue) || + isContextApi(methodName) || + isTaskApi(methodName); + const hasMethod = hasProtocol || isFunction(method); + if (!hasProtocol && !method) { // 暂不支持的 api return function () { console.error(`飞书小程序 暂不支持${methodName}`); }; } + if (!needWrapper || !hasMethod) { + return method; + } + const protocol = protocols[methodName]; return function (arg1, arg2) { // 目前 api 最多两个参数 let options = protocol || {}; diff --git a/packages/uni-mp-qq/dist/uni.api.esm.js b/packages/uni-mp-qq/dist/uni.api.esm.js index c0e6a5fe0bd..92dd9d5bcb8 100644 --- a/packages/uni-mp-qq/dist/uni.api.esm.js +++ b/packages/uni-mp-qq/dist/uni.api.esm.js @@ -848,27 +848,27 @@ function initWrapper(protocols) { return processArgs(methodName, res, returnValue, {}, realKeepReturnValue); } return function wrapper(methodName, method) { - if ((isContextApi(methodName) || isTaskApi(methodName)) && method) { - const oldMethod = method; - method = function (...args) { - const contextOrTask = oldMethod.apply(this, args); - if (contextOrTask) { - contextOrTask.__v_skip = true; - } - return contextOrTask; - }; - } - if ((!hasOwn(protocols, methodName) && !isFunction(protocols.returnValue)) || - !isFunction(method)) { - return method; - } - const protocol = protocols[methodName]; - if (!protocol && !isFunction(protocols.returnValue)) { + /** + * 注意: + * - 此处method为原始全局对象上的uni方法名对应的属性值,比如method值可能为my.login,即undefined + * - uni.env并非方法,但是也会被传入wrapper + */ + const hasProtocol = hasOwn(protocols, methodName); + const needWrapper = hasProtocol || + isFunction(protocols.returnValue) || + isContextApi(methodName) || + isTaskApi(methodName); + const hasMethod = hasProtocol || isFunction(method); + if (!hasProtocol && !method) { // 暂不支持的 api return function () { console.error(`QQ小程序 暂不支持${methodName}`); }; } + if (!needWrapper || !hasMethod) { + return method; + } + const protocol = protocols[methodName]; return function (arg1, arg2) { // 目前 api 最多两个参数 let options = protocol || {}; diff --git a/packages/uni-mp-toutiao/dist-x/uni.api.esm.js b/packages/uni-mp-toutiao/dist-x/uni.api.esm.js index e049962a16f..f1c153c757f 100644 --- a/packages/uni-mp-toutiao/dist-x/uni.api.esm.js +++ b/packages/uni-mp-toutiao/dist-x/uni.api.esm.js @@ -949,27 +949,27 @@ function initWrapper(protocols) { return processArgs(methodName, res, returnValue, {}, realKeepReturnValue); } return function wrapper(methodName, method) { - if ((isContextApi(methodName) || isTaskApi(methodName)) && method) { - const oldMethod = method; - method = function (...args) { - const contextOrTask = oldMethod.apply(this, args); - if (contextOrTask) { - contextOrTask.__v_skip = true; - } - return contextOrTask; - }; - } - if ((!hasOwn(protocols, methodName) && !isFunction(protocols.returnValue)) || - !isFunction(method)) { - return method; - } - const protocol = protocols[methodName]; - if (!protocol && !isFunction(protocols.returnValue)) { + /** + * 注意: + * - 此处method为原始全局对象上的uni方法名对应的属性值,比如method值可能为my.login,即undefined + * - uni.env并非方法,但是也会被传入wrapper + */ + const hasProtocol = hasOwn(protocols, methodName); + const needWrapper = hasProtocol || + isFunction(protocols.returnValue) || + isContextApi(methodName) || + isTaskApi(methodName); + const hasMethod = hasProtocol || isFunction(method); + if (!hasProtocol && !method) { // 暂不支持的 api return function () { console.error(`字节跳动小程序 暂不支持${methodName}`); }; } + if (!needWrapper || !hasMethod) { + return method; + } + const protocol = protocols[methodName]; return function (arg1, arg2) { // 目前 api 最多两个参数 let options = protocol || {}; diff --git a/packages/uni-mp-toutiao/dist/uni.api.esm.js b/packages/uni-mp-toutiao/dist/uni.api.esm.js index 160756a1f06..06485060bc1 100644 --- a/packages/uni-mp-toutiao/dist/uni.api.esm.js +++ b/packages/uni-mp-toutiao/dist/uni.api.esm.js @@ -848,27 +848,27 @@ function initWrapper(protocols) { return processArgs(methodName, res, returnValue, {}, realKeepReturnValue); } return function wrapper(methodName, method) { - if ((isContextApi(methodName) || isTaskApi(methodName)) && method) { - const oldMethod = method; - method = function (...args) { - const contextOrTask = oldMethod.apply(this, args); - if (contextOrTask) { - contextOrTask.__v_skip = true; - } - return contextOrTask; - }; - } - if ((!hasOwn(protocols, methodName) && !isFunction(protocols.returnValue)) || - !isFunction(method)) { - return method; - } - const protocol = protocols[methodName]; - if (!protocol && !isFunction(protocols.returnValue)) { + /** + * 注意: + * - 此处method为原始全局对象上的uni方法名对应的属性值,比如method值可能为my.login,即undefined + * - uni.env并非方法,但是也会被传入wrapper + */ + const hasProtocol = hasOwn(protocols, methodName); + const needWrapper = hasProtocol || + isFunction(protocols.returnValue) || + isContextApi(methodName) || + isTaskApi(methodName); + const hasMethod = hasProtocol || isFunction(method); + if (!hasProtocol && !method) { // 暂不支持的 api return function () { console.error(`字节跳动小程序 暂不支持${methodName}`); }; } + if (!needWrapper || !hasMethod) { + return method; + } + const protocol = protocols[methodName]; return function (arg1, arg2) { // 目前 api 最多两个参数 let options = protocol || {}; diff --git a/packages/uni-mp-vue/dist-x/vue.runtime.esm.js b/packages/uni-mp-vue/dist-x/vue.runtime.esm.js index a1dc2418415..92ae621f14d 100644 --- a/packages/uni-mp-vue/dist-x/vue.runtime.esm.js +++ b/packages/uni-mp-vue/dist-x/vue.runtime.esm.js @@ -6284,7 +6284,9 @@ function setUniElementRef(ins, ref, id, opts, tagType) { } function hasIdProp(_ctx) { - return _ctx.$.propsOptions && _ctx.$.propsOptions[0] && 'id' in _ctx.$.propsOptions[0]; + return (_ctx.$.propsOptions && + _ctx.$.propsOptions[0] && + 'id' in _ctx.$.propsOptions[0]); } function hasVirtualHostId(_ctx) { return _ctx.virtualHostId !== ''; diff --git a/packages/uni-mp-vue/dist/vue.runtime.esm.js b/packages/uni-mp-vue/dist/vue.runtime.esm.js index 014a8641777..886833fd0c3 100644 --- a/packages/uni-mp-vue/dist/vue.runtime.esm.js +++ b/packages/uni-mp-vue/dist/vue.runtime.esm.js @@ -5793,7 +5793,9 @@ function withModelModifiers(fn, { number, trim }, isComponent = false) { } function hasIdProp(_ctx) { - return _ctx.$.propsOptions && _ctx.$.propsOptions[0] && 'id' in _ctx.$.propsOptions[0]; + return (_ctx.$.propsOptions && + _ctx.$.propsOptions[0] && + 'id' in _ctx.$.propsOptions[0]); } function hasVirtualHostId(_ctx) { return _ctx.$scope.virtualHostId !== ''; diff --git a/packages/uni-mp-weixin/dist-x/uni.api.esm.js b/packages/uni-mp-weixin/dist-x/uni.api.esm.js index 919e44c051d..3344c58a88d 100644 --- a/packages/uni-mp-weixin/dist-x/uni.api.esm.js +++ b/packages/uni-mp-weixin/dist-x/uni.api.esm.js @@ -986,27 +986,27 @@ function initWrapper(protocols) { return processArgs(methodName, res, returnValue, {}, realKeepReturnValue); } return function wrapper(methodName, method) { - if ((isContextApi(methodName) || isTaskApi(methodName)) && method) { - const oldMethod = method; - method = function (...args) { - const contextOrTask = oldMethod.apply(this, args); - if (contextOrTask) { - contextOrTask.__v_skip = true; - } - return contextOrTask; - }; - } - if ((!hasOwn(protocols, methodName) && !isFunction(protocols.returnValue)) || - !isFunction(method)) { - return method; - } - const protocol = protocols[methodName]; - if (!protocol && !isFunction(protocols.returnValue)) { + /** + * 注意: + * - 此处method为原始全局对象上的uni方法名对应的属性值,比如method值可能为my.login,即undefined + * - uni.env并非方法,但是也会被传入wrapper + */ + const hasProtocol = hasOwn(protocols, methodName); + const needWrapper = hasProtocol || + isFunction(protocols.returnValue) || + isContextApi(methodName) || + isTaskApi(methodName); + const hasMethod = hasProtocol || isFunction(method); + if (!hasProtocol && !method) { // 暂不支持的 api return function () { console.error(`微信小程序 暂不支持${methodName}`); }; } + if (!needWrapper || !hasMethod) { + return method; + } + const protocol = protocols[methodName]; return function (arg1, arg2) { // 目前 api 最多两个参数 let options = protocol || {}; diff --git a/packages/uni-mp-weixin/dist/uni.api.esm.js b/packages/uni-mp-weixin/dist/uni.api.esm.js index 24ba881ca84..8ea05235e10 100644 --- a/packages/uni-mp-weixin/dist/uni.api.esm.js +++ b/packages/uni-mp-weixin/dist/uni.api.esm.js @@ -847,27 +847,27 @@ function initWrapper(protocols) { return processArgs(methodName, res, returnValue, {}, realKeepReturnValue); } return function wrapper(methodName, method) { - if ((isContextApi(methodName) || isTaskApi(methodName)) && method) { - const oldMethod = method; - method = function (...args) { - const contextOrTask = oldMethod.apply(this, args); - if (contextOrTask) { - contextOrTask.__v_skip = true; - } - return contextOrTask; - }; - } - if ((!hasOwn(protocols, methodName) && !isFunction(protocols.returnValue)) || - !isFunction(method)) { - return method; - } - const protocol = protocols[methodName]; - if (!protocol && !isFunction(protocols.returnValue)) { + /** + * 注意: + * - 此处method为原始全局对象上的uni方法名对应的属性值,比如method值可能为my.login,即undefined + * - uni.env并非方法,但是也会被传入wrapper + */ + const hasProtocol = hasOwn(protocols, methodName); + const needWrapper = hasProtocol || + isFunction(protocols.returnValue) || + isContextApi(methodName) || + isTaskApi(methodName); + const hasMethod = hasProtocol || isFunction(method); + if (!hasProtocol && !method) { // 暂不支持的 api return function () { console.error(`微信小程序 暂不支持${methodName}`); }; } + if (!needWrapper || !hasMethod) { + return method; + } + const protocol = protocols[methodName]; return function (arg1, arg2) { // 目前 api 最多两个参数 let options = protocol || {}; diff --git a/packages/uni-mp-xhs/dist/uni.api.esm.js b/packages/uni-mp-xhs/dist/uni.api.esm.js index 39661ec1493..e1d11be0148 100644 --- a/packages/uni-mp-xhs/dist/uni.api.esm.js +++ b/packages/uni-mp-xhs/dist/uni.api.esm.js @@ -848,27 +848,27 @@ function initWrapper(protocols) { return processArgs(methodName, res, returnValue, {}, realKeepReturnValue); } return function wrapper(methodName, method) { - if ((isContextApi(methodName) || isTaskApi(methodName)) && method) { - const oldMethod = method; - method = function (...args) { - const contextOrTask = oldMethod.apply(this, args); - if (contextOrTask) { - contextOrTask.__v_skip = true; - } - return contextOrTask; - }; - } - if ((!hasOwn(protocols, methodName) && !isFunction(protocols.returnValue)) || - !isFunction(method)) { - return method; - } - const protocol = protocols[methodName]; - if (!protocol && !isFunction(protocols.returnValue)) { + /** + * 注意: + * - 此处method为原始全局对象上的uni方法名对应的属性值,比如method值可能为my.login,即undefined + * - uni.env并非方法,但是也会被传入wrapper + */ + const hasProtocol = hasOwn(protocols, methodName); + const needWrapper = hasProtocol || + isFunction(protocols.returnValue) || + isContextApi(methodName) || + isTaskApi(methodName); + const hasMethod = hasProtocol || isFunction(method); + if (!hasProtocol && !method) { // 暂不支持的 api return function () { console.error(`小红书小程序 暂不支持${methodName}`); }; } + if (!needWrapper || !hasMethod) { + return method; + } + const protocol = protocols[methodName]; return function (arg1, arg2) { // 目前 api 最多两个参数 let options = protocol || {}; diff --git a/packages/uni-quickapp-webview/dist/uni.api.esm.js b/packages/uni-quickapp-webview/dist/uni.api.esm.js index e38b3c68f8b..a0f05fd89fd 100644 --- a/packages/uni-quickapp-webview/dist/uni.api.esm.js +++ b/packages/uni-quickapp-webview/dist/uni.api.esm.js @@ -848,27 +848,27 @@ function initWrapper(protocols) { return processArgs(methodName, res, returnValue, {}, realKeepReturnValue); } return function wrapper(methodName, method) { - if ((isContextApi(methodName) || isTaskApi(methodName)) && method) { - const oldMethod = method; - method = function (...args) { - const contextOrTask = oldMethod.apply(this, args); - if (contextOrTask) { - contextOrTask.__v_skip = true; - } - return contextOrTask; - }; - } - if ((!hasOwn(protocols, methodName) && !isFunction(protocols.returnValue)) || - !isFunction(method)) { - return method; - } - const protocol = protocols[methodName]; - if (!protocol && !isFunction(protocols.returnValue)) { + /** + * 注意: + * - 此处method为原始全局对象上的uni方法名对应的属性值,比如method值可能为my.login,即undefined + * - uni.env并非方法,但是也会被传入wrapper + */ + const hasProtocol = hasOwn(protocols, methodName); + const needWrapper = hasProtocol || + isFunction(protocols.returnValue) || + isContextApi(methodName) || + isTaskApi(methodName); + const hasMethod = hasProtocol || isFunction(method); + if (!hasProtocol && !method) { // 暂不支持的 api return function () { console.error(`快应用(Webview)版 暂不支持${methodName}`); }; } + if (!needWrapper || !hasMethod) { + return method; + } + const protocol = protocols[methodName]; return function (arg1, arg2) { // 目前 api 最多两个参数 let options = protocol || {};