Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
80ecec43
U
uni-app
项目概览
DCloud
/
uni-app
6 个月 前同步成功
通知
751
Star
38709
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
8
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
8
Issue
8
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
80ecec43
编写于
4月 25, 2024
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: build
上级
2b29cb2f
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
103 addition
and
47 deletion
+103
-47
packages/uni-app-plus/dist/uni-app-view.umd.js
packages/uni-app-plus/dist/uni-app-view.umd.js
+1
-1
packages/uni-h5/dist-x/uni-h5.cjs.js
packages/uni-h5/dist-x/uni-h5.cjs.js
+21
-16
packages/uni-h5/dist-x/uni-h5.es.js
packages/uni-h5/dist-x/uni-h5.es.js
+43
-17
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+14
-6
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+24
-7
未找到文件。
packages/uni-app-plus/dist/uni-app-view.umd.js
浏览文件 @
80ecec43
此差异已折叠。
点击以展开。
packages/uni-h5/dist-x/uni-h5.cjs.js
浏览文件 @
80ecec43
...
...
@@ -5584,7 +5584,7 @@ const index$s = /* @__PURE__ */ defineBuiltInComponent({
compatConfig
:
{
MODE
:
3
},
props
:
shared
.
extend
({},
navigatorProps
,
{
props
:
/* @__PURE__ */
shared
.
extend
({},
navigatorProps
,
{
renderLink
:
{
type
:
Boolean
,
default
:
true
...
...
@@ -8245,7 +8245,7 @@ class UniViewElement extends UniElement {
}
const
index$i
=
/* @__PURE__ */
defineBuiltInComponent
({
name
:
"
View
"
,
props
:
shared
.
extend
({},
hoverProps
),
props
:
/* @__PURE__ */
shared
.
extend
({},
hoverProps
),
setup
(
props2
,
{
slots
})
{
...
...
@@ -9041,7 +9041,7 @@ function initPageMeta(id) {
function
normalizePageMeta
(
pageMeta
)
{
if
(
__UNI_FEATURE_PULL_DOWN_REFRESH__
)
{
const
{
enablePullDownRefresh
,
navigationBar
}
=
pageMeta
;
if
(
enablePullDownRefresh
)
{
{
const
pullToRefresh
=
normalizePullToRefreshRpx
(
shared
.
extend
(
{
...
...
@@ -9170,11 +9170,11 @@ function initPage(vm) {
navigationBarBackgroundColor
:
pageMeta
.
navigationBar
.
backgroundColor
,
navigationBarTextStyle
:
pageMeta
.
navigationBar
.
titleColor
,
navigationBarTitleText
:
pageMeta
.
navigationBar
.
titleText
,
titleImage
:
pageMeta
.
navigationBar
.
titleImage
,
navigationStyle
:
pageMeta
.
navigationBar
.
style
,
disableScroll
:
pageMeta
.
disableScroll
,
enablePullDownRefresh
:
pageMeta
.
enablePullDownRefresh
,
onReachBottomDistance
:
pageMeta
.
onReachBottomDistance
titleImage
:
pageMeta
.
navigationBar
.
titleImage
||
""
,
navigationStyle
:
pageMeta
.
navigationBar
.
style
||
"
default
"
,
disableScroll
:
pageMeta
.
disableScroll
||
false
,
enablePullDownRefresh
:
pageMeta
.
enablePullDownRefresh
||
false
,
onReachBottomDistance
:
pageMeta
.
onReachBottomDistance
||
uniShared
.
ON_REACH_BOTTOM_DISTANCE
});
}
currentPagesMap
.
set
(
normalizeRouteKey
(
page
.
path
,
page
.
id
),
vm
);
...
...
@@ -13985,27 +13985,32 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
]);
}
const
PageRefresh
=
/* @__PURE__ */
_export_sfc
(
_sfc_main
,
[[
"
render
"
,
_sfc_render
]]);
const
PageBody
=
defineSystemComponent
({
const
PageBody
=
/* @__PURE__ */
defineSystemComponent
({
name
:
"
PageBody
"
,
setup
(
props2
,
ctx
)
{
const
pageMeta
=
__UNI_FEATURE_PULL_DOWN_REFRESH__
&&
usePageMeta
();
const
refreshRef
=
__UNI_FEATURE_PULL_DOWN_REFRESH__
&&
vue
.
ref
(
null
);
const
pageRefresh
=
null
;
const
_pageRefresh
=
null
;
const
pageRefresh
=
vue
.
ref
(
null
);
vue
.
watch
(()
=>
{
return
pageMeta
.
enablePullDownRefresh
;
},
()
=>
{
pageRefresh
.
value
=
pageMeta
.
enablePullDownRefresh
?
_pageRefresh
:
null
;
},
{
immediate
:
true
});
return
()
=>
{
const
pageRefreshTsx
=
__UNI_FEATURE_PULL_DOWN_REFRESH__
&&
createPageRefreshTsx
(
refreshRef
,
pageMeta
);
return
vue
.
createVNode
(
vue
.
Fragment
,
null
,
[
pageRefreshTsx
,
vue
.
createVNode
(
"
uni-page-wrapper
"
,
pageRefresh
,
[
vue
.
createVNode
(
"
uni-page-body
"
,
null
,
[
vue
.
renderSlot
(
ctx
.
slots
,
"
default
"
)])],
16
)]);
const
pageRefreshTsx
=
__UNI_FEATURE_PULL_DOWN_REFRESH__
&&
createPageRefreshTsx
(
refreshRef
);
return
vue
.
createVNode
(
vue
.
Fragment
,
null
,
[
pageRefreshTsx
,
vue
.
createVNode
(
"
uni-page-wrapper
"
,
pageRefresh
.
value
,
[
vue
.
createVNode
(
"
uni-page-body
"
,
null
,
[
vue
.
renderSlot
(
ctx
.
slots
,
"
default
"
)])],
16
)]);
};
}
});
function
createPageRefreshTsx
(
refreshRef
,
pageMeta
)
{
if
(
!
__UNI_FEATURE_PULL_DOWN_REFRESH__
||
!
pageMeta
.
enablePullDownRefresh
)
{
return
null
;
}
return
vue
.
createVNode
(
PageRefresh
,
{
"
ref
"
:
refreshRef
},
null
,
512
);
}
const
index
=
defineSystemComponent
({
const
index
=
/* @__PURE__ */
defineSystemComponent
({
name
:
"
Page
"
,
setup
(
_props
,
ctx
)
{
const
pageMeta
=
providePageMeta
(
getStateId
());
...
...
packages/uni-h5/dist-x/uni-h5.es.js
浏览文件 @
80ecec43
...
...
@@ -12083,7 +12083,7 @@ const index$q = /* @__PURE__ */ defineBuiltInComponent({
compatConfig: {
MODE: 3
},
props: extend({}, navigatorProps, {
props:
/* @__PURE__ */
extend({}, navigatorProps, {
renderLink: {
type: Boolean,
default: true
...
...
@@ -16090,7 +16090,7 @@ class UniViewElement extends UniElement {
}
const index$j = /* @__PURE__ */ defineBuiltInComponent({
name: "View",
props: extend({}, hoverProps),
props:
/* @__PURE__ */
extend({}, hoverProps),
rootElement: {
name: "uni-view",
class: UniViewElement
...
...
@@ -17157,7 +17157,7 @@ function initPageMeta(id2) {
function normalizePageMeta(pageMeta) {
if (__UNI_FEATURE_PULL_DOWN_REFRESH__) {
const { enablePullDownRefresh, navigationBar } = pageMeta;
if (enablePullDownRefresh)
{
{
const pullToRefresh = normalizePullToRefreshRpx(
extend(
{
...
...
@@ -17370,11 +17370,11 @@ function initPage(vm) {
navigationBarBackgroundColor: pageMeta.navigationBar.backgroundColor,
navigationBarTextStyle: pageMeta.navigationBar.titleColor,
navigationBarTitleText: pageMeta.navigationBar.titleText,
titleImage: pageMeta.navigationBar.titleImage,
navigationStyle: pageMeta.navigationBar.style,
disableScroll: pageMeta.disableScroll,
enablePullDownRefresh: pageMeta.enablePullDownRefresh,
onReachBottomDistance: pageMeta.onReachBottomDistance
titleImage: pageMeta.navigationBar.titleImage
|| ""
,
navigationStyle: pageMeta.navigationBar.style
|| "default"
,
disableScroll: pageMeta.disableScroll
|| false
,
enablePullDownRefresh: pageMeta.enablePullDownRefresh
|| false
,
onReachBottomDistance: pageMeta.onReachBottomDistance
|| ON_REACH_BOTTOM_DISTANCE
});
}
currentPagesMap.set(normalizeRouteKey(page.path, page.id), vm);
...
...
@@ -27328,6 +27328,9 @@ function usePageRefresh(refreshRef) {
let refreshInnerElemStyle;
useSubscribe(
() => {
if (!pageMeta.enablePullDownRefresh) {
return;
}
if (!state2) {
state2 = REFRESHING;
addClass();
...
...
@@ -27342,6 +27345,9 @@ function usePageRefresh(refreshRef) {
);
useSubscribe(
() => {
if (!pageMeta.enablePullDownRefresh) {
return;
}
if (state2 === REFRESHING) {
removeClass();
state2 = RESTORING;
...
...
@@ -27356,14 +27362,29 @@ function usePageRefresh(refreshRef) {
false,
id2
);
onMounted(() =>
{
function initElement()
{
refreshContainerElem = refreshRef.value.$el;
refreshControllerElem = refreshContainerElem.querySelector(".uni-page-refresh");
refreshControllerElemStyle = refreshControllerElem.style;
refreshInnerElemStyle = refreshControllerElem.querySelector(
".uni-page-refresh-inner"
).style;
}
onMounted(() => {
initElement();
});
{
watch(
() => pageMeta.enablePullDownRefresh,
(enablePullDownRefresh) => {
if (enablePullDownRefresh) {
nextTick(() => {
initElement();
});
}
}
);
}
let touchId;
let startY;
let canRefresh;
...
...
@@ -27537,27 +27558,32 @@ function usePageRefresh(refreshRef) {
onTouchcancel: onTouchend
};
}
const PageBody = defineSystemComponent({
const PageBody =
/* @__PURE__ */
defineSystemComponent({
name: "PageBody",
setup(props2, ctx) {
const pageMeta = __UNI_FEATURE_PULL_DOWN_REFRESH__ && usePageMeta();
const refreshRef = __UNI_FEATURE_PULL_DOWN_REFRESH__ && ref(null);
const pageRefresh = __UNI_FEATURE_PULL_DOWN_REFRESH__ && pageMeta.enablePullDownRefresh ? usePageRefresh(refreshRef) : null;
const _pageRefresh = __UNI_FEATURE_PULL_DOWN_REFRESH__ ? usePageRefresh(refreshRef) : null;
const pageRefresh = ref(null);
watch(() => {
return pageMeta.enablePullDownRefresh;
}, () => {
pageRefresh.value = pageMeta.enablePullDownRefresh ? _pageRefresh : null;
}, {
immediate: true
});
return () => {
const pageRefreshTsx = __UNI_FEATURE_PULL_DOWN_REFRESH__ && createPageRefreshTsx(refreshRef
, pageMeta
);
return createVNode(Fragment, null, [pageRefreshTsx, createVNode("uni-page-wrapper", pageRefresh, [createVNode("uni-page-body", null, [renderSlot(ctx.slots, "default")])], 16)]);
const pageRefreshTsx = __UNI_FEATURE_PULL_DOWN_REFRESH__ && createPageRefreshTsx(refreshRef);
return createVNode(Fragment, null, [pageRefreshTsx, createVNode("uni-page-wrapper", pageRefresh
.value
, [createVNode("uni-page-body", null, [renderSlot(ctx.slots, "default")])], 16)]);
};
}
});
function createPageRefreshTsx(refreshRef, pageMeta) {
if (!__UNI_FEATURE_PULL_DOWN_REFRESH__ || !pageMeta.enablePullDownRefresh) {
return null;
}
return createVNode(PageRefresh, {
"ref": refreshRef
}, null, 512);
}
const index = defineSystemComponent({
const index =
/* @__PURE__ */
defineSystemComponent({
name: "Page",
setup(_props, ctx) {
const pageMeta = providePageMeta(getStateId());
...
...
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
80ecec43
...
...
@@ -4938,7 +4938,7 @@ const index$r = /* @__PURE__ */ defineBuiltInComponent({
compatConfig
:
{
MODE
:
3
},
props
:
shared
.
extend
({},
navigatorProps
,
{
props
:
/* @__PURE__ */
shared
.
extend
({},
navigatorProps
,
{
renderLink
:
{
type
:
Boolean
,
default
:
true
...
...
@@ -7542,7 +7542,7 @@ const index$g = /* @__PURE__ */ defineBuiltInComponent({
});
const
index$f
=
/* @__PURE__ */
defineBuiltInComponent
({
name
:
"
View
"
,
props
:
shared
.
extend
({},
hoverProps
),
props
:
/* @__PURE__ */
shared
.
extend
({},
hoverProps
),
setup
(
props2
,
{
slots
})
{
...
...
@@ -12671,15 +12671,23 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
]);
}
const
PageRefresh
=
/* @__PURE__ */
_export_sfc
(
_sfc_main
,
[[
"
render
"
,
_sfc_render
]]);
const
PageBody
=
defineSystemComponent
({
const
PageBody
=
/* @__PURE__ */
defineSystemComponent
({
name
:
"
PageBody
"
,
setup
(
props2
,
ctx
)
{
const
pageMeta
=
__UNI_FEATURE_PULL_DOWN_REFRESH__
&&
usePageMeta
();
const
refreshRef
=
__UNI_FEATURE_PULL_DOWN_REFRESH__
&&
vue
.
ref
(
null
);
const
pageRefresh
=
null
;
const
_pageRefresh
=
null
;
const
pageRefresh
=
vue
.
ref
(
null
);
vue
.
watch
(()
=>
{
return
pageMeta
.
enablePullDownRefresh
;
},
()
=>
{
pageRefresh
.
value
=
pageMeta
.
enablePullDownRefresh
?
_pageRefresh
:
null
;
},
{
immediate
:
true
});
return
()
=>
{
const
pageRefreshTsx
=
__UNI_FEATURE_PULL_DOWN_REFRESH__
&&
createPageRefreshTsx
(
refreshRef
,
pageMeta
);
return
vue
.
createVNode
(
vue
.
Fragment
,
null
,
[
pageRefreshTsx
,
vue
.
createVNode
(
"
uni-page-wrapper
"
,
pageRefresh
,
[
vue
.
createVNode
(
"
uni-page-body
"
,
null
,
[
vue
.
renderSlot
(
ctx
.
slots
,
"
default
"
)])],
16
)]);
return
vue
.
createVNode
(
vue
.
Fragment
,
null
,
[
pageRefreshTsx
,
vue
.
createVNode
(
"
uni-page-wrapper
"
,
pageRefresh
.
value
,
[
vue
.
createVNode
(
"
uni-page-body
"
,
null
,
[
vue
.
renderSlot
(
ctx
.
slots
,
"
default
"
)])],
16
)]);
};
}
});
...
...
@@ -12691,7 +12699,7 @@ function createPageRefreshTsx(refreshRef, pageMeta) {
"
ref
"
:
refreshRef
},
null
,
512
);
}
const
index
=
defineSystemComponent
({
const
index
=
/* @__PURE__ */
defineSystemComponent
({
name
:
"
Page
"
,
setup
(
_props
,
ctx
)
{
const
pageMeta
=
providePageMeta
(
getStateId
());
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
80ecec43
...
...
@@ -11416,7 +11416,7 @@ const index$p = /* @__PURE__ */ defineBuiltInComponent({
compatConfig: {
MODE: 3
},
props: extend({}, navigatorProps, {
props:
/* @__PURE__ */
extend({}, navigatorProps, {
renderLink: {
type: Boolean,
default: true
...
...
@@ -15145,7 +15145,7 @@ const index$h = /* @__PURE__ */ defineBuiltInComponent({
});
const index$g = /* @__PURE__ */ defineBuiltInComponent({
name: "View",
props: extend({}, hoverProps),
props:
/* @__PURE__ */
extend({}, hoverProps),
setup(props2, {
slots
}) {
...
...
@@ -25508,6 +25508,9 @@ function usePageRefresh(refreshRef) {
let refreshInnerElemStyle;
useSubscribe(
() => {
if (!pageMeta.enablePullDownRefresh) {
return;
}
if (!state2) {
state2 = REFRESHING;
addClass();
...
...
@@ -25522,6 +25525,9 @@ function usePageRefresh(refreshRef) {
);
useSubscribe(
() => {
if (!pageMeta.enablePullDownRefresh) {
return;
}
if (state2 === REFRESHING) {
removeClass();
state2 = RESTORING;
...
...
@@ -25536,13 +25542,16 @@ function usePageRefresh(refreshRef) {
false,
id2
);
onMounted(() =>
{
function initElement()
{
refreshContainerElem = refreshRef.value.$el;
refreshControllerElem = refreshContainerElem.querySelector(".uni-page-refresh");
refreshControllerElemStyle = refreshControllerElem.style;
refreshInnerElemStyle = refreshControllerElem.querySelector(
".uni-page-refresh-inner"
).style;
}
onMounted(() => {
initElement();
});
let touchId;
let startY;
...
...
@@ -25717,15 +25726,23 @@ function usePageRefresh(refreshRef) {
onTouchcancel: onTouchend
};
}
const PageBody = defineSystemComponent({
const PageBody =
/* @__PURE__ */
defineSystemComponent({
name: "PageBody",
setup(props2, ctx) {
const pageMeta = __UNI_FEATURE_PULL_DOWN_REFRESH__ && usePageMeta();
const refreshRef = __UNI_FEATURE_PULL_DOWN_REFRESH__ && ref(null);
const pageRefresh = __UNI_FEATURE_PULL_DOWN_REFRESH__ && pageMeta.enablePullDownRefresh ? usePageRefresh(refreshRef) : null;
const _pageRefresh = __UNI_FEATURE_PULL_DOWN_REFRESH__ ? usePageRefresh(refreshRef) : null;
const pageRefresh = ref(null);
watch(() => {
return pageMeta.enablePullDownRefresh;
}, () => {
pageRefresh.value = pageMeta.enablePullDownRefresh ? _pageRefresh : null;
}, {
immediate: true
});
return () => {
const pageRefreshTsx = __UNI_FEATURE_PULL_DOWN_REFRESH__ && createPageRefreshTsx(refreshRef, pageMeta);
return createVNode(Fragment, null, [pageRefreshTsx, createVNode("uni-page-wrapper", pageRefresh, [createVNode("uni-page-body", null, [renderSlot(ctx.slots, "default")])], 16)]);
return createVNode(Fragment, null, [pageRefreshTsx, createVNode("uni-page-wrapper", pageRefresh
.value
, [createVNode("uni-page-body", null, [renderSlot(ctx.slots, "default")])], 16)]);
};
}
});
...
...
@@ -25737,7 +25754,7 @@ function createPageRefreshTsx(refreshRef, pageMeta) {
"ref": refreshRef
}, null, 512);
}
const index = defineSystemComponent({
const index =
/* @__PURE__ */
defineSystemComponent({
name: "Page",
setup(_props, ctx) {
const pageMeta = providePageMeta(getStateId());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录