mirror of
https://github.com/HoshinoSuzumi/rayine-ui.git
synced 2025-04-16 13:58:50 +08:00
♻️ Rename useUI
This commit is contained in:
parent
ce36a35873
commit
c2e97c1d17
@ -1,9 +1,10 @@
|
||||
<script lang="ts" setup>
|
||||
import { twJoin, twMerge } from 'tailwind-merge'
|
||||
import type { PropType } from 'vue'
|
||||
import { computed, toRef, type PropType } from 'vue'
|
||||
import { button } from '../../ui.config'
|
||||
import type { DeepPartial, Strategy } from '../../types/utils'
|
||||
import type { ButtonColor, ButtonSize, ButtonVariant } from '../../types/button'
|
||||
import { useRayUI } from '#build/imports'
|
||||
|
||||
const config = button
|
||||
|
||||
@ -42,7 +43,7 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
const { ui, attrs } = useUI('button', toRef(props, 'ui'), config)
|
||||
const { ui, attrs } = useRayUI('button', toRef(props, 'ui'), config)
|
||||
|
||||
const buttonClass = computed(() => {
|
||||
// @ts-ignore
|
||||
|
@ -1,4 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { inject, ref, onMounted } from 'vue';
|
||||
import type { MessageProviderApi, Message } from '../../types/message'
|
||||
|
||||
const providerApi = inject<MessageProviderApi>('ray-message-provider')
|
||||
|
@ -4,7 +4,7 @@ import { mergeUiConfig } from '../utils'
|
||||
import { omit, getValueByPath } from '../utils/objectUtils'
|
||||
import { useAppConfig } from '#app'
|
||||
|
||||
export const useUI = <T>(
|
||||
export const useRayUI = <T>(
|
||||
key: string,
|
||||
ui?: Ref<(DeepPartial<T> & { strategy?: Strategy }) | undefined>,
|
||||
config?: T | Ref<T>,
|
Loading…
Reference in New Issue
Block a user