Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_38335589
uni-app
提交
60e8e2e2
U
uni-app
项目概览
weixin_38335589
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
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,发现更多精彩内容 >>
提交
60e8e2e2
编写于
7月 20, 2019
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor runtime
上级
37a14950
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
91 addition
and
118 deletion
+91
-118
packages/uni-app-plus/dist/index.js
packages/uni-app-plus/dist/index.js
+11
-16
packages/uni-mp-alipay/dist/index.js
packages/uni-mp-alipay/dist/index.js
+17
-19
packages/uni-mp-baidu/dist/index.js
packages/uni-mp-baidu/dist/index.js
+18
-23
packages/uni-mp-qq/dist/index.js
packages/uni-mp-qq/dist/index.js
+11
-16
packages/uni-mp-toutiao/dist/index.js
packages/uni-mp-toutiao/dist/index.js
+21
-26
packages/uni-mp-weixin/dist/index.js
packages/uni-mp-weixin/dist/index.js
+11
-16
src/core/runtime/extra.js
src/core/runtime/extra.js
+1
-1
src/core/runtime/wrapper.js
src/core/runtime/wrapper.js
+1
-1
未找到文件。
packages/uni-app-plus/dist/index.js
浏览文件 @
60e8e2e2
...
...
@@ -491,8 +491,6 @@ function $emit () {
return
apply
(
getEmitter
(),
'
$emit
'
,
[...
arguments
])
}
var
eventApi
=
/*#__PURE__*/
Object
.
freeze
({
$on
:
$on
,
$off
:
$off
,
...
...
@@ -679,14 +677,14 @@ function initHooks (mpOptions, hooks, vueOptions) {
});
}
function
initVueComponent
(
Vue
$$1
,
vueOptions
)
{
function
initVueComponent
(
Vue
,
vueOptions
)
{
vueOptions
=
vueOptions
.
default
||
vueOptions
;
let
VueComponent
;
if
(
isFn
(
vueOptions
))
{
VueComponent
=
vueOptions
;
vueOptions
=
VueComponent
.
extendOptions
;
}
else
{
VueComponent
=
Vue
$$1
.
extend
(
vueOptions
);
VueComponent
=
Vue
.
extend
(
vueOptions
);
}
return
[
VueComponent
,
vueOptions
]
}
...
...
@@ -853,7 +851,7 @@ function initProperties (props, isBehavior = false, file = '') {
value
=
value
();
}
opts
.
type
=
parsePropType
(
key
,
opts
.
type
,
value
,
file
);
opts
.
type
=
parsePropType
(
key
,
opts
.
type
);
properties
[
key
]
=
{
type
:
PROP_TYPES
.
indexOf
(
opts
.
type
)
!==
-
1
?
opts
.
type
:
null
,
...
...
@@ -861,7 +859,7 @@ function initProperties (props, isBehavior = false, file = '') {
observer
:
createObserver
(
key
)
};
}
else
{
// content:String
const
type
=
parsePropType
(
key
,
opts
,
null
,
file
);
const
type
=
parsePropType
(
key
,
opts
);
properties
[
key
]
=
{
type
:
PROP_TYPES
.
indexOf
(
type
)
!==
-
1
?
type
:
null
,
observer
:
createObserver
(
key
)
...
...
@@ -1257,8 +1255,8 @@ function createApp (vm) {
}
function
parseBaseComponent
(
vueComponentOptions
,
{
isPage
:
isPage$$1
,
initRelation
:
initRelation$$1
isPage
,
initRelation
}
=
{})
{
let
[
VueComponent
,
vueOptions
]
=
initVueComponent
(
Vue
,
vueComponentOptions
);
...
...
@@ -1275,7 +1273,7 @@ function parseBaseComponent (vueComponentOptions, {
const
properties
=
this
.
properties
;
const
options
=
{
mpType
:
isPage
$$1
.
call
(
this
)
?
'
page
'
:
'
component
'
,
mpType
:
isPage
.
call
(
this
)
?
'
page
'
:
'
component
'
,
mpInstance
:
this
,
propsData
:
properties
};
...
...
@@ -1283,7 +1281,7 @@ function parseBaseComponent (vueComponentOptions, {
initVueIds
(
properties
.
vueId
,
this
);
// 处理父子关系
initRelation
$$1
.
call
(
this
,
{
initRelation
.
call
(
this
,
{
vuePid
:
this
.
_$vuePid
,
vueOptions
:
options
});
...
...
@@ -1327,7 +1325,7 @@ function parseBaseComponent (vueComponentOptions, {
}
};
if
(
isPage
$$1
)
{
if
(
isPage
)
{
return
componentOptions
}
return
[
componentOptions
,
VueComponent
]
...
...
@@ -1361,10 +1359,7 @@ function parseBasePage (vuePageOptions, {
isPage
,
initRelation
})
{
const
pageOptions
=
parseComponent$1
(
vuePageOptions
,
{
isPage
,
initRelation
});
const
pageOptions
=
parseComponent$1
(
vuePageOptions
);
initHooks
(
pageOptions
.
methods
,
hooks$2
,
vuePageOptions
);
...
...
@@ -1477,4 +1472,4 @@ wx.createComponent = createComponent;
var
uni$1
=
uni
;
export
default
uni$1
;
export
{
createApp
,
create
Page
,
createComponent
};
export
{
createApp
,
create
Component
,
createPage
};
packages/uni-mp-alipay/dist/index.js
浏览文件 @
60e8e2e2
...
...
@@ -891,8 +891,6 @@ function $emit () {
return
apply
(
getEmitter
(),
'
$emit
'
,
[...
arguments
])
}
var
eventApi
=
/*#__PURE__*/
Object
.
freeze
({
$on
:
$on
,
$off
:
$off
,
...
...
@@ -1054,14 +1052,14 @@ function initHooks (mpOptions, hooks, vueOptions) {
});
}
function
initVueComponent
(
Vue
$$1
,
vueOptions
)
{
function
initVueComponent
(
Vue
,
vueOptions
)
{
vueOptions
=
vueOptions
.
default
||
vueOptions
;
let
VueComponent
;
if
(
isFn
(
vueOptions
))
{
VueComponent
=
vueOptions
;
vueOptions
=
VueComponent
.
extendOptions
;
}
else
{
VueComponent
=
Vue
$$1
.
extend
(
vueOptions
);
VueComponent
=
Vue
.
extend
(
vueOptions
);
}
return
[
VueComponent
,
vueOptions
]
}
...
...
@@ -1218,7 +1216,7 @@ function initProperties (props, isBehavior = false, file = '') {
value
=
value
();
}
opts
.
type
=
parsePropType
(
key
,
opts
.
type
,
value
,
file
);
opts
.
type
=
parsePropType
(
key
,
opts
.
type
);
properties
[
key
]
=
{
type
:
PROP_TYPES
.
indexOf
(
opts
.
type
)
!==
-
1
?
opts
.
type
:
null
,
...
...
@@ -1226,7 +1224,7 @@ function initProperties (props, isBehavior = false, file = '') {
observer
:
createObserver
(
key
)
};
}
else
{
// content:String
const
type
=
parsePropType
(
key
,
opts
,
null
,
file
);
const
type
=
parsePropType
(
key
,
opts
);
properties
[
key
]
=
{
type
:
PROP_TYPES
.
indexOf
(
type
)
!==
-
1
?
type
:
null
,
observer
:
createObserver
(
key
)
...
...
@@ -1617,13 +1615,13 @@ const customize = cached((str) => {
const
isComponent2
=
my
.
canIUse
(
'
component2
'
);
const
mocks
$1
=
[
'
$id
'
];
const
mocks
=
[
'
$id
'
];
function
initRefs
$1
()
{
function
initRefs
()
{
}
function
initBehavior
$1
({
function
initBehavior
({
properties
})
{
const
props
=
{};
...
...
@@ -1637,7 +1635,7 @@ function initBehavior$1 ({
}
}
function
initRelation
$1
(
detail
)
{
function
initRelation
(
detail
)
{
this
.
props
.
onVueInit
(
detail
);
}
...
...
@@ -1760,13 +1758,13 @@ function createObserver$1 (isDidUpdate) {
const
handleLink$1
=
(
function
()
{
if
(
isComponent2
)
{
return
function
handleLink$
$
1
(
detail
)
{
return
function
handleLink$1
(
detail
)
{
return
handleLink
.
call
(
this
,
{
detail
})
}
}
return
function
handleLink$
$
1
(
detail
)
{
return
function
handleLink$1
(
detail
)
{
if
(
this
.
$vm
&&
this
.
$vm
.
_isMounted
)
{
// 父已初始化
return
handleLink
.
call
(
this
,
{
detail
:
{
...
...
@@ -1799,8 +1797,8 @@ function parseApp (vm) {
});
return
parseBaseApp
(
vm
,
{
mocks
:
mocks$1
,
initRefs
:
initRefs$1
mocks
,
initRefs
})
}
...
...
@@ -1825,7 +1823,7 @@ function parsePage (vuePageOptions) {
let
[
VueComponent
,
vueOptions
]
=
initVueComponent
(
Vue
,
vuePageOptions
);
const
pageOptions
=
{
mixins
:
initBehaviors
(
vueOptions
,
initBehavior
$1
),
mixins
:
initBehaviors
(
vueOptions
,
initBehavior
),
data
:
initData
(
vueOptions
,
Vue
.
prototype
),
onLoad
(
args
)
{
const
properties
=
this
.
props
;
...
...
@@ -1889,7 +1887,7 @@ function initVm (VueComponent) {
if
(
isComponent2
)
{
// 处理父子关系
initRelation
$1
.
call
(
this
,
{
initRelation
.
call
(
this
,
{
vuePid
:
this
.
_$vuePid
,
vueOptions
:
options
});
...
...
@@ -1901,7 +1899,7 @@ function initVm (VueComponent) {
this
.
$vm
.
$mount
();
}
else
{
// 处理父子关系
initRelation
$1
.
call
(
this
,
{
initRelation
.
call
(
this
,
{
vuePid
:
this
.
_$vuePid
,
vueOptions
:
options
,
VueComponent
,
...
...
@@ -1940,7 +1938,7 @@ function parseComponent (vueComponentOptions) {
});
const
componentOptions
=
{
mixins
:
initBehaviors
(
vueOptions
,
initBehavior
$1
),
mixins
:
initBehaviors
(
vueOptions
,
initBehavior
),
data
:
initData
(
vueOptions
,
Vue
.
prototype
),
props
,
didMount
()
{
...
...
@@ -2059,4 +2057,4 @@ my.createComponent = createComponent;
var
uni$1
=
uni
;
export
default
uni$1
;
export
{
createApp
,
create
Page
,
createComponent
};
export
{
createApp
,
create
Component
,
createPage
};
packages/uni-mp-baidu/dist/index.js
浏览文件 @
60e8e2e2
...
...
@@ -653,8 +653,6 @@ function $emit () {
return
apply
(
getEmitter
(),
'
$emit
'
,
[...
arguments
])
}
var
eventApi
=
/*#__PURE__*/
Object
.
freeze
({
$on
:
$on
,
$off
:
$off
,
...
...
@@ -784,14 +782,14 @@ function initHooks (mpOptions, hooks, vueOptions) {
});
}
function
initVueComponent
(
Vue
$$1
,
vueOptions
)
{
function
initVueComponent
(
Vue
,
vueOptions
)
{
vueOptions
=
vueOptions
.
default
||
vueOptions
;
let
VueComponent
;
if
(
isFn
(
vueOptions
))
{
VueComponent
=
vueOptions
;
vueOptions
=
VueComponent
.
extendOptions
;
}
else
{
VueComponent
=
Vue
$$1
.
extend
(
vueOptions
);
VueComponent
=
Vue
.
extend
(
vueOptions
);
}
return
[
VueComponent
,
vueOptions
]
}
...
...
@@ -1353,20 +1351,20 @@ function handleLink (event) {
vueOptions
.
parent
=
parentVm
;
}
const
mocks
$1
=
[
'
nodeId
'
,
'
componentName
'
];
const
mocks
=
[
'
nodeId
'
,
'
componentName
'
];
function
isPage
$1
()
{
function
isPage
()
{
return
!
this
.
ownerId
}
function
initRelation
$1
(
detail
)
{
function
initRelation
(
detail
)
{
this
.
dispatch
(
'
__l
'
,
detail
);
}
function
parseApp
(
vm
)
{
// 百度 onShow 竟然会在 onLaunch 之前
const
appOptions
=
parseBaseApp
(
vm
,
{
mocks
:
mocks$1
,
mocks
,
initRefs
});
appOptions
.
onShow
=
function
onShow
(
args
)
{
...
...
@@ -1384,8 +1382,8 @@ function createApp (vm) {
}
function
parseBaseComponent
(
vueComponentOptions
,
{
isPage
:
isPage$$1
,
initRelation
:
initRelation$$1
isPage
,
initRelation
}
=
{})
{
let
[
VueComponent
,
vueOptions
]
=
initVueComponent
(
Vue
,
vueComponentOptions
);
...
...
@@ -1402,7 +1400,7 @@ function parseBaseComponent (vueComponentOptions, {
const
properties
=
this
.
properties
;
const
options
=
{
mpType
:
isPage
$$1
.
call
(
this
)
?
'
page
'
:
'
component
'
,
mpType
:
isPage
.
call
(
this
)
?
'
page
'
:
'
component
'
,
mpInstance
:
this
,
propsData
:
properties
};
...
...
@@ -1410,7 +1408,7 @@ function parseBaseComponent (vueComponentOptions, {
initVueIds
(
properties
.
vueId
,
this
);
// 处理父子关系
initRelation
$$1
.
call
(
this
,
{
initRelation
.
call
(
this
,
{
vuePid
:
this
.
_$vuePid
,
vueOptions
:
options
});
...
...
@@ -1454,7 +1452,7 @@ function parseBaseComponent (vueComponentOptions, {
}
};
if
(
isPage
$$1
)
{
if
(
isPage
)
{
return
componentOptions
}
return
[
componentOptions
,
VueComponent
]
...
...
@@ -1462,15 +1460,15 @@ function parseBaseComponent (vueComponentOptions, {
function
parseComponent
(
vueOptions
)
{
const
componentOptions
=
parseBaseComponent
(
vueOptions
,
{
isPage
:
isPage$1
,
initRelation
:
initRelation$1
isPage
,
initRelation
});
const
oldAttached
=
componentOptions
.
lifetimes
.
attached
;
componentOptions
.
lifetimes
.
attached
=
function
attached
()
{
oldAttached
.
call
(
this
);
if
(
isPage
$1
.
call
(
this
))
{
// 百度 onLoad 在 attached 之前触发
if
(
isPage
.
call
(
this
))
{
// 百度 onLoad 在 attached 之前触发
// 百度 当组件作为页面时 pageinstancce 不是原来组件的 instance
this
.
pageinstance
.
$vm
=
this
.
$vm
;
...
...
@@ -1504,10 +1502,7 @@ function parseBasePage (vuePageOptions, {
isPage
,
initRelation
})
{
const
pageOptions
=
parseComponent
(
vuePageOptions
,
{
isPage
,
initRelation
});
const
pageOptions
=
parseComponent
(
vuePageOptions
);
initHooks
(
pageOptions
.
methods
,
hooks$1
,
vuePageOptions
);
...
...
@@ -1535,8 +1530,8 @@ function onPageUnload ($vm) {
function
parsePage
(
vuePageOptions
)
{
const
pageOptions
=
parseBasePage
(
vuePageOptions
,
{
isPage
:
isPage$1
,
initRelation
:
initRelation$1
isPage
,
initRelation
});
pageOptions
.
methods
.
onLoad
=
function
onLoad
(
args
)
{
...
...
@@ -1645,4 +1640,4 @@ swan.createComponent = createComponent;
var
uni$1
=
uni
;
export
default
uni$1
;
export
{
createApp
,
create
Page
,
createComponent
};
export
{
createApp
,
create
Component
,
createPage
};
packages/uni-mp-qq/dist/index.js
浏览文件 @
60e8e2e2
...
...
@@ -628,8 +628,6 @@ function $emit () {
return
apply
(
getEmitter
(),
'
$emit
'
,
[...
arguments
])
}
var
eventApi
=
/*#__PURE__*/
Object
.
freeze
({
$on
:
$on
,
$off
:
$off
,
...
...
@@ -743,14 +741,14 @@ function initHooks (mpOptions, hooks, vueOptions) {
});
}
function
initVueComponent
(
Vue
$$1
,
vueOptions
)
{
function
initVueComponent
(
Vue
,
vueOptions
)
{
vueOptions
=
vueOptions
.
default
||
vueOptions
;
let
VueComponent
;
if
(
isFn
(
vueOptions
))
{
VueComponent
=
vueOptions
;
vueOptions
=
VueComponent
.
extendOptions
;
}
else
{
VueComponent
=
Vue
$$1
.
extend
(
vueOptions
);
VueComponent
=
Vue
.
extend
(
vueOptions
);
}
return
[
VueComponent
,
vueOptions
]
}
...
...
@@ -917,7 +915,7 @@ function initProperties (props, isBehavior = false, file = '') {
value
=
value
();
}
opts
.
type
=
parsePropType
(
key
,
opts
.
type
,
value
,
file
);
opts
.
type
=
parsePropType
(
key
,
opts
.
type
);
properties
[
key
]
=
{
type
:
PROP_TYPES
.
indexOf
(
opts
.
type
)
!==
-
1
?
opts
.
type
:
null
,
...
...
@@ -925,7 +923,7 @@ function initProperties (props, isBehavior = false, file = '') {
observer
:
createObserver
(
key
)
};
}
else
{
// content:String
const
type
=
parsePropType
(
key
,
opts
,
null
,
file
);
const
type
=
parsePropType
(
key
,
opts
);
properties
[
key
]
=
{
type
:
PROP_TYPES
.
indexOf
(
type
)
!==
-
1
?
type
:
null
,
observer
:
createObserver
(
key
)
...
...
@@ -1313,8 +1311,8 @@ function createApp (vm) {
}
function
parseBaseComponent
(
vueComponentOptions
,
{
isPage
:
isPage$$1
,
initRelation
:
initRelation$$1
isPage
,
initRelation
}
=
{})
{
let
[
VueComponent
,
vueOptions
]
=
initVueComponent
(
Vue
,
vueComponentOptions
);
...
...
@@ -1331,7 +1329,7 @@ function parseBaseComponent (vueComponentOptions, {
const
properties
=
this
.
properties
;
const
options
=
{
mpType
:
isPage
$$1
.
call
(
this
)
?
'
page
'
:
'
component
'
,
mpType
:
isPage
.
call
(
this
)
?
'
page
'
:
'
component
'
,
mpInstance
:
this
,
propsData
:
properties
};
...
...
@@ -1339,7 +1337,7 @@ function parseBaseComponent (vueComponentOptions, {
initVueIds
(
properties
.
vueId
,
this
);
// 处理父子关系
initRelation
$$1
.
call
(
this
,
{
initRelation
.
call
(
this
,
{
vuePid
:
this
.
_$vuePid
,
vueOptions
:
options
});
...
...
@@ -1383,7 +1381,7 @@ function parseBaseComponent (vueComponentOptions, {
}
};
if
(
isPage
$$1
)
{
if
(
isPage
)
{
return
componentOptions
}
return
[
componentOptions
,
VueComponent
]
...
...
@@ -1412,10 +1410,7 @@ function parseBasePage (vuePageOptions, {
isPage
,
initRelation
})
{
const
pageOptions
=
parseComponent$1
(
vuePageOptions
,
{
isPage
,
initRelation
});
const
pageOptions
=
parseComponent$1
(
vuePageOptions
);
initHooks
(
pageOptions
.
methods
,
hooks$1
,
vuePageOptions
);
...
...
@@ -1526,4 +1521,4 @@ wx.createComponent = createComponent;
var
uni$1
=
uni
;
export
default
uni$1
;
export
{
createApp
,
create
Page
,
createComponent
};
export
{
createApp
,
create
Component
,
createPage
};
packages/uni-mp-toutiao/dist/index.js
浏览文件 @
60e8e2e2
...
...
@@ -709,8 +709,6 @@ function $emit () {
return
apply
(
getEmitter
(),
'
$emit
'
,
[...
arguments
])
}
var
eventApi
=
/*#__PURE__*/
Object
.
freeze
({
$on
:
$on
,
$off
:
$off
,
...
...
@@ -824,14 +822,14 @@ function initHooks (mpOptions, hooks, vueOptions) {
});
}
function
initVueComponent
(
Vue
$$1
,
vueOptions
)
{
function
initVueComponent
(
Vue
,
vueOptions
)
{
vueOptions
=
vueOptions
.
default
||
vueOptions
;
let
VueComponent
;
if
(
isFn
(
vueOptions
))
{
VueComponent
=
vueOptions
;
vueOptions
=
VueComponent
.
extendOptions
;
}
else
{
VueComponent
=
Vue
$$1
.
extend
(
vueOptions
);
VueComponent
=
Vue
.
extend
(
vueOptions
);
}
return
[
VueComponent
,
vueOptions
]
}
...
...
@@ -998,7 +996,7 @@ function initProperties (props, isBehavior = false, file = '') {
value
=
value
();
}
opts
.
type
=
parsePropType
(
key
,
opts
.
type
,
value
,
file
);
opts
.
type
=
parsePropType
(
key
,
opts
.
type
);
properties
[
key
]
=
{
type
:
PROP_TYPES
.
indexOf
(
opts
.
type
)
!==
-
1
?
opts
.
type
:
null
,
...
...
@@ -1006,7 +1004,7 @@ function initProperties (props, isBehavior = false, file = '') {
observer
:
createObserver
(
key
)
};
}
else
{
// content:String
const
type
=
parsePropType
(
key
,
opts
,
null
,
file
);
const
type
=
parsePropType
(
key
,
opts
);
properties
[
key
]
=
{
type
:
PROP_TYPES
.
indexOf
(
type
)
!==
-
1
?
type
:
null
,
observer
:
createObserver
(
key
)
...
...
@@ -1344,13 +1342,13 @@ function handleLink (event) {
vueOptions
.
parent
=
parentVm
;
}
const
mocks
$1
=
[
'
__route__
'
,
'
__webviewId__
'
,
'
__nodeid__
'
,
'
__nodeId__
'
];
const
mocks
=
[
'
__route__
'
,
'
__webviewId__
'
,
'
__nodeid__
'
,
'
__nodeId__
'
];
function
isPage
$1
()
{
function
isPage
()
{
return
this
.
__nodeid__
===
0
||
this
.
__nodeId__
===
0
}
function
initRefs
$1
(
vm
)
{
function
initRefs
(
vm
)
{
const
mpInstance
=
vm
.
$scope
;
mpInstance
.
selectAllComponents
(
'
.vue-ref
'
,
(
components
)
=>
{
components
.
forEach
(
component
=>
{
...
...
@@ -1371,7 +1369,7 @@ function initRefs$1 (vm) {
const
instances
=
Object
.
create
(
null
);
function
initRelation
$1
({
function
initRelation
({
vuePid
,
mpInstance
})
{
...
...
@@ -1435,7 +1433,7 @@ function parseApp (vm) {
this
.
$scope
.
route
=
this
.
$scope
.
__route__
;
}
initRefs
$1
(
this
);
initRefs
(
this
);
this
.
__init_injections
(
this
);
this
.
__init_provide
(
this
);
...
...
@@ -1444,7 +1442,7 @@ function parseApp (vm) {
});
return
parseBaseApp
(
vm
,
{
mocks
:
mocks$1
,
mocks
,
initRefs
:
function
()
{}
// attached 时,可能查询不到
})
}
...
...
@@ -1455,8 +1453,8 @@ function createApp (vm) {
}
function
parseBaseComponent
(
vueComponentOptions
,
{
isPage
:
isPage$$1
,
initRelation
:
initRelation$$1
isPage
,
initRelation
}
=
{})
{
let
[
VueComponent
,
vueOptions
]
=
initVueComponent
(
Vue
,
vueComponentOptions
);
...
...
@@ -1473,7 +1471,7 @@ function parseBaseComponent (vueComponentOptions, {
const
properties
=
this
.
properties
;
const
options
=
{
mpType
:
isPage
$$1
.
call
(
this
)
?
'
page
'
:
'
component
'
,
mpType
:
isPage
.
call
(
this
)
?
'
page
'
:
'
component
'
,
mpInstance
:
this
,
propsData
:
properties
};
...
...
@@ -1481,7 +1479,7 @@ function parseBaseComponent (vueComponentOptions, {
initVueIds
(
properties
.
vueId
,
this
);
// 处理父子关系
initRelation
$$1
.
call
(
this
,
{
initRelation
.
call
(
this
,
{
vuePid
:
this
.
_$vuePid
,
vueOptions
:
options
});
...
...
@@ -1525,7 +1523,7 @@ function parseBaseComponent (vueComponentOptions, {
}
};
if
(
isPage
$$1
)
{
if
(
isPage
)
{
return
componentOptions
}
return
[
componentOptions
,
VueComponent
]
...
...
@@ -1538,7 +1536,7 @@ function parseComponent (vueOptions) {
const
properties
=
this
.
properties
;
const
options
=
{
mpType
:
isPage
$1
.
call
(
this
)
?
'
page
'
:
'
component
'
,
mpType
:
isPage
.
call
(
this
)
?
'
page
'
:
'
component
'
,
mpInstance
:
this
,
propsData
:
properties
};
...
...
@@ -1552,7 +1550,7 @@ function parseComponent (vueOptions) {
initSlots
(
this
.
$vm
,
properties
.
vueSlots
);
// 处理父子关系
initRelation
$1
.
call
(
this
,
{
initRelation
.
call
(
this
,
{
vuePid
:
this
.
_$vuePid
,
mpInstance
:
this
});
...
...
@@ -1581,10 +1579,7 @@ function parseBasePage (vuePageOptions, {
isPage
,
initRelation
})
{
const
pageOptions
=
parseComponent
(
vuePageOptions
,
{
isPage
,
initRelation
});
const
pageOptions
=
parseComponent
(
vuePageOptions
);
initHooks
(
pageOptions
.
methods
,
hooks$1
,
vuePageOptions
);
...
...
@@ -1598,8 +1593,8 @@ function parseBasePage (vuePageOptions, {
function
parsePage
(
vuePageOptions
)
{
const
pageOptions
=
parseBasePage
(
vuePageOptions
,
{
isPage
:
isPage$1
,
initRelation
:
initRelation$1
isPage
,
initRelation
});
// 页面需要在 ready 中触发,其他组件是在 handleLink 中触发
pageOptions
.
lifetimes
.
ready
=
function
ready
()
{
...
...
@@ -1705,4 +1700,4 @@ tt.createComponent = createComponent;
var
uni$1
=
uni
;
export
default
uni$1
;
export
{
createApp
,
create
Page
,
createComponent
};
export
{
createApp
,
create
Component
,
createPage
};
packages/uni-mp-weixin/dist/index.js
浏览文件 @
60e8e2e2
...
...
@@ -561,8 +561,6 @@ function $emit () {
return
apply
(
getEmitter
(),
'
$emit
'
,
[...
arguments
])
}
var
eventApi
=
/*#__PURE__*/
Object
.
freeze
({
$on
:
$on
,
$off
:
$off
,
...
...
@@ -681,14 +679,14 @@ function initHooks (mpOptions, hooks, vueOptions) {
});
}
function
initVueComponent
(
Vue
$$1
,
vueOptions
)
{
function
initVueComponent
(
Vue
,
vueOptions
)
{
vueOptions
=
vueOptions
.
default
||
vueOptions
;
let
VueComponent
;
if
(
isFn
(
vueOptions
))
{
VueComponent
=
vueOptions
;
vueOptions
=
VueComponent
.
extendOptions
;
}
else
{
VueComponent
=
Vue
$$1
.
extend
(
vueOptions
);
VueComponent
=
Vue
.
extend
(
vueOptions
);
}
return
[
VueComponent
,
vueOptions
]
}
...
...
@@ -855,7 +853,7 @@ function initProperties (props, isBehavior = false, file = '') {
value
=
value
();
}
opts
.
type
=
parsePropType
(
key
,
opts
.
type
,
value
,
file
);
opts
.
type
=
parsePropType
(
key
,
opts
.
type
);
properties
[
key
]
=
{
type
:
PROP_TYPES
.
indexOf
(
opts
.
type
)
!==
-
1
?
opts
.
type
:
null
,
...
...
@@ -863,7 +861,7 @@ function initProperties (props, isBehavior = false, file = '') {
observer
:
createObserver
(
key
)
};
}
else
{
// content:String
const
type
=
parsePropType
(
key
,
opts
,
null
,
file
);
const
type
=
parsePropType
(
key
,
opts
);
properties
[
key
]
=
{
type
:
PROP_TYPES
.
indexOf
(
type
)
!==
-
1
?
type
:
null
,
observer
:
createObserver
(
key
)
...
...
@@ -1252,8 +1250,8 @@ function createApp (vm) {
}
function
parseBaseComponent
(
vueComponentOptions
,
{
isPage
:
isPage$$1
,
initRelation
:
initRelation$$1
isPage
,
initRelation
}
=
{})
{
let
[
VueComponent
,
vueOptions
]
=
initVueComponent
(
Vue
,
vueComponentOptions
);
...
...
@@ -1270,7 +1268,7 @@ function parseBaseComponent (vueComponentOptions, {
const
properties
=
this
.
properties
;
const
options
=
{
mpType
:
isPage
$$1
.
call
(
this
)
?
'
page
'
:
'
component
'
,
mpType
:
isPage
.
call
(
this
)
?
'
page
'
:
'
component
'
,
mpInstance
:
this
,
propsData
:
properties
};
...
...
@@ -1278,7 +1276,7 @@ function parseBaseComponent (vueComponentOptions, {
initVueIds
(
properties
.
vueId
,
this
);
// 处理父子关系
initRelation
$$1
.
call
(
this
,
{
initRelation
.
call
(
this
,
{
vuePid
:
this
.
_$vuePid
,
vueOptions
:
options
});
...
...
@@ -1322,7 +1320,7 @@ function parseBaseComponent (vueComponentOptions, {
}
};
if
(
isPage
$$1
)
{
if
(
isPage
)
{
return
componentOptions
}
return
[
componentOptions
,
VueComponent
]
...
...
@@ -1347,10 +1345,7 @@ function parseBasePage (vuePageOptions, {
isPage
,
initRelation
})
{
const
pageOptions
=
parseComponent
(
vuePageOptions
,
{
isPage
,
initRelation
});
const
pageOptions
=
parseComponent
(
vuePageOptions
);
initHooks
(
pageOptions
.
methods
,
hooks$1
,
vuePageOptions
);
...
...
@@ -1457,4 +1452,4 @@ wx.createComponent = createComponent;
var
uni$1
=
uni
;
export
default
uni$1
;
export
{
createApp
,
create
Page
,
createComponent
};
export
{
createApp
,
create
Component
,
createPage
};
src/core/runtime/extra.js
浏览文件 @
60e8e2e2
...
...
@@ -2,7 +2,7 @@ import {
isFn
}
from
'
uni-shared
'
import
providers
from
'
uni-platform/
servic
e/api/providers
'
import
providers
from
'
uni-platform/
runtim
e/api/providers
'
export
function
getProvider
({
service
,
...
...
src/core/runtime/wrapper.js
浏览文件 @
60e8e2e2
...
...
@@ -10,7 +10,7 @@ import {
isContextApi
}
from
'
../helpers/promise
'
import
{
protocols
}
from
'
uni-platform/
servic
e/api/protocols
'
import
{
protocols
}
from
'
uni-platform/
runtim
e/api/protocols
'
const
CALLBACKS
=
[
'
success
'
,
'
fail
'
,
'
cancel
'
,
'
complete
'
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录