@utogether/udp-core 1.0.0 → 1.0.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/plugins.ts +8 -2
- package/dist/{403-B1R-4vXw.js → 403-BBQoJwTM.js} +9 -8
- package/dist/{404-fXPl8csw.js → 404-BbJPSIWM.js} +15 -14
- package/dist/{500-eI5842YB.js → 500-BtFL9R4M.js} +11 -10
- package/dist/{AuthorityInfo-CfVH6PaB.js → AuthorityInfo-DhiwCeLN.js} +1 -1
- package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-DbK-f8jH.js → AuthorityInfo.vue_vue_type_style_index_0_lang-Duyweh89.js} +3 -3
- package/dist/{AuthorityPanel-BaLMwMgW.js → AuthorityPanel-BeBNiwqc.js} +1 -1
- package/dist/{AuthorityPanel.vue_vue_type_style_index_0_lang-C_bkqLD9.js → AuthorityPanel.vue_vue_type_style_index_0_lang-CIYmnP9-.js} +6 -6
- package/dist/{Company-CYC9Avfz.js → Company-CGqmslx-.js} +3 -3
- package/dist/{CompanyPanel-B4MzoqN_.js → CompanyPanel-hlDsxD-6.js} +10 -10
- package/dist/{Department-B4BNSiYx.js → Department-BZyJtacc.js} +3 -3
- package/dist/{DepartmentPanel-zJO89L2O.js → DepartmentPanel-D-a_EBFt.js} +23 -23
- package/dist/{DesignPanel-S8P0J97f.js → DesignPanel-Bl4luWDV.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DW-_Vqrr.js → DesignPanel.vue_vue_type_style_index_0_lang-I8C3iGvz.js} +6 -6
- package/dist/{DictView-bIS5-rK-.js → DictView-B4a7Hs1X.js} +9 -9
- package/dist/InvOrganization-q4T3y8dQ.js +260 -0
- package/dist/{Org-kXHSjsgJ.js → Org-BTGTrAVz.js} +3 -3
- package/dist/{Preview-CRyiwUIR.js → Preview-pHD84xqI.js} +1 -1
- package/dist/{ReportDefine-WZYIx8Sm.js → ReportDefine-DnnCNQWS.js} +1 -1
- package/dist/{ReportDesign-D-7GKgpb.js → ReportDesign-BnI_Q4pg.js} +10 -10
- package/dist/{ReportQuery-BIIJny6w.js → ReportQuery-Dby2MmtM.js} +5 -5
- package/dist/{ReportQueryFrom-OoUl7N2O.js → ReportQueryFrom-Blm1N8P1.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-B878fgj8.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-CnG_Ybnt.js} +6 -5
- package/dist/{ReportTemplate-Cfeq9US-.js → ReportTemplate-D65RXRY_.js} +11 -11
- package/dist/{Role-BwTV2QMH.js → Role-eFZoTpXc.js} +3 -3
- package/dist/{RoleAssign-De1JjOun.js → RoleAssign-D9-Y3UNz.js} +3 -3
- package/dist/{RolePanel-pUBXsqCM.js → RolePanel-CoUOc3sX.js} +1 -1
- package/dist/{RolePanel-E3RcdByM.js → RolePanel-DlFw6HSf.js} +1 -1
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-B2pQwHb0.js → RolePanel.vue_vue_type_script_setup_true_lang-Clwk-MHw.js} +12 -12
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-CTIad9_Q.js → RolePanel.vue_vue_type_script_setup_true_lang-DKHgNWQP.js} +4 -4
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-vMR1fBi0.js → ScrollPanel.vue_vue_type_style_index_0_lang-M2FQJwPU.js} +8 -8
- package/dist/{Staff-Czm7A8vI.js → Staff-DFBLCsAd.js} +3 -3
- package/dist/StaffInfo-d2CK0oBA.js +4 -0
- package/dist/{StaffInfo.vue_vue_type_style_index_0_lang-DMTL7KCh.js → StaffInfo.vue_vue_type_script_setup_true_lang-4m8wK9tq.js} +7 -7
- package/dist/{StaffPanel-CHk60LEz.js → StaffPanel-D6aWLKN3.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-iPKLb5wG.js → StaffPanel.vue_vue_type_script_setup_true_lang-C7YT2CVb.js} +46 -49
- package/dist/{SysUser-BGwbttRn.js → SysUser-BdZvYxQH.js} +2 -2
- package/dist/{SysUserPanel-BCbKoLKt.js → SysUserPanel-BIVa6LLr.js} +1 -1
- package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-0QUjnhjF.js → SysUserPanel.vue_vue_type_script_setup_true_lang-BsBKpYR7.js} +1 -2
- package/dist/{SystemMenu-BkqZSDKl.js → SystemMenu-C-5VKlHK.js} +51 -49
- package/dist/{UserInfo-BsyAcT2d.js → UserInfo-DqXCRZts.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-D0-KDxAh.js → UserInfo.vue_vue_type_style_index_0_lang-N3TwfpPx.js} +13 -13
- package/dist/{childView-CyuLTUqC.js → childView-B2lSsqS3.js} +1 -1
- package/dist/{childView-CF83nhxb.js → childView-DRUNqgjI.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-Cch4lE-i.js → childView.vue_vue_type_style_index_0_lang-B9XBDDU_.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-CNSgGda3.js → childView.vue_vue_type_style_index_0_lang-oGriyFTv.js} +6 -6
- package/dist/{code-rule-Bz-gnktN.js → code-rule-DZC9T6cl.js} +6 -6
- package/dist/core.es.js +4 -4
- package/dist/{cron-task-CIifSUdW.js → cron-task-BJwPeA5F.js} +11 -11
- package/dist/{frameView-_d2mqjjQ.js → frameView-C6wkvok-.js} +15 -14
- package/dist/index-DZc3qRTx.js +2650 -0
- package/dist/{layoutView-DLKVepB8.js → layoutView-CeJBpZb_.js} +658 -653
- package/dist/{login-LREiDfFU.js → login-BOxwzwdB.js} +26 -25
- package/dist/{lov-view-DDrIVILB.js → lov-view-DRF-99U4.js} +5 -5
- package/dist/{menuInfo-B1FUV-Sk.js → menuInfo-3Sjvs9nM.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-Cnk3vdtD.js → menuInfo.vue_vue_type_style_index_0_lang-DrQ560nm.js} +95 -94
- package/dist/pda-app-B9tn7jdv.js +696 -0
- package/dist/redirect-BqegffKC.js +15 -0
- package/dist/{resource-BCwx9fEv.js → resource-BqnxbQNe.js} +7 -7
- package/dist/{su-welcome-189A7N4r.js → su-welcome-VwifUK_O.js} +41 -40
- package/dist/{sys-config-BZ3sejow.js → sys-config-C0-gSBFO.js} +18 -18
- package/dist/udp-core.css +2 -2
- package/dist/{utogether-r08LNiIZ.js → utogether-Di1byIum.js} +6 -6
- package/package.json +18 -16
- package/src/App.vue +3 -3
- package/src/components/udp/form-upload.vue +183 -0
- package/src/components/udp/index.ts +4 -0
- package/src/components/udp/modal-form.vue +180 -0
- package/src/components/udp/utils.ts +40 -0
- package/src/main.ts +109 -108
- package/src/plugins/vxe-table/index.ts +53 -46
- package/src/plugins/vxe-table/render.tsx +604 -184
- package/src/utils/udp/useRender.ts +420 -0
- package/src/views/organization/inv-org/InvOrganization.vue +2 -1
- package/src/views/organization/staff/StaffInfo.vue +0 -30
- package/src/views/organization/staff/StaffPanel.vue +4 -3
- package/src/views/system/menu/AuthorityPanel.vue +2 -2
- package/src/views/system/menu/SystemMenu.vue +197 -191
- package/src/views/system/menu/menuInfo.vue +11 -6
- package/src/views/system/role/AuthorityInfo.vue +1 -19
- package/src/views/system/sysUser/SysUserPanel.vue +1 -1
- package/src/views/udev/dict/DictView.vue +2 -2
- package/src/views/uhome/components/menu-favorite.vue +1 -1
- package/src/views/uhome/su-welcome.vue +1 -1
- package/src/views/ulogin/login.vue +1 -1
- package/types/global.d.ts +0 -1
- package/vite.config.ts +9 -2
- package/dist/InvOrganization-MuM2jtsG.js +0 -66
- package/dist/StaffInfo-DJzvBuxy.js +0 -4
- package/dist/core.umd.js +0 -173
- package/dist/index-BKIw8tSn.js +0 -9195
- package/dist/pda-app-CRhVGijN.js +0 -2209
- package/dist/redirect-DiaNDu8F.js +0 -15
- package/src/assets/images/empty.png +0 -0
- package/src/assets/images/logo.png +0 -0
- package/src/components/ReCountTo/README.md +0 -2
- package/src/components/ReCountTo/index.ts +0 -18
- package/src/components/ReCountTo/src/normal/index.tsx +0 -165
- package/src/components/ReCountTo/src/normal/props.ts +0 -37
- package/src/components/ReCountTo/src/rebound/index.tsx +0 -67
- package/src/components/ReCountTo/src/rebound/props.ts +0 -14
- package/src/components/ReCountTo/src/rebound/rebound.css +0 -77
- package/src/components/ReCropper/index.ts +0 -14
- package/src/components/ReCropper/src/index.tsx +0 -141
- package/src/components/ReFlicker/index.css +0 -39
- package/src/components/ReFlicker/index.ts +0 -50
- package/src/components/ReFlop/index.ts +0 -14
- package/src/components/ReFlop/src/Filpper.tsx +0 -99
- package/src/components/ReFlop/src/filpper.css +0 -184
- package/src/components/ReFlop/src/index.vue +0 -126
- package/src/components/ReFlowChart/index.ts +0 -24
- package/src/components/ReFlowChart/src/Control.vue +0 -139
- package/src/components/ReFlowChart/src/DataDialog.vue +0 -12
- package/src/components/ReFlowChart/src/NodePanel.vue +0 -151
- package/src/components/ReFlowChart/src/adpterForTurbo.ts +0 -160
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.css +0 -49
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.eot +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.js +0 -61
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.json +0 -58
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.svg +0 -47
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.ttf +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff2 +0 -0
- package/src/components/ReFlowChart/src/config.ts +0 -62
- package/src/components/ReSplitPane/index.css +0 -49
- package/src/components/ReSplitPane/index.tsx +0 -119
- package/src/components/ReSplitPane/resizer.css +0 -45
- package/src/components/ReSplitPane/resizer.tsx +0 -30
- package/src/components/SuCommon/card/components/Card.vue +0 -148
- package/src/components/SuCommon/card/components/DialogForm.vue +0 -127
- package/src/components/SuCommon/card/index.vue +0 -142
- package/src/components/SuCommon/icon-select/index.vue +0 -241
- package/src/components/SuCommon/table/index.vue +0 -208
- package/src/components/SuCommon/utils/index.ts +0 -103
- package/src/components/SuCommon/utils/slot.tsx +0 -50
- package/src/views/components/contextmenu/basic.vue +0 -74
- package/src/views/components/contextmenu/context-menu.vue +0 -40
- package/src/views/components/contextmenu/menuDynamic.vue +0 -99
- package/src/views/components/contextmenu/menuGroup.vue +0 -71
- package/src/views/components/count-to/index.vue +0 -43
- package/src/views/components/cropping/index.vue +0 -59
- package/src/views/components/cropping/picture.jpeg +0 -0
- package/src/views/components/split-pane/index.vue +0 -82
- package/src/views/components/video/index.vue +0 -57
package/src/main.ts
CHANGED
|
@@ -1,108 +1,109 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: wei.li
|
|
3
|
-
* @Date: 2022-10-18 18:13:54
|
|
4
|
-
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-04-29 15:35:32
|
|
6
|
-
* @Description: file content
|
|
7
|
-
*/
|
|
8
|
-
import { createApp, type Directive } from 'vue';
|
|
9
|
-
import App from './App.vue';
|
|
10
|
-
import router from './router';
|
|
11
|
-
import { setViews } from './router';
|
|
12
|
-
import { setupStore } from './store';
|
|
13
|
-
import { setConfig, setSystemEnv } from './config';
|
|
14
|
-
import { useI18n } from '../src/plugins/i18n';
|
|
15
|
-
import { setTableConfig } from '../src/plugins/vxe-table';
|
|
16
|
-
import { injectResponsiveStorage } from './utils/storage';
|
|
17
|
-
import hasAuthority from './utils/authority';
|
|
18
|
-
import { getServiceApi, getBaseURL, setRouter } from './api';
|
|
19
|
-
|
|
20
|
-
import 'nprogress/nprogress.css';
|
|
21
|
-
// 一定要在main.ts中导入tailwind.css,防止vite每次hmr都会请求src/style/index.scss整体css文件导致热更新慢的问题
|
|
22
|
-
import './style/tailwind.css';
|
|
23
|
-
// // 引入重置样式
|
|
24
|
-
import './style/reset.scss';
|
|
25
|
-
// 导入公共样式
|
|
26
|
-
import './style/index.scss';
|
|
27
|
-
|
|
28
|
-
import 'viewerjs/dist/viewer.css';
|
|
29
|
-
|
|
30
|
-
import VueViewer from 'v-viewer';
|
|
31
|
-
|
|
32
|
-
// import SuTable from './components/SuTable/SuTable.vue';
|
|
33
|
-
|
|
34
|
-
// import {
|
|
35
|
-
// UtButton,
|
|
36
|
-
// UGrid,
|
|
37
|
-
// UtDivider,
|
|
38
|
-
//
|
|
39
|
-
//
|
|
40
|
-
//
|
|
41
|
-
//
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
//
|
|
46
|
-
//
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
import 'tippy.js/
|
|
55
|
-
import
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
app.config.globalProperties.$
|
|
67
|
-
app.config.globalProperties.$
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const init = ({ config, lang, views, env, tableConfig }) => {
|
|
78
|
-
app.use(router);
|
|
79
|
-
setRouter(router);
|
|
80
|
-
setConfig(app, config);
|
|
81
|
-
setSystemEnv(env);
|
|
82
|
-
setViews(views);
|
|
83
|
-
setTableConfig(tableConfig);
|
|
84
|
-
return new Promise(resolve => {
|
|
85
|
-
useI18n(app, lang);
|
|
86
|
-
app.component('IconifyIconOffline', IconifyIconOffline);
|
|
87
|
-
app.component('FontIcon', FontIcon);
|
|
88
|
-
// app.component('uAttachment', uAttachment).component('UGrid', UGrid);
|
|
89
|
-
// .component('UtDivider', UtDivider)
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
// .component('
|
|
93
|
-
// .component('
|
|
94
|
-
// .component('
|
|
95
|
-
// .component('
|
|
96
|
-
// .component('
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
|
|
1
|
+
/*
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2022-10-18 18:13:54
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2025-04-29 15:35:32
|
|
6
|
+
* @Description: file content
|
|
7
|
+
*/
|
|
8
|
+
import { createApp, type Directive } from 'vue';
|
|
9
|
+
import App from './App.vue';
|
|
10
|
+
import router from './router';
|
|
11
|
+
import { setViews } from './router';
|
|
12
|
+
import { setupStore } from './store';
|
|
13
|
+
import { setConfig, setSystemEnv } from './config';
|
|
14
|
+
import { useI18n } from '../src/plugins/i18n';
|
|
15
|
+
import { setTableConfig } from '../src/plugins/vxe-table';
|
|
16
|
+
import { injectResponsiveStorage } from './utils/storage';
|
|
17
|
+
import hasAuthority from './utils/authority';
|
|
18
|
+
import { getServiceApi, getBaseURL, setRouter } from './api';
|
|
19
|
+
|
|
20
|
+
import 'nprogress/nprogress.css';
|
|
21
|
+
// 一定要在main.ts中导入tailwind.css,防止vite每次hmr都会请求src/style/index.scss整体css文件导致热更新慢的问题
|
|
22
|
+
import './style/tailwind.css';
|
|
23
|
+
// // 引入重置样式
|
|
24
|
+
import './style/reset.scss';
|
|
25
|
+
// 导入公共样式
|
|
26
|
+
import './style/index.scss';
|
|
27
|
+
|
|
28
|
+
import 'viewerjs/dist/viewer.css';
|
|
29
|
+
|
|
30
|
+
import VueViewer from 'v-viewer';
|
|
31
|
+
|
|
32
|
+
// import SuTable from './components/SuTable/SuTable.vue';
|
|
33
|
+
|
|
34
|
+
// import {
|
|
35
|
+
// UtButton,
|
|
36
|
+
// UGrid,
|
|
37
|
+
// UtDivider,
|
|
38
|
+
// UtModalForm2,
|
|
39
|
+
// FormUpload2
|
|
40
|
+
// UtForm,
|
|
41
|
+
// UtModalGrid,
|
|
42
|
+
// UtContent,
|
|
43
|
+
// UtCountdown,
|
|
44
|
+
// UtIconSelect,
|
|
45
|
+
// UtCalendar
|
|
46
|
+
// uAttachment
|
|
47
|
+
// } from './components/udp';
|
|
48
|
+
|
|
49
|
+
const app = createApp(App);
|
|
50
|
+
|
|
51
|
+
// 全局注册`@iconify/vue`图标库
|
|
52
|
+
import { IconifyIconOffline, FontIcon } from './components/ReIcon';
|
|
53
|
+
// 全局注册`vue-tippy`
|
|
54
|
+
import 'tippy.js/dist/tippy.css';
|
|
55
|
+
import 'tippy.js/animations/perspective.css';
|
|
56
|
+
import VueTippy from 'vue-tippy';
|
|
57
|
+
|
|
58
|
+
app.use(VueTippy, {
|
|
59
|
+
defaultProps: { animation: 'perspective' }
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// 自定义指令
|
|
63
|
+
import * as directives from './directives';
|
|
64
|
+
|
|
65
|
+
const setGlobal = app => {
|
|
66
|
+
app.config.globalProperties.$hasAuthority = hasAuthority;
|
|
67
|
+
app.config.globalProperties.$serviceApi = getServiceApi();
|
|
68
|
+
app.config.globalProperties.$url = getBaseURL();
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const setGlobalDirective = app => {
|
|
72
|
+
Object.keys(directives).forEach(key => {
|
|
73
|
+
app.directive(key, (directives as { [key: string]: Directive })[key]);
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const init = ({ config, lang, views, env, tableConfig }) => {
|
|
78
|
+
app.use(router);
|
|
79
|
+
setRouter(router);
|
|
80
|
+
setConfig(app, config);
|
|
81
|
+
setSystemEnv(env);
|
|
82
|
+
setViews(views);
|
|
83
|
+
setTableConfig(tableConfig);
|
|
84
|
+
return new Promise(resolve => {
|
|
85
|
+
useI18n(app, lang);
|
|
86
|
+
app.component('IconifyIconOffline', IconifyIconOffline);
|
|
87
|
+
app.component('FontIcon', FontIcon);
|
|
88
|
+
// app.component('uAttachment', uAttachment).component('UGrid', UGrid);
|
|
89
|
+
// .component('UtDivider', UtDivider)
|
|
90
|
+
// .component('UtModalForm2', UtModalForm2)
|
|
91
|
+
// app.component('FormUpload2', FormUpload2);
|
|
92
|
+
// .component('UtForm', UtForm)
|
|
93
|
+
// .component('UtContent', UtContent)
|
|
94
|
+
// .component('UtIconSelect', UtIconSelect)
|
|
95
|
+
// .component('UtCountdown', UtCountdown)
|
|
96
|
+
// .component('UtCalendar', UtCalendar)
|
|
97
|
+
// .component('UtModalGrid', UtModalGrid);
|
|
98
|
+
app.use(VueViewer, { defaultOptions: { zIndex: 9999 } });
|
|
99
|
+
setGlobal(app);
|
|
100
|
+
setGlobalDirective(app);
|
|
101
|
+
// 全局组件
|
|
102
|
+
setupStore(app);
|
|
103
|
+
injectResponsiveStorage(app, config);
|
|
104
|
+
const result = { app, router };
|
|
105
|
+
resolve(result);
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export default init;
|
|
@@ -1,46 +1,53 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: levi7754 levi7754@163.com
|
|
3
|
-
* @Date: 2024-06-05 14:32:03
|
|
4
|
-
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-
|
|
6
|
-
* @FilePath: /udp-front/packages/udp-core/src/plugins/vxe-table/index.ts
|
|
7
|
-
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
8
|
-
*/
|
|
9
|
-
import 'xe-utils';
|
|
10
|
-
import { merge } from 'xe-utils';
|
|
11
|
-
import { geti18n, transformI18n } from '../i18n/index';
|
|
12
|
-
// import { storageLocal } from '@utogether/utils';
|
|
13
|
-
import { VxetableRender } from '@utogether/utils';
|
|
14
|
-
// import { VxetableRender } from './
|
|
15
|
-
import { getServiceApi } from '../../api';
|
|
16
|
-
|
|
17
|
-
import VXETable, { VxeUI } from 'vxe-table';
|
|
18
|
-
// import './render.tsx';
|
|
19
|
-
|
|
20
|
-
// const dict = storageLocal.getItem('kLov');
|
|
21
|
-
VxetableRender(VXETable, { serviceApi: getServiceApi(), i18n: transformI18n });
|
|
22
|
-
|
|
23
|
-
// 全局默认参数
|
|
24
|
-
const defaultConfig = {
|
|
25
|
-
// 对组件内置的提示语进行国际化翻译
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
i18n: (key, args) => geti18n().global.t(key, args),
|
|
28
|
-
// 可选,对参数中的列头、校验提示..等进行自动翻译(只对支持国际化的有效)
|
|
29
|
-
translate(key) {
|
|
30
|
-
// 例如,只翻译 "message." 开头的键值
|
|
31
|
-
const NAMESPACED = ['message.', 'el.'];
|
|
32
|
-
if (key && NAMESPACED.findIndex(v => key.includes(v)) !== -1) {
|
|
33
|
-
return geti18n().global.t.call(geti18n().global.locale, key);
|
|
34
|
-
}
|
|
35
|
-
return key;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export function setTableConfig(config = {}) {
|
|
40
|
-
VXETable.setConfig(merge(defaultConfig, config));
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* @Author: levi7754 levi7754@163.com
|
|
3
|
+
* @Date: 2024-06-05 14:32:03
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2025-07-20 11:07:31
|
|
6
|
+
* @FilePath: /udp-front/packages/udp-core/src/plugins/vxe-table/index.ts
|
|
7
|
+
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
8
|
+
*/
|
|
9
|
+
import 'xe-utils';
|
|
10
|
+
import { merge } from 'xe-utils';
|
|
11
|
+
import { geti18n, transformI18n } from '../i18n/index';
|
|
12
|
+
// import { storageLocal } from '@utogether/utils';
|
|
13
|
+
import { VxetableRender } from '@utogether/utils';
|
|
14
|
+
// import { VxetableRender } from './render';
|
|
15
|
+
import { getServiceApi } from '../../api';
|
|
16
|
+
|
|
17
|
+
import VXETable, { VxeUI } from 'vxe-table';
|
|
18
|
+
// import './render.tsx';
|
|
19
|
+
|
|
20
|
+
// const dict = storageLocal.getItem('kLov');
|
|
21
|
+
VxetableRender(VXETable, { serviceApi: getServiceApi(), i18n: transformI18n });
|
|
22
|
+
|
|
23
|
+
// 全局默认参数
|
|
24
|
+
const defaultConfig = {
|
|
25
|
+
// 对组件内置的提示语进行国际化翻译
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
i18n: (key, args) => geti18n().global.t(key, args),
|
|
28
|
+
// 可选,对参数中的列头、校验提示..等进行自动翻译(只对支持国际化的有效)
|
|
29
|
+
translate(key) {
|
|
30
|
+
// 例如,只翻译 "message." 开头的键值
|
|
31
|
+
const NAMESPACED = ['message.', 'el.'];
|
|
32
|
+
if (key && NAMESPACED.findIndex(v => key.includes(v)) !== -1) {
|
|
33
|
+
return geti18n().global.t.call(geti18n().global.locale, key);
|
|
34
|
+
}
|
|
35
|
+
return key;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export function setTableConfig(config = {}) {
|
|
40
|
+
VXETable.setConfig(merge(defaultConfig, config));
|
|
41
|
+
|
|
42
|
+
VxeUI.interceptor.add('event.clearEdit', {
|
|
43
|
+
tableInterceptorMethod(params) {
|
|
44
|
+
const { $event } = params;
|
|
45
|
+
if ($event.target.className.indexOf('vxe-table--ignore-clear') > -1) return false;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function setTheme(theme) {
|
|
51
|
+
// 切换为暗黑主题
|
|
52
|
+
VxeUI.setTheme(theme);
|
|
53
|
+
}
|