view.hbs 748 B

12345678910111213141516171819202122232425262728293031
  1. <script setup lang="ts">
  2. import { create{{pascalCase name}}, update{{pascalCase name}}, get{{pascalCase name}}List, del{{pascalCase name}} } from '@/api/{{name}}.ts'
  3. import type { BasicForm, ICRUD } from '@/types/form'
  4. const CRUD: ICRUD = {
  5. create(data) {
  6. return create{{pascalCase name}}(data)
  7. },
  8. update(data) {
  9. return update{{pascalCase name}}(data)
  10. },
  11. getList(data) {
  12. return get{{pascalCase name}}List(data)
  13. },
  14. delete(data) {
  15. return del{{pascalCase name}}(data)
  16. }
  17. }
  18. const formConfig = reactive<BasicForm>({
  19. formItems: []
  20. })
  21. </script>
  22. <template>
  23. <pro-table :crud="CRUD" :formConfig="formConfig">
  24. <vxe-column field="" title=""></vxe-column>
  25. </pro-table>
  26. </template>
  27. <style lang="scss" scoped></style>