fix:最新
This commit is contained in:
@@ -25,6 +25,8 @@ import { staticAssets } from '@/utils/static-assets'
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean
|
||||
/** 勾选前弹出确认;同意才勾选,不同意保持未勾选 */
|
||||
confirmBeforeAgree?: boolean
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -32,6 +34,20 @@ const emit = defineEmits<{
|
||||
}>()
|
||||
|
||||
function toggle() {
|
||||
if (!props.modelValue && props.confirmBeforeAgree) {
|
||||
uni.showModal({
|
||||
title: '用户协议与隐私政策',
|
||||
content: '请您仔细阅读并充分理解《用户服务协议》和《隐私政策》的全部内容。如您同意,请点击「同意」后继续。',
|
||||
confirmText: '同意',
|
||||
cancelText: '不同意',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
emit('update:modelValue', true)
|
||||
}
|
||||
},
|
||||
})
|
||||
return
|
||||
}
|
||||
emit('update:modelValue', !props.modelValue)
|
||||
}
|
||||
|
||||
|
||||
@@ -20,10 +20,13 @@ const props = defineProps<{
|
||||
/** 外部传入时覆盖内部计算(如设备详情页自定义顶部区域) */
|
||||
scrollStyle?: CSSProperties
|
||||
extraBottomPx?: number
|
||||
/** 页面顶部固定区域选择器(导航栏 + 步骤条等),用于计算滚动区高度 */
|
||||
topSelector?: string
|
||||
}>()
|
||||
|
||||
const { scrollStyle: defaultScrollStyle } = usePageScrollHeight({
|
||||
extraBottomPx: props.extraBottomPx ?? 0,
|
||||
topSelector: props.topSelector,
|
||||
})
|
||||
|
||||
const mergedStyle = computed<CSSProperties>(() => props.scrollStyle ?? defaultScrollStyle.value)
|
||||
|
||||
Reference in New Issue
Block a user