TypeScript前端代码生成模板同步到最新

This commit is contained in:
RuoYi
2026-03-12 12:25:42 +08:00
parent 842ed96c27
commit ed36bc4292
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ function handleImportTable(): void {
proxy.$modal.msgError("请输入建表语句") proxy.$modal.msgError("请输入建表语句")
return return
} }
createTable({ sql: content.value }).then(res => { createTable({ sql: content.value, tplWebType: 'element-plus-typescript' }).then(res => {
proxy.$modal.msgSuccess(res.msg) proxy.$modal.msgSuccess(res.msg)
if (res.code === 200) { if (res.code === 200) {
visible.value = false visible.value = false
+2 -1
View File
@@ -18,6 +18,7 @@
<el-select v-model="info.tplWebType"> <el-select v-model="info.tplWebType">
<el-option label="Vue2 Element UI 模版" value="element-ui" /> <el-option label="Vue2 Element UI 模版" value="element-ui" />
<el-option label="Vue3 Element Plus 模版" value="element-plus" /> <el-option label="Vue3 Element Plus 模版" value="element-plus" />
<el-option label="Vue3 Element Plus TypeScript 模版" value="element-plus-typescript" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -303,7 +304,7 @@ watch(() => props.info?.subTableName, (val: string) => {
watch(() => props.info?.tplWebType, (val: string) => { watch(() => props.info?.tplWebType, (val: string) => {
if (val === '' && props.info) { if (val === '' && props.info) {
props.info.tplWebType = "element-plus" props.info.tplWebType = "element-plus-typescript"
} }
}) })
</script> </script>
+1 -1
View File
@@ -112,7 +112,7 @@ function handleImportTable() {
proxy.$modal.msgError("请选择要导入的表") proxy.$modal.msgError("请选择要导入的表")
return return
} }
importTable({ tables: tableNames }).then(res => { importTable({ tables: tableNames, tplWebType: 'element-plus-typescript' }).then(res => {
proxy.$modal.msgSuccess(res.msg) proxy.$modal.msgSuccess(res.msg)
if (res.code === 200) { if (res.code === 200) {
visible.value = false visible.value = false