完善生产查询与登录权限配置

This commit is contained in:
2026-09-03 19:56:19 +08:00
parent 793f140a45
commit 02c8fb7021
438 changed files with 1595 additions and 573 deletions
@@ -0,0 +1,19 @@
import type { ExtractPropTypes, PropType } from 'vue';
/**
* SafeBottomProps SafeBottom 底部安全区
*/
export const SafeBottomProps = {
/** 自定义根节点样式 */
customStyle: {
type: [String, Object] as PropType<string | Record<string, any>>,
default: () => ({})
},
/** 自定义根节点样式类 */
customClass: {
type: String as unknown as PropType<string>,
default: ''
}
};
export type SafeBottomProps = ExtractPropTypes<typeof SafeBottomProps>;
@@ -0,0 +1,55 @@
<template>
<view
class="u-safe-bottom"
:style="$u.toStyle(style, customStyle)"
:class="[!isNVue && 'safe-area-inset-bottom', customClass]"
></view>
</template>
<script lang="ts">
export default {
name: 'u-safe-bottom',
options: {
addGlobalClass: true,
// #ifndef MP-TOUTIAO
virtualHost: true,
// #endif
styleIsolation: 'shared'
}
};
</script>
<script setup lang="ts">
import { ref, computed, onMounted, type CSSProperties } from 'vue';
import { SafeBottomProps } from './types';
import { $u } from '../../';
/**
* SafeBottom 底部安全区
* @description 这个适配,主要是针对IPhone X等一些底部带指示条的机型,指示条的操作区域与页面底部存在重合,容易导致用户误操作,因此我们需要针对这些机型进行底部安全区适配。
* @property {String | Object} customStyle 自定义样式
* @example <u-safe-bottom></u-safe-bottom>
*/
const props = defineProps(SafeBottomProps);
const isNVue = ref(false);
const style = computed(() => {
let result: CSSProperties = {};
// #ifdef APP-NVUE || MP-TOUTIAO
// nvue下,高度使用js计算填充
const safeAreaInsets = $u.sys()?.safeAreaInsets;
if (safeAreaInsets?.bottom) {
result.height = $u.addUnit(safeAreaInsets.bottom, 'px');
}
// #endif
return result;
});
onMounted(() => {
// #ifdef APP-NVUE
// 标识为是否nvue
isNVue.value = true;
// #endif
});
</script>