Commit 65c86878e912bb32e37fe7cfe5de8aee0caa247c

Authored by xingyu
1 parent 9054a772

feat: 升级依赖

yudao-ui-admin-vue3/package.json
1 1 {
2 2 "name": "ruoyi-vue-pro-vue3",
3   - "version": "1.6.4.1611",
  3 + "version": "1.6.4.1641",
4 4 "description": "基于vue3、element-plus、typesScript、vite3",
5 5 "author": "xingyu",
6 6 "private": false,
... ...
yudao-ui-admin-vue3/src/components/Dialog/src/Dialog.vue
... ... @@ -74,7 +74,7 @@ const dialogStyle = computed(() => {
74 74 </slot>
75 75 <Icon
76 76 v-if="fullscreen"
77   - class="mr-22px cursor-pointer is-hover mt-2px"
  77 + class="mr-22px cursor-pointer is-hover mt-2px z-10"
78 78 :icon="isFullscreen ? 'zmdi:fullscreen-exit' : 'zmdi:fullscreen'"
79 79 color="var(--el-color-info)"
80 80 @click="toggleFull"
... ...
yudao-ui-admin-vue3/src/components/Editor/src/Editor.vue
... ... @@ -177,7 +177,7 @@ defineExpose({
177 177 </script>
178 178  
179 179 <template>
180   - <div class="border-1 border-solid border-[var(--tags-view-border-color)]">
  180 + <div class="border-1 border-solid border-[var(--tags-view-border-color)] z-3000">
181 181 <!-- 工具栏 -->
182 182 <Toolbar
183 183 :editor="editorRef"
... ...
yudao-ui-admin-vue3/src/views/infra/codegen/components/GenInfoForm.vue
1 1 <script setup lang="ts">
2   -import { PropType, reactive, watch } from 'vue'
  2 +import { onMounted, PropType, reactive, ref, watch } from 'vue'
3 3 import { required } from '@/utils/formRules'
4   -import { CodegenTableVO } from '@/api/infra/codegen/types'
5 4 import { Form } from '@/components/Form'
  5 +import { handleTree } from '@/utils/tree'
  6 +import { ElTreeSelect } from 'element-plus'
6 7 import { useForm } from '@/hooks/web/useForm'
7 8 import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
  9 +import { listSimpleMenusApi } from '@/api/system/menu'
  10 +import { CodegenTableVO } from '@/api/infra/codegen/types'
8 11 const props = defineProps({
9 12 genInfo: {
10 13 type: Object as PropType<Nullable<CodegenTableVO>>,
11 14 default: () => null
12 15 }
13 16 })
  17 +const defaultProps = {
  18 + children: 'children',
  19 + label: 'name',
  20 + value: 'id'
  21 +}
14 22 const rules = reactive({
15 23 templateType: [required],
16 24 scene: [required],
... ... @@ -22,6 +30,13 @@ const rules = reactive({
22 30 })
23 31 const templateTypeOptions = getIntDictOptions(DICT_TYPE.INFRA_CODEGEN_TEMPLATE_TYPE)
24 32 const sceneOptions = getIntDictOptions(DICT_TYPE.INFRA_CODEGEN_SCENE)
  33 +const parentMenuId = ref()
  34 +const treeRef = ref<InstanceType<typeof ElTreeSelect>>()
  35 +const menuOptions = ref<any>([]) // 树形结构
  36 +const getTree = async () => {
  37 + const res = await listSimpleMenusApi()
  38 + menuOptions.value = handleTree(res)
  39 +}
25 40 const schema = reactive<FormSchema[]>([
26 41 {
27 42 label: '生成模板',
... ... @@ -84,7 +99,9 @@ const schema = reactive&lt;FormSchema[]&gt;([
84 99 {
85 100 label: '上级菜单',
86 101 field: 'parentMenuId',
87   - component: 'Input',
  102 + componentProps: {
  103 + optionsSlot: true
  104 + },
88 105 labelMessage: '分配到指定菜单下,例如 系统管理',
89 106 colProps: {
90 107 span: 12
... ... @@ -94,6 +111,13 @@ const schema = reactive&lt;FormSchema[]&gt;([
94 111 const { register, methods, elFormRef } = useForm({
95 112 schema
96 113 })
  114 +const handleNodeClick = () => {
  115 + console.log(parentMenuId.value)
  116 +}
  117 +// ========== 初始化 ==========
  118 +onMounted(async () => {
  119 + await getTree()
  120 +})
97 121 watch(
98 122 () => props.genInfo,
99 123 (genInfo) => {
... ... @@ -106,12 +130,24 @@ watch(
106 130 immediate: true
107 131 }
108 132 )
109   -
110 133 defineExpose({
111 134 elFormRef,
112 135 getFormData: methods.getFormData
113 136 })
114 137 </script>
115 138 <template>
116   - <Form :rules="rules" @register="register" />
  139 + <Form :rules="rules" @register="register">
  140 + <template #parentMenuId>
  141 + <el-tree-select
  142 + v-model="parentMenuId"
  143 + ref="treeRef"
  144 + node-key="id"
  145 + check-on-click-node
  146 + expand-on-click-node="false"
  147 + :props="defaultProps"
  148 + :data="menuOptions"
  149 + @node-click="handleNodeClick"
  150 + />
  151 + </template>
  152 + </Form>
117 153 </template>
... ...