useConditionSegmentLocation.js 603 B

123456789101112131415161718
  1. import {conditionSharedConfig} from "@/components/mx-condition/modules/conditionSharedConfig";
  2. import {useCacheStore} from "@/hooks/useCacheStore";
  3. import {cacheActions} from "@/hooks/defineCacheActions";
  4. export const useConditionSegmentLocation = function (options = {}) {
  5. const {dispatchCache} = useCacheStore()
  6. return {
  7. ...conditionSharedConfig,
  8. handler: async () => await dispatchCache(cacheActions.getSectionLocations),
  9. key: 'location',
  10. title: '地域',
  11. keyName: 'text',
  12. keyValue: 'value',
  13. required: true,
  14. ...options
  15. }
  16. }