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.

13 lines
428 B

  1. import {storeToRefs} from 'pinia';
  2. import {useAdminStore} from '@/store/index.js';
  3. const adminStore = useAdminStore();
  4. const {marketList} = storeToRefs(adminStore);
  5. // 地区映射
  6. export const marketMapping = marketList.value;
  7. console.log('marketList:', marketList)
  8. // 反向映射
  9. export const reverseMarketMapping = Object.entries(marketMapping).reduce((acc, [key, value]) => {
  10. acc[value] = key;
  11. return acc;
  12. }, {});