import { getCurrentInstance, onMounted } from 'vue' import Config from '../../build/index' const { packages } = Config export function usePrefix () { const instance = getCurrentInstance() if (instance) { const globalPrefix = instance?.appContext.config.globalProperties.prefix const isLocal = packages.filter(item => { return item.toLowerCase() === String(instance.props?.type).toLowerCase() }) if (isLocal.length > 0) { return 's' } else if (instance.props.prefix) { return instance.props.prefix } else { return globalPrefix } } }