嘉兴绿城濮院
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

50 lines
1.2 KiB

import { i18n } from '@/i18n'
import type { State } from './state'
import type { Root } from '../key'
import type { CreateActions } from '../types'
export interface Actions {
SET_SHOP_LIST(list: Shop[]): void
SET_BUILDING_LIST(list: Building[]): void
SET_COLUMN_LIST(list: Featured[]): void
SET_LANGUAGE(language: Language): void
SET_CURRENT_FLOOR(currentFloor: CurrentFloor): void
SET_SHOP(shop: Shop): void
SET_CONFIG(config: Config): void
SET_FACILITY_LIST(list: Facility[]): void
SET_MAP_STATUS(flag: boolean): void
}
export type DataActions = CreateActions<Root, State, Actions>
export const actions: DataActions = {
SET_BUILDING_LIST(list) {
this.buildingList = list
},
SET_COLUMN_LIST(list) {
this.columnList = list
},
SET_LANGUAGE(language) {
i18n.global.locale = language
this.language = language
},
SET_CONFIG(config) {
this.config = config
},
SET_SHOP_LIST(list) {
this.shopList = Object.freeze(list)
},
SET_CURRENT_FLOOR(currentFloor) {
this.currentFloor = currentFloor
},
SET_SHOP(shop) {
this.shop = shop
},
SET_FACILITY_LIST(list) {
this.facilityList = list
},
SET_MAP_STATUS(flag) {
this.mapStatus = flag
}
}