- 在 .env.production 中新增 VITE_AUTH_COOKIE_NAME 配置项用于设置认证cookie名称 - 将 AcceptanceException.vue 中的表单标签宽度从固定90px改为自动适配 - 在 ActionDialog.vue 中将多个表单项标记为必填项并调整标签宽度为自动适配 - 重构 ActionHistory.vue 中的按钮布局结构并添加表格列样式类名 - 更新 api-contract-audit.cjs 添加生产任务和BOM相关接口的契约测试 - 修改 auth.js 使用动态认证cookie键名替换硬编码的Admin-Token - 调整系统角色授权用户页面的表单布局和表格样式类名 - 优化 ReceiptDialog Batch 组件的对话框尺寸、表单验证和分页功能
97 lines
3.3 KiB
JavaScript
97 lines
3.3 KiB
JavaScript
import { createApp, defineAsyncComponent } from 'vue'
|
|
|
|
import { readComponentSize } from '@/utils/component-size'
|
|
|
|
import ElementPlus from 'element-plus'
|
|
import 'element-plus/dist/index.css'
|
|
import 'element-plus/theme-chalk/dark/css-vars.css'
|
|
import locale from 'element-plus/es/locale/lang/zh-cn'
|
|
|
|
import '@/assets/styles/index.scss' // global css
|
|
import '@/assets/styles/app.scss'
|
|
import '@/assets/styles/business-ui.scss'
|
|
import '@/assets/styles/viewport.scss'
|
|
import installBusiness from '@/plugins/business'
|
|
import { installAppNavigation } from '@/utils/app-navigation'
|
|
|
|
import App from './App'
|
|
import store from './store'
|
|
import router from './router'
|
|
import directive from './directive' // directive
|
|
|
|
// 注册指令
|
|
import plugins from './plugins' // plugins
|
|
import { download } from '@/utils/request'
|
|
|
|
// svg图标
|
|
import 'virtual:svg-icons-register'
|
|
import SvgIcon from '@/components/SvgIcon'
|
|
import elementIcons from '@/components/SvgIcon/svgicon'
|
|
|
|
import './permission' // permission control
|
|
|
|
import { useDict } from '@/utils/dict'
|
|
import { getConfigKey } from "@/api/system/config"
|
|
import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi'
|
|
|
|
// 分页组件
|
|
import Pagination from '@/components/Pagination'
|
|
// 自定义表格工具组件
|
|
import RightToolbar from '@/components/RightToolbar'
|
|
import BusinessInputNumber from '@/components/BusinessInputNumber'
|
|
// 富文本组件
|
|
const Editor = defineAsyncComponent(() => import('@/components/Editor'))
|
|
// 文件上传组件
|
|
const FileUpload = defineAsyncComponent(() => import('@/components/FileUpload'))
|
|
// 图片上传组件
|
|
const ImageUpload = defineAsyncComponent(() => import('@/components/ImageUpload'))
|
|
// 图片预览组件
|
|
const ImagePreview = defineAsyncComponent(() => import('@/components/ImagePreview'))
|
|
// 字典标签组件
|
|
import DictTag from '@/components/DictTag'
|
|
|
|
const app = createApp(App)
|
|
|
|
// 全局方法挂载
|
|
app.config.globalProperties.useDict = useDict
|
|
app.config.globalProperties.download = download
|
|
app.config.globalProperties.parseTime = parseTime
|
|
app.config.globalProperties.resetForm = resetForm
|
|
app.config.globalProperties.handleTree = handleTree
|
|
app.config.globalProperties.addDateRange = addDateRange
|
|
app.config.globalProperties.getConfigKey = getConfigKey
|
|
app.config.globalProperties.selectDictLabel = selectDictLabel
|
|
app.config.globalProperties.selectDictLabels = selectDictLabels
|
|
|
|
// 全局组件挂载
|
|
app.component('DictTag', DictTag)
|
|
app.component('Pagination', Pagination)
|
|
app.component('FileUpload', FileUpload)
|
|
app.component('ImageUpload', ImageUpload)
|
|
app.component('ImagePreview', ImagePreview)
|
|
app.component('RightToolbar', RightToolbar)
|
|
app.component('Editor', Editor)
|
|
|
|
app.use(router)
|
|
app.use(store)
|
|
app.use(plugins)
|
|
installBusiness(app)
|
|
installAppNavigation(router)
|
|
app.use(elementIcons)
|
|
app.component('svg-icon', SvgIcon)
|
|
|
|
directive(app)
|
|
|
|
// 使用element-plus 并且设置全局的大小
|
|
app.use(ElementPlus, {
|
|
locale: locale,
|
|
// 支持 large、default、small
|
|
size: readComponentSize()
|
|
})
|
|
// Kebab-case registration is what existing templates resolve. Keep the original
|
|
// component available by its export without patching the dependency or changing
|
|
// its model/update, validation, sizing, or numeric behavior.
|
|
app.component('el-input-number', BusinessInputNumber)
|
|
|
|
app.mount('#app')
|