mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
feat(InputNumber): implement component (#2577)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { reactive } from 'vue'
|
||||
import type { Reactive } from 'vue'
|
||||
import { mountSuspended } from '@nuxt/test-utils/runtime'
|
||||
import type { FormProps } from '../../src/runtime/components/Form.vue'
|
||||
import {
|
||||
@@ -11,17 +12,19 @@ import {
|
||||
USelect,
|
||||
USelectMenu,
|
||||
UInputMenu,
|
||||
UInputNumber,
|
||||
USwitch,
|
||||
USlider,
|
||||
UPinInput
|
||||
} from '#components'
|
||||
|
||||
export async function renderForm(options: {
|
||||
state?: Reactive<any>
|
||||
props: Partial<FormProps<any>>
|
||||
slotVars?: object
|
||||
slotTemplate: string
|
||||
}) {
|
||||
const state = reactive({})
|
||||
const state = options.state ?? reactive({})
|
||||
|
||||
return await mountSuspended(UForm, {
|
||||
props: {
|
||||
@@ -45,6 +48,7 @@ export async function renderForm(options: {
|
||||
USelect,
|
||||
USelectMenu,
|
||||
UInputMenu,
|
||||
UInputNumber,
|
||||
USwitch,
|
||||
USlider,
|
||||
UPinInput
|
||||
|
||||
Reference in New Issue
Block a user