mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-23 16:30:45 +01:00
chore: use get in useUI
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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', () => [])
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user