楼栋增删改查完成, 接着房屋
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user