Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
754060fc
U
uni-app
项目概览
DCloud
/
uni-app
3 个月 前同步成功
通知
723
Star
38705
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
7
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
7
Issue
7
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
754060fc
编写于
3月 22, 2023
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'alpha'
上级
b575b905
9fb8f86b
变更
51
展开全部
隐藏空白更改
内联
并排
Showing
51 changed file
with
261 addition
and
66 deletion
+261
-66
lerna.json
lerna.json
+1
-1
packages/uni-app-plus-nvue/package.json
packages/uni-app-plus-nvue/package.json
+1
-1
packages/uni-app-plus/dist/index.v3.js
packages/uni-app-plus/dist/index.v3.js
+49
-1
packages/uni-app-plus/dist/view.umd.min.js
packages/uni-app-plus/dist/view.umd.min.js
+2
-2
packages/uni-app-plus/package.json
packages/uni-app-plus/package.json
+1
-1
packages/uni-app/package.json
packages/uni-app/package.json
+1
-1
packages/uni-automator/package.json
packages/uni-automator/package.json
+1
-1
packages/uni-cli-i18n/package.json
packages/uni-cli-i18n/package.json
+1
-1
packages/uni-cli-shared/package.json
packages/uni-cli-shared/package.json
+1
-1
packages/uni-h5-ui/package.json
packages/uni-h5-ui/package.json
+1
-1
packages/uni-h5/dist/index.umd.min.js
packages/uni-h5/dist/index.umd.min.js
+1
-1
packages/uni-h5/package.json
packages/uni-h5/package.json
+1
-1
packages/uni-i18n/package.json
packages/uni-i18n/package.json
+1
-1
packages/uni-migration/package.json
packages/uni-migration/package.json
+1
-1
packages/uni-mp-alipay/package.json
packages/uni-mp-alipay/package.json
+1
-1
packages/uni-mp-baidu/package.json
packages/uni-mp-baidu/package.json
+1
-1
packages/uni-mp-jd/package.json
packages/uni-mp-jd/package.json
+1
-1
packages/uni-mp-kuaishou/package.json
packages/uni-mp-kuaishou/package.json
+1
-1
packages/uni-mp-lark/package.json
packages/uni-mp-lark/package.json
+1
-1
packages/uni-mp-qq/package.json
packages/uni-mp-qq/package.json
+1
-1
packages/uni-mp-toutiao/dist/index.js
packages/uni-mp-toutiao/dist/index.js
+0
-5
packages/uni-mp-toutiao/package.json
packages/uni-mp-toutiao/package.json
+1
-1
packages/uni-mp-vue/package.json
packages/uni-mp-vue/package.json
+1
-1
packages/uni-mp-weixin/dist/index.js
packages/uni-mp-weixin/dist/index.js
+17
-0
packages/uni-mp-weixin/package.json
packages/uni-mp-weixin/package.json
+1
-1
packages/uni-mp-xhs/package.json
packages/uni-mp-xhs/package.json
+1
-1
packages/uni-quickapp-native/package.json
packages/uni-quickapp-native/package.json
+1
-1
packages/uni-quickapp-webview/package.json
packages/uni-quickapp-webview/package.json
+1
-1
packages/uni-stacktracey/package.json
packages/uni-stacktracey/package.json
+1
-1
packages/uni-stat/package.json
packages/uni-stat/package.json
+1
-1
packages/uni-template-compiler/__tests__/compiler-mp-weixin.spec.js
...ni-template-compiler/__tests__/compiler-mp-weixin.spec.js
+7
-0
packages/uni-template-compiler/lib/mp.js
packages/uni-template-compiler/lib/mp.js
+20
-2
packages/uni-template-compiler/package.json
packages/uni-template-compiler/package.json
+1
-1
packages/vue-cli-plugin-hbuilderx/package.json
packages/vue-cli-plugin-hbuilderx/package.json
+1
-1
packages/vue-cli-plugin-uni-optimize/package.json
packages/vue-cli-plugin-uni-optimize/package.json
+1
-1
packages/vue-cli-plugin-uni/package.json
packages/vue-cli-plugin-uni/package.json
+2
-2
packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js
packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js
+2
-2
packages/webpack-uni-mp-loader/lib/plugin/mp-weixin-uniad-app.json.js
...pack-uni-mp-loader/lib/plugin/mp-weixin-uniad-app.json.js
+2
-2
packages/webpack-uni-mp-loader/package.json
packages/webpack-uni-mp-loader/package.json
+1
-1
packages/webpack-uni-pages-loader/lib/platforms/mp.js
packages/webpack-uni-pages-loader/lib/platforms/mp.js
+18
-2
packages/webpack-uni-pages-loader/package.json
packages/webpack-uni-pages-loader/package.json
+2
-2
src/core/service/plugins/lifecycle.js
src/core/service/plugins/lifecycle.js
+15
-0
src/core/view/bridge/subscribe/api/request-component-info.js
src/core/view/bridge/subscribe/api/request-component-info.js
+14
-6
src/platforms/app-plus/service/api/network/upload-file.js
src/platforms/app-plus/service/api/network/upload-file.js
+5
-1
src/platforms/app-plus/service/api/plugin/uts.js
src/platforms/app-plus/service/api/plugin/uts.js
+29
-0
src/platforms/app-plus/view/components/video/index.vue
src/platforms/app-plus/view/components/video/index.vue
+11
-1
src/platforms/h5/view/components/map/index.vue
src/platforms/h5/view/components/map/index.vue
+8
-2
src/platforms/h5/view/components/map/map-marker.js
src/platforms/h5/view/components/map/map-marker.js
+9
-1
src/platforms/mp-toutiao/runtime/api/protocols.js
src/platforms/mp-toutiao/runtime/api/protocols.js
+0
-5
src/platforms/mp-weixin/runtime/wrapper/page-base-parser.js
src/platforms/mp-weixin/runtime/wrapper/page-base-parser.js
+5
-0
src/platforms/mp-weixin/runtime/wrapper/util.js
src/platforms/mp-weixin/runtime/wrapper/util.js
+14
-0
未找到文件。
lerna.json
浏览文件 @
754060fc
...
...
@@ -12,5 +12,5 @@
"message"
:
"chore(release): publish %s"
}
},
"version"
:
"2.0.2-
3070320230222
001"
"version"
:
"2.0.2-
alpha-3070720230316
001"
}
packages/uni-app-plus-nvue/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-app-plus-nvue"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app app-plus-nvue"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
packages/uni-app-plus/dist/index.v3.js
浏览文件 @
754060fc
...
...
@@ -9563,8 +9563,12 @@ var serviceContext = (function () {
files,
header,
formData,
timeout
= __uniConfig.networkTimeout.uploadFile ? __uniConfig.networkTimeout.uploadFile / 1000 : 120
timeout
} = {}) {
timeout =
(timeout ||
(__uniConfig.networkTimeout && __uniConfig.networkTimeout.uploadFile) ||
60 * 1000) / 1000;
const uploader = plus.uploader.createUpload(url, {
timeout,
// 需要与其它平台上的表现保持一致,不走重试的逻辑。
...
...
@@ -10538,6 +10542,9 @@ var serviceContext = (function () {
return proxy;
}
function resolveSyncResult(res) {
if ((process.env.NODE_ENV !== 'production')) {
console.log('uts.invokeSync.result', res);
}
if (res.errMsg) {
throw new Error(res.errMsg);
}
...
...
@@ -10548,6 +10555,9 @@ var serviceContext = (function () {
throw new Error(args.errMsg);
}
delete args.errMsg;
if ((process.env.NODE_ENV !== 'production')) {
console.log('uts.invokePropGetter.args', args);
}
return resolveSyncResult(getProxy().invokeSync(args, () => { }));
}
function initProxyFunction(async, { moduleName, moduleType, package: pkg, class: cls, name: propOrMethod, method, companion, params: methodParams, errMsg, }, instanceId) {
...
...
@@ -10589,7 +10599,13 @@ var serviceContext = (function () {
});
if (async) {
return new Promise((resolve, reject) => {
if ((process.env.NODE_ENV !== 'production')) {
console.log('uts.invokeAsync.args', invokeArgs);
}
getProxy().invokeAsync(invokeArgs, (res) => {
if ((process.env.NODE_ENV !== 'production')) {
console.log('uts.invokeAsync.result', res);
}
if (res.type !== 'return') {
invokeCallback(res);
}
...
...
@@ -10604,6 +10620,9 @@ var serviceContext = (function () {
});
});
}
if ((process.env.NODE_ENV !== 'production')) {
console.log('uts.invokeSync.args', invokeArgs);
}
return resolveSyncResult(getProxy().invokeSync(invokeArgs, invokeCallback));
};
}
...
...
@@ -10616,6 +10635,12 @@ var serviceContext = (function () {
return initProxyFunction(async, opts, 0);
}
const initUTSProxyFunction = initUTSStaticMethod;
function parseClassMethodName(name, methods) {
if (hasOwn(methods, name + 'ByJs')) {
return name + 'ByJs';
}
return name;
}
function initUTSProxyClass({ moduleName, moduleType, package: pkg, class: cls, constructor: { params: constructorParams }, methods, props, staticProps, staticMethods, errMsg, }) {
const baseOptions = {
moduleName,
...
...
@@ -10624,6 +10649,12 @@ var serviceContext = (function () {
class: cls,
errMsg,
};
// iOS 需要为 ByJs 的 class 构造函数(如果包含JSONObject或UTSCallback类型)补充最后一个参数
if (typeof plus !== 'undefined' && plus.os.name === 'iOS') {
if (constructorParams.find((p) => p.type === 'UTSCallback' || p.type.indexOf('JSONObject') > 0)) {
constructorParams.push({ name: '_byJs', type: 'boolean' });
}
}
const ProxyClass = class UTSClass {
constructor(...params) {
if (errMsg) {
...
...
@@ -10639,6 +10670,7 @@ var serviceContext = (function () {
get(_, name) {
if (!target[name]) {
//实例方法
name = parseClassMethodName(name, methods);
if (hasOwn(methods, name)) {
const { async, params } = methods[name];
target[name] = initUTSInstanceMethod(!!async, extend({
...
...
@@ -10665,6 +10697,7 @@ var serviceContext = (function () {
const staticMethodCache = {};
return new Proxy(ProxyClass, {
get(target, name, receiver) {
name = parseClassMethodName(name, staticMethods);
if (hasOwn(staticMethods, name)) {
if (!staticMethodCache[name]) {
const { async, params } = staticMethods[name];
...
...
@@ -24062,6 +24095,21 @@ var serviceContext = (function () {
});
}
// script setup onPageScroll、onReachBottom not effective
const setup = extendOptions.setup;
if (setup) {
const injectHooks = ['onPageScroll', 'onReachBottom'];
let setupString = '';
try {
setupString = setup.toString();
} catch (error) {}
injectHooks.forEach(hook => {
if (setupString.indexOf(`uniApp.${hook}`) && !extendOptions[hook]) {
extendOptions[hook] = [() => {}];
}
});
}
return oldExtend.call(this, extendOptions)
};
...
...
packages/uni-app-plus/dist/view.umd.min.js
浏览文件 @
754060fc
此差异已折叠。
点击以展开。
packages/uni-app-plus/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-app-plus"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app app-plus"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
packages/uni-app/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-app"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app composition-api"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
packages/uni-automator/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-automator"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app automator"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
packages/uni-cli-i18n/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-cli-i18n"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-cli-i18n"
,
"main"
:
"lib/index.js"
,
"repository"
:
{
...
...
packages/uni-cli-shared/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-cli-shared"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-cli-shared"
,
"main"
:
"lib/index.js"
,
"repository"
:
{
...
...
packages/uni-h5-ui/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-h5-ui"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app h5 ui"
,
"main"
:
"dist/index.umd.min.js"
,
"repository"
:
{
...
...
packages/uni-h5/dist/index.umd.min.js
浏览文件 @
754060fc
此差异已折叠。
点击以展开。
packages/uni-h5/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-h5"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app h5"
,
"main"
:
"dist/index.umd.min.js"
,
"repository"
:
{
...
...
packages/uni-i18n/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-i18n"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"@dcloudio/uni-i18n"
,
"main"
:
"./dist/uni-i18n.cjs.js"
,
"module"
:
"./dist/uni-i18n.es.js"
,
...
...
packages/uni-migration/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-migration"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app migration"
,
"main"
:
"lib/index.js"
,
"repository"
:
{
...
...
packages/uni-mp-alipay/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-mp-alipay"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app mp-alipay"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
packages/uni-mp-baidu/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-mp-baidu"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app mp-baidu"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
packages/uni-mp-jd/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-mp-jd"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app mp-jd"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
packages/uni-mp-kuaishou/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-mp-kuaishou"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app mp-kuaishou"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
packages/uni-mp-lark/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-mp-lark"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app mp-lark"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
packages/uni-mp-qq/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-mp-qq"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app mp-qq"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
packages/uni-mp-toutiao/dist/index.js
浏览文件 @
754060fc
...
...
@@ -1041,11 +1041,6 @@ const canIUses = [
// 需要做转换的 API 列表
const
protocols
=
{
chooseImage
:
{
args
:
{
sizeType
:
false
}
},
navigateTo
,
redirectTo
,
previewImage
,
...
...
packages/uni-mp-toutiao/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-mp-toutiao"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app mp-toutiao"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
packages/uni-mp-vue/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-mp-vue"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"@dcloudio/uni-mp-vue"
,
"main"
:
"dist/vue.runtime.esm.js"
,
"module"
:
"dist/vue.runtime.esm.js"
,
...
...
packages/uni-mp-weixin/dist/index.js
浏览文件 @
754060fc
...
...
@@ -1429,6 +1429,20 @@ function toSkip (obj) {
});
}
return
obj
}
const
WORKLET_RE
=
/_
(
.*
)
_worklet_factory_/
;
function
initWorkletMethods
(
mpMethods
,
vueMethods
)
{
if
(
vueMethods
)
{
Object
.
keys
(
vueMethods
).
forEach
((
name
)
=>
{
const
matches
=
name
.
match
(
WORKLET_RE
);
if
(
matches
)
{
const
workletName
=
matches
[
1
];
mpMethods
[
name
]
=
vueMethods
[
name
];
mpMethods
[
workletName
]
=
vueMethods
[
workletName
];
}
});
}
}
const
MPPage
=
Page
;
...
...
@@ -2436,6 +2450,9 @@ function parseBasePage (vuePageOptions) {
{
initUnknownHooks
(
pageOptions
.
methods
,
vuePageOptions
,
[
'
onReady
'
]);
}
{
initWorkletMethods
(
pageOptions
.
methods
,
vueOptions
.
methods
);
}
return
pageOptions
}
...
...
packages/uni-mp-weixin/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-mp-weixin"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app mp-weixin"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
packages/uni-mp-xhs/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-mp-xhs"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app mp-xhs"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
packages/uni-quickapp-native/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-quickapp-native"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app quickapp-native"
,
"main"
:
"dist/vue.prod.js"
,
"repository"
:
{
...
...
packages/uni-quickapp-webview/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-quickapp-webview"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app quickapp-webview"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
packages/uni-stacktracey/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-stacktracey"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"@dcloudio/uni-stacktracey"
,
"main"
:
"dist/uni-stacktracey.cjs.js"
,
"module"
:
"dist/uni-stacktracey.es.js"
,
...
...
packages/uni-stat/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-stat"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
""
,
"main"
:
"dist/uni-stat.es.js"
,
"repository"
:
{
...
...
packages/uni-template-compiler/__tests__/compiler-mp-weixin.spec.js
浏览文件 @
754060fc
...
...
@@ -438,4 +438,11 @@ describe('mp:compiler-mp-weixin', () => {
}
)
})
it
(
'
skyline gesture
'
,
()
=>
{
assertCodegen
(
'
<vertical-drag-gesture-handler onGestureEvent="handlePan" native-view="scroll-view" shouldResponseOnMove="shouldResponse" shouldAcceptGesture="shouldAccept"/>
'
,
'
<vertical-drag-gesture-handler onGestureEvent="handlePan" native-view="scroll-view" shouldResponseOnMove="shouldResponse" shouldAcceptGesture="shouldAccept"></vertical-drag-gesture-handler>
'
)
})
})
packages/uni-template-compiler/lib/mp.js
浏览文件 @
754060fc
...
...
@@ -83,7 +83,25 @@ const tags = {
'
page-container
'
,
'
page-meta
'
,
'
navigation-bar
'
,
'
match-media
'
'
match-media
'
,
'
share-element
'
,
'
channel-live
'
,
'
channel-video
'
,
'
voip-room
'
,
'
root-portal
'
,
// 手势组件
'
tap-gesture-handler
'
,
'
double-tap-gesture-handler
'
,
'
scale-gesture-handler
'
,
'
force-press-gesture-handler
'
,
'
pan-gesture-handler
'
,
'
vertical-drag-gesture-handler
'
,
'
horizontal-drag-gesture-handler
'
,
'
long-press-gesture-handler
'
,
'
grid-view
'
,
'
list-view
'
,
'
sticky-header
'
,
'
sticky-section
'
],
// 支付宝小程序平台独有组件
'
mp-alipay
'
:
[
...
...
@@ -184,4 +202,4 @@ module.exports = function getCompilerOptions (platform) {
baseCompiler
,
require
(
id
+
'
/lib/uni.compiler.js
'
)
)
}
}
packages/uni-template-compiler/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/uni-template-compiler"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-template-compiler"
,
"main"
:
"lib/index.js"
,
"repository"
:
{
...
...
packages/vue-cli-plugin-hbuilderx/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/vue-cli-plugin-hbuilderx"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"HBuilderX plugin for vue-cli 3"
,
"main"
:
"index.js"
,
"repository"
:
{
...
...
packages/vue-cli-plugin-uni-optimize/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/vue-cli-plugin-uni-optimize"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app optimize plugin for vue-cli 3"
,
"main"
:
"index.js"
,
"repository"
:
{
...
...
packages/vue-cli-plugin-uni/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/vue-cli-plugin-uni"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app plugin for vue-cli 3"
,
"main"
:
"index.js"
,
"repository"
:
{
...
...
@@ -17,7 +17,7 @@
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"dependencies"
:
{
"@dcloudio/uni-stat"
:
"^2.0.2-
3070320230222
001"
,
"@dcloudio/uni-stat"
:
"^2.0.2-
alpha-3070720230316
001"
,
"buffer-json"
:
"^2.0.0"
,
"clone-deep"
:
"^4.0.1"
,
"cross-env"
:
"^5.2.0"
,
...
...
packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js
浏览文件 @
754060fc
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
packages/webpack-uni-mp-loader/lib/plugin/mp-weixin-uniad-app.json.js
浏览文件 @
754060fc
...
...
@@ -4,13 +4,13 @@ module.exports = function (appJson) {
}
if
(
!
appJson
.
plugins
[
'
uni-ad
'
])
{
appJson
.
plugins
[
'
uni-ad
'
]
=
{
version
:
'
1.
0
.1
'
,
version
:
'
1.
1
.1
'
,
provider
:
'
wxf72d316417b6767f
'
}
}
if
(
!
appJson
.
plugins
[
'
coral-adv
'
])
{
appJson
.
plugins
[
'
coral-adv
'
]
=
{
version
:
'
1.0.1
2
'
,
version
:
'
1.0.1
5
'
,
provider
:
'
wx0e203209e27b1e66
'
}
}
...
...
packages/webpack-uni-mp-loader/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/webpack-uni-mp-loader"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"webpack-uni-mp-loader"
,
"main"
:
"index.js"
,
"repository"
:
{
...
...
packages/webpack-uni-pages-loader/lib/platforms/mp.js
浏览文件 @
754060fc
...
...
@@ -213,6 +213,19 @@ function getCondition (pagesJson) {
return
false
}
function
weixinSkyline
(
config
)
{
return
config
.
renderer
===
'
skyline
'
&&
config
.
lazyCodeLoading
===
'
requiredComponents
'
}
function
openES62ES5
(
config
)
{
if
(
!
config
.
setting
)
{
config
.
setting
=
{}
}
if
(
!
config
.
setting
.
es6
)
{
config
.
setting
.
es6
=
true
}
}
module
.
exports
=
function
(
pagesJson
,
manifestJson
,
project
=
{})
{
const
app
=
{
pages
:
[],
...
...
@@ -291,8 +304,8 @@ module.exports = function (pagesJson, manifestJson, project = {}) {
}
if
(
p
rocess
.
env
.
UNI_PLATFORM
===
'
mp-weixin
'
||
p
rocess
.
env
.
UNI_PLATFORM
===
'
mp-qq
'
p
latform
===
'
mp-weixin
'
||
p
latform
===
'
mp-qq
'
)
{
// 微信不需要生成,其他平台做拷贝
return
{
...
...
@@ -354,6 +367,9 @@ module.exports = function (pagesJson, manifestJson, project = {}) {
}
}
// 使用了微信小程序手势系统,自动开启 ES6=>ES5
platform
===
'
mp-weixin
'
&&
weixinSkyline
(
manifestJson
[
platform
])
&&
openES62ES5
(
project
)
if
(
process
.
env
.
UNI_AUTOMATOR_WS_ENDPOINT
)
{
if
(
!
project
.
setting
)
{
project
.
setting
=
{}
...
...
packages/webpack-uni-pages-loader/package.json
浏览文件 @
754060fc
{
"name"
:
"@dcloudio/webpack-uni-pages-loader"
,
"version"
:
"2.0.2-
3070320230222
001"
,
"version"
:
"2.0.2-
alpha-3070720230316
001"
,
"description"
:
"uni-app pages.json loader"
,
"main"
:
"lib/index.js"
,
"repository"
:
{
...
...
@@ -21,7 +21,7 @@
"strip-json-comments"
:
"^2.0.1"
},
"uni-app"
:
{
"compilerVersion"
:
"3.7.
3
"
"compilerVersion"
:
"3.7.
7
"
},
"gitHead"
:
"4a974e44466ae58194372e446299cf83c7a3ad2c"
}
src/core/service/plugins/lifecycle.js
浏览文件 @
754060fc
...
...
@@ -81,6 +81,21 @@ export function lifecycleMixin (Vue) {
})
}
// script setup onPageScroll、onReachBottom not effective
const
setup
=
extendOptions
.
setup
if
(
setup
)
{
const
injectHooks
=
[
'
onPageScroll
'
,
'
onReachBottom
'
]
let
setupString
=
''
try
{
setupString
=
setup
.
toString
()
}
catch
(
error
)
{}
injectHooks
.
forEach
(
hook
=>
{
if
(
setupString
.
indexOf
(
`uniApp.
${
hook
}
`
)
&&
!
extendOptions
[
hook
])
{
extendOptions
[
hook
]
=
[()
=>
{}]
}
})
}
return
oldExtend
.
call
(
this
,
extendOptions
)
}
...
...
src/core/view/bridge/subscribe/api/request-component-info.js
浏览文件 @
754060fc
...
...
@@ -2,6 +2,10 @@ import {
getTargetDataset
}
from
'
uni-helpers/index
'
import
{
camelize
}
from
'
uni-shared
'
import
getWindowOffset
from
'
uni-platform/helpers/get-window-offset
'
import
{
...
...
@@ -62,14 +66,18 @@ function getNodeInfo (el, fields) {
info
.
height
=
rect
.
height
}
}
// TODO 组件 props
if
(
Array
.
isArray
(
fields
.
properties
))
{
fields
.
properties
.
forEach
(
prop
=>
{
prop
=
prop
.
replace
(
/-
([
a-z
])
/g
,
function
(
e
,
t
)
{
return
t
.
toUpperCase
()
const
props
=
el
.
__vue__
&&
el
.
__vue__
.
$props
if
(
props
)
{
fields
.
properties
.
forEach
(
prop
=>
{
if
(
typeof
prop
===
'
string
'
)
{
prop
=
camelize
(
prop
)
if
(
props
[
prop
]
!=
null
)
{
info
[
prop
]
=
props
[
prop
]
}
}
})
// props
})
}
}
if
(
fields
.
scrollOffset
)
{
if
(
el
.
tagName
===
'
UNI-SCROLL-VIEW
'
&&
el
.
__vue__
&&
el
.
__vue__
.
getScrollPosition
)
{
...
...
src/platforms/app-plus/service/api/network/upload-file.js
浏览文件 @
754060fc
...
...
@@ -24,8 +24,12 @@ const createUploadTaskById = function (uploadTaskId, {
files
,
header
,
formData
,
timeout
=
__uniConfig
.
networkTimeout
.
uploadFile
?
__uniConfig
.
networkTimeout
.
uploadFile
/
1000
:
120
timeout
}
=
{})
{
timeout
=
(
timeout
||
(
__uniConfig
.
networkTimeout
&&
__uniConfig
.
networkTimeout
.
uploadFile
)
||
60
*
1000
)
/
1000
const
uploader
=
plus
.
uploader
.
createUpload
(
url
,
{
timeout
,
// 需要与其它平台上的表现保持一致,不走重试的逻辑。
...
...
src/platforms/app-plus/service/api/plugin/uts.js
浏览文件 @
754060fc
...
...
@@ -28,6 +28,9 @@ function getProxy() {
return
proxy
;
}
function
resolveSyncResult
(
res
)
{
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
))
{
console
.
log
(
'
uts.invokeSync.result
'
,
res
);
}
if
(
res
.
errMsg
)
{
throw
new
Error
(
res
.
errMsg
);
}
...
...
@@ -38,6 +41,9 @@ function invokePropGetter(args) {
throw
new
Error
(
args
.
errMsg
);
}
delete
args
.
errMsg
;
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
))
{
console
.
log
(
'
uts.invokePropGetter.args
'
,
args
);
}
return
resolveSyncResult
(
getProxy
().
invokeSync
(
args
,
()
=>
{
}));
}
function
initProxyFunction
(
async
,
{
moduleName
,
moduleType
,
package
:
pkg
,
class
:
cls
,
name
:
propOrMethod
,
method
,
companion
,
params
:
methodParams
,
errMsg
,
},
instanceId
)
{
...
...
@@ -79,7 +85,13 @@ function initProxyFunction(async, { moduleName, moduleType, package: pkg, class:
});
if
(
async
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
))
{
console
.
log
(
'
uts.invokeAsync.args
'
,
invokeArgs
);
}
getProxy
().
invokeAsync
(
invokeArgs
,
(
res
)
=>
{
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
))
{
console
.
log
(
'
uts.invokeAsync.result
'
,
res
);
}
if
(
res
.
type
!==
'
return
'
)
{
invokeCallback
(
res
);
}
...
...
@@ -94,6 +106,9 @@ function initProxyFunction(async, { moduleName, moduleType, package: pkg, class:
});
});
}
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
))
{
console
.
log
(
'
uts.invokeSync.args
'
,
invokeArgs
);
}
return
resolveSyncResult
(
getProxy
().
invokeSync
(
invokeArgs
,
invokeCallback
));
};
}
...
...
@@ -106,6 +121,12 @@ function initUTSStaticMethod(async, opts) {
return
initProxyFunction
(
async
,
opts
,
0
);
}
const
initUTSProxyFunction
=
initUTSStaticMethod
;
function
parseClassMethodName
(
name
,
methods
)
{
if
(
hasOwn
(
methods
,
name
+
'
ByJs
'
))
{
return
name
+
'
ByJs
'
;
}
return
name
;
}
function
initUTSProxyClass
({
moduleName
,
moduleType
,
package
:
pkg
,
class
:
cls
,
constructor
:
{
params
:
constructorParams
},
methods
,
props
,
staticProps
,
staticMethods
,
errMsg
,
})
{
const
baseOptions
=
{
moduleName
,
...
...
@@ -114,6 +135,12 @@ function initUTSProxyClass({ moduleName, moduleType, package: pkg, class: cls, c
class
:
cls
,
errMsg
,
};
// iOS 需要为 ByJs 的 class 构造函数(如果包含JSONObject或UTSCallback类型)补充最后一个参数
if
(
typeof
plus
!==
'
undefined
'
&&
plus
.
os
.
name
===
'
iOS
'
)
{
if
(
constructorParams
.
find
((
p
)
=>
p
.
type
===
'
UTSCallback
'
||
p
.
type
.
indexOf
(
'
JSONObject
'
)
>
0
))
{
constructorParams
.
push
({
name
:
'
_byJs
'
,
type
:
'
boolean
'
});
}
}
const
ProxyClass
=
class
UTSClass
{
constructor
(...
params
)
{
if
(
errMsg
)
{
...
...
@@ -129,6 +156,7 @@ function initUTSProxyClass({ moduleName, moduleType, package: pkg, class: cls, c
get
(
_
,
name
)
{
if
(
!
target
[
name
])
{
//实例方法
name
=
parseClassMethodName
(
name
,
methods
);
if
(
hasOwn
(
methods
,
name
))
{
const
{
async
,
params
}
=
methods
[
name
];
target
[
name
]
=
initUTSInstanceMethod
(
!!
async
,
extend
({
...
...
@@ -155,6 +183,7 @@ function initUTSProxyClass({ moduleName, moduleType, package: pkg, class: cls, c
const
staticMethodCache
=
{};
return
new
Proxy
(
ProxyClass
,
{
get
(
target
,
name
,
receiver
)
{
name
=
parseClassMethodName
(
name
,
staticMethods
);
if
(
hasOwn
(
staticMethods
,
name
))
{
if
(
!
staticMethodCache
[
name
])
{
const
{
async
,
params
}
=
staticMethods
[
name
];
...
...
src/platforms/app-plus/view/components/video/index.vue
浏览文件 @
754060fc
...
...
@@ -203,6 +203,10 @@ export default {
title
:
{
type
:
String
,
default
:
''
},
isLive
:
{
type
:
Boolean
,
default
:
false
}
},
computed
:
{
...
...
@@ -218,7 +222,13 @@ export default {
},
mounted
()
{
this
.
_onParentReady
(()
=>
{
const
video
=
this
.
video
=
plus
.
video
.
createVideoPlayer
(
'
video
'
+
Date
.
now
(),
Object
.
assign
({},
this
.
attrs
,
this
.
position
))
const
playStrategy
=
Number
(
this
.
isLive
?
3
:
this
.
playStrategy
)
const
video
=
this
.
video
=
plus
.
video
.
createVideoPlayer
(
'
video
'
+
Date
.
now
(),
Object
.
assign
({},
this
.
attrs
,
this
.
position
,
{
playStrategy
:
isNaN
(
playStrategy
)
?
0
:
playStrategy
})
)
plus
.
webview
.
currentWebview
().
append
(
video
)
if
(
this
.
hidden
)
{
video
.
hide
()
...
...
src/platforms/h5/view/components/map/index.vue
浏览文件 @
754060fc
...
...
@@ -424,13 +424,19 @@ export default {
causedBy
:
'
drag
'
},
getMapInfo
()))
})
maps
.
event
.
addListener
(
map
,
'
zoom_changed
'
,
()
=>
{
const
zoomChangedCallback
=
()
=>
{
this
.
$emit
(
'
update:scale
'
,
map
.
getZoom
())
this
.
$trigger
(
'
regionchange
'
,
{},
Object
.
assign
({
type
:
'
end
'
,
causedBy
:
'
scale
'
},
getMapInfo
()))
})
}
// QQ or Google
maps
.
event
.
addListener
(
map
,
'
zoom_changed
'
,
zoomChangedCallback
)
// AMAP
maps
.
event
.
addListener
(
map
,
'
zoomend
'
,
zoomChangedCallback
)
maps
.
event
.
addListener
(
map
,
'
center_changed
'
,
()
=>
{
var
latitude
var
longitude
...
...
src/platforms/h5/view/components/map/map-marker.js
浏览文件 @
754060fc
...
...
@@ -101,8 +101,16 @@ export default {
marker
.
dom
.
addEventListener
(
'
click
'
,
e
=>
{
this
.
handleAMapMarkerClick
(
e
,
marker
)
})
// 地图缩放会触发touchend,故判断 touchstart 和 touchend touches[0] 是否相同确定是否点击
let
touchStartTouch
=
{}
marker
.
dom
.
addEventListener
(
'
touchstart
'
,
e
=>
{
touchStartTouch
=
e
.
touches
[
0
]
})
marker
.
dom
.
addEventListener
(
'
touchend
'
,
e
=>
{
this
.
handleAMapMarkerClick
(
e
,
marker
)
const
touchEndTouch
=
e
.
changedTouches
[
0
]
if
(
touchStartTouch
.
clientX
===
touchEndTouch
.
clientX
&&
touchStartTouch
.
clientY
===
touchEndTouch
.
clientY
)
{
this
.
handleAMapMarkerClick
(
e
,
marker
)
}
})
}
else
{
maps
.
event
.
addListener
(
marker
,
'
click
'
,
(
e
)
=>
{
...
...
src/platforms/mp-toutiao/runtime/api/protocols.js
浏览文件 @
754060fc
...
...
@@ -98,11 +98,6 @@ const canIUses = [
// 需要做转换的 API 列表
const
protocols
=
{
chooseImage
:
{
args
:
{
sizeType
:
false
}
},
navigateTo
,
redirectTo
,
previewImage
,
...
...
src/platforms/mp-weixin/runtime/wrapper/page-base-parser.js
浏览文件 @
754060fc
...
...
@@ -10,6 +10,8 @@ import {
import
parseComponent
from
'
uni-platform/runtime/wrapper/component-parser
'
import
{
initWorkletMethods
}
from
'
./util
'
const
hooks
=
[
'
onShow
'
,
'
onHide
'
,
...
...
@@ -38,6 +40,9 @@ export default function parseBasePage (vuePageOptions) {
}
else
{
initUnknownHooks
(
pageOptions
.
methods
,
vuePageOptions
,
[
'
onReady
'
])
}
if
(
__PLATFORM__
===
'
mp-weixin
'
)
{
initWorkletMethods
(
pageOptions
.
methods
,
vueOptions
.
methods
)
}
return
pageOptions
}
src/platforms/mp-weixin/runtime/wrapper/util.js
浏览文件 @
754060fc
...
...
@@ -134,3 +134,17 @@ export function toSkip (obj) {
}
return
obj
}
const
WORKLET_RE
=
/_
(
.*
)
_worklet_factory_/
export
function
initWorkletMethods
(
mpMethods
,
vueMethods
)
{
if
(
vueMethods
)
{
Object
.
keys
(
vueMethods
).
forEach
((
name
)
=>
{
const
matches
=
name
.
match
(
WORKLET_RE
)
if
(
matches
)
{
const
workletName
=
matches
[
1
]
mpMethods
[
name
]
=
vueMethods
[
name
]
mpMethods
[
workletName
]
=
vueMethods
[
workletName
]
}
})
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录