Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yangkaifeng
uni-app
提交
3c115ed0
U
uni-app
项目概览
yangkaifeng
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3c115ed0
编写于
3月 03, 2020
作者:
fxy060608
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of
https://github.com/dcloudio/uni-app
into alpha
上级
cbfb9923
9a8f2446
变更
12
展开全部
显示空白变更内容
内联
并排
Showing
12 changed file
with
108 addition
and
79 deletion
+108
-79
packages/uni-app-plus/dist/service.runtime.esm.dev.js
packages/uni-app-plus/dist/service.runtime.esm.dev.js
+9
-1
packages/uni-app-plus/dist/service.runtime.esm.prod.js
packages/uni-app-plus/dist/service.runtime.esm.prod.js
+9
-1
packages/uni-mp-weixin/dist/wxs.js
packages/uni-mp-weixin/dist/wxs.js
+2
-2
packages/vue-cli-plugin-uni/lib/app-plus/index.js
packages/vue-cli-plugin-uni/lib/app-plus/index.js
+1
-1
packages/vue-cli-plugin-uni/lib/env.js
packages/vue-cli-plugin-uni/lib/env.js
+2
-2
packages/vue-cli-plugin-uni/lib/mp.js
packages/vue-cli-plugin-uni/lib/mp.js
+1
-1
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-pages-loader/lib/platforms/app-plus/app-config-service.js
...pages-loader/lib/platforms/app-plus/app-config-service.js
+1
-1
src/core/runtime/mp/wxs.js
src/core/runtime/mp/wxs.js
+2
-2
src/core/view/components/canvas/index.vue
src/core/view/components/canvas/index.vue
+6
-2
src/platforms/mp-alipay/runtime/api/protocols.js
src/platforms/mp-alipay/runtime/api/protocols.js
+70
-62
src/platforms/mp-weixin/runtime/wrapper/component-base-parser.js
...tforms/mp-weixin/runtime/wrapper/component-base-parser.js
+4
-3
未找到文件。
packages/uni-app-plus/dist/service.runtime.esm.dev.js
浏览文件 @
3c115ed0
...
...
@@ -6070,7 +6070,7 @@ function createPatchFunction (backend) {
function
removeAndInvokeRemoveHook
(
vnode
,
rm
)
{
if
(
isDef
(
rm
)
||
isDef
(
vnode
.
data
))
{
var
i
;
var
i
,
children
;
var
listeners
=
cbs
.
remove
.
length
+
1
;
if
(
isDef
(
rm
))
{
// we have a recursively passed down rm callback
...
...
@@ -6083,6 +6083,14 @@ function createPatchFunction (backend) {
// recursively invoke hooks on child component root node
if
(
isDef
(
i
=
vnode
.
componentInstance
)
&&
isDef
(
i
=
i
.
_vnode
)
&&
isDef
(
i
.
data
))
{
removeAndInvokeRemoveHook
(
i
,
rm
);
}
else
if
(
isDef
(
children
=
vnode
.
children
))
{
// app-plus service 层 elm 暂未实现父子关系维护,移除父 elm 时,导致子 elm 还存留(影响了事件查找)
// 暂时使用 vnode 的 children 递归 rm 掉子 elm
for
(
i
=
0
;
i
<
children
.
length
;
i
++
)
{
if
(
children
[
i
].
tag
)
{
removeAndInvokeRemoveHook
(
children
[
i
]);
}
}
}
for
(
i
=
0
;
i
<
cbs
.
remove
.
length
;
++
i
)
{
cbs
.
remove
[
i
](
vnode
,
rm
);
...
...
packages/uni-app-plus/dist/service.runtime.esm.prod.js
浏览文件 @
3c115ed0
...
...
@@ -5288,7 +5288,7 @@ function createPatchFunction (backend) {
function
removeAndInvokeRemoveHook
(
vnode
,
rm
)
{
if
(
isDef
(
rm
)
||
isDef
(
vnode
.
data
))
{
var
i
;
var
i
,
children
;
var
listeners
=
cbs
.
remove
.
length
+
1
;
if
(
isDef
(
rm
))
{
// we have a recursively passed down rm callback
...
...
@@ -5301,6 +5301,14 @@ function createPatchFunction (backend) {
// recursively invoke hooks on child component root node
if
(
isDef
(
i
=
vnode
.
componentInstance
)
&&
isDef
(
i
=
i
.
_vnode
)
&&
isDef
(
i
.
data
))
{
removeAndInvokeRemoveHook
(
i
,
rm
);
}
else
if
(
isDef
(
children
=
vnode
.
children
))
{
// app-plus service 层 elm 暂未实现父子关系维护,移除父 elm 时,导致子 elm 还存留(影响了事件查找)
// 暂时使用 vnode 的 children 递归 rm 掉子 elm
for
(
i
=
0
;
i
<
children
.
length
;
i
++
)
{
if
(
children
[
i
].
tag
)
{
removeAndInvokeRemoveHook
(
children
[
i
]);
}
}
}
for
(
i
=
0
;
i
<
cbs
.
remove
.
length
;
++
i
)
{
cbs
.
remove
[
i
](
vnode
,
rm
);
...
...
packages/uni-mp-weixin/dist/wxs.js
浏览文件 @
3c115ed0
...
...
@@ -2,7 +2,7 @@
* wxs getRegExp
*/
function
getRegExp
()
{
const
args
=
Array
.
prototype
.
slice
.
call
(
arguments
);
var
args
=
Array
.
prototype
.
slice
.
call
(
arguments
);
args
.
unshift
(
RegExp
);
return
new
(
Function
.
prototype
.
bind
.
apply
(
RegExp
,
args
))()
}
...
...
@@ -11,7 +11,7 @@ function getRegExp () {
* wxs getDate
*/
function
getDate
()
{
const
args
=
Array
.
prototype
.
slice
.
call
(
arguments
);
var
args
=
Array
.
prototype
.
slice
.
call
(
arguments
);
args
.
unshift
(
Date
);
return
new
(
Function
.
prototype
.
bind
.
apply
(
Date
,
args
))()
}
...
...
packages/vue-cli-plugin-uni/lib/app-plus/index.js
浏览文件 @
3c115ed0
...
...
@@ -132,7 +132,7 @@ const v3 = {
return
{
devtool
,
mode
:
process
.
env
.
NODE_ENV
,
mode
:
process
.
env
.
NODE_ENV
===
'
production
'
?
'
production
'
:
'
development
'
,
externals
:
{
vue
:
'
Vue
'
},
...
...
packages/vue-cli-plugin-uni/lib/env.js
浏览文件 @
3c115ed0
...
...
@@ -268,8 +268,8 @@ if (process.env.UNI_USING_COMPONENTS) { // 是否启用分包优化
const
warningMsg
=
usingComponentsAbsent
?
`该应用之前可能是非自定义组件模式,目前以自定义组件模式运行。非自定义组件
将
于2019年11月1日起停止支持。详见:https://ask.dcloud.net.cn/article/36385`
:
`uni-app
将
于2019年11月1日起停止支持非自定义组件模式 [详情](https://ask.dcloud.net.cn/article/36385)`
?
`该应用之前可能是非自定义组件模式,目前以自定义组件模式运行。非自定义组件
已
于2019年11月1日起停止支持。详见:https://ask.dcloud.net.cn/article/36385`
:
`uni-app
已
于2019年11月1日起停止支持非自定义组件模式 [详情](https://ask.dcloud.net.cn/article/36385)`
const
needWarning
=
!
platformOptions
.
usingComponents
||
usingComponentsAbsent
let
hasNVue
=
false
...
...
packages/vue-cli-plugin-uni/lib/mp.js
浏览文件 @
3c115ed0
...
...
@@ -104,7 +104,7 @@ module.exports = {
return
{
devtool
,
mode
:
process
.
env
.
NODE_ENV
,
mode
:
process
.
env
.
NODE_ENV
===
'
production
'
?
'
production
'
:
'
development
'
,
entry
()
{
return
process
.
UNI_ENTRY
},
...
...
packages/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js
浏览文件 @
3c115ed0
此差异已折叠。
点击以展开。
packages/webpack-uni-pages-loader/lib/platforms/app-plus/app-config-service.js
浏览文件 @
3c115ed0
...
...
@@ -41,7 +41,7 @@ var isReady=false;var onReadyCallbacks=[];
var __uniConfig =
${
JSON
.
stringify
(
appJson
,
null
)}
;
var __uniRoutes =
${
JSON
.
stringify
(
__uniRoutes
)}
;
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes}}}});
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes
,window:void 0
}}}});
`
}
}
src/core/runtime/mp/wxs.js
浏览文件 @
3c115ed0
...
...
@@ -2,7 +2,7 @@
* wxs getRegExp
*/
export
function
getRegExp
()
{
const
args
=
Array
.
prototype
.
slice
.
call
(
arguments
)
var
args
=
Array
.
prototype
.
slice
.
call
(
arguments
)
args
.
unshift
(
RegExp
)
return
new
(
Function
.
prototype
.
bind
.
apply
(
RegExp
,
args
))()
}
...
...
@@ -11,7 +11,7 @@ export function getRegExp () {
* wxs getDate
*/
export
function
getDate
()
{
const
args
=
Array
.
prototype
.
slice
.
call
(
arguments
)
var
args
=
Array
.
prototype
.
slice
.
call
(
arguments
)
args
.
unshift
(
Date
)
return
new
(
Function
.
prototype
.
bind
.
apply
(
Date
,
args
))()
}
src/core/view/components/canvas/index.vue
浏览文件 @
3c115ed0
...
...
@@ -122,7 +122,11 @@ export default {
}
},
_resize
()
{
var
canvas
=
this
.
$refs
.
canvas
var
context
=
canvas
.
getContext
(
'
2d
'
)
var
imageData
=
context
.
getImageData
(
0
,
0
,
canvas
.
width
,
canvas
.
height
)
wrapper
(
this
.
$refs
.
canvas
)
context
.
putImageData
(
imageData
,
0
,
0
)
},
_touchmove
(
event
)
{
event
.
preventDefault
()
...
...
src/platforms/mp-alipay/runtime/api/protocols.js
浏览文件 @
3c115ed0
...
...
@@ -333,8 +333,16 @@ const protocols = { // 需要做转换的 API 列表
}
},
getUserInfo
:
{
name
:
'
getAuthUserInfo
'
,
name
:
my
.
canIUse
(
'
getOpenUserInfo
'
)
?
'
getOpenUserInfo
'
:
'
getAuthUserInfo
'
,
returnValue
(
result
)
{
if
(
my
.
canIUse
(
'
getOpenUserInfo
'
))
{
let
response
=
{}
try
{
response
=
JSON
.
parse
(
result
.
response
).
response
}
catch
(
e
)
{}
result
.
nickName
=
response
.
nickName
result
.
avatar
=
response
.
avatar
}
result
.
userInfo
=
{
nickName
:
result
.
nickName
,
avatarUrl
:
result
.
avatar
...
...
src/platforms/mp-weixin/runtime/wrapper/component-base-parser.js
浏览文件 @
3c115ed0
...
...
@@ -23,7 +23,8 @@ export default function parseBaseComponent (vueComponentOptions, {
const
options
=
{
multipleSlots
:
true
,
addGlobalClass
:
true
addGlobalClass
:
true
,
...(
vueOptions
.
options
||
{})
}
if
(
__PLATFORM__
===
'
mp-weixin
'
||
__PLATFORM__
===
'
mp-qq
'
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录