update: 发布dev2.7.6Beta版本 (#1908)

* feat: 优化菜单管理的路径选择框

* fixed: 修复错误的文件命名

* feat: 增加参数管理功能,调整菜单选择组件。

* feat: 恢复config.yaml

* feat: 更新AI功能

* feat: 增加API自动填充功能

* feat: 增加AI自动填充表格导出模板

* feat: 增加AI自动填充表格导出模板和AI自动模板填充

* feat: 新增方法支持选择是否鉴权

---------

Co-authored-by: Azir <2075125282@qq.com>
This commit is contained in:
PiexlMax(奇淼
2024-10-15 21:58:17 +08:00
committed by GitHub
parent c34e3b4282
commit 0ce5a63c1d
52 changed files with 1620 additions and 706 deletions

View File

@@ -165,24 +165,9 @@
label="文件路径"
prop="component"
>
<el-select
v-model="form.component"
filterable
allow-create
autocomplete="off"
style="width: 100%"
placeholder="页面:view/xxx/xx.vue 插件:plugin/xx/xx.vue"
default-first-option
@change="fmtComponent"
>
<el-option
v-for="(item,path) in pathOptions"
:key="path"
:label="path"
:value="path"
/>
</el-select>
<span style="font-size: 12px; margin-right: 12px">如果菜单包含子菜单请创建router-view二级路由页面或者</span><el-button
<components-cascader :component="form.component" @change="fmtComponent" />
<span style="font-size: 12px; margin-right: 12px">如果菜单包含子菜单请创建router-view二级路由页面或者</span>
<el-button
style="margin-top: 4px"
@click="form.component = 'view/routerHolder.vue'"
>
@@ -556,27 +541,19 @@ import {
import icon from '@/view/superAdmin/menu/icon.vue'
import WarningBar from '@/components/warningBar/warningBar.vue'
import { canRemoveAuthorityBtnApi } from '@/api/authorityBtn'
import { reactive, ref, onMounted } from 'vue'
import {reactive, ref} from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { QuestionFilled } from '@element-plus/icons-vue'
import pathInfo from '@/pathInfo.json'
import { toDoc } from '@/utils/doc'
import { toLowerCase } from '@/utils/stringFun'
import {toLowerCase} from "@/utils/stringFun";
import ComponentsCascader from "@/view/superAdmin/menu/components/components-cascader.vue";
import pathInfo from "@/pathInfo.json";
defineOptions({
name: 'Menus',
})
const pathOptions = reactive({})
onMounted(()=>{
for (let pathInfoKey in pathInfo) {
// 取消掉最前面的 /src/
pathOptions[pathInfoKey.replace(/^\/src\//, '')] = pathInfo[pathInfoKey]
}
})
const rules = reactive({
path: [{ required: true, message: '请输入菜单name', trigger: 'blur' }],
component: [{ required: true, message: '请输入文件路径', trigger: 'blur' }],
@@ -608,9 +585,9 @@ const addParameter = (form) => {
})
}
const fmtComponent = () => {
form.value.component = form.value.component.replace(/\\/g, '/')
form.value.name = toLowerCase(pathOptions[form.value.component])
const fmtComponent = (component) => {
form.value.component = component.replace(/\\/g, '/')
form.value.name = toLowerCase(pathInfo["/src/"+component])
form.value.path = form.value.name
}