|
|
@@ -118,8 +118,8 @@
|
|
|
</label>
|
|
|
<label class="filter-item">
|
|
|
<select
|
|
|
- v-model="selectedCategory"
|
|
|
ref="categorySelectRef"
|
|
|
+ v-model="selectedCategory"
|
|
|
:class="['level-select', { 'level-select-placeholder': !selectedCategory }]"
|
|
|
:style="{ width: selectWidths.category ? `${selectWidths.category}px` : 'auto' }"
|
|
|
>
|
|
|
@@ -135,8 +135,8 @@
|
|
|
</label>
|
|
|
<label class="filter-item">
|
|
|
<select
|
|
|
- v-model="selectedLocationAttribute"
|
|
|
ref="locationAttributeSelectRef"
|
|
|
+ v-model="selectedLocationAttribute"
|
|
|
:class="['level-select', { 'level-select-placeholder': !selectedLocationAttribute }]"
|
|
|
:style="{ width: selectWidths.attribute ? `${selectWidths.attribute}px` : 'auto' }"
|
|
|
>
|
|
|
@@ -152,8 +152,8 @@
|
|
|
</label>
|
|
|
<label class="filter-item">
|
|
|
<select
|
|
|
- v-model="selectedHasContainer"
|
|
|
ref="hasContainerSelectRef"
|
|
|
+ v-model="selectedHasContainer"
|
|
|
:class="['level-select', { 'level-select-placeholder': !selectedHasContainer }]"
|
|
|
:style="{ width: selectWidths.container ? `${selectWidths.container}px` : 'auto' }"
|
|
|
>
|
|
|
@@ -164,8 +164,8 @@
|
|
|
</label>
|
|
|
<label class="filter-item">
|
|
|
<select
|
|
|
- v-model="selectedZoneId"
|
|
|
ref="zoneSelectRef"
|
|
|
+ v-model="selectedZoneId"
|
|
|
:class="['level-select', { 'level-select-placeholder': !selectedZoneId }]"
|
|
|
:style="{ width: selectWidths.zone ? `${selectWidths.zone}px` : 'auto' }"
|
|
|
>
|
|
|
@@ -180,9 +180,9 @@
|
|
|
</select>
|
|
|
</label>
|
|
|
<select
|
|
|
+ ref="levelSelectRef"
|
|
|
v-model.number="currentLevel"
|
|
|
class="level-select level-select-floor"
|
|
|
- ref="levelSelectRef"
|
|
|
:style="{ width: selectWidths.level ? `${selectWidths.level}px` : 'auto' }"
|
|
|
@change="handleLevelChange"
|
|
|
>
|
|
|
@@ -588,7 +588,9 @@ const getLocationAttributeLabel = (attribute: LocationAttributeCode) => {
|
|
|
|
|
|
const categoryLabel = computed(() => selectedCategory.value || '热度')
|
|
|
const locationAttributeLabel = computed(() =>
|
|
|
- selectedLocationAttribute.value ? getLocationAttributeLabel(selectedLocationAttribute.value) : '状态'
|
|
|
+ selectedLocationAttribute.value
|
|
|
+ ? getLocationAttributeLabel(selectedLocationAttribute.value)
|
|
|
+ : '状态'
|
|
|
)
|
|
|
const hasContainerLabel = computed(() => {
|
|
|
if (selectedHasContainer.value === 'Y') return '有'
|
|
|
@@ -932,14 +934,11 @@ watch(isLightTheme, (isLight) => {
|
|
|
window.localStorage.setItem(THEME_STORAGE_KEY, isLight ? 'light' : 'dark')
|
|
|
})
|
|
|
|
|
|
-watch(
|
|
|
- [categoryLabel, locationAttributeLabel, hasContainerLabel, zoneLabel, levelLabel],
|
|
|
- () => {
|
|
|
- nextTick(() => {
|
|
|
- updateSelectWidths()
|
|
|
- })
|
|
|
- }
|
|
|
-)
|
|
|
+watch([categoryLabel, locationAttributeLabel, hasContainerLabel, zoneLabel, levelLabel], () => {
|
|
|
+ nextTick(() => {
|
|
|
+ updateSelectWidths()
|
|
|
+ })
|
|
|
+})
|
|
|
|
|
|
onBeforeUnmount(() => {
|
|
|
if (refreshTimer !== null) {
|