Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
406ee152
U
uni-app
项目概览
DCloud
/
uni-app
大约 1 个月 前同步成功
通知
702
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,发现更多精彩内容 >>
提交
406ee152
编写于
2月 05, 2021
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'alpha'
上级
d115c999
48b200e7
变更
54
展开全部
隐藏空白更改
内联
并排
Showing
54 changed file
with
743 addition
and
332 deletion
+743
-332
docs/collocation/manifest.md
docs/collocation/manifest.md
+1
-0
docs/component/image.md
docs/component/image.md
+1
-0
lerna.json
lerna.json
+1
-1
packages/uni-app-plus-nvue/package.json
packages/uni-app-plus-nvue/package.json
+2
-2
packages/uni-app-plus/dist/index.js
packages/uni-app-plus/dist/index.js
+138
-98
packages/uni-app-plus/dist/index.v3.js
packages/uni-app-plus/dist/index.v3.js
+6
-3
packages/uni-app-plus/dist/view.umd.min.js
packages/uni-app-plus/dist/view.umd.min.js
+1
-1
packages/uni-app-plus/package.json
packages/uni-app-plus/package.json
+2
-2
packages/uni-automator/package.json
packages/uni-automator/package.json
+2
-2
packages/uni-cli-shared/package.json
packages/uni-cli-shared/package.json
+2
-2
packages/uni-h5-ui/package.json
packages/uni-h5-ui/package.json
+2
-2
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
+2
-2
packages/uni-migration/package.json
packages/uni-migration/package.json
+2
-2
packages/uni-mp-alipay/dist/index.js
packages/uni-mp-alipay/dist/index.js
+57
-17
packages/uni-mp-alipay/package.json
packages/uni-mp-alipay/package.json
+2
-2
packages/uni-mp-baidu/dist/index.js
packages/uni-mp-baidu/dist/index.js
+57
-17
packages/uni-mp-baidu/package.json
packages/uni-mp-baidu/package.json
+2
-2
packages/uni-mp-kuaishou/dist/index.js
packages/uni-mp-kuaishou/dist/index.js
+57
-17
packages/uni-mp-kuaishou/package.json
packages/uni-mp-kuaishou/package.json
+2
-2
packages/uni-mp-qq/dist/index.js
packages/uni-mp-qq/dist/index.js
+57
-17
packages/uni-mp-qq/package.json
packages/uni-mp-qq/package.json
+2
-2
packages/uni-mp-toutiao/dist/index.js
packages/uni-mp-toutiao/dist/index.js
+57
-17
packages/uni-mp-toutiao/package.json
packages/uni-mp-toutiao/package.json
+2
-2
packages/uni-mp-vue/dist/vue.runtime.esm.js
packages/uni-mp-vue/dist/vue.runtime.esm.js
+5
-4
packages/uni-mp-vue/package.json
packages/uni-mp-vue/package.json
+2
-2
packages/uni-mp-weixin/dist/index.js
packages/uni-mp-weixin/dist/index.js
+70
-30
packages/uni-mp-weixin/package.json
packages/uni-mp-weixin/package.json
+2
-2
packages/uni-quickapp-native/dist/vue.dev.js
packages/uni-quickapp-native/dist/vue.dev.js
+1
-1
packages/uni-quickapp-native/dist/vue.prod.js
packages/uni-quickapp-native/dist/vue.prod.js
+1
-1
packages/uni-quickapp-native/package.json
packages/uni-quickapp-native/package.json
+2
-2
packages/uni-quickapp-webview/dist/index.js
packages/uni-quickapp-webview/dist/index.js
+57
-17
packages/uni-quickapp-webview/package.json
packages/uni-quickapp-webview/package.json
+2
-2
packages/uni-stat/package.json
packages/uni-stat/package.json
+2
-2
packages/uni-template-compiler/package.json
packages/uni-template-compiler/package.json
+2
-2
packages/vue-cli-plugin-hbuilderx/package.json
packages/vue-cli-plugin-hbuilderx/package.json
+2
-2
packages/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/template.js
...builderx/packages/webpack-uni-nvue-loader/lib/template.js
+2
-1
packages/vue-cli-plugin-hbuilderx/packages/weex-styler/lib/shorthand-parser.js
...in-hbuilderx/packages/weex-styler/lib/shorthand-parser.js
+1
-1
packages/vue-cli-plugin-uni-optimize/package.json
packages/vue-cli-plugin-uni-optimize/package.json
+2
-2
packages/vue-cli-plugin-uni/lib/env.js
packages/vue-cli-plugin-uni/lib/env.js
+5
-3
packages/vue-cli-plugin-uni/lib/mp/index.js
packages/vue-cli-plugin-uni/lib/mp/index.js
+5
-1
packages/vue-cli-plugin-uni/package.json
packages/vue-cli-plugin-uni/package.json
+3
-3
packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js
packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js
+1
-1
packages/webpack-uni-mp-loader/package.json
packages/webpack-uni-mp-loader/package.json
+2
-2
packages/webpack-uni-pages-loader/package.json
packages/webpack-uni-pages-loader/package.json
+3
-3
src/core/helpers/protocol/media/choose-file.js
src/core/helpers/protocol/media/choose-file.js
+4
-1
src/core/helpers/protocol/media/choose-image.js
src/core/helpers/protocol/media/choose-image.js
+1
-1
src/core/helpers/protocol/media/choose-video.js
src/core/helpers/protocol/media/choose-video.js
+1
-1
src/core/runtime/index.js
src/core/runtime/index.js
+5
-2
src/core/runtime/wrapper/create-app.js
src/core/runtime/wrapper/create-app.js
+1
-27
src/core/runtime/wrapper/create-subpackage-app.js
src/core/runtime/wrapper/create-subpackage-app.js
+43
-0
src/core/view/components/image/index.vue
src/core/view/components/image/index.vue
+5
-0
src/core/view/mixins/touchtrack.js
src/core/view/mixins/touchtrack.js
+23
-1
src/platforms/mp-weixin/runtime/wrapper/app-base-parser.js
src/platforms/mp-weixin/runtime/wrapper/app-base-parser.js
+30
-2
未找到文件。
docs/collocation/manifest.md
浏览文件 @
406ee152
...
...
@@ -59,6 +59,7 @@ uni 统计配置项
|distribute|Object|App 发布信息,
[
详见
](
/collocation/manifest?id=distribute
)
||
|usingComponents|Boolean|是否启用自定义组件模式,默认为false,
[
编译模式区别详情
](
https://ask.dcloud.net.cn/article/35843
)
|1.9.0+|
|nvueCompiler|String|切换 nvue 编译模式,可选值,
`weex`
:老编译模式,
`uni-app`
: 新编译模式,默认为
`weex`
。
[
编译模式区别详情
](
http://ask.dcloud.net.cn/article/36074
)
|2.0.3+|
|nvueStyleCompiler|String|切换 nvue 样式编译模式,可选值,
`weex`
:老编译模式,
`uni-app`
: 新编译模式,默认为
`weex`
。
[
编译模式区别详情
](
https://ask.dcloud.net.cn/article/38751
)
|3.1.1+|
|renderer|String|可不加载基于 webview 的运行框架,减少包体积、提升启动速度。可选值
`native`
| App-nvue 2.2.0+|
|compilerVersion|Number|编译器版本,可选值:2、3 默认 2
[
详见
](
https://ask.dcloud.net.cn/article/36599
)
|HBuilderX alpha 2.4.4+或HBuilderX 2.5.0+|
|nvueLaunchMode|Number|Nvue 首页启动模式,在 compilerVersion 值为 3 时生效,可选值:normal、fast 默认 normal(HBuilderX alpha 2.4.4-2.4.9 固定为 fast)
[
详见
](
https://ask.dcloud.net.cn/article/36749
)
|2.5.0+|
...
...
docs/component/image.md
浏览文件 @
406ee152
...
...
@@ -10,6 +10,7 @@
|fade-show|Boolean|true|图片显示动画效果|仅App-nvue 2.3.4+ Android有效|
|webp|boolean|false|默认不解析 webP 格式,只支持网络资源|微信小程序2.9.0|
|show-menu-by-longpress|boolean|false|开启长按图片显示识别小程序码菜单|微信小程序2.7.0|
|draggable|boolean|true|鼠标长按是否能拖动图片|仅 H5 平台 3.1.1+ 有效|
|@error|HandleEvent||当错误发生时,发布到 AppService 的事件名,事件对象event.detail = {errMsg: 'something wrong'}||
|@load|HandleEvent||当图片载入完毕时,发布到 AppService 的事件名,事件对象event.detail = {height:'图片高度px', width:'图片宽度px'}|
|
...
...
lerna.json
浏览文件 @
406ee152
...
...
@@ -12,5 +12,5 @@
"message"
:
"chore(release): publish %s"
}
},
"version"
:
"2.0.0-alpha-31
020210201
001"
"version"
:
"2.0.0-alpha-31
120210204
001"
}
packages/uni-app-plus-nvue/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-app-plus-nvue"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"uni-app app-plus-nvue"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -13,5 +13,5 @@
},
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/uni-app-plus/dist/index.js
浏览文件 @
406ee152
...
...
@@ -639,74 +639,6 @@ if (!MPPage.__$wrappered) {
};
}
class
EventChannel
{
constructor
(
id
,
events
)
{
this
.
id
=
id
;
this
.
listener
=
{};
this
.
emitCache
=
{};
if
(
events
)
{
Object
.
keys
(
events
).
forEach
(
name
=>
{
this
.
on
(
name
,
events
[
name
]);
});
}
}
emit
(
eventName
,
...
args
)
{
const
fns
=
this
.
listener
[
eventName
];
if
(
!
fns
)
{
return
(
this
.
emitCache
[
eventName
]
||
(
this
.
emitCache
[
eventName
]
=
[])).
push
(
args
)
}
fns
.
forEach
(
opt
=>
{
opt
.
fn
.
apply
(
opt
.
fn
,
args
);
});
this
.
listener
[
eventName
]
=
fns
.
filter
(
opt
=>
opt
.
type
!==
'
once
'
);
}
on
(
eventName
,
fn
)
{
this
.
_addListener
(
eventName
,
'
on
'
,
fn
);
this
.
_clearCache
(
eventName
);
}
once
(
eventName
,
fn
)
{
this
.
_addListener
(
eventName
,
'
once
'
,
fn
);
this
.
_clearCache
(
eventName
);
}
off
(
eventName
,
fn
)
{
const
fns
=
this
.
listener
[
eventName
];
if
(
!
fns
)
{
return
}
if
(
fn
)
{
for
(
let
i
=
0
;
i
<
fns
.
length
;)
{
if
(
fns
[
i
].
fn
===
fn
)
{
fns
.
splice
(
i
,
1
);
i
--
;
}
i
++
;
}
}
else
{
delete
this
.
listener
[
eventName
];
}
}
_clearCache
(
eventName
)
{
const
cacheArgs
=
this
.
emitCache
[
eventName
];
if
(
cacheArgs
)
{
for
(;
cacheArgs
.
length
>
0
;)
{
this
.
emit
.
apply
(
this
,
[
eventName
].
concat
(
cacheArgs
.
shift
()));
}
}
}
_addListener
(
eventName
,
type
,
fn
)
{
(
this
.
listener
[
eventName
]
||
(
this
.
listener
[
eventName
]
=
[])).
push
({
fn
,
type
});
}
}
const
PAGE_EVENT_HOOKS
=
[
'
onPullDownRefresh
'
,
'
onReachBottom
'
,
...
...
@@ -1245,19 +1177,118 @@ function handleEvent (event) {
}
}
class
EventChannel
{
constructor
(
id
,
events
)
{
this
.
id
=
id
;
this
.
listener
=
{};
this
.
emitCache
=
{};
if
(
events
)
{
Object
.
keys
(
events
).
forEach
(
name
=>
{
this
.
on
(
name
,
events
[
name
]);
});
}
}
emit
(
eventName
,
...
args
)
{
const
fns
=
this
.
listener
[
eventName
];
if
(
!
fns
)
{
return
(
this
.
emitCache
[
eventName
]
||
(
this
.
emitCache
[
eventName
]
=
[])).
push
(
args
)
}
fns
.
forEach
(
opt
=>
{
opt
.
fn
.
apply
(
opt
.
fn
,
args
);
});
this
.
listener
[
eventName
]
=
fns
.
filter
(
opt
=>
opt
.
type
!==
'
once
'
);
}
on
(
eventName
,
fn
)
{
this
.
_addListener
(
eventName
,
'
on
'
,
fn
);
this
.
_clearCache
(
eventName
);
}
once
(
eventName
,
fn
)
{
this
.
_addListener
(
eventName
,
'
once
'
,
fn
);
this
.
_clearCache
(
eventName
);
}
off
(
eventName
,
fn
)
{
const
fns
=
this
.
listener
[
eventName
];
if
(
!
fns
)
{
return
}
if
(
fn
)
{
for
(
let
i
=
0
;
i
<
fns
.
length
;)
{
if
(
fns
[
i
].
fn
===
fn
)
{
fns
.
splice
(
i
,
1
);
i
--
;
}
i
++
;
}
}
else
{
delete
this
.
listener
[
eventName
];
}
}
_clearCache
(
eventName
)
{
const
cacheArgs
=
this
.
emitCache
[
eventName
];
if
(
cacheArgs
)
{
for
(;
cacheArgs
.
length
>
0
;)
{
this
.
emit
.
apply
(
this
,
[
eventName
].
concat
(
cacheArgs
.
shift
()));
}
}
}
_addListener
(
eventName
,
type
,
fn
)
{
(
this
.
listener
[
eventName
]
||
(
this
.
listener
[
eventName
]
=
[])).
push
({
fn
,
type
});
}
}
const
eventChannels
=
{};
const
eventChannelStack
=
[];
function
getEventChannel
(
id
)
{
if
(
id
)
{
const
eventChannel
=
eventChannels
[
id
];
delete
eventChannels
[
id
];
return
eventChannel
}
return
eventChannelStack
.
shift
()
}
const
hooks
=
[
'
onShow
'
,
'
onHide
'
,
'
onError
'
,
'
onPageNotFound
'
,
'
onThemeChange
'
,
'
onPageNotFound
'
,
'
onThemeChange
'
,
'
onUnhandledRejection
'
];
function
initEventChannel
()
{
Vue
.
prototype
.
getOpenerEventChannel
=
function
()
{
if
(
!
this
.
__eventChannel__
)
{
this
.
__eventChannel__
=
new
EventChannel
();
}
return
this
.
__eventChannel__
};
const
callHook
=
Vue
.
prototype
.
__call_hook
;
Vue
.
prototype
.
__call_hook
=
function
(
hook
,
args
)
{
if
(
hook
===
'
onLoad
'
&&
args
&&
args
.
__id__
)
{
this
.
__eventChannel__
=
getEventChannel
(
args
.
__id__
);
delete
args
.
__id__
;
}
return
callHook
.
call
(
this
,
hook
,
args
)
};
}
function
parseBaseApp
(
vm
,
{
mocks
,
initRefs
})
{
initEventChannel
();
if
(
vm
.
$options
.
store
)
{
Vue
.
prototype
.
$store
=
vm
.
$options
.
store
;
}
...
...
@@ -1426,34 +1457,7 @@ function parseApp$1 (vm) {
return
appOptions
}
const
eventChannels
=
{};
const
eventChannelStack
=
[];
function
getEventChannel
(
id
)
{
if
(
id
)
{
const
eventChannel
=
eventChannels
[
id
];
delete
eventChannels
[
id
];
return
eventChannel
}
return
eventChannelStack
.
shift
()
}
function
createApp
(
vm
)
{
Vue
.
prototype
.
getOpenerEventChannel
=
function
()
{
if
(
!
this
.
__eventChannel__
)
{
this
.
__eventChannel__
=
new
EventChannel
();
}
return
this
.
__eventChannel__
};
const
callHook
=
Vue
.
prototype
.
__call_hook
;
Vue
.
prototype
.
__call_hook
=
function
(
hook
,
args
)
{
if
(
hook
===
'
onLoad
'
&&
args
&&
args
.
__id__
)
{
this
.
__eventChannel__
=
getEventChannel
(
args
.
__id__
);
delete
args
.
__id__
;
}
return
callHook
.
call
(
this
,
hook
,
args
)
};
App
(
parseApp$1
(
vm
));
return
vm
}
...
...
@@ -1675,6 +1679,41 @@ function createComponent (vueOptions) {
}
}
function
createSubpackageApp
(
vm
)
{
const
appOptions
=
parseApp$1
(
vm
);
const
app
=
getApp
({
allowDefault
:
true
});
const
globalData
=
app
.
globalData
;
if
(
globalData
)
{
Object
.
keys
(
appOptions
.
globalData
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
globalData
,
name
))
{
globalData
[
name
]
=
appOptions
.
globalData
[
name
];
}
});
}
Object
.
keys
(
appOptions
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
app
,
name
))
{
app
[
name
]
=
appOptions
[
name
];
}
});
if
(
isFn
(
appOptions
.
onShow
)
&&
wx
.
onAppShow
)
{
wx
.
onAppShow
((...
args
)
=>
{
appOptions
.
onShow
.
apply
(
app
,
args
);
});
}
if
(
isFn
(
appOptions
.
onHide
)
&&
wx
.
onAppHide
)
{
wx
.
onAppHide
((...
args
)
=>
{
appOptions
.
onHide
.
apply
(
app
,
args
);
});
}
if
(
isFn
(
appOptions
.
onLaunch
))
{
const
args
=
wx
.
getLaunchOptionsSync
&&
wx
.
getLaunchOptionsSync
();
appOptions
.
onLaunch
.
call
(
app
,
args
);
}
return
vm
}
todos
.
forEach
(
todoApi
=>
{
protocols
[
todoApi
]
=
false
;
});
...
...
@@ -1744,8 +1783,9 @@ if (typeof Proxy !== 'undefined' && "app-plus" !== 'app-plus') {
wx
.
createApp
=
createApp
;
wx
.
createPage
=
createPage
;
wx
.
createComponent
=
createComponent
;
wx
.
createSubpackageApp
=
createSubpackageApp
;
var
uni$1
=
uni
;
export
default
uni$1
;
export
{
createApp
,
createComponent
,
createPage
};
export
{
createApp
,
createComponent
,
createPage
,
createSubpackageApp
};
packages/uni-app-plus/dist/index.v3.js
浏览文件 @
406ee152
...
...
@@ -1356,7 +1356,10 @@ var serviceContext = (function () {
},
extension: {
type: Array,
default: ['']
default: [''],
validator (extension, params) {
if (extension.length === 0) { return 'param extension should not be empty.' }
}
}
};
...
...
@@ -1402,7 +1405,7 @@ var serviceContext = (function () {
type: Array,
default: ['*'],
validator (extension, params) {
if (extension.length === 0)
params.extension = ['*'];
if (extension.length === 0)
{ return 'param extension should not be empty.' }
}
}
};
...
...
@@ -1436,7 +1439,7 @@ var serviceContext = (function () {
type: Array,
default: ['*'],
validator (extension, params) {
if (extension.length === 0)
params.extension = ['*'];
if (extension.length === 0)
{ return 'param extension should not be empty.' }
}
}
};
...
...
packages/uni-app-plus/dist/view.umd.min.js
浏览文件 @
406ee152
此差异已折叠。
点击以展开。
packages/uni-app-plus/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-app-plus"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"uni-app app-plus"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -17,5 +17,5 @@
"name"
:
"app-plus"
,
"title"
:
"APP-PLUS"
},
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/uni-automator/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-automator"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"uni-app automator"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -30,5 +30,5 @@
"node-simctl"
:
"^6.1.0"
,
"puppeteer"
:
"^3.0.1"
},
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/uni-cli-shared/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-cli-shared"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"uni-cli-shared"
,
"main"
:
"lib/index.js"
,
"repository"
:
{
...
...
@@ -23,5 +23,5 @@
"postcss-urlrewrite"
:
"^0.2.2"
,
"strip-json-comments"
:
"^2.0.1"
},
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/uni-h5-ui/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-h5-ui"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"uni-app h5 ui"
,
"main"
:
"dist/index.umd.min.js"
,
"repository"
:
{
...
...
@@ -13,5 +13,5 @@
},
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/uni-h5/dist/index.umd.min.js
浏览文件 @
406ee152
此差异已折叠。
点击以展开。
packages/uni-h5/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-h5"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"uni-app h5"
,
"main"
:
"dist/index.umd.min.js"
,
"repository"
:
{
...
...
@@ -24,5 +24,5 @@
"title"
:
"H5"
,
"main"
:
"lib/h5/uni.config.js"
},
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/uni-migration/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-migration"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"uni-app migration"
,
"main"
:
"lib/index.js"
,
"repository"
:
{
...
...
@@ -20,7 +20,7 @@
},
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
,
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
,
"dependencies"
:
{
"commander"
:
"^4.0.1"
,
"fs-extra"
:
"^8.1.0"
,
...
...
packages/uni-mp-alipay/dist/index.js
浏览文件 @
406ee152
...
...
@@ -1904,15 +1904,33 @@ const hooks = [
'
onShow
'
,
'
onHide
'
,
'
onError
'
,
'
onPageNotFound
'
,
'
onThemeChange
'
,
'
onPageNotFound
'
,
'
onThemeChange
'
,
'
onUnhandledRejection
'
];
function
initEventChannel$1
()
{
Vue
.
prototype
.
getOpenerEventChannel
=
function
()
{
if
(
!
this
.
__eventChannel__
)
{
this
.
__eventChannel__
=
new
EventChannel
();
}
return
this
.
__eventChannel__
};
const
callHook
=
Vue
.
prototype
.
__call_hook
;
Vue
.
prototype
.
__call_hook
=
function
(
hook
,
args
)
{
if
(
hook
===
'
onLoad
'
&&
args
&&
args
.
__id__
)
{
this
.
__eventChannel__
=
getEventChannel
(
args
.
__id__
);
delete
args
.
__id__
;
}
return
callHook
.
call
(
this
,
hook
,
args
)
};
}
function
parseBaseApp
(
vm
,
{
mocks
,
initRefs
})
{
initEventChannel$1
();
if
(
vm
.
$options
.
store
)
{
Vue
.
prototype
.
$store
=
vm
.
$options
.
store
;
}
...
...
@@ -2316,20 +2334,6 @@ function parseApp (vm) {
}
function
createApp
(
vm
)
{
Vue
.
prototype
.
getOpenerEventChannel
=
function
()
{
if
(
!
this
.
__eventChannel__
)
{
this
.
__eventChannel__
=
new
EventChannel
();
}
return
this
.
__eventChannel__
};
const
callHook
=
Vue
.
prototype
.
__call_hook
;
Vue
.
prototype
.
__call_hook
=
function
(
hook
,
args
)
{
if
(
hook
===
'
onLoad
'
&&
args
&&
args
.
__id__
)
{
this
.
__eventChannel__
=
getEventChannel
(
args
.
__id__
);
delete
args
.
__id__
;
}
return
callHook
.
call
(
this
,
hook
,
args
)
};
App
(
parseApp
(
vm
));
return
vm
}
...
...
@@ -2588,6 +2592,41 @@ function createComponent (vueOptions) {
}
}
function
createSubpackageApp
(
vm
)
{
const
appOptions
=
parseApp
(
vm
);
const
app
=
getApp
({
allowDefault
:
true
});
const
globalData
=
app
.
globalData
;
if
(
globalData
)
{
Object
.
keys
(
appOptions
.
globalData
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
globalData
,
name
))
{
globalData
[
name
]
=
appOptions
.
globalData
[
name
];
}
});
}
Object
.
keys
(
appOptions
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
app
,
name
))
{
app
[
name
]
=
appOptions
[
name
];
}
});
if
(
isFn
(
appOptions
.
onShow
)
&&
my
.
onAppShow
)
{
my
.
onAppShow
((...
args
)
=>
{
appOptions
.
onShow
.
apply
(
app
,
args
);
});
}
if
(
isFn
(
appOptions
.
onHide
)
&&
my
.
onAppHide
)
{
my
.
onAppHide
((...
args
)
=>
{
appOptions
.
onHide
.
apply
(
app
,
args
);
});
}
if
(
isFn
(
appOptions
.
onLaunch
))
{
const
args
=
my
.
getLaunchOptionsSync
&&
my
.
getLaunchOptionsSync
();
appOptions
.
onLaunch
.
call
(
app
,
args
);
}
return
vm
}
todos
.
forEach
(
todoApi
=>
{
protocols
[
todoApi
]
=
false
;
});
...
...
@@ -2667,8 +2706,9 @@ if (typeof Proxy !== 'undefined' && "mp-alipay" !== 'app-plus') {
my
.
createApp
=
createApp
;
my
.
createPage
=
createPage
;
my
.
createComponent
=
createComponent
;
my
.
createSubpackageApp
=
createSubpackageApp
;
var
uni$1
=
uni
;
export
default
uni$1
;
export
{
createApp
,
createComponent
,
createPage
};
export
{
createApp
,
createComponent
,
createPage
,
createSubpackageApp
};
packages/uni-mp-alipay/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-mp-alipay"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"uni-app mp-alipay"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -17,5 +17,5 @@
"name"
:
"mp-alipay"
,
"title"
:
"支付宝小程序"
},
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/uni-mp-baidu/dist/index.js
浏览文件 @
406ee152
...
...
@@ -1593,15 +1593,33 @@ const hooks = [
'
onShow
'
,
'
onHide
'
,
'
onError
'
,
'
onPageNotFound
'
,
'
onThemeChange
'
,
'
onPageNotFound
'
,
'
onThemeChange
'
,
'
onUnhandledRejection
'
];
function
initEventChannel$1
()
{
Vue
.
prototype
.
getOpenerEventChannel
=
function
()
{
if
(
!
this
.
__eventChannel__
)
{
this
.
__eventChannel__
=
new
EventChannel
();
}
return
this
.
__eventChannel__
};
const
callHook
=
Vue
.
prototype
.
__call_hook
;
Vue
.
prototype
.
__call_hook
=
function
(
hook
,
args
)
{
if
(
hook
===
'
onLoad
'
&&
args
&&
args
.
__id__
)
{
this
.
__eventChannel__
=
getEventChannel
(
args
.
__id__
);
delete
args
.
__id__
;
}
return
callHook
.
call
(
this
,
hook
,
args
)
};
}
function
parseBaseApp
(
vm
,
{
mocks
,
initRefs
})
{
initEventChannel$1
();
if
(
vm
.
$options
.
store
)
{
Vue
.
prototype
.
$store
=
vm
.
$options
.
store
;
}
...
...
@@ -1769,20 +1787,6 @@ function parseApp (vm) {
}
function
createApp
(
vm
)
{
Vue
.
prototype
.
getOpenerEventChannel
=
function
()
{
if
(
!
this
.
__eventChannel__
)
{
this
.
__eventChannel__
=
new
EventChannel
();
}
return
this
.
__eventChannel__
};
const
callHook
=
Vue
.
prototype
.
__call_hook
;
Vue
.
prototype
.
__call_hook
=
function
(
hook
,
args
)
{
if
(
hook
===
'
onLoad
'
&&
args
&&
args
.
__id__
)
{
this
.
__eventChannel__
=
getEventChannel
(
args
.
__id__
);
delete
args
.
__id__
;
}
return
callHook
.
call
(
this
,
hook
,
args
)
};
App
(
parseApp
(
vm
));
return
vm
}
...
...
@@ -2074,6 +2078,41 @@ function createComponent (vueOptions) {
}
}
function
createSubpackageApp
(
vm
)
{
const
appOptions
=
parseApp
(
vm
);
const
app
=
getApp
({
allowDefault
:
true
});
const
globalData
=
app
.
globalData
;
if
(
globalData
)
{
Object
.
keys
(
appOptions
.
globalData
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
globalData
,
name
))
{
globalData
[
name
]
=
appOptions
.
globalData
[
name
];
}
});
}
Object
.
keys
(
appOptions
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
app
,
name
))
{
app
[
name
]
=
appOptions
[
name
];
}
});
if
(
isFn
(
appOptions
.
onShow
)
&&
swan
.
onAppShow
)
{
swan
.
onAppShow
((...
args
)
=>
{
appOptions
.
onShow
.
apply
(
app
,
args
);
});
}
if
(
isFn
(
appOptions
.
onHide
)
&&
swan
.
onAppHide
)
{
swan
.
onAppHide
((...
args
)
=>
{
appOptions
.
onHide
.
apply
(
app
,
args
);
});
}
if
(
isFn
(
appOptions
.
onLaunch
))
{
const
args
=
swan
.
getLaunchOptionsSync
&&
swan
.
getLaunchOptionsSync
();
appOptions
.
onLaunch
.
call
(
app
,
args
);
}
return
vm
}
todos
.
forEach
(
todoApi
=>
{
protocols
[
todoApi
]
=
false
;
});
...
...
@@ -2153,8 +2192,9 @@ if (typeof Proxy !== 'undefined' && "mp-baidu" !== 'app-plus') {
swan
.
createApp
=
createApp
;
swan
.
createPage
=
createPage
;
swan
.
createComponent
=
createComponent
;
swan
.
createSubpackageApp
=
createSubpackageApp
;
var
uni$1
=
uni
;
export
default
uni$1
;
export
{
createApp
,
createComponent
,
createPage
};
export
{
createApp
,
createComponent
,
createPage
,
createSubpackageApp
};
packages/uni-mp-baidu/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-mp-baidu"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"uni-app mp-baidu"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -17,5 +17,5 @@
"name"
:
"mp-baidu"
,
"title"
:
"百度小程序"
},
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/uni-mp-kuaishou/dist/index.js
浏览文件 @
406ee152
...
...
@@ -1345,15 +1345,33 @@ const hooks = [
'
onShow
'
,
'
onHide
'
,
'
onError
'
,
'
onPageNotFound
'
,
'
onThemeChange
'
,
'
onPageNotFound
'
,
'
onThemeChange
'
,
'
onUnhandledRejection
'
];
function
initEventChannel$1
()
{
Vue
.
prototype
.
getOpenerEventChannel
=
function
()
{
if
(
!
this
.
__eventChannel__
)
{
this
.
__eventChannel__
=
new
EventChannel
();
}
return
this
.
__eventChannel__
};
const
callHook
=
Vue
.
prototype
.
__call_hook
;
Vue
.
prototype
.
__call_hook
=
function
(
hook
,
args
)
{
if
(
hook
===
'
onLoad
'
&&
args
&&
args
.
__id__
)
{
this
.
__eventChannel__
=
getEventChannel
(
args
.
__id__
);
delete
args
.
__id__
;
}
return
callHook
.
call
(
this
,
hook
,
args
)
};
}
function
parseBaseApp
(
vm
,
{
mocks
,
initRefs
})
{
initEventChannel$1
();
if
(
vm
.
$options
.
store
)
{
Vue
.
prototype
.
$store
=
vm
.
$options
.
store
;
}
...
...
@@ -1515,20 +1533,6 @@ function parseApp$1 (vm) {
}
function
createApp
(
vm
)
{
Vue
.
prototype
.
getOpenerEventChannel
=
function
()
{
if
(
!
this
.
__eventChannel__
)
{
this
.
__eventChannel__
=
new
EventChannel
();
}
return
this
.
__eventChannel__
};
const
callHook
=
Vue
.
prototype
.
__call_hook
;
Vue
.
prototype
.
__call_hook
=
function
(
hook
,
args
)
{
if
(
hook
===
'
onLoad
'
&&
args
&&
args
.
__id__
)
{
this
.
__eventChannel__
=
getEventChannel
(
args
.
__id__
);
delete
args
.
__id__
;
}
return
callHook
.
call
(
this
,
hook
,
args
)
};
App
(
parseApp$1
(
vm
));
return
vm
}
...
...
@@ -1732,6 +1736,41 @@ function createComponent (vueOptions) {
}
}
function
createSubpackageApp
(
vm
)
{
const
appOptions
=
parseApp$1
(
vm
);
const
app
=
getApp
({
allowDefault
:
true
});
const
globalData
=
app
.
globalData
;
if
(
globalData
)
{
Object
.
keys
(
appOptions
.
globalData
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
globalData
,
name
))
{
globalData
[
name
]
=
appOptions
.
globalData
[
name
];
}
});
}
Object
.
keys
(
appOptions
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
app
,
name
))
{
app
[
name
]
=
appOptions
[
name
];
}
});
if
(
isFn
(
appOptions
.
onShow
)
&&
ks
.
onAppShow
)
{
ks
.
onAppShow
((...
args
)
=>
{
appOptions
.
onShow
.
apply
(
app
,
args
);
});
}
if
(
isFn
(
appOptions
.
onHide
)
&&
ks
.
onAppHide
)
{
ks
.
onAppHide
((...
args
)
=>
{
appOptions
.
onHide
.
apply
(
app
,
args
);
});
}
if
(
isFn
(
appOptions
.
onLaunch
))
{
const
args
=
ks
.
getLaunchOptionsSync
&&
ks
.
getLaunchOptionsSync
();
appOptions
.
onLaunch
.
call
(
app
,
args
);
}
return
vm
}
todos
.
forEach
(
todoApi
=>
{
protocols
[
todoApi
]
=
false
;
});
...
...
@@ -1811,8 +1850,9 @@ if (typeof Proxy !== 'undefined' && "mp-kuaishou" !== 'app-plus') {
ks
.
createApp
=
createApp
;
ks
.
createPage
=
createPage
;
ks
.
createComponent
=
createComponent
;
ks
.
createSubpackageApp
=
createSubpackageApp
;
var
uni$1
=
uni
;
export
default
uni$1
;
export
{
createApp
,
createComponent
,
createPage
};
export
{
createApp
,
createComponent
,
createPage
,
createSubpackageApp
};
packages/uni-mp-kuaishou/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-mp-kuaishou"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"uni-app mp-kuaishou"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -17,5 +17,5 @@
"name"
:
"mp-kuaishou"
,
"title"
:
"快手小程序"
},
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/uni-mp-qq/dist/index.js
浏览文件 @
406ee152
...
...
@@ -1506,15 +1506,33 @@ const hooks = [
'
onShow
'
,
'
onHide
'
,
'
onError
'
,
'
onPageNotFound
'
,
'
onThemeChange
'
,
'
onPageNotFound
'
,
'
onThemeChange
'
,
'
onUnhandledRejection
'
];
function
initEventChannel$1
()
{
Vue
.
prototype
.
getOpenerEventChannel
=
function
()
{
if
(
!
this
.
__eventChannel__
)
{
this
.
__eventChannel__
=
new
EventChannel
();
}
return
this
.
__eventChannel__
};
const
callHook
=
Vue
.
prototype
.
__call_hook
;
Vue
.
prototype
.
__call_hook
=
function
(
hook
,
args
)
{
if
(
hook
===
'
onLoad
'
&&
args
&&
args
.
__id__
)
{
this
.
__eventChannel__
=
getEventChannel
(
args
.
__id__
);
delete
args
.
__id__
;
}
return
callHook
.
call
(
this
,
hook
,
args
)
};
}
function
parseBaseApp
(
vm
,
{
mocks
,
initRefs
})
{
initEventChannel$1
();
if
(
vm
.
$options
.
store
)
{
Vue
.
prototype
.
$store
=
vm
.
$options
.
store
;
}
...
...
@@ -1681,20 +1699,6 @@ function parseApp$1 (vm) {
}
function
createApp
(
vm
)
{
Vue
.
prototype
.
getOpenerEventChannel
=
function
()
{
if
(
!
this
.
__eventChannel__
)
{
this
.
__eventChannel__
=
new
EventChannel
();
}
return
this
.
__eventChannel__
};
const
callHook
=
Vue
.
prototype
.
__call_hook
;
Vue
.
prototype
.
__call_hook
=
function
(
hook
,
args
)
{
if
(
hook
===
'
onLoad
'
&&
args
&&
args
.
__id__
)
{
this
.
__eventChannel__
=
getEventChannel
(
args
.
__id__
);
delete
args
.
__id__
;
}
return
callHook
.
call
(
this
,
hook
,
args
)
};
App
(
parseApp$1
(
vm
));
return
vm
}
...
...
@@ -1905,6 +1909,41 @@ function createComponent (vueOptions) {
}
}
function
createSubpackageApp
(
vm
)
{
const
appOptions
=
parseApp$1
(
vm
);
const
app
=
getApp
({
allowDefault
:
true
});
const
globalData
=
app
.
globalData
;
if
(
globalData
)
{
Object
.
keys
(
appOptions
.
globalData
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
globalData
,
name
))
{
globalData
[
name
]
=
appOptions
.
globalData
[
name
];
}
});
}
Object
.
keys
(
appOptions
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
app
,
name
))
{
app
[
name
]
=
appOptions
[
name
];
}
});
if
(
isFn
(
appOptions
.
onShow
)
&&
wx
.
onAppShow
)
{
wx
.
onAppShow
((...
args
)
=>
{
appOptions
.
onShow
.
apply
(
app
,
args
);
});
}
if
(
isFn
(
appOptions
.
onHide
)
&&
wx
.
onAppHide
)
{
wx
.
onAppHide
((...
args
)
=>
{
appOptions
.
onHide
.
apply
(
app
,
args
);
});
}
if
(
isFn
(
appOptions
.
onLaunch
))
{
const
args
=
wx
.
getLaunchOptionsSync
&&
wx
.
getLaunchOptionsSync
();
appOptions
.
onLaunch
.
call
(
app
,
args
);
}
return
vm
}
todos
.
forEach
(
todoApi
=>
{
protocols
[
todoApi
]
=
false
;
});
...
...
@@ -1984,8 +2023,9 @@ if (typeof Proxy !== 'undefined' && "mp-qq" !== 'app-plus') {
wx
.
createApp
=
createApp
;
wx
.
createPage
=
createPage
;
wx
.
createComponent
=
createComponent
;
wx
.
createSubpackageApp
=
createSubpackageApp
;
var
uni$1
=
uni
;
export
default
uni$1
;
export
{
createApp
,
createComponent
,
createPage
};
export
{
createApp
,
createComponent
,
createPage
,
createSubpackageApp
};
packages/uni-mp-qq/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-mp-qq"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"uni-app mp-qq"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -17,5 +17,5 @@
"name"
:
"mp-qq"
,
"title"
:
"QQ小程序"
},
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/uni-mp-toutiao/dist/index.js
浏览文件 @
406ee152
...
...
@@ -1598,15 +1598,33 @@ const hooks = [
'
onShow
'
,
'
onHide
'
,
'
onError
'
,
'
onPageNotFound
'
,
'
onThemeChange
'
,
'
onPageNotFound
'
,
'
onThemeChange
'
,
'
onUnhandledRejection
'
];
function
initEventChannel$1
()
{
Vue
.
prototype
.
getOpenerEventChannel
=
function
()
{
if
(
!
this
.
__eventChannel__
)
{
this
.
__eventChannel__
=
new
EventChannel
();
}
return
this
.
__eventChannel__
};
const
callHook
=
Vue
.
prototype
.
__call_hook
;
Vue
.
prototype
.
__call_hook
=
function
(
hook
,
args
)
{
if
(
hook
===
'
onLoad
'
&&
args
&&
args
.
__id__
)
{
this
.
__eventChannel__
=
getEventChannel
(
args
.
__id__
);
delete
args
.
__id__
;
}
return
callHook
.
call
(
this
,
hook
,
args
)
};
}
function
parseBaseApp
(
vm
,
{
mocks
,
initRefs
})
{
initEventChannel$1
();
if
(
vm
.
$options
.
store
)
{
Vue
.
prototype
.
$store
=
vm
.
$options
.
store
;
}
...
...
@@ -1848,20 +1866,6 @@ function parseApp (vm) {
}
function
createApp
(
vm
)
{
Vue
.
prototype
.
getOpenerEventChannel
=
function
()
{
if
(
!
this
.
__eventChannel__
)
{
this
.
__eventChannel__
=
new
EventChannel
();
}
return
this
.
__eventChannel__
};
const
callHook
=
Vue
.
prototype
.
__call_hook
;
Vue
.
prototype
.
__call_hook
=
function
(
hook
,
args
)
{
if
(
hook
===
'
onLoad
'
&&
args
&&
args
.
__id__
)
{
this
.
__eventChannel__
=
getEventChannel
(
args
.
__id__
);
delete
args
.
__id__
;
}
return
callHook
.
call
(
this
,
hook
,
args
)
};
App
(
parseApp
(
vm
));
return
vm
}
...
...
@@ -2113,6 +2117,41 @@ function createComponent (vueOptions) {
}
}
function
createSubpackageApp
(
vm
)
{
const
appOptions
=
parseApp
(
vm
);
const
app
=
getApp
({
allowDefault
:
true
});
const
globalData
=
app
.
globalData
;
if
(
globalData
)
{
Object
.
keys
(
appOptions
.
globalData
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
globalData
,
name
))
{
globalData
[
name
]
=
appOptions
.
globalData
[
name
];
}
});
}
Object
.
keys
(
appOptions
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
app
,
name
))
{
app
[
name
]
=
appOptions
[
name
];
}
});
if
(
isFn
(
appOptions
.
onShow
)
&&
tt
.
onAppShow
)
{
tt
.
onAppShow
((...
args
)
=>
{
appOptions
.
onShow
.
apply
(
app
,
args
);
});
}
if
(
isFn
(
appOptions
.
onHide
)
&&
tt
.
onAppHide
)
{
tt
.
onAppHide
((...
args
)
=>
{
appOptions
.
onHide
.
apply
(
app
,
args
);
});
}
if
(
isFn
(
appOptions
.
onLaunch
))
{
const
args
=
tt
.
getLaunchOptionsSync
&&
tt
.
getLaunchOptionsSync
();
appOptions
.
onLaunch
.
call
(
app
,
args
);
}
return
vm
}
todos
.
forEach
(
todoApi
=>
{
protocols
[
todoApi
]
=
false
;
});
...
...
@@ -2192,8 +2231,9 @@ if (typeof Proxy !== 'undefined' && "mp-toutiao" !== 'app-plus') {
tt
.
createApp
=
createApp
;
tt
.
createPage
=
createPage
;
tt
.
createComponent
=
createComponent
;
tt
.
createSubpackageApp
=
createSubpackageApp
;
var
uni$1
=
uni
;
export
default
uni$1
;
export
{
createApp
,
createComponent
,
createPage
};
export
{
createApp
,
createComponent
,
createPage
,
createSubpackageApp
};
packages/uni-mp-toutiao/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-mp-toutiao"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"uni-app mp-toutiao"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -17,5 +17,5 @@
"name"
:
"mp-toutiao"
,
"title"
:
"字节跳动小程序"
},
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/uni-mp-vue/dist/vue.runtime.esm.js
浏览文件 @
406ee152
...
...
@@ -2990,6 +2990,7 @@ function createComponentInstance(vnode, parent, suspense) {
return
instance
;
}
let
currentInstance
=
null
;
const
getCurrentInstance
=
()
=>
currentInstance
||
currentRenderingInstance
;
const
setCurrentInstance
=
(
instance
)
=>
{
currentInstance
=
instance
;
};
...
...
@@ -3247,7 +3248,7 @@ function defineEmit() {
}
// Core API ------------------------------------------------------------------
const
version
=
"
3.0.
4
"
;
const
version
=
"
3.0.
5
"
;
// import deepCopy from './deepCopy'
/**
...
...
@@ -3661,7 +3662,7 @@ function createVueApp(rootComponent, rootProps = null) {
}
function
applyOptions$1
(
options
,
instance
,
publicThis
)
{
Object
.
keys
(
options
).
forEach
(
name
=>
{
Object
.
keys
(
options
).
forEach
(
(
name
)
=>
{
if
(
name
.
indexOf
(
'
on
'
)
===
0
)
{
const
hook
=
options
[
name
];
if
(
isFunction
(
hook
))
{
...
...
@@ -3737,7 +3738,7 @@ var plugin = {
createMiniProgramApp
(
instance
);
return
instance
;
};
}
}
,
};
// @ts-ignore
...
...
@@ -3773,4 +3774,4 @@ function createApp(rootComponent, rootProps = null) {
return
createVueApp
(
rootComponent
,
rootProps
).
use
(
plugin
);
}
export
{
callWithAsyncErrorHandling
,
callWithErrorHandling
,
computed$1
as
computed
,
createApp
,
createHook$1
as
createHook
,
createVueApp
,
customRef
,
defineComponent
,
defineEmit
,
defineProps
,
inject
,
injectHook
,
isInSSRComponentSetup
,
isProxy
,
isReactive
,
isReadonly
,
isRef
,
logError
,
markRaw
,
nextTick
,
onActivated
,
onAddToFavorites
,
onBackPress
,
onBeforeMount
,
onBeforeUnmount
,
onBeforeUpdate
,
onDeactivated
,
onError
,
onErrorCaptured
,
onHide
,
onLaunch
,
onLoad
,
onMounted
,
onNavigationBarButtonTap
,
onNavigationBarSearchInputChanged
,
onNavigationBarSearchInputClicked
,
onNavigationBarSearchInputConfirmed
,
onNavigationBarSearchInputFocusChanged
,
onPageNotFound
,
onPageScroll
,
onPullDownRefresh
,
onReachBottom
,
onReady
,
onRenderTracked
,
onRenderTriggered
,
onResize
,
onShareAppMessage
,
onShareTimeline
,
onShow
,
onTabItemTap
,
onThemeChange
,
onUnhandledRejection
,
onUnload
,
onUnmounted
,
onUpdated
,
provide
,
reactive
,
readonly
,
ref
,
resolveDirective
,
shallowReactive
,
shallowReadonly
,
shallowRef
,
toRaw
,
toRef
,
toRefs
,
triggerRef
,
unref
,
version
,
warn
,
watch
,
watchEffect
,
withDirectives
};
export
{
callWithAsyncErrorHandling
,
callWithErrorHandling
,
computed$1
as
computed
,
createApp
,
createHook$1
as
createHook
,
createVueApp
,
customRef
,
defineComponent
,
defineEmit
,
defineProps
,
getCurrentInstance
,
inject
,
injectHook
,
isInSSRComponentSetup
,
isProxy
,
isReactive
,
isReadonly
,
isRef
,
logError
,
markRaw
,
nextTick
,
onActivated
,
onAddToFavorites
,
onBackPress
,
onBeforeMount
,
onBeforeUnmount
,
onBeforeUpdate
,
onDeactivated
,
onError
,
onErrorCaptured
,
onHide
,
onLaunch
,
onLoad
,
onMounted
,
onNavigationBarButtonTap
,
onNavigationBarSearchInputChanged
,
onNavigationBarSearchInputClicked
,
onNavigationBarSearchInputConfirmed
,
onNavigationBarSearchInputFocusChanged
,
onPageNotFound
,
onPageScroll
,
onPullDownRefresh
,
onReachBottom
,
onReady
,
onRenderTracked
,
onRenderTriggered
,
onResize
,
onShareAppMessage
,
onShareTimeline
,
onShow
,
onTabItemTap
,
onThemeChange
,
onUnhandledRejection
,
onUnload
,
onUnmounted
,
onUpdated
,
provide
,
reactive
,
readonly
,
ref
,
resolveDirective
,
shallowReactive
,
shallowReadonly
,
shallowRef
,
toRaw
,
toRef
,
toRefs
,
triggerRef
,
unref
,
version
,
warn
,
watch
,
watchEffect
,
withDirectives
};
packages/uni-mp-vue/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-mp-vue"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"@dcloudio/uni-mp-vue"
,
"main"
:
"dist/vue.runtime.esm.js"
,
"module"
:
"dist/vue.runtime.esm.js"
,
...
...
@@ -23,5 +23,5 @@
"bugs"
:
{
"url"
:
"https://github.com/dcloudio/uni-app/issues"
},
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/uni-mp-weixin/dist/index.js
浏览文件 @
406ee152
...
...
@@ -1246,19 +1246,50 @@ function handleEvent (event) {
}
}
const
eventChannels
=
{};
const
eventChannelStack
=
[];
function
getEventChannel
(
id
)
{
if
(
id
)
{
const
eventChannel
=
eventChannels
[
id
];
delete
eventChannels
[
id
];
return
eventChannel
}
return
eventChannelStack
.
shift
()
}
const
hooks
=
[
'
onShow
'
,
'
onHide
'
,
'
onError
'
,
'
onPageNotFound
'
,
'
onThemeChange
'
,
'
onPageNotFound
'
,
'
onThemeChange
'
,
'
onUnhandledRejection
'
];
function
initEventChannel
()
{
Vue
.
prototype
.
getOpenerEventChannel
=
function
()
{
// 微信小程序使用自身getOpenerEventChannel
{
return
this
.
$scope
.
getOpenerEventChannel
()
}
};
const
callHook
=
Vue
.
prototype
.
__call_hook
;
Vue
.
prototype
.
__call_hook
=
function
(
hook
,
args
)
{
if
(
hook
===
'
onLoad
'
&&
args
&&
args
.
__id__
)
{
this
.
__eventChannel__
=
getEventChannel
(
args
.
__id__
);
delete
args
.
__id__
;
}
return
callHook
.
call
(
this
,
hook
,
args
)
};
}
function
parseBaseApp
(
vm
,
{
mocks
,
initRefs
})
{
initEventChannel
();
if
(
vm
.
$options
.
store
)
{
Vue
.
prototype
.
$store
=
vm
.
$options
.
store
;
}
...
...
@@ -1427,34 +1458,7 @@ function parseApp (vm) {
})
}
const
eventChannels
=
{};
const
eventChannelStack
=
[];
function
getEventChannel
(
id
)
{
if
(
id
)
{
const
eventChannel
=
eventChannels
[
id
];
delete
eventChannels
[
id
];
return
eventChannel
}
return
eventChannelStack
.
shift
()
}
function
createApp
(
vm
)
{
Vue
.
prototype
.
getOpenerEventChannel
=
function
()
{
// 微信小程序使用自身getOpenerEventChannel
{
return
this
.
$scope
.
getOpenerEventChannel
()
}
};
const
callHook
=
Vue
.
prototype
.
__call_hook
;
Vue
.
prototype
.
__call_hook
=
function
(
hook
,
args
)
{
if
(
hook
===
'
onLoad
'
&&
args
&&
args
.
__id__
)
{
this
.
__eventChannel__
=
getEventChannel
(
args
.
__id__
);
delete
args
.
__id__
;
}
return
callHook
.
call
(
this
,
hook
,
args
)
};
App
(
parseApp
(
vm
));
return
vm
}
...
...
@@ -1657,6 +1661,41 @@ function createComponent (vueOptions) {
}
}
function
createSubpackageApp
(
vm
)
{
const
appOptions
=
parseApp
(
vm
);
const
app
=
getApp
({
allowDefault
:
true
});
const
globalData
=
app
.
globalData
;
if
(
globalData
)
{
Object
.
keys
(
appOptions
.
globalData
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
globalData
,
name
))
{
globalData
[
name
]
=
appOptions
.
globalData
[
name
];
}
});
}
Object
.
keys
(
appOptions
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
app
,
name
))
{
app
[
name
]
=
appOptions
[
name
];
}
});
if
(
isFn
(
appOptions
.
onShow
)
&&
wx
.
onAppShow
)
{
wx
.
onAppShow
((...
args
)
=>
{
appOptions
.
onShow
.
apply
(
app
,
args
);
});
}
if
(
isFn
(
appOptions
.
onHide
)
&&
wx
.
onAppHide
)
{
wx
.
onAppHide
((...
args
)
=>
{
appOptions
.
onHide
.
apply
(
app
,
args
);
});
}
if
(
isFn
(
appOptions
.
onLaunch
))
{
const
args
=
wx
.
getLaunchOptionsSync
&&
wx
.
getLaunchOptionsSync
();
appOptions
.
onLaunch
.
call
(
app
,
args
);
}
return
vm
}
todos
.
forEach
(
todoApi
=>
{
protocols
[
todoApi
]
=
false
;
});
...
...
@@ -1736,8 +1775,9 @@ if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
wx
.
createApp
=
createApp
;
wx
.
createPage
=
createPage
;
wx
.
createComponent
=
createComponent
;
wx
.
createSubpackageApp
=
createSubpackageApp
;
var
uni$1
=
uni
;
export
default
uni$1
;
export
{
createApp
,
createComponent
,
createPage
};
export
{
createApp
,
createComponent
,
createPage
,
createSubpackageApp
};
packages/uni-mp-weixin/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-mp-weixin"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"uni-app mp-weixin"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -17,5 +17,5 @@
"name"
:
"mp-weixin"
,
"title"
:
"微信小程序"
},
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/uni-quickapp-native/dist/vue.dev.js
浏览文件 @
406ee152
此差异已折叠。
点击以展开。
packages/uni-quickapp-native/dist/vue.prod.js
浏览文件 @
406ee152
此差异已折叠。
点击以展开。
packages/uni-quickapp-native/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-quickapp-native"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"uni-app quickapp-native"
,
"main"
:
"dist/vue.prod.js"
,
"repository"
:
{
...
...
@@ -19,7 +19,7 @@
},
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
,
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
,
"uni-app"
:
{
"name"
:
"quickapp-native"
,
"title"
:
"快应用(Native)版"
...
...
packages/uni-quickapp-webview/dist/index.js
浏览文件 @
406ee152
...
...
@@ -1320,15 +1320,33 @@ const hooks = [
'
onShow
'
,
'
onHide
'
,
'
onError
'
,
'
onPageNotFound
'
,
'
onThemeChange
'
,
'
onPageNotFound
'
,
'
onThemeChange
'
,
'
onUnhandledRejection
'
];
function
initEventChannel$1
()
{
Vue
.
prototype
.
getOpenerEventChannel
=
function
()
{
if
(
!
this
.
__eventChannel__
)
{
this
.
__eventChannel__
=
new
EventChannel
();
}
return
this
.
__eventChannel__
};
const
callHook
=
Vue
.
prototype
.
__call_hook
;
Vue
.
prototype
.
__call_hook
=
function
(
hook
,
args
)
{
if
(
hook
===
'
onLoad
'
&&
args
&&
args
.
__id__
)
{
this
.
__eventChannel__
=
getEventChannel
(
args
.
__id__
);
delete
args
.
__id__
;
}
return
callHook
.
call
(
this
,
hook
,
args
)
};
}
function
parseBaseApp
(
vm
,
{
mocks
,
initRefs
})
{
initEventChannel$1
();
if
(
vm
.
$options
.
store
)
{
Vue
.
prototype
.
$store
=
vm
.
$options
.
store
;
}
...
...
@@ -1558,20 +1576,6 @@ function parseApp (vm) {
}
function
createApp
(
vm
)
{
Vue
.
prototype
.
getOpenerEventChannel
=
function
()
{
if
(
!
this
.
__eventChannel__
)
{
this
.
__eventChannel__
=
new
EventChannel
();
}
return
this
.
__eventChannel__
};
const
callHook
=
Vue
.
prototype
.
__call_hook
;
Vue
.
prototype
.
__call_hook
=
function
(
hook
,
args
)
{
if
(
hook
===
'
onLoad
'
&&
args
&&
args
.
__id__
)
{
this
.
__eventChannel__
=
getEventChannel
(
args
.
__id__
);
delete
args
.
__id__
;
}
return
callHook
.
call
(
this
,
hook
,
args
)
};
App
(
parseApp
(
vm
));
return
vm
}
...
...
@@ -1823,6 +1827,41 @@ function createComponent (vueOptions) {
}
}
function
createSubpackageApp
(
vm
)
{
const
appOptions
=
parseApp
(
vm
);
const
app
=
getApp
({
allowDefault
:
true
});
const
globalData
=
app
.
globalData
;
if
(
globalData
)
{
Object
.
keys
(
appOptions
.
globalData
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
globalData
,
name
))
{
globalData
[
name
]
=
appOptions
.
globalData
[
name
];
}
});
}
Object
.
keys
(
appOptions
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
app
,
name
))
{
app
[
name
]
=
appOptions
[
name
];
}
});
if
(
isFn
(
appOptions
.
onShow
)
&&
qa
.
onAppShow
)
{
qa
.
onAppShow
((...
args
)
=>
{
appOptions
.
onShow
.
apply
(
app
,
args
);
});
}
if
(
isFn
(
appOptions
.
onHide
)
&&
qa
.
onAppHide
)
{
qa
.
onAppHide
((...
args
)
=>
{
appOptions
.
onHide
.
apply
(
app
,
args
);
});
}
if
(
isFn
(
appOptions
.
onLaunch
))
{
const
args
=
qa
.
getLaunchOptionsSync
&&
qa
.
getLaunchOptionsSync
();
appOptions
.
onLaunch
.
call
(
app
,
args
);
}
return
vm
}
todos
.
forEach
(
todoApi
=>
{
protocols
[
todoApi
]
=
false
;
});
...
...
@@ -1902,8 +1941,9 @@ if (typeof Proxy !== 'undefined' && "quickapp-webview" !== 'app-plus') {
qa
.
createApp
=
createApp
;
qa
.
createPage
=
createPage
;
qa
.
createComponent
=
createComponent
;
qa
.
createSubpackageApp
=
createSubpackageApp
;
var
uni$1
=
uni
;
export
default
uni$1
;
export
{
createApp
,
createComponent
,
createPage
};
export
{
createApp
,
createComponent
,
createPage
,
createSubpackageApp
};
packages/uni-quickapp-webview/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-quickapp-webview"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"uni-app quickapp-webview"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -17,5 +17,5 @@
"name"
:
"quickapp-webview"
,
"title"
:
"快应用(Webview)版"
},
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/uni-stat/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-stat"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
""
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -34,5 +34,5 @@
"rollup-plugin-replace"
:
"^2.2.0"
,
"rollup-plugin-uglify"
:
"^6.0.2"
},
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/uni-template-compiler/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/uni-template-compiler"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"uni-template-compiler"
,
"main"
:
"lib/index.js"
,
"repository"
:
{
...
...
@@ -22,5 +22,5 @@
"@babel/types"
:
"^7.3.3"
,
"vue-template-compiler"
:
"^2.6.10"
},
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/vue-cli-plugin-hbuilderx/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/vue-cli-plugin-hbuilderx"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"HBuilderX plugin for vue-cli 3"
,
"main"
:
"index.js"
,
"repository"
:
{
...
...
@@ -18,5 +18,5 @@
"css"
:
"~2.2.1"
,
"escodegen"
:
"^1.8.1"
},
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/template.js
浏览文件 @
406ee152
...
...
@@ -69,6 +69,7 @@ module.exports = function (content, map) {
}
Object
.
assign
(
appJson
.
globalStyle
,
appJson
.
globalStyle
[
'
app-plus
'
]
||
{})
pageJson
.
style
=
pageJson
.
style
||
{}
Object
.
assign
(
pageJson
.
style
,
pageJson
.
style
[
'
app-plus
'
]
||
{})
const
pageJsonStyle
=
Object
.
assign
(
appJson
.
globalStyle
,
pageJson
.
style
)
if
(
pageJsonStyle
.
disableScroll
===
true
)
{
...
...
@@ -78,4 +79,4 @@ module.exports = function (content, map) {
this
.
callback
(
null
,
`<scroll-view :scroll-y="true" :show-scrollbar="
${
pageJsonStyle
.
scrollIndicator
===
'
none
'
?
'
false
'
:
'
true
'
}
" :enableBackToTop="true" bubble="true" style="flex-direction:column">
${
content
}
</scroll-view>`
,
map
)
}
}
packages/vue-cli-plugin-hbuilderx/packages/weex-styler/lib/shorthand-parser.js
浏览文件 @
406ee152
...
...
@@ -76,7 +76,7 @@ function borderProperty (declaration) {
var
{
value
,
important
}
=
clearImportant
(
declaration
.
value
)
var
position
=
declaration
.
position
var
property
=
declaration
.
property
.
split
(
'
-
'
)[
1
]
var
splitResult
=
value
.
split
(
/
\s
+/
)
var
splitResult
=
value
.
replace
(
/
\s
*,
\s
*/g
,
'
,
'
).
split
(
/
\s
+/
)
var
result
=
[]
switch
(
splitResult
.
length
)
{
case
1
:
...
...
packages/vue-cli-plugin-uni-optimize/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/vue-cli-plugin-uni-optimize"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"uni-app optimize plugin for vue-cli 3"
,
"main"
:
"index.js"
,
"repository"
:
{
...
...
@@ -13,5 +13,5 @@
},
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/vue-cli-plugin-uni/lib/env.js
浏览文件 @
406ee152
...
...
@@ -83,7 +83,7 @@ if (
const
defaultOutputDir
=
'
../../../../dist/
'
+
(
process
.
env
.
NODE_ENV
===
'
production
'
?
'
build
'
:
'
dev
'
)
+
'
/
'
+
(
process
.
env
.
UNI_SUB_PLATFORM
||
process
.
env
.
UNI_PLATFORM
)
process
.
env
.
UNI_OUTPUT_DEFAULT_DIR
=
path
.
resolve
(
__dirname
,
defaultOutputDir
)
if
(
process
.
env
.
UNI_OUTPUT_DIR
&&
process
.
env
.
UNI_OUTPUT_DIR
.
indexOf
(
'
./
'
)
===
0
)
{
process
.
env
.
UNI_OUTPUT_DIR
=
path
.
resolve
(
process
.
cwd
(),
process
.
env
.
UNI_OUTPUT_DIR
)
...
...
@@ -243,8 +243,10 @@ if (isNVueCompiler) {
process
.
env
.
UNI_USING_NVUE_COMPILER
=
true
}
if
(
platformOptions
.
nvueStyleCompiler
!==
'
weex
'
)
{
if
(
platformOptions
.
nvueStyleCompiler
===
'
uni-app
'
)
{
process
.
env
.
UNI_USING_NVUE_STYLE_COMPILER
=
true
}
else
{
platformOptions
.
nvueStyleCompiler
=
'
weex
'
}
if
(
platformOptions
.
usingComponents
===
true
)
{
...
...
@@ -451,4 +453,4 @@ runByHBuilderX && console.log('正在编译中...')
module
.
exports
=
{
manifestPlatformOptions
:
platformOptions
}
}
packages/vue-cli-plugin-uni/lib/mp/index.js
浏览文件 @
406ee152
...
...
@@ -36,7 +36,11 @@ function getProvides () {
}
if
(
process
.
env
.
UNI_USING_COMPONENTS
)
{
provides
.
createApp
=
[
uniPath
,
'
createApp
'
]
if
(
process
.
env
.
UNI_SUBPACKGE
)
{
provides
.
createApp
=
[
uniPath
,
'
createSubpackageApp
'
]
}
else
{
provides
.
createApp
=
[
uniPath
,
'
createApp
'
]
}
provides
.
createPage
=
[
uniPath
,
'
createPage
'
]
provides
.
createComponent
=
[
uniPath
,
'
createComponent
'
]
}
...
...
packages/vue-cli-plugin-uni/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/vue-cli-plugin-uni"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
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.0-alpha-31
020210201
001"
,
"@dcloudio/uni-stat"
:
"^2.0.0-alpha-31
120210204
001"
,
"buffer-json"
:
"^2.0.0"
,
"copy-webpack-plugin"
:
"^5.1.1"
,
"cross-env"
:
"^5.2.0"
,
...
...
@@ -37,5 +37,5 @@
"wrap-loader"
:
"^0.2.0"
,
"xregexp"
:
"4.0.0"
},
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js
浏览文件 @
406ee152
此差异已折叠。
点击以展开。
packages/webpack-uni-mp-loader/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/webpack-uni-mp-loader"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
001"
,
"description"
:
"webpack-uni-mp-loader"
,
"main"
:
"index.js"
,
"repository"
:
{
...
...
@@ -16,5 +16,5 @@
},
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
packages/webpack-uni-pages-loader/package.json
浏览文件 @
406ee152
{
"name"
:
"@dcloudio/webpack-uni-pages-loader"
,
"version"
:
"2.0.0-alpha-31
020210201
001"
,
"version"
:
"2.0.0-alpha-31
120210204
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.1.
0
"
"compilerVersion"
:
"3.1.
1
"
},
"gitHead"
:
"
e43df719e16464b00873adb52ac6a64c91036a79
"
"gitHead"
:
"
b366367ac0b63f41ef205dc93eee55d8e9f8f3ed
"
}
src/core/helpers/protocol/media/choose-file.js
浏览文件 @
406ee152
...
...
@@ -32,6 +32,9 @@ export const chooseFile = {
},
extension
:
{
type
:
Array
,
default
:
[
''
]
default
:
[
''
],
validator
(
extension
,
params
)
{
if
(
extension
.
length
===
0
)
{
return
'
param extension should not be empty.
'
}
}
}
}
src/core/helpers/protocol/media/choose-image.js
浏览文件 @
406ee152
...
...
@@ -35,7 +35,7 @@ export const chooseImage = {
type
:
Array
,
default
:
[
'
*
'
],
validator
(
extension
,
params
)
{
if
(
extension
.
length
===
0
)
params
.
extension
=
[
'
*
'
]
if
(
extension
.
length
===
0
)
{
return
'
param extension should not be empty.
'
}
}
}
}
src/core/helpers/protocol/media/choose-video.js
浏览文件 @
406ee152
...
...
@@ -22,7 +22,7 @@ export const chooseVideo = {
type
:
Array
,
default
:
[
'
*
'
],
validator
(
extension
,
params
)
{
if
(
extension
.
length
===
0
)
params
.
extension
=
[
'
*
'
]
if
(
extension
.
length
===
0
)
{
return
'
param extension should not be empty.
'
}
}
}
}
src/core/runtime/index.js
浏览文件 @
406ee152
...
...
@@ -26,7 +26,8 @@ import {
import
createApp
from
'
./wrapper/create-app
'
import
createPage
from
'
./wrapper/create-page
'
import
createComponent
from
'
./wrapper/create-component
'
import
createComponent
from
'
./wrapper/create-component
'
import
createSubpackageApp
from
'
./wrapper/create-subpackage-app
'
todos
.
forEach
(
todoApi
=>
{
protocols
[
todoApi
]
=
false
...
...
@@ -114,11 +115,13 @@ if (__PLATFORM__ === 'app-plus') {
__GLOBAL__
.
createApp
=
createApp
__GLOBAL__
.
createPage
=
createPage
__GLOBAL__
.
createComponent
=
createComponent
__GLOBAL__
.
createSubpackageApp
=
createSubpackageApp
export
{
createApp
,
createPage
,
createComponent
createComponent
,
createSubpackageApp
}
export
default
uni
src/core/runtime/wrapper/create-app.js
浏览文件 @
406ee152
import
Vue
from
'
vue
'
import
'
uni-platform/runtime/index
'
import
EventChannel
from
'
uni-helpers/EventChannel
'
import
parseApp
from
'
uni-platform/runtime/wrapper/app-parser
'
import
{
getEventChannel
}
from
'
uni-helpers/navigate-to
'
export
default
function
createApp
(
vm
)
{
Vue
.
prototype
.
getOpenerEventChannel
=
function
()
{
// 微信小程序使用自身getOpenerEventChannel
if
(
__PLATFORM__
===
'
mp-weixin
'
)
{
return
this
.
$scope
.
getOpenerEventChannel
()
}
if
(
!
this
.
__eventChannel__
)
{
this
.
__eventChannel__
=
new
EventChannel
()
}
return
this
.
__eventChannel__
}
const
callHook
=
Vue
.
prototype
.
__call_hook
Vue
.
prototype
.
__call_hook
=
function
(
hook
,
args
)
{
if
(
hook
===
'
onLoad
'
&&
args
&&
args
.
__id__
)
{
this
.
__eventChannel__
=
getEventChannel
(
args
.
__id__
)
delete
args
.
__id__
}
return
callHook
.
call
(
this
,
hook
,
args
)
}
App
(
parseApp
(
vm
))
return
vm
}
}
src/core/runtime/wrapper/create-subpackage-app.js
0 → 100644
浏览文件 @
406ee152
import
'
uni-platform/runtime/index
'
import
{
isFn
,
hasOwn
}
from
'
uni-shared
'
import
parseApp
from
'
uni-platform/runtime/wrapper/app-parser
'
export
default
function
createSubpackageApp
(
vm
)
{
const
appOptions
=
parseApp
(
vm
)
const
app
=
getApp
({
allowDefault
:
true
})
const
globalData
=
app
.
globalData
if
(
globalData
)
{
Object
.
keys
(
appOptions
.
globalData
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
globalData
,
name
))
{
globalData
[
name
]
=
appOptions
.
globalData
[
name
]
}
})
}
Object
.
keys
(
appOptions
).
forEach
(
name
=>
{
if
(
!
hasOwn
(
app
,
name
))
{
app
[
name
]
=
appOptions
[
name
]
}
})
if
(
isFn
(
appOptions
.
onShow
)
&&
__GLOBAL__
.
onAppShow
)
{
__GLOBAL__
.
onAppShow
((...
args
)
=>
{
appOptions
.
onShow
.
apply
(
app
,
args
)
})
}
if
(
isFn
(
appOptions
.
onHide
)
&&
__GLOBAL__
.
onAppHide
)
{
__GLOBAL__
.
onAppHide
((...
args
)
=>
{
appOptions
.
onHide
.
apply
(
app
,
args
)
})
}
if
(
isFn
(
appOptions
.
onLaunch
))
{
const
args
=
__GLOBAL__
.
getLaunchOptionsSync
&&
__GLOBAL__
.
getLaunchOptionsSync
()
appOptions
.
onLaunch
.
call
(
app
,
args
)
}
return
vm
}
src/core/view/components/image/index.vue
浏览文件 @
406ee152
此差异已折叠。
点击以展开。
src/core/view/mixins/touchtrack.js
浏览文件 @
406ee152
此差异已折叠。
点击以展开。
src/platforms/mp-weixin/runtime/wrapper/app-base-parser.js
浏览文件 @
406ee152
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录