提交 4fd85293 编写于 作者: Q qiang

chore: build

上级 f7f62c76
...@@ -11158,6 +11158,20 @@ function parseTheme(pageStyle) { ...@@ -11158,6 +11158,20 @@ function parseTheme(pageStyle) {
} }
return __uniConfig.darkmode ? parsedStyle : pageStyle; return __uniConfig.darkmode ? parsedStyle : pageStyle;
} }
function useTheme(pageStyle, onThemeChangeCallback) {
const isReactived = vue.isReactive(pageStyle);
const reactivePageStyle = isReactived ? vue.reactive(parseTheme(pageStyle)) : parseTheme(pageStyle);
if (__uniConfig.darkmode && isReactived) {
vue.watch(pageStyle, (value) => {
const _pageStyle = parseTheme(value);
for (const key in _pageStyle) {
reactivePageStyle[key] = _pageStyle[key];
}
});
}
onThemeChangeCallback && onThemeChange(onThemeChangeCallback);
return reactivePageStyle;
}
const _middleButton = { const _middleButton = {
width: "50px", width: "50px",
height: "50px", height: "50px",
...@@ -11168,16 +11182,7 @@ const TabBar = /* @__PURE__ */ defineSystemComponent({ ...@@ -11168,16 +11182,7 @@ const TabBar = /* @__PURE__ */ defineSystemComponent({
setup() { setup() {
const visibleList = vue.ref([]); const visibleList = vue.ref([]);
const _tabBar = useTabBar(); const _tabBar = useTabBar();
const tabBar2 = vue.reactive(parseTheme(_tabBar)); const tabBar2 = useTheme(_tabBar, () => {
useVisibleList(tabBar2, visibleList);
useTabBarCssVar(tabBar2);
const onSwitchTab = useSwitchTab(vueRouter.useRoute(), tabBar2, visibleList);
const {
style,
borderStyle,
placeholderStyle
} = useTabBarStyle(tabBar2);
onThemeChange(() => {
const tabBarStyle = parseTheme(_tabBar); const tabBarStyle = parseTheme(_tabBar);
tabBar2.backgroundColor = tabBarStyle.backgroundColor; tabBar2.backgroundColor = tabBarStyle.backgroundColor;
tabBar2.borderStyle = tabBarStyle.borderStyle; tabBar2.borderStyle = tabBarStyle.borderStyle;
...@@ -11191,6 +11196,14 @@ const TabBar = /* @__PURE__ */ defineSystemComponent({ ...@@ -11191,6 +11196,14 @@ const TabBar = /* @__PURE__ */ defineSystemComponent({
}); });
} }
}); });
useVisibleList(tabBar2, visibleList);
useTabBarCssVar(tabBar2);
const onSwitchTab = useSwitchTab(vueRouter.useRoute(), tabBar2, visibleList);
const {
style,
borderStyle,
placeholderStyle
} = useTabBarStyle(tabBar2);
return () => { return () => {
const tabBarItemsTsx = createTabBarItemsTsx(tabBar2, onSwitchTab, visibleList); const tabBarItemsTsx = createTabBarItemsTsx(tabBar2, onSwitchTab, visibleList);
return vue.createVNode("uni-tabbar", { return vue.createVNode("uni-tabbar", {
...@@ -11824,16 +11837,15 @@ const PageHead = /* @__PURE__ */ defineSystemComponent({ ...@@ -11824,16 +11837,15 @@ const PageHead = /* @__PURE__ */ defineSystemComponent({
setup() { setup() {
const headRef = vue.ref(null); const headRef = vue.ref(null);
const pageMeta = usePageMeta(); const pageMeta = usePageMeta();
const navigationBar = vue.reactive(parseTheme(pageMeta.navigationBar)); const navigationBar = useTheme(pageMeta.navigationBar, () => {
const {
clazz: clazz2,
style
} = usePageHead(navigationBar);
onThemeChange(() => {
const _navigationBar = parseTheme(pageMeta.navigationBar); const _navigationBar = parseTheme(pageMeta.navigationBar);
navigationBar.backgroundColor = _navigationBar.backgroundColor; navigationBar.backgroundColor = _navigationBar.backgroundColor;
navigationBar.titleColor = _navigationBar.titleColor; navigationBar.titleColor = _navigationBar.titleColor;
}); });
const {
clazz: clazz2,
style
} = usePageHead(navigationBar);
const buttons = __UNI_FEATURE_NAVIGATIONBAR_BUTTONS__ && usePageHeadButtons(pageMeta); const buttons = __UNI_FEATURE_NAVIGATIONBAR_BUTTONS__ && usePageHeadButtons(pageMeta);
const searchInput = __UNI_FEATURE_NAVIGATIONBAR_SEARCHINPUT__ && navigationBar.searchInput && usePageHeadSearchInput(pageMeta); const searchInput = __UNI_FEATURE_NAVIGATIONBAR_SEARCHINPUT__ && navigationBar.searchInput && usePageHeadSearchInput(pageMeta);
__UNI_FEATURE_NAVIGATIONBAR_TRANSPARENT__ && navigationBar.type === "transparent" && usePageHeadTransparent(headRef, pageMeta); __UNI_FEATURE_NAVIGATIONBAR_TRANSPARENT__ && navigationBar.type === "transparent" && usePageHeadTransparent(headRef, pageMeta);
......
import { withModifiers, createVNode, getCurrentInstance, ref, defineComponent, openBlock, createElementBlock, provide, computed, watch, onUnmounted, inject, onBeforeUnmount, mergeProps, injectHook, reactive, onActivated, onMounted, nextTick, onBeforeMount, withDirectives, vModelDynamic, vShow, shallowRef, watchEffect, isVNode, Fragment, markRaw, Comment, h, createTextVNode, createBlock, onBeforeActivate, onBeforeDeactivate, renderList, onDeactivated, createApp, Transition, effectScope, withCtx, KeepAlive, resolveDynamicComponent, createElementVNode, normalizeStyle, renderSlot } from "vue"; import { withModifiers, createVNode, getCurrentInstance, ref, defineComponent, openBlock, createElementBlock, provide, computed, watch, onUnmounted, inject, onBeforeUnmount, mergeProps, injectHook, reactive, onActivated, onMounted, nextTick, onBeforeMount, withDirectives, vModelDynamic, vShow, shallowRef, watchEffect, isVNode, Fragment, markRaw, Comment, h, createTextVNode, createBlock, onBeforeActivate, onBeforeDeactivate, renderList, onDeactivated, createApp, isReactive, Transition, effectScope, withCtx, KeepAlive, resolveDynamicComponent, createElementVNode, normalizeStyle, renderSlot } from "vue";
import { isArray, isString, extend, remove, stringifyStyle, parseStringStyle, isPlainObject, isFunction, capitalize, camelize, hasOwn, isObject, toRawType, makeMap as makeMap$1, isPromise, hyphenate, invokeArrayFns as invokeArrayFns$1 } from "@vue/shared"; import { isArray, isString, extend, remove, stringifyStyle, parseStringStyle, isPlainObject, isFunction, capitalize, camelize, hasOwn, isObject, toRawType, makeMap as makeMap$1, isPromise, hyphenate, invokeArrayFns as invokeArrayFns$1 } from "@vue/shared";
import { once, UNI_STORAGE_LOCALE, I18N_JSON_DELIMITERS, Emitter, passive, initCustomDatasetOnce, resolveComponentInstance, normalizeStyles, addLeadingSlash, invokeArrayFns, removeLeadingSlash, resolveOwnerVm, resolveOwnerEl, ON_WXS_INVOKE_CALL_METHOD, normalizeTarget, ON_RESIZE, ON_APP_ENTER_FOREGROUND, ON_APP_ENTER_BACKGROUND, ON_SHOW, ON_HIDE, ON_PAGE_SCROLL, ON_REACH_BOTTOM, EventChannel, SCHEME_RE, DATA_RE, getCustomDataset, LINEFEED, ON_ERROR, callOptions, ON_UNHANDLE_REJECTION, ON_PAGE_NOT_FOUND, PRIMARY_COLOR, getLen, debounce, isUniLifecycleHook, ON_LOAD, UniLifecycleHooks, invokeCreateErrorHandler, invokeCreateVueAppHook, parseQuery, NAVBAR_HEIGHT, ON_UNLOAD, ON_REACH_BOTTOM_DISTANCE, decodedQuery, WEB_INVOKE_APPSERVICE, ON_WEB_INVOKE_APP_SERVICE, ON_THEME_CHANGE, updateElementStyle, sortObject, OFF_THEME_CHANGE, ON_BACK_PRESS, parseUrl, addFont, ON_NAVIGATION_BAR_CHANGE, scrollTo, RESPONSIVE_MIN_WIDTH, onCreateVueApp, formatDateTime, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_PULL_DOWN_REFRESH } from "@dcloudio/uni-shared"; import { once, UNI_STORAGE_LOCALE, I18N_JSON_DELIMITERS, Emitter, passive, initCustomDatasetOnce, resolveComponentInstance, normalizeStyles, addLeadingSlash, invokeArrayFns, removeLeadingSlash, resolveOwnerVm, resolveOwnerEl, ON_WXS_INVOKE_CALL_METHOD, normalizeTarget, ON_RESIZE, ON_APP_ENTER_FOREGROUND, ON_APP_ENTER_BACKGROUND, ON_SHOW, ON_HIDE, ON_PAGE_SCROLL, ON_REACH_BOTTOM, EventChannel, SCHEME_RE, DATA_RE, getCustomDataset, LINEFEED, ON_ERROR, callOptions, ON_UNHANDLE_REJECTION, ON_PAGE_NOT_FOUND, PRIMARY_COLOR, getLen, debounce, isUniLifecycleHook, ON_LOAD, UniLifecycleHooks, invokeCreateErrorHandler, invokeCreateVueAppHook, parseQuery, NAVBAR_HEIGHT, ON_UNLOAD, ON_REACH_BOTTOM_DISTANCE, decodedQuery, WEB_INVOKE_APPSERVICE, ON_WEB_INVOKE_APP_SERVICE, ON_THEME_CHANGE, updateElementStyle, sortObject, OFF_THEME_CHANGE, ON_BACK_PRESS, parseUrl, addFont, ON_NAVIGATION_BAR_CHANGE, scrollTo, RESPONSIVE_MIN_WIDTH, onCreateVueApp, formatDateTime, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_PULL_DOWN_REFRESH } from "@dcloudio/uni-shared";
import { onCreateVueApp as onCreateVueApp2 } from "@dcloudio/uni-shared"; import { onCreateVueApp as onCreateVueApp2 } from "@dcloudio/uni-shared";
...@@ -20880,6 +20880,20 @@ function parseTheme(pageStyle) { ...@@ -20880,6 +20880,20 @@ function parseTheme(pageStyle) {
} }
return __uniConfig.darkmode ? parsedStyle : pageStyle; return __uniConfig.darkmode ? parsedStyle : pageStyle;
} }
function useTheme(pageStyle, onThemeChangeCallback) {
const isReactived = isReactive(pageStyle);
const reactivePageStyle = isReactived ? reactive(parseTheme(pageStyle)) : parseTheme(pageStyle);
if (__uniConfig.darkmode && isReactived) {
watch(pageStyle, (value) => {
const _pageStyle = parseTheme(value);
for (const key in _pageStyle) {
reactivePageStyle[key] = _pageStyle[key];
}
});
}
onThemeChangeCallback && onThemeChange(onThemeChangeCallback);
return reactivePageStyle;
}
const ModalTheme = { const ModalTheme = {
light: { light: {
cancelColor: "#000000" cancelColor: "#000000"
...@@ -21910,16 +21924,7 @@ const TabBar = /* @__PURE__ */ defineSystemComponent({ ...@@ -21910,16 +21924,7 @@ const TabBar = /* @__PURE__ */ defineSystemComponent({
setup() { setup() {
const visibleList = ref([]); const visibleList = ref([]);
const _tabBar = useTabBar(); const _tabBar = useTabBar();
const tabBar2 = reactive(parseTheme(_tabBar)); const tabBar2 = useTheme(_tabBar, () => {
useVisibleList(tabBar2, visibleList);
useTabBarCssVar(tabBar2);
const onSwitchTab = useSwitchTab(useRoute(), tabBar2, visibleList);
const {
style,
borderStyle,
placeholderStyle
} = useTabBarStyle(tabBar2);
onThemeChange(() => {
const tabBarStyle = parseTheme(_tabBar); const tabBarStyle = parseTheme(_tabBar);
tabBar2.backgroundColor = tabBarStyle.backgroundColor; tabBar2.backgroundColor = tabBarStyle.backgroundColor;
tabBar2.borderStyle = tabBarStyle.borderStyle; tabBar2.borderStyle = tabBarStyle.borderStyle;
...@@ -21933,6 +21938,14 @@ const TabBar = /* @__PURE__ */ defineSystemComponent({ ...@@ -21933,6 +21938,14 @@ const TabBar = /* @__PURE__ */ defineSystemComponent({
}); });
} }
}); });
useVisibleList(tabBar2, visibleList);
useTabBarCssVar(tabBar2);
const onSwitchTab = useSwitchTab(useRoute(), tabBar2, visibleList);
const {
style,
borderStyle,
placeholderStyle
} = useTabBarStyle(tabBar2);
onMounted(() => { onMounted(() => {
if (tabBar2.iconfontSrc) { if (tabBar2.iconfontSrc) {
loadFontFace({ loadFontFace({
...@@ -24514,16 +24527,15 @@ const PageHead = /* @__PURE__ */ defineSystemComponent({ ...@@ -24514,16 +24527,15 @@ const PageHead = /* @__PURE__ */ defineSystemComponent({
setup() { setup() {
const headRef = ref(null); const headRef = ref(null);
const pageMeta = usePageMeta(); const pageMeta = usePageMeta();
const navigationBar = reactive(parseTheme(pageMeta.navigationBar)); const navigationBar = useTheme(pageMeta.navigationBar, () => {
const {
clazz: clazz2,
style
} = usePageHead(navigationBar);
onThemeChange(() => {
const _navigationBar = parseTheme(pageMeta.navigationBar); const _navigationBar = parseTheme(pageMeta.navigationBar);
navigationBar.backgroundColor = _navigationBar.backgroundColor; navigationBar.backgroundColor = _navigationBar.backgroundColor;
navigationBar.titleColor = _navigationBar.titleColor; navigationBar.titleColor = _navigationBar.titleColor;
}); });
const {
clazz: clazz2,
style
} = usePageHead(navigationBar);
const buttons = __UNI_FEATURE_NAVIGATIONBAR_BUTTONS__ && usePageHeadButtons(pageMeta); const buttons = __UNI_FEATURE_NAVIGATIONBAR_BUTTONS__ && usePageHeadButtons(pageMeta);
const searchInput = __UNI_FEATURE_NAVIGATIONBAR_SEARCHINPUT__ && navigationBar.searchInput && usePageHeadSearchInput(pageMeta); const searchInput = __UNI_FEATURE_NAVIGATIONBAR_SEARCHINPUT__ && navigationBar.searchInput && usePageHeadSearchInput(pageMeta);
__UNI_FEATURE_NAVIGATIONBAR_TRANSPARENT__ && navigationBar.type === "transparent" && usePageHeadTransparent(headRef, pageMeta); __UNI_FEATURE_NAVIGATIONBAR_TRANSPARENT__ && navigationBar.type === "transparent" && usePageHeadTransparent(headRef, pageMeta);
......
...@@ -16,7 +16,7 @@ var uniad_app_json = function (appJson) { ...@@ -16,7 +16,7 @@ var uniad_app_json = function (appJson) {
} }
if (!appJson.plugins['uni-ad']) { if (!appJson.plugins['uni-ad']) {
appJson.plugins['uni-ad'] = { appJson.plugins['uni-ad'] = {
version: '1.1.7', version: '1.1.10',
provider: 'wxf72d316417b6767f', provider: 'wxf72d316417b6767f',
}; };
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册