publish: 发布2.7.4版本Beta (#1880)
* 媒体库增加批量导入URL * fix 描述错误 * feature: 自动化代码方法支持增加方法描述 * update: 更新依赖,升级为最新版本 * feature: 自动化代码预览部分支持黑夜模式 * fixed: 修复keepalive上线后失效的bug * feature: 增加自动化基础模板功能 * feature: 增加自动化基础模板功能 * 将用户配置保存到数据库,刷新或者异地登录配置不丢失 * update: 清除无用的userinfo配置信息 * fixed: 清理开发阶段页面无端进入404的bug * feature: 前端主题配置跟随用户,不再单独设置json编译生效。 * feature: 增加个人中心配置兼容性 * fix(package): 包名设置为中文会导致无法自动生成代码,禁止包名设置为中文 * feature: 格式化代码 * feature: 对严格模式新建根角色进行调整。 * feature: 版本变更为2.7.4 --------- Co-authored-by: sliboy <34034053+sliboy@users.noreply.github.com> Co-authored-by: ba0ch3ng <ba0ch3ng@foxmail.com> Co-authored-by: task <121913992@qq.com> Co-authored-by: task <ms.yangdan@gmail.com> Co-authored-by: 爱丽-黑子 <62006632+ailiheizi@users.noreply.github.com> Co-authored-by: sliboy <sliboy@hotmail.com>
This commit is contained in:
@@ -386,6 +386,20 @@
|
||||
<el-checkbox v-model="form.autoCreateResource" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item>
|
||||
<template #label>
|
||||
<el-tooltip
|
||||
content="注:使用基础模板将不会生成任何结构体和CURD,仅仅配置enter等属性方便自行开发非CURD逻辑"
|
||||
placement="bottom"
|
||||
effect="light"
|
||||
>
|
||||
<div> 基础模板 <el-icon><QuestionFilled /></el-icon> </div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<el-checkbox v-model="form.onlyTemplate" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -395,6 +409,7 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="editAndAddField()"
|
||||
:disabled="form.onlyTemplate"
|
||||
>
|
||||
新增字段
|
||||
</el-button>
|
||||
@@ -1013,6 +1028,7 @@ const form = ref({
|
||||
autoMigrate: true,
|
||||
gvaModel: true,
|
||||
autoCreateResource: false,
|
||||
onlyTemplate: false,
|
||||
fields: []
|
||||
})
|
||||
const rules = ref({
|
||||
@@ -1125,6 +1141,9 @@ const deleteField = (index) => {
|
||||
}
|
||||
const autoCodeForm = ref(null)
|
||||
const enterForm = async(isPreview) => {
|
||||
|
||||
if(!form.value.onlyTemplate){
|
||||
|
||||
if (form.value.fields.length <= 0) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
@@ -1151,14 +1170,6 @@ const enterForm = async(isPreview) => {
|
||||
return false
|
||||
}
|
||||
|
||||
if (form.value.package === form.value.abbreviation) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: 'package和结构体简称不可同名'
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
if (form.value.fields.some(item => !item.fieldType)) {
|
||||
ElMessage({
|
||||
@@ -1168,6 +1179,16 @@ const enterForm = async(isPreview) => {
|
||||
return false
|
||||
}
|
||||
|
||||
if (form.value.package === form.value.abbreviation) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: 'package和结构体简称不可同名'
|
||||
})
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
autoCodeForm.value.validate(async valid => {
|
||||
if (valid) {
|
||||
for (const key in form.value) {
|
||||
@@ -1366,6 +1387,7 @@ const clearCatch = async () => {
|
||||
autoMigrate: true,
|
||||
gvaModel: true,
|
||||
autoCreateResource: false,
|
||||
onlyTemplate: false,
|
||||
fields: []
|
||||
}
|
||||
await nextTick()
|
||||
@@ -1390,7 +1412,6 @@ const exportJson = () => {
|
||||
const importJson = (file) =>{
|
||||
const reader = new FileReader()
|
||||
reader.onload = (e) => {
|
||||
console.log(e)
|
||||
try {
|
||||
form.value = JSON.parse(e.target.result)
|
||||
ElMessage.success('JSON 文件导入成功')
|
||||
@@ -1402,4 +1423,20 @@ const importJson = (file) =>{
|
||||
return false
|
||||
}
|
||||
|
||||
watch(()=>form.value.onlyTemplate,(val)=>{
|
||||
if(val){
|
||||
ElMessageBox.confirm('使用基础模板将不会生成任何结构体和CURD,仅仅配置enter等属性方便自行开发非CURD逻辑', '注意', {
|
||||
confirmButtonText: '继续',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
form.value.fields = []
|
||||
})
|
||||
.catch(() => {
|
||||
form.value.onlyTemplate = false
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user