楼栋增删改查完成, 接着房屋

This commit is contained in:
Zy
2026-04-08 18:37:30 +08:00
parent cd292d5bf4
commit 6e998d4e87
9 changed files with 241 additions and 82 deletions

View File

@@ -10,9 +10,9 @@
<div
class="housetype"
:class="{
active: active === index
active: houseStore.buildingtype === index
}"
@click="changeHouseType(index)"
@click="houseStore.switchHouseType(index)"
v-for="(house, index) in housetypelist"
:key="index"
>
@@ -34,16 +34,9 @@ import PageHeader from '@/components/Pageheader/index.vue';
import { useHouseStore } from '@/store/modules/house';
const houseStore = useHouseStore();
const { currentVilageInfo } = storeToRefs(houseStore);
console.log(currentVilageInfo);
const housetypelist = ['住宅', '办公', '商用', '公寓'];
const active = ref(0);
const changeHouseType = (index: number) => {
active.value = index;
};
houseStore.initHouse(houseStore.buildingtype);
// 初始化数据
houseStore.initHouse(active.value);
</script>
<style lang="scss" scoped>