modal的定位維持在中間且在拖曳時不偏移 | fitToView恢復 | 告警加上Device Category說明

This commit is contained in:
koko 2024-11-05 17:16:49 +08:00
parent a7054c07b5
commit bba1b2892e
4 changed files with 7 additions and 5 deletions

View File

@ -48,7 +48,7 @@ onMounted(() => {
'modal', 'modal',
backdrop backdrop
? '' ? ''
: 'h-fit w-fit max-h-fit max-w-fit focus-visible:outline-none backdrop:bg-transparent', : 'focus-visible:outline-none backdrop:bg-transparent',
)" :style="modalStyle" v-draggable="draggable"> )" :style="modalStyle" v-draggable="draggable">
<div :class="twMerge( <div :class="twMerge(
'modal-box static rounded-md border border-info py-5 px-6 overflow-y-scroll bg-normal', 'modal-box static rounded-md border border-info py-5 px-6 overflow-y-scroll bg-normal',

View File

@ -62,8 +62,11 @@ watch(searchParams, (newValue) => {
<template> <template>
<div class="flex flex-wrap mt-3"> <div class="flex flex-wrap mt-3">
<h2 class="text-lg font-bold ps-1 pe-4">
{{ $t("history.device_category") }} :
</h2>
<button <button
class="btn btn-success mr-4" class="btn btn-sm btn-success mr-4"
@click.stop.prevent="changeCheckedItem" @click.stop.prevent="changeCheckedItem"
> >
{{ checkedItem.length === store.subSys.length ? t("button.deselect_all") : t("button.select_all") }} {{ checkedItem.length === store.subSys.length ? t("button.deselect_all") : t("button.select_all") }}

View File

@ -24,7 +24,7 @@ const fitToView = (forge_dbid) => {
<p class="title">{{ d.full_name }}</p> <p class="title">{{ d.full_name }}</p>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-5"> <div class="grid grid-cols-1 lg:grid-cols-2 gap-5">
<div class="col-auto relative" v-for="device in d.device_list" :key="device.device_guid"> <div class="col-auto relative" v-for="device in d.device_list" :key="device.device_guid">
<div class="item h-full"> <div class="item h-full cursor-pointer" @click="() => fitToView(device.forge_dbid)">
<div class="left h-full flex flex-wrap justify-center"> <div class="left h-full flex flex-wrap justify-center">
<div class="sec02 w-full"> <div class="sec02 w-full">
<img v-if="device.device_image_url" :src="device.device_image_url" alt="" > <img v-if="device.device_image_url" :src="device.device_image_url" alt="" >

View File

@ -32,8 +32,7 @@ watch(
</script> </script>
<template> <template>
<Modal id="system_info_modal" :onCancel="onCancel" width="600" :draggable="!data?.isMobile" :backdrop="false" <Modal id="system_info_modal" :onCancel="onCancel" width="600" :draggable="!data?.isMobile" :backdrop="false">
:modalStyle="position" class="-translate-x-1/2 -translate-y-1/2">
<template #modalContent> <template #modalContent>
<SystemInfoModalContent /> <SystemInfoModalContent />
</template> </template>