12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- {
- "vue component template": {
- "prefix": "vcomp",
- "body": [
- "<script setup lang=\"ts\">",
- "interface Props {",
- "\t${1}",
- "}",
- "const props = defineProps<Props>()",
- "${2}",
- "</script>",
- "",
- "<template>",
- "\t",
- "</template>",
- "",
- "<style lang=\"scss\" scoped>",
- "</style>"
- ]
- },
- "vue view template": {
- "prefix": "vview",
- "body": [
- "<script setup lang=\"ts\">",
- "import type { BasicForm, ICRUD } from '@/types/form'",
- "import { ${0} } from '@/api/'",
- "",
- "const CRUD: ICRUD = {",
- "\tcreate(data) {",
- "\t\t",
- "\t},",
- "\tupdate(data) {",
- "\t\t",
- "\t},",
- "\tgetList(data) {",
- "\t\t",
- "\t},",
- "\tdelete(data) {",
- "\t\t",
- "\t}",
- "}",
- "const formConfig = reactive<BasicForm>({",
- "\tformItems: []",
- "})",
- "</script>",
- "",
- "<template>",
- "\t<pro-table :crud=\"CRUD\" :formConfig=\"formConfig\">",
- "\t\t<vxe-column field=\"\" title=\"\"></vxe-column>",
- "\t</pro-table>",
- "</template>",
- "",
- "<style lang=\"scss\" scoped>",
- "</style>"
- ]
- },
- "vue api template": {
- "prefix": "vapi",
- "body": [
- "import request from '@/utils/request'",
- "",
- "export function get${0}(data?: any) {",
- "\treturn request.get('/sys/', data)",
- "}",
- "export function save${0}(data: any) {",
- "\treturn request.post('/sys/', data)",
- "}",
- "export function delete${0}(data: any) {",
- "\treturn request.get('/sys/', data)",
- "}",
- ]
- },
- }
|