提交 07b136d2 编写于 作者: fxy060608's avatar fxy060608

chore: add animation mixin

上级 fd3128a2
...@@ -9,11 +9,10 @@ export const defineBuiltInComponent: typeof defineComponent = ( ...@@ -9,11 +9,10 @@ export const defineBuiltInComponent: typeof defineComponent = (
options: any options: any
) => { ) => {
// TODO 可能会补充特殊标记 // TODO 可能会补充特殊标记
if (!options.props || typeof options.props.animation === 'undefined') { const { props, mixins } = options
// 补充内置组件animation // 补充内置组件animation
typeof options.mixins !== 'undefined' if (!props || !props.animation) {
? options.mixins.push(animation) ;(mixins || (options.mixins = [])).push(animation)
: (options.mixins = [animation])
} }
return defineSystemComponent(options) return defineSystemComponent(options)
} }
......
...@@ -1149,8 +1149,9 @@ var animation = { ...@@ -1149,8 +1149,9 @@ var animation = {
} }
}; };
const defineBuiltInComponent = (options) => { const defineBuiltInComponent = (options) => {
if (!options.props || typeof options.props.animation === "undefined") { const {props: props2, mixins} = options;
typeof options.mixins !== "undefined" ? options.mixins.push(animation) : options.mixins = [animation]; if (!props2 || !props2.animation) {
(mixins || (options.mixins = [])).push(animation);
} }
return defineSystemComponent(options); return defineSystemComponent(options);
}; };
......
...@@ -485,7 +485,7 @@ var safeAreaInsets = { ...@@ -485,7 +485,7 @@ var safeAreaInsets = {
onChange, onChange,
offChange offChange
}; };
var D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out = safeAreaInsets; var out = safeAreaInsets;
const onEventPrevent = /* @__PURE__ */ withModifiers(() => { const onEventPrevent = /* @__PURE__ */ withModifiers(() => {
}, ["prevent"]); }, ["prevent"]);
const onEventStop = /* @__PURE__ */ withModifiers(() => { const onEventStop = /* @__PURE__ */ withModifiers(() => {
...@@ -497,10 +497,10 @@ function getWindowOffset() { ...@@ -497,10 +497,10 @@ function getWindowOffset() {
const left = parseInt(style.getPropertyValue("--window-left")); const left = parseInt(style.getPropertyValue("--window-left"));
const right = parseInt(style.getPropertyValue("--window-right")); const right = parseInt(style.getPropertyValue("--window-right"));
return { return {
top: top ? top + D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.top : 0, top: top ? top + out.top : 0,
bottom: bottom ? bottom + D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.bottom : 0, bottom: bottom ? bottom + out.bottom : 0,
left: left ? left + D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.left : 0, left: left ? left + out.left : 0,
right: right ? right + D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.right : 0 right: right ? right + out.right : 0
}; };
} }
function updateCssVar(cssVars) { function updateCssVar(cssVars) {
...@@ -1190,7 +1190,7 @@ function normalizePageMeta(pageMeta) { ...@@ -1190,7 +1190,7 @@ function normalizePageMeta(pageMeta) {
let offset = rpx2px(refreshOptions.offset); let offset = rpx2px(refreshOptions.offset);
const {type} = navigationBar; const {type} = navigationBar;
if (type !== "transparent" && type !== "none") { if (type !== "transparent" && type !== "none") {
offset += NAVBAR_HEIGHT + D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.top; offset += NAVBAR_HEIGHT + out.top;
} }
refreshOptions.offset = offset; refreshOptions.offset = offset;
refreshOptions.height = rpx2px(refreshOptions.height); refreshOptions.height = rpx2px(refreshOptions.height);
...@@ -2090,8 +2090,9 @@ var animation = { ...@@ -2090,8 +2090,9 @@ var animation = {
} }
}; };
const defineBuiltInComponent = (options) => { const defineBuiltInComponent = (options) => {
if (!options.props || typeof options.props.animation === "undefined") { const {props: props2, mixins} = options;
typeof options.mixins !== "undefined" ? options.mixins.push(animation) : options.mixins = [animation]; if (!props2 || !props2.animation) {
(mixins || (options.mixins = [])).push(animation);
} }
return defineSystemComponent(options); return defineSystemComponent(options);
}; };
...@@ -14916,7 +14917,7 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", () ...@@ -14916,7 +14917,7 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
const windowWidth = getWindowWidth(screenWidth); const windowWidth = getWindowWidth(screenWidth);
let windowHeight = window.innerHeight; let windowHeight = window.innerHeight;
const language = navigator.language; const language = navigator.language;
const statusBarHeight = D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.top; const statusBarHeight = out.top;
let osname; let osname;
let osversion; let osversion;
let model; let model;
...@@ -15029,12 +15030,12 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", () ...@@ -15029,12 +15030,12 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
const system = `${osname} ${osversion}`; const system = `${osname} ${osversion}`;
const platform = osname.toLocaleLowerCase(); const platform = osname.toLocaleLowerCase();
const safeArea = { const safeArea = {
left: D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.left, left: out.left,
right: windowWidth - D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.right, right: windowWidth - out.right,
top: D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.top, top: out.top,
bottom: windowHeight - D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.bottom, bottom: windowHeight - out.bottom,
width: windowWidth - D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.left - D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.right, width: windowWidth - out.left - out.right,
height: windowHeight - D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.top - D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.bottom height: windowHeight - out.top - out.bottom
}; };
const {top: windowTop, bottom: windowBottom} = getWindowOffset(); const {top: windowTop, bottom: windowBottom} = getWindowOffset();
windowHeight -= windowTop; windowHeight -= windowTop;
...@@ -15054,10 +15055,10 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", () ...@@ -15054,10 +15055,10 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
model, model,
safeArea, safeArea,
safeAreaInsets: { safeAreaInsets: {
top: D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.top, top: out.top,
right: D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.right, right: out.right,
bottom: D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.bottom, bottom: out.bottom,
left: D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.left left: out.left
} }
}; };
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册