Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yangkaifeng
uni-app
提交
2d49fd9e
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,发现更多精彩内容 >>
提交
2d49fd9e
编写于
1月 20, 2022
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(stat): lifecycle
上级
e99d6c92
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
163 addition
and
106 deletion
+163
-106
packages/uni-app-plus/dist/uni-app-service.es.js
packages/uni-app-plus/dist/uni-app-service.es.js
+36
-10
packages/uni-app-plus/dist/uni-app-view.umd.js
packages/uni-app-plus/dist/uni-app-view.umd.js
+2
-2
packages/uni-components/src/helpers/component.ts
packages/uni-components/src/helpers/component.ts
+4
-0
packages/uni-h5-vue/dist/vue.runtime.cjs.js
packages/uni-h5-vue/dist/vue.runtime.cjs.js
+4
-0
packages/uni-h5-vue/dist/vue.runtime.esm.js
packages/uni-h5-vue/dist/vue.runtime.esm.js
+4
-0
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+45
-42
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+68
-52
未找到文件。
packages/uni-app-plus/dist/uni-app-service.es.js
浏览文件 @
2d49fd9e
...
...
@@ -2671,6 +2671,9 @@ var serviceContext = (function (vue) {
openMapApp(ctx, args) {
return invokeVmMethod(ctx, 'openMapApp', args);
},
on(ctx, args) {
return ctx.on(args.name, args.callback);
},
};
function operateMap(id, pageId, type, data, operateMapCallback) {
const page = getCurrentPages().find((page) => page.$page.id === pageId);
...
...
@@ -9947,16 +9950,39 @@ var serviceContext = (function (vue) {
return plus.maps.getMapById(this.pageId + '-map-' + this.id);
}
}
addCustomLayer() { }
removeCustomLayer() { }
addGroundOverlay() { }
removeGroundOverlay() { }
updateGroundOverlay() { }
initMarkerCluster() { }
addMarkers() { }
removeMarkers() { }
moveAlong() { }
openMapApp() { }
addCustomLayer(options) {
operateMapWrap(this.id, this.pageId, 'addCustomLayer', options);
}
removeCustomLayer(options) {
operateMapWrap(this.id, this.pageId, 'removeCustomLayer', options);
}
addGroundOverlay(options) {
operateMapWrap(this.id, this.pageId, 'addGroundOverlay', options);
}
removeGroundOverlay(options) {
operateMapWrap(this.id, this.pageId, 'removeGroundOverlay', options);
}
updateGroundOverlay(options) {
operateMapWrap(this.id, this.pageId, 'updateGroundOverlay', options);
}
initMarkerCluster(options) {
operateMapWrap(this.id, this.pageId, 'initMarkerCluster', options);
}
addMarkers(options) {
operateMapWrap(this.id, this.pageId, 'addMarkers', options);
}
removeMarkers(options) {
operateMapWrap(this.id, this.pageId, 'removeMarkers', options);
}
moveAlong(options) {
operateMapWrap(this.id, this.pageId, 'moveAlong', options);
}
openMapApp(options) {
operateMapWrap(this.id, this.pageId, 'openMapApp', options);
}
on(options) {
operateMapWrap(this.id, this.pageId, 'on', options);
}
}
const createMapContext = defineSyncApi(API_CREATE_MAP_CONTEXT, (id, context) => {
if (context) {
...
...
packages/uni-app-plus/dist/uni-app-view.umd.js
浏览文件 @
2d49fd9e
此差异已折叠。
点击以展开。
packages/uni-components/src/helpers/component.ts
浏览文件 @
2d49fd9e
...
...
@@ -14,6 +14,8 @@ import animation from './animation'
export
const
defineBuiltInComponent
:
typeof
defineComponent
=
(
options
:
any
)
=>
{
// 标记为保留组件,这样框架其他地方可以据此来识别,比如 onLoad 等生命周期的注入会忽略系统保留组件
options
.
__reserved
=
true
// TODO 可能会补充特殊标记
const
{
props
,
mixins
}
=
options
// 补充内置组件animation
...
...
@@ -28,6 +30,8 @@ export const defineBuiltInComponent: typeof defineComponent = (
* @returns
*/
export
const
defineSystemComponent
:
typeof
defineComponent
=
(
options
:
any
)
=>
{
// 标记为保留组件
options
.
__reserved
=
true
;(
options
as
ComponentOptions
).
compatConfig
=
{
MODE
:
3
,
// 标记为vue3
}
...
...
packages/uni-h5-vue/dist/vue.runtime.cjs.js
浏览文件 @
2d49fd9e
...
...
@@ -3842,6 +3842,10 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
if
(
target
)
{
// fixed by xxxxxx
if
(
uniShared
.
isRootHook
(
type
))
{
// 系统保留组件,如 view,app 等
if
(
target
.
type
.
__reserved
)
{
return
;
}
target
=
target
.
root
;
}
const
hooks
=
target
[
type
]
||
(
target
[
type
]
=
[]);
...
...
packages/uni-h5-vue/dist/vue.runtime.esm.js
浏览文件 @
2d49fd9e
...
...
@@ -3867,6 +3867,10 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
if
(
target
)
{
// fixed by xxxxxx
if
(
isRootHook
(
type
))
{
// 系统保留组件,如 view,app 等
if
(
target
.
type
.
__reserved
)
{
return
;
}
target
=
target
.
root
;
}
const
hooks
=
target
[
type
]
||
(
target
[
type
]
=
[]);
...
...
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
2d49fd9e
...
...
@@ -602,6 +602,7 @@ var animation = {
}
};
const
defineBuiltInComponent
=
(
options
)
=>
{
options
.
__reserved
=
true
;
const
{
props
:
props2
,
mixins
}
=
options
;
if
(
!
props2
||
!
props2
.
animation
)
{
(
mixins
||
(
options
.
mixins
=
[])).
push
(
animation
);
...
...
@@ -609,6 +610,7 @@ const defineBuiltInComponent = (options) => {
return
defineSystemComponent
(
options
);
};
const
defineSystemComponent
=
(
options
)
=>
{
options
.
__reserved
=
true
;
options
.
compatConfig
=
{
MODE
:
3
};
...
...
@@ -823,50 +825,51 @@ function useProvideLabel() {
});
return
handlers
;
}
const
buttonProps
=
{
id
:
{
type
:
String
,
default
:
""
},
hoverClass
:
{
type
:
String
,
default
:
"
button-hover
"
},
hoverStartTime
:
{
type
:
[
Number
,
String
],
default
:
20
},
hoverStayTime
:
{
type
:
[
Number
,
String
],
default
:
70
},
hoverStopPropagation
:
{
type
:
Boolean
,
default
:
false
},
disabled
:
{
type
:
[
Boolean
,
String
],
default
:
false
},
formType
:
{
type
:
String
,
default
:
""
},
openType
:
{
type
:
String
,
default
:
""
},
loading
:
{
type
:
[
Boolean
,
String
],
default
:
false
},
plain
:
{
type
:
[
Boolean
,
String
],
default
:
false
}
};
var
index$C
=
/* @__PURE__ */
defineBuiltInComponent
({
name
:
"
Button
"
,
props
:
{
id
:
{
type
:
String
,
default
:
""
},
hoverClass
:
{
type
:
String
,
default
:
"
button-hover
"
},
hoverStartTime
:
{
type
:
[
Number
,
String
],
default
:
20
},
hoverStayTime
:
{
type
:
[
Number
,
String
],
default
:
70
},
hoverStopPropagation
:
{
type
:
Boolean
,
default
:
false
},
disabled
:
{
type
:
[
Boolean
,
String
],
default
:
false
},
formType
:
{
type
:
String
,
default
:
""
},
openType
:
{
type
:
String
,
default
:
""
},
loading
:
{
type
:
[
Boolean
,
String
],
default
:
false
},
plain
:
{
type
:
[
Boolean
,
String
],
default
:
false
}
},
props
:
buttonProps
,
setup
(
props2
,
{
slots
})
{
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
2d49fd9e
...
...
@@ -1634,6 +1634,7 @@ var animation = {
}
};
const defineBuiltInComponent = (options) => {
options.__reserved = true;
const { props: props2, mixins } = options;
if (!props2 || !props2.animation) {
(mixins || (options.mixins = [])).push(animation);
...
...
@@ -1641,6 +1642,7 @@ const defineBuiltInComponent = (options) => {
return defineSystemComponent(options);
};
const defineSystemComponent = (options) => {
options.__reserved = true;
options.compatConfig = {
MODE: 3
};
...
...
@@ -1909,50 +1911,51 @@ function _removeListeners(id2, listeners2, watch2) {
}
});
}
const buttonProps = {
id: {
type: String,
default: ""
},
hoverClass: {
type: String,
default: "button-hover"
},
hoverStartTime: {
type: [Number, String],
default: 20
},
hoverStayTime: {
type: [Number, String],
default: 70
},
hoverStopPropagation: {
type: Boolean,
default: false
},
disabled: {
type: [Boolean, String],
default: false
},
formType: {
type: String,
default: ""
},
openType: {
type: String,
default: ""
},
loading: {
type: [Boolean, String],
default: false
},
plain: {
type: [Boolean, String],
default: false
}
};
var index$y = /* @__PURE__ */ defineBuiltInComponent({
name: "Button",
props: {
id: {
type: String,
default: ""
},
hoverClass: {
type: String,
default: "button-hover"
},
hoverStartTime: {
type: [Number, String],
default: 20
},
hoverStayTime: {
type: [Number, String],
default: 70
},
hoverStopPropagation: {
type: Boolean,
default: false
},
disabled: {
type: [Boolean, String],
default: false
},
formType: {
type: String,
default: ""
},
openType: {
type: String,
default: ""
},
loading: {
type: [Boolean, String],
default: false
},
plain: {
type: [Boolean, String],
default: false
}
},
props: buttonProps,
setup(props2, {
slots
}) {
...
...
@@ -3094,25 +3097,38 @@ class MapContext {
}
$getAppMap() {
}
addCustomLayer() {
addCustomLayer(options) {
operateMapWrap(this.id, this.pageId, "addCustomLayer", options);
}
removeCustomLayer(options) {
operateMapWrap(this.id, this.pageId, "removeCustomLayer", options);
}
removeCustomLayer() {
addGroundOverlay(options) {
operateMapWrap(this.id, this.pageId, "addGroundOverlay", options);
}
addGroundOverlay() {
removeGroundOverlay(options) {
operateMapWrap(this.id, this.pageId, "removeGroundOverlay", options);
}
removeGroundOverlay() {
updateGroundOverlay(options) {
operateMapWrap(this.id, this.pageId, "updateGroundOverlay", options);
}
updateGroundOverlay() {
initMarkerCluster(options) {
operateMapWrap(this.id, this.pageId, "initMarkerCluster", options);
}
initMarkerCluster() {
addMarkers(options) {
operateMapWrap(this.id, this.pageId, "addMarkers", options);
}
addMarkers() {
removeMarkers(options) {
operateMapWrap(this.id, this.pageId, "removeMarkers", options);
}
removeMarkers() {
moveAlong(options) {
operateMapWrap(this.id, this.pageId, "moveAlong", options);
}
moveAlong() {
openMapApp(options) {
operateMapWrap(this.id, this.pageId, "openMapApp", options);
}
openMapApp() {
on(options) {
operateMapWrap(this.id, this.pageId, "on", options);
}
}
const createMapContext = /* @__PURE__ */ defineSyncApi(API_CREATE_MAP_CONTEXT, (id2, context) => {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录