mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-06-08 08:18:00 +08:00
fix: ListPage 的关闭按钮
This commit is contained in:
parent
dd0f596e21
commit
99432d4fd3
@ -121,6 +121,8 @@ export interface ListPageProps extends ListProps {
|
|||||||
right?: boolean;
|
right?: boolean;
|
||||||
/** 是否显示关闭按钮 */
|
/** 是否显示关闭按钮 */
|
||||||
close?: boolean;
|
close?: boolean;
|
||||||
|
/** 关闭按钮的位置,相对于组件定位 */
|
||||||
|
closeLoc?: ElementLocator;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ListPageEmits = {
|
export type ListPageEmits = {
|
||||||
@ -145,7 +147,9 @@ const listPageProps = {
|
|||||||
'winskin',
|
'winskin',
|
||||||
'color',
|
'color',
|
||||||
'border',
|
'border',
|
||||||
'alphaRange'
|
'alphaRange',
|
||||||
|
'close',
|
||||||
|
'closeLoc'
|
||||||
],
|
],
|
||||||
emits: ['update', 'update:selected', 'close']
|
emits: ['update', 'update:selected', 'close']
|
||||||
} satisfies SetupComponentOptions<
|
} satisfies SetupComponentOptions<
|
||||||
@ -202,7 +206,12 @@ export const ListPage = defineComponent<
|
|||||||
slots.default?.(selected.value)}
|
slots.default?.(selected.value)}
|
||||||
</container>
|
</container>
|
||||||
{props.close && (
|
{props.close && (
|
||||||
<text text="关闭" cursor="pointer" font={props.font}></text>
|
<text
|
||||||
|
loc={props.closeLoc}
|
||||||
|
text="关闭"
|
||||||
|
cursor="pointer"
|
||||||
|
font={props.font}
|
||||||
|
></text>
|
||||||
)}
|
)}
|
||||||
</container>
|
</container>
|
||||||
);
|
);
|
||||||
|
@ -53,6 +53,7 @@ export const Statistics = defineComponent<StatisticsProps>(props => {
|
|||||||
close
|
close
|
||||||
onClose={close}
|
onClose={close}
|
||||||
lineHeight={24}
|
lineHeight={24}
|
||||||
|
closeLoc={[10, 470, void 0, void 0, 0, 1]}
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
total: () => <TotalStatistics data={props.data} />,
|
total: () => <TotalStatistics data={props.data} />,
|
||||||
|
Loading…
Reference in New Issue
Block a user