提交 80ecec43 编写于 作者: fxy060608's avatar fxy060608

chore: build

上级 2b29cb2f
......@@ -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());
......
......@@ -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());
......
......@@ -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());
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册