mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-27 01:32:03 +08:00
commit
8791ea214c
@ -1,6 +1,8 @@
|
|||||||
# 本地开发环境
|
# 本地开发环境
|
||||||
NODE_ENV=development
|
NODE_ENV=development
|
||||||
|
|
||||||
|
VITE_DEV=true
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='http://localhost:48080'
|
VITE_BASE_URL='http://localhost:48080'
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
# 开发环境
|
# 开发环境
|
||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
|
|
||||||
|
VITE_DEV=false
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='http://localhost:48080'
|
VITE_BASE_URL='http://localhost:48080'
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
# 生产环境
|
# 生产环境
|
||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
|
|
||||||
|
VITE_DEV=false
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='http://localhost:48080'
|
VITE_BASE_URL='http://localhost:48080'
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
# 测试环境
|
# 测试环境
|
||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
|
|
||||||
|
VITE_DEV=false
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='http://localhost:48080'
|
VITE_BASE_URL='http://localhost:48080'
|
||||||
|
|
||||||
|
@ -255,16 +255,17 @@ const getToolBarConfig = (options: XTableProps) => {
|
|||||||
if (toolbarConfig) return
|
if (toolbarConfig) return
|
||||||
if (toolBar) {
|
if (toolBar) {
|
||||||
if (!isBoolean(toolBar)) {
|
if (!isBoolean(toolBar)) {
|
||||||
|
console.info(2)
|
||||||
options.toolbarConfig = toolBar
|
options.toolbarConfig = toolBar
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else if (!topActionSlots) {
|
} else if (topActionSlots != false) {
|
||||||
options.toolbarConfig = {
|
options.toolbarConfig = {
|
||||||
enabled: true
|
slots: { buttons: 'toolbar_buttons' }
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
options.toolbarConfig = {
|
options.toolbarConfig = {
|
||||||
slots: { buttons: 'toolbar_buttons' }
|
enabled: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,13 @@ import App from './App.vue'
|
|||||||
|
|
||||||
import './permission'
|
import './permission'
|
||||||
|
|
||||||
|
import { isDevMode } from '@/utils/env'
|
||||||
|
|
||||||
|
if (isDevMode()) {
|
||||||
|
console.info(isDevMode())
|
||||||
|
import('element-plus/dist/index.css')
|
||||||
|
}
|
||||||
|
|
||||||
// 创建实例
|
// 创建实例
|
||||||
const setupAll = async () => {
|
const setupAll = async () => {
|
||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
|
@ -21,6 +21,7 @@ declare module '@vue/runtime-core' {
|
|||||||
DictTag: typeof import('./../components/DictTag/src/DictTag.vue')['default']
|
DictTag: typeof import('./../components/DictTag/src/DictTag.vue')['default']
|
||||||
Echart: typeof import('./../components/Echart/src/Echart.vue')['default']
|
Echart: typeof import('./../components/Echart/src/Echart.vue')['default']
|
||||||
Editor: typeof import('./../components/Editor/src/Editor.vue')['default']
|
Editor: typeof import('./../components/Editor/src/Editor.vue')['default']
|
||||||
|
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
||||||
ElBadge: typeof import('element-plus/es')['ElBadge']
|
ElBadge: typeof import('element-plus/es')['ElBadge']
|
||||||
ElButton: typeof import('element-plus/es')['ElButton']
|
ElButton: typeof import('element-plus/es')['ElButton']
|
||||||
ElCard: typeof import('element-plus/es')['ElCard']
|
ElCard: typeof import('element-plus/es')['ElCard']
|
||||||
@ -30,6 +31,7 @@ declare module '@vue/runtime-core' {
|
|||||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||||
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
|
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
|
||||||
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
|
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
|
||||||
|
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||||
ElDivider: typeof import('element-plus/es')['ElDivider']
|
ElDivider: typeof import('element-plus/es')['ElDivider']
|
||||||
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
||||||
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
||||||
@ -38,6 +40,7 @@ declare module '@vue/runtime-core' {
|
|||||||
ElForm: typeof import('element-plus/es')['ElForm']
|
ElForm: typeof import('element-plus/es')['ElForm']
|
||||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||||
|
ElImage: typeof import('element-plus/es')['ElImage']
|
||||||
ElImageViewer: typeof import('element-plus/es')['ElImageViewer']
|
ElImageViewer: typeof import('element-plus/es')['ElImageViewer']
|
||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
ElInput: typeof import('element-plus/es')['ElInput']
|
||||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||||
@ -48,10 +51,14 @@ declare module '@vue/runtime-core' {
|
|||||||
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
||||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||||
ElRow: typeof import('element-plus/es')['ElRow']
|
ElRow: typeof import('element-plus/es')['ElRow']
|
||||||
|
ElScroll: typeof import('element-plus/es')['ElScroll']
|
||||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||||
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
|
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
|
||||||
|
ElSpace: typeof import('element-plus/es')['ElSpace']
|
||||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||||
|
ElTable: typeof import('element-plus/es')['ElTable']
|
||||||
|
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||||
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||||
ElTag: typeof import('element-plus/es')['ElTag']
|
ElTag: typeof import('element-plus/es')['ElTag']
|
||||||
|
8
yudao-ui-admin-vue3/src/utils/env.ts
Normal file
8
yudao-ui-admin-vue3/src/utils/env.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
export const isDevMode = () => {
|
||||||
|
const dev = import.meta.env.VITE_DEV
|
||||||
|
if (dev && dev === true) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
@ -5,5 +5,6 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="Swagger">
|
<script setup lang="ts" name="Swagger">
|
||||||
const BASE_URL = import.meta.env.VITE_BASE_URL
|
const BASE_URL = import.meta.env.VITE_BASE_URL
|
||||||
const src = ref(BASE_URL + '/doc.html')
|
// const src = ref(BASE_URL + '/doc.html')
|
||||||
|
const src = ref(BASE_URL + '/swagger-ui')
|
||||||
</script>
|
</script>
|
||||||
|
@ -8,17 +8,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-input v-model="filterText" placeholder="搜索部门" />
|
<el-input v-model="filterText" placeholder="搜索部门" />
|
||||||
<el-tree
|
<el-scrollbar height="650">
|
||||||
ref="treeRef"
|
<el-tree
|
||||||
node-key="id"
|
ref="treeRef"
|
||||||
default-expand-all
|
node-key="id"
|
||||||
:data="deptOptions"
|
default-expand-all
|
||||||
:props="defaultProps"
|
:data="deptOptions"
|
||||||
:highlight-current="true"
|
:props="defaultProps"
|
||||||
:filter-node-method="filterNode"
|
:highlight-current="true"
|
||||||
:expand-on-click-node="false"
|
:filter-node-method="filterNode"
|
||||||
@node-click="handleDeptNodeClick"
|
:expand-on-click-node="false"
|
||||||
/>
|
@node-click="handleDeptNodeClick"
|
||||||
|
/>
|
||||||
|
</el-scrollbar>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="w-4/5 user" style="margin-left: 10px" :gutter="12" shadow="hover">
|
<el-card class="w-4/5 user" style="margin-left: 10px" :gutter="12" shadow="hover">
|
||||||
<template #header>
|
<template #header>
|
||||||
@ -534,8 +536,8 @@ onMounted(async () => {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.user {
|
.user {
|
||||||
height: 900px;
|
height: 780px;
|
||||||
max-height: 960px;
|
max-height: 800px;
|
||||||
}
|
}
|
||||||
.card-header {
|
.card-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
1
yudao-ui-admin-vue3/types/env.d.ts
vendored
1
yudao-ui-admin-vue3/types/env.d.ts
vendored
@ -11,6 +11,7 @@ interface ImportMetaEnv {
|
|||||||
readonly VITE_APP_TITLE: string
|
readonly VITE_APP_TITLE: string
|
||||||
readonly VITE_PORT: number
|
readonly VITE_PORT: number
|
||||||
readonly VITE_OPEN: string
|
readonly VITE_OPEN: string
|
||||||
|
readonly VITE_DEV: boolean
|
||||||
readonly VITE_ROUTE_ALWAYSSHOW_ENABLE: string
|
readonly VITE_ROUTE_ALWAYSSHOW_ENABLE: string
|
||||||
readonly VITE_APP_CAPTCHA_ENABLE: string
|
readonly VITE_APP_CAPTCHA_ENABLE: string
|
||||||
readonly VITE_APP_TENANT_ENABLE: string
|
readonly VITE_APP_TENANT_ENABLE: string
|
||||||
|
Loading…
Reference in New Issue
Block a user