| 1234567891011121314151617181920212223242526 |
- import { mapState,mapGetters } from 'vuex'
- export default {
- data(){
- return {
- menuObj:{ title:'门店', titleChild:'请选择门店', list: [] },
- shopId:0
- }
- },
- computed:{
- ...mapState({
- userShopAll:state=>state.user.userShopAll
- }),
- ...mapGetters({
- loginInfo: "getLoginInfo",
- userInfo: 'getUser'
- })
- },
- mounted () {
- this.menuObj.list = this.userShopAll.map(i=>({ ...i, name:i.shopName }))
- },
- watch:{
- userShopAll (val) {
- if(!this.$util.isEmpty(val)) { this.menuObj.list = val.map(i=>({ ...i, name:i.shopName })); }
- }
- }
- }
|