12345678910111213141516171819202122232425262728293031 |
- <script setup lang="ts">
- import { create{{pascalCase name}}, update{{pascalCase name}}, get{{pascalCase name}}List, del{{pascalCase name}} } from '@/api/{{name}}.ts'
- import type { BasicForm, ICRUD } from '@/types/form'
- const CRUD: ICRUD = {
- create(data) {
- return create{{pascalCase name}}(data)
- },
- update(data) {
- return update{{pascalCase name}}(data)
- },
- getList(data) {
- return get{{pascalCase name}}List(data)
- },
- delete(data) {
- return del{{pascalCase name}}(data)
- }
- }
- const formConfig = reactive<BasicForm>({
- formItems: []
- })
- </script>
- <template>
- <pro-table :crud="CRUD" :formConfig="formConfig">
- <vxe-column field="" title=""></vxe-column>
- </pro-table>
- </template>
- <style lang="scss" scoped></style>
|