mirror of
https://github.com/chansee97/nova-admin.git
synced 2025-09-17 19:29:58 +08:00
31 lines
466 B
Vue
31 lines
466 B
Vue
<script setup lang="ts">
|
|
import {
|
|
fetchFormPost,
|
|
} from '@/api'
|
|
|
|
const emit = defineEmits<{
|
|
update: [data: any] // 具名元组语法
|
|
}>()
|
|
|
|
async function post() {
|
|
const params = {
|
|
data: '2022-2-2',
|
|
name: 'for',
|
|
}
|
|
const res = await fetchFormPost(params)
|
|
emit('update', res)
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<n-card title="formPost" size="small">
|
|
<n-button @click="post">
|
|
click
|
|
</n-button>
|
|
</n-card>
|
|
</template>
|
|
|
|
<style scoped>
|
|
|
|
</style>
|