address.js 306 B

12345678910111213141516171819202122232425
  1. let state = {
  2. area:[],//省市区数据
  3. city:[]//村镇数据
  4. }
  5. let mutations = {
  6. // 设置省市区
  7. setArea(state,data){
  8. state.area = data;
  9. },
  10. // 设置村镇
  11. setCity(state,data){
  12. state.city = data;
  13. }
  14. }
  15. let getters = {}
  16. export default {
  17. namespaced: true,
  18. state,
  19. mutations,
  20. getters
  21. }