|
@@ -0,0 +1,73 @@
|
|
|
+{
|
|
|
+ "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: any) {",
|
|
|
+ "\t\t",
|
|
|
+ "\t},",
|
|
|
+ "\tupdate(data: any) {",
|
|
|
+ "\t\t",
|
|
|
+ "\t},",
|
|
|
+ "\tgetList(data: any) {",
|
|
|
+ "\t\t",
|
|
|
+ "\t},",
|
|
|
+ "\tdelete(data: any) {",
|
|
|
+ "\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)",
|
|
|
+ "}",
|
|
|
+ ]
|
|
|
+ },
|
|
|
+}
|