add 集成vForm动态表单组件
This commit is contained in:
parent
7cb0864be3
commit
fe67c2ce2c
16
lib/vform/designer.style.css
Normal file
16
lib/vform/designer.style.css
Normal file
File diff suppressed because one or more lines are too long
1601
lib/vform/designer.umd.js
Normal file
1601
lib/vform/designer.umd.js
Normal file
File diff suppressed because one or more lines are too long
13
src/main.ts
13
src/main.ts
@ -1,4 +1,8 @@
|
||||
import { createApp } from 'vue';
|
||||
|
||||
import ElementPlus from 'element-plus';
|
||||
import locale from 'element-plus/lib/locale/lang/zh-cn'; // 中文语言
|
||||
|
||||
// global css
|
||||
import 'uno.css';
|
||||
import '@/assets/styles/index.scss';
|
||||
@ -33,6 +37,9 @@ import { parseTime, addDateRange, handleTree, selectDictLabel, selectDictLabels
|
||||
// 国际化
|
||||
import i18n from '@/lang/index';
|
||||
|
||||
import VForm3 from '@/../lib/vform/designer.umd.js';
|
||||
import '../lib/vform/designer.style.css';
|
||||
|
||||
const app = createApp(App);
|
||||
// 全局方法挂载
|
||||
app.config.globalProperties.useDict = useDict;
|
||||
@ -50,8 +57,14 @@ app.use(ElementIcons);
|
||||
app.use(router);
|
||||
app.use(store);
|
||||
app.use(i18n);
|
||||
app.use(VForm3);
|
||||
app.use(plugins);
|
||||
// 自定义指令
|
||||
directive(app);
|
||||
|
||||
// 使用element-plus 并且设置全局的大小
|
||||
app.use(ElementPlus, {
|
||||
locale: locale
|
||||
});
|
||||
|
||||
app.mount('#app');
|
||||
|
@ -23,7 +23,7 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => {
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: Number(env.VITE_APP_PORT),
|
||||
open: true,
|
||||
open: false,
|
||||
proxy: {
|
||||
[env.VITE_APP_BASE_API]: {
|
||||
target: 'http://localhost:8080',
|
||||
@ -68,6 +68,7 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => {
|
||||
'vue-i18n',
|
||||
'@vueup/vue-quill',
|
||||
'@iconify/iconify',
|
||||
'@/../lib/vform/designer.umd.js',
|
||||
|
||||
'element-plus/es/components/form/style/css',
|
||||
'element-plus/es/components/form-item/style/css',
|
||||
@ -113,6 +114,12 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => {
|
||||
'element-plus/es/components/image/style/css',
|
||||
'element-plus/es/components/tab-pane/style/css'
|
||||
]
|
||||
},
|
||||
build: {
|
||||
commonjsOptions: {
|
||||
// 把lib目录加进来,否则生产打包会报错!!
|
||||
include: /node_modules|lib/
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user