Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wychl
uni-app
提交
69c9ae75
U
uni-app
项目概览
wychl
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
69c9ae75
编写于
2月 03, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(mp): export getCurrentInstance #2456
上级
f433031d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
5 addition
and
4 deletion
+5
-4
packages/uni-mp-vue/dist/vue.runtime.esm.js
packages/uni-mp-vue/dist/vue.runtime.esm.js
+5
-4
未找到文件。
packages/uni-mp-vue/dist/vue.runtime.esm.js
浏览文件 @
69c9ae75
...
@@ -2990,6 +2990,7 @@ function createComponentInstance(vnode, parent, suspense) {
...
@@ -2990,6 +2990,7 @@ function createComponentInstance(vnode, parent, suspense) {
return
instance
;
return
instance
;
}
}
let
currentInstance
=
null
;
let
currentInstance
=
null
;
const
getCurrentInstance
=
()
=>
currentInstance
||
currentRenderingInstance
;
const
setCurrentInstance
=
(
instance
)
=>
{
const
setCurrentInstance
=
(
instance
)
=>
{
currentInstance
=
instance
;
currentInstance
=
instance
;
};
};
...
@@ -3247,7 +3248,7 @@ function defineEmit() {
...
@@ -3247,7 +3248,7 @@ function defineEmit() {
}
}
// Core API ------------------------------------------------------------------
// Core API ------------------------------------------------------------------
const
version
=
"
3.0.
4
"
;
const
version
=
"
3.0.
5
"
;
// import deepCopy from './deepCopy'
// import deepCopy from './deepCopy'
/**
/**
...
@@ -3661,7 +3662,7 @@ function createVueApp(rootComponent, rootProps = null) {
...
@@ -3661,7 +3662,7 @@ function createVueApp(rootComponent, rootProps = null) {
}
}
function
applyOptions$1
(
options
,
instance
,
publicThis
)
{
function
applyOptions$1
(
options
,
instance
,
publicThis
)
{
Object
.
keys
(
options
).
forEach
(
name
=>
{
Object
.
keys
(
options
).
forEach
(
(
name
)
=>
{
if
(
name
.
indexOf
(
'
on
'
)
===
0
)
{
if
(
name
.
indexOf
(
'
on
'
)
===
0
)
{
const
hook
=
options
[
name
];
const
hook
=
options
[
name
];
if
(
isFunction
(
hook
))
{
if
(
isFunction
(
hook
))
{
...
@@ -3737,7 +3738,7 @@ var plugin = {
...
@@ -3737,7 +3738,7 @@ var plugin = {
createMiniProgramApp
(
instance
);
createMiniProgramApp
(
instance
);
return
instance
;
return
instance
;
};
};
}
}
,
};
};
// @ts-ignore
// @ts-ignore
...
@@ -3773,4 +3774,4 @@ function createApp(rootComponent, rootProps = null) {
...
@@ -3773,4 +3774,4 @@ function createApp(rootComponent, rootProps = null) {
return
createVueApp
(
rootComponent
,
rootProps
).
use
(
plugin
);
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
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录