chore: use get in useUI

This commit is contained in:
Benjamin Canac
2023-09-21 12:50:18 +02:00
parent c937736734
commit 86dc49ecc9
34 changed files with 36 additions and 36 deletions

View File

@@ -47,7 +47,7 @@ export default defineComponent({
},
emits: ['update:modelValue', 'close'],
setup (props, { emit }) {
const { ui, attrs, attrsClass } = useUI('contextMenu', props.ui, config)
const { ui, attrs, attrsClass } = useUI('ui.contextMenu', props.ui, config)
const popper = computed<PopperOptions>(() => defu({}, props.popper, ui.value.popper as PopperOptions))

View File

@@ -82,7 +82,7 @@ export default defineComponent({
},
emits: ['update:modelValue', 'close'],
setup (props, { emit }) {
const { ui, attrs } = useUI('modal', props.ui, config, { mergeWrapper: true })
const { ui, attrs } = useUI('ui.modal', props.ui, config, { mergeWrapper: true })
const isOpen = computed({
get () {

View File

@@ -113,7 +113,7 @@ export default defineComponent({
},
emits: ['close'],
setup (props, { emit }) {
const { ui, attrs, attrsClass } = useUI('notification', props.ui, config)
const { ui, attrs, attrsClass } = useUI('ui.notification', props.ui, config)
let timer: any = null
const remaining = ref(props.timeout)

View File

@@ -45,7 +45,7 @@ export default defineComponent({
}
},
setup (props) {
const { ui, attrs, attrsClass } = useUI('notifications', props.ui, config)
const { ui, attrs, attrsClass } = useUI('ui.notifications', props.ui, config)
const toast = useToast()
const notifications = useState<Notification[]>('notifications', () => [])

View File

@@ -75,7 +75,7 @@ export default defineComponent({
}
},
setup (props) {
const { ui, attrs } = useUI('popover', props.ui, config, { mergeWrapper: true })
const { ui, attrs } = useUI('ui.popover', props.ui, config, { mergeWrapper: true })
const popper = computed<PopperOptions>(() => defu(props.mode === 'hover' ? { offsetDistance: 0 } : {}, props.popper, ui.value.popper as PopperOptions))

View File

@@ -68,7 +68,7 @@ export default defineComponent({
},
emits: ['update:modelValue', 'close'],
setup (props, { emit }) {
const { ui, attrs } = useUI('slideover', props.ui, config, { mergeWrapper: true })
const { ui, attrs } = useUI('ui.slideover', props.ui, config, { mergeWrapper: true })
const isOpen: WritableComputedRef<boolean> = computed({
get () {

View File

@@ -74,7 +74,7 @@ export default defineComponent({
}
},
setup (props) {
const { ui, attrs } = useUI('tooltip', props.ui, config, { mergeWrapper: true })
const { ui, attrs } = useUI('ui.tooltip', props.ui, config, { mergeWrapper: true })
const popper = computed<PopperOptions>(() => defu({}, props.popper, ui.value.popper as PopperOptions))