Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
genary
uni-app
提交
052822a9
U
uni-app
项目概览
genary
/
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,发现更多精彩内容 >>
提交
052822a9
编写于
1月 13, 2022
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(mp-alipay): remove behavior (#3191)
上级
53f71c3e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
6 addition
and
39 deletion
+6
-39
packages/uni-mp-alipay/src/runtime/createComponent.ts
packages/uni-mp-alipay/src/runtime/createComponent.ts
+1
-2
packages/uni-mp-alipay/src/runtime/util.ts
packages/uni-mp-alipay/src/runtime/util.ts
+0
-10
packages/uni-mp-core/src/runtime/component.ts
packages/uni-mp-core/src/runtime/component.ts
+2
-2
packages/uni-mp-core/src/runtime/componentOptions.ts
packages/uni-mp-core/src/runtime/componentOptions.ts
+3
-21
packages/uni-mp-core/src/runtime/util.ts
packages/uni-mp-core/src/runtime/util.ts
+0
-4
未找到文件。
packages/uni-mp-alipay/src/runtime/createComponent.ts
浏览文件 @
052822a9
...
...
@@ -10,7 +10,6 @@ import {
initWxsCallMethods
,
}
from
'
@dcloudio/uni-mp-core
'
import
{
initBehavior
,
handleRef
,
handleLink
,
triggerEvent
,
...
...
@@ -117,7 +116,7 @@ export function initCreateComponent() {
}
if
(
__VUE_OPTIONS_API__
)
{
mpComponentOptions
.
data
=
initData
(
vueOptions
)
mpComponentOptions
.
mixins
=
initBehaviors
(
vueOptions
,
initBehavior
)
mpComponentOptions
.
mixins
=
initBehaviors
(
vueOptions
)
}
if
(
isComponent2
)
{
...
...
packages/uni-mp-alipay/src/runtime/util.ts
浏览文件 @
052822a9
...
...
@@ -40,16 +40,6 @@ function customize(str: string) {
return
camelize
(
str
.
replace
(
customizeRE
,
'
-
'
))
}
export
function
initBehavior
({
properties
}:
Record
<
string
,
any
>
)
{
const
props
:
Record
<
string
,
any
>
=
{}
Object
.
keys
(
properties
).
forEach
((
key
)
=>
{
props
[
key
]
=
properties
[
key
].
value
})
return
{
props
,
}
}
export
function
initRelation
(
mpInstance
:
MPComponentInstance
,
detail
:
RelationOptions
...
...
packages/uni-mp-core/src/runtime/component.ts
浏览文件 @
052822a9
...
...
@@ -4,7 +4,7 @@ import { ComponentOptions, ComponentPublicInstance } from 'vue'
// @ts-expect-error
import
{
getExposeProxy
}
from
'
vue
'
import
{
initExtraOptions
,
initWxsCallMethods
,
initBehavior
}
from
'
./util
'
import
{
initExtraOptions
,
initWxsCallMethods
}
from
'
./util
'
import
{
initProps
}
from
'
./componentProps
'
import
{
applyOptions
,
initPropsObserver
}
from
'
./componentOptions
'
...
...
@@ -109,7 +109,7 @@ export function parseComponent(
}
if
(
__VUE_OPTIONS_API__
)
{
applyOptions
(
mpComponentOptions
,
vueOptions
,
initBehavior
)
applyOptions
(
mpComponentOptions
,
vueOptions
)
}
initProps
(
mpComponentOptions
)
...
...
packages/uni-mp-core/src/runtime/componentOptions.ts
浏览文件 @
052822a9
...
...
@@ -83,13 +83,8 @@ function hasPropsChanged(
return
false
}
export
function
initBehaviors
(
vueOptions
:
ComponentOptions
,
initBehavior
:
(
behavior
:
any
)
=>
string
|
{
props
:
any
}
):
string
[]
{
export
function
initBehaviors
(
vueOptions
:
ComponentOptions
):
string
[]
{
const
vueBehaviors
=
vueOptions
.
behaviors
const
vueExtends
=
vueOptions
.
extends
const
vueMixins
=
vueOptions
.
mixins
let
vueProps
=
vueOptions
.
props
...
...
@@ -118,26 +113,13 @@ export function initBehaviors(
}
})
}
if
(
vueExtends
&&
vueExtends
.
props
)
{
const
behavior
=
{}
behaviors
.
push
(
initBehavior
(
behavior
)
as
string
)
}
if
(
isArray
(
vueMixins
))
{
vueMixins
.
forEach
((
vueMixin
)
=>
{
if
(
vueMixin
.
props
)
{
const
behavior
=
{}
behaviors
.
push
(
initBehavior
(
behavior
)
as
string
)
}
})
}
return
behaviors
}
export
function
applyOptions
(
componentOptions
:
MPComponentOptions
,
vueOptions
:
ComponentOptions
,
initBehavior
:
(
behavior
:
unknown
)
=>
string
vueOptions
:
ComponentOptions
)
{
componentOptions
.
data
=
initData
(
vueOptions
)
componentOptions
.
behaviors
=
initBehaviors
(
vueOptions
,
initBehavior
)
componentOptions
.
behaviors
=
initBehaviors
(
vueOptions
)
}
packages/uni-mp-core/src/runtime/util.ts
浏览文件 @
052822a9
...
...
@@ -8,10 +8,6 @@ import {
import
{
MPComponentInstance
,
MPComponentOptions
}
from
'
./component
'
export
function
initBehavior
(
options
:
any
)
{
return
Behavior
(
options
)
}
export
function
initVueIds
(
vueIds
:
string
|
undefined
,
mpInstance
:
MPComponentInstance
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录