Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
0a4f2426
U
uni-app
项目概览
DCloud
/
uni-app
通知
699
Star
38703
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,体验更适合开发者的 AI 搜索 >>
提交
0a4f2426
编写于
1月 18, 2024
作者:
雪洛
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(uni-app-x web): 调整vue相关类型
上级
b49b33de
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
49 addition
and
8 deletion
+49
-8
packages/uni-uts-v1/lib/tsconfig/hbuilderx/global.d.ts
packages/uni-uts-v1/lib/tsconfig/hbuilderx/global.d.ts
+33
-2
packages/uni-uts-v1/lib/tsconfig/hbuilderx/shim-uni.d.ts
packages/uni-uts-v1/lib/tsconfig/hbuilderx/shim-uni.d.ts
+16
-6
未找到文件。
packages/uni-uts-v1/lib/tsconfig/hbuilderx/global.d.ts
浏览文件 @
0a4f2426
...
...
@@ -64,19 +64,34 @@ import {
WritableComputedOptions
as
WritableComputedOptionsOrigin
,
computed
as
computedOrigin
,
effect
as
effectOrigin
,
effectScope
as
effectScopeOrigin
,
getCurrentScope
as
getCurrentScopeOrigin
,
onScopeDispose
as
onScopeDisposeOrigin
,
WatchEffect
as
WatchEffectOrigin
,
Ref
as
RefOrigin
,
isReactive
as
isReactiveOrigin
,
isReadonly
as
isReadonlyOrigin
,
isRef
as
isRefOrigin
,
reactive
as
reactiveOrigin
,
ref
as
refOrigin
,
toRef
as
toRefOrigin
,
toRefs
as
toRefsOrigin
,
toValue
as
toValueOrigin
,
triggerRef
as
triggerRefOrigin
,
readonly
as
readonlyOrigin
,
shallowReactive
as
shallowReactiveOrigin
,
shallowRef
as
shallowRefOrigin
,
shallowReadonly
as
shallowReadonlyOrigin
,
stop
as
stopOrigin
,
toRaw
as
toRawOrigin
,
unref
as
unrefOrigin
,
customRef
as
customRefOrigin
,
isProxy
as
isProxyOrigin
,
PropType
as
PropTypeOrigin
,
SlotsType
as
SlotsTypeOrigin
}
from
'
@vue/runtime-core
'
SlotsType
as
SlotsTypeOrigin
,
DebuggerEvent
as
DebuggerEventOrigin
,
OnCleanup
as
OnCleanupOrigin
}
from
'
vue
'
declare
global
{
const
VueAppContext
:
typeof
VueAppContextOrigin
...
...
@@ -149,21 +164,37 @@ declare global {
type
WatchOptions
=
WatchOptionsOrigin
type
VueComponentOptions
=
VueComponentOptionsOrigin
type
ComponentPublicInstance
=
ComponentPublicInstanceOrigin
type
EffectScope
=
EffectScopeOrigin
const
EffectScope
:
typeof
EffectScopeOrigin
const
ReactiveEffect
:
typeof
ReactiveEffectOrigin
type
WritableComputedOptions
<
T
>
=
WritableComputedOptionsOrigin
<
T
>
const
computed
:
typeof
computedOrigin
const
effect
:
typeof
effectOrigin
const
effectScope
=
effectScopeOrigin
const
getCurrentScope
=
getCurrentScopeOrigin
const
onScopeDispose
=
onScopeDisposeOrigin
type
WatchEffect
=
WatchEffectOrigin
type
Ref
<
T
>
=
RefOrigin
<
T
>
const
isReactive
:
typeof
isReactiveOrigin
const
isReadonly
:
typeof
isReadonlyOrigin
const
isRef
:
typeof
isRefOrigin
const
reactive
:
typeof
reactiveOrigin
const
ref
:
typeof
refOrigin
const
toRef
:
typeof
toRefOrigin
const
toRefs
:
typeof
toRefsOrigin
const
toValue
:
typeof
toValueOrigin
const
triggerRef
:
typeof
triggerRefOrigin
const
readonly
:
typeof
readonlyOrigin
const
shallowReactive
:
typeof
shallowReactiveOrigin
const
shallowRef
:
typeof
shallowRefOrigin
const
shallowReadonly
:
typeof
shallowReadonlyOrigin
const
stop
:
typeof
stopOrigin
const
toRaw
:
typeof
toRawOrigin
const
unref
:
typeof
unrefOrigin
const
customRef
:
typeof
customRefOrigin
const
isProxy
:
typeof
isProxyOrigin
type
PropType
<
T
>
=
PropTypeOrigin
<
T
>
type
SlotsType
<
T
>
=
SlotsTypeOrigin
<
T
>
type
DebuggerEvent
=
DebuggerEventOrigin
type
OnCleanup
=
OnCleanupOrigin
}
packages/uni-uts-v1/lib/tsconfig/hbuilderx/shim-uni.d.ts
浏览文件 @
0a4f2426
import
{
createApp
,
defineComponent
}
from
'
vue
'
import
{
createApp
,
defineComponent
,
Ref
}
from
'
vue
'
declare
module
'
vue
'
{
export
interface
ComponentCustomProperties
{
$data
:
Record
<
string
,
any
|
null
>
$callMethod
:
(
methodName
:
string
,
...
args
:
(
any
|
null
)[])
=>
any
|
null
}
// TODO defineApp单独实现类型
export
{
export
type
OnCleanup
=
(
cleanupFn
:
()
=>
void
)
=>
void
;
export
{
createApp
as
createVueApp
,
defineComponent
as
defineApp
}
}
declare
module
'
@vue/reactivity
'
{
export
interface
RefUnwrapBailTypes
{
runtimeDOMBailTypes
:
Uni
;
}
export
declare
function
toRef
<
T
>
(
value
:
Ref
<
T
>
):
Ref
<
T
>
;
export
declare
function
toRef
<
T
>
(
fn
:
()
=>
T
):
Ref
<
T
>
;
export
declare
function
toRef
<
T
>
(
obj
:
object
,
key
:
string
):
Ref
<
T
>
;
export
declare
function
toRaw
<
T
>
(
observed
:
any
):
T
;
export
declare
function
customRef
<
T
>
(
factory
:
Function
):
Ref
<
T
>
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录