@utogether/udp-core 1.0.1-beta.10 → 1.0.1-beta.12

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.
Files changed (84) hide show
  1. package/dist/{403-Ctxjn4q8.js → 403-D7L5zm05.js} +1 -1
  2. package/dist/{404-W5yzyiZ9.js → 404-BQKzkK5W.js} +1 -1
  3. package/dist/{500-DXuGEOm4.js → 500-BM6k8XR5.js} +1 -1
  4. package/dist/{AuthorityInfo-C2tflCt8.js → AuthorityInfo-Dc-7W4L_.js} +1 -1
  5. package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-SVgy3HX7.js → AuthorityInfo.vue_vue_type_style_index_0_lang-CKvlh3lm.js} +1 -1
  6. package/dist/{Company-PLez5GoH.js → Company-BgwMUr-I.js} +3 -3
  7. package/dist/{CompanyPanel-CIGaQooL.js → CompanyPanel-CDfVCPKC.js} +1 -1
  8. package/dist/{Department-B9wLsXFm.js → Department-CFvEB4Ys.js} +3 -3
  9. package/dist/{DepartmentPanel-DSM4lTaz.js → DepartmentPanel-11Ytcj2u.js} +1 -1
  10. package/dist/{DesignPanel-B6a9wW_A.js → DesignPanel-CP8z6teZ.js} +1 -1
  11. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DtHfoDQk.js → DesignPanel.vue_vue_type_style_index_0_lang-Cp-WR8yE.js} +2 -2
  12. package/dist/{DictView-DhFbQxdJ.js → DictView-13NoDgPW.js} +1 -1
  13. package/dist/InvOrganization-DOD4QdEX.js +72 -0
  14. package/dist/{Org-DxBkYabD.js → Org-cezJs-6P.js} +1 -1
  15. package/dist/{Preview-BFtRpBxw.js → Preview-DzOKwnp8.js} +1 -1
  16. package/dist/{ReportDefine-BIa2QryC.js → ReportDefine-DWJq2q0f.js} +1 -1
  17. package/dist/{ReportDesign-CnyjI-WD.js → ReportDesign-f_ed8u_q.js} +2 -2
  18. package/dist/{ReportQuery-BiK7yEhV.js → ReportQuery-D58gv_yZ.js} +1 -1
  19. package/dist/{ReportQueryFrom-C2rqdFTm.js → ReportQueryFrom-R0R6EbYv.js} +1 -1
  20. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-Ba9HLnXQ.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-CIFpgUAH.js} +1 -1
  21. package/dist/{ReportTemplate-DdkLscP3.js → ReportTemplate-BTknctTT.js} +1 -1
  22. package/dist/{Role-BrsxgK8D.js → Role-QTDJ16h8.js} +3 -3
  23. package/dist/{RoleAssign-DiqwJqDa.js → RoleAssign-7aZ3ufp5.js} +3 -3
  24. package/dist/{RolePanel-Dqx5dI3f.js → RolePanel-CSe-UoR5.js} +1 -1
  25. package/dist/{RolePanel-BDusGyo7.js → RolePanel-XXwmaAgy.js} +1 -1
  26. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-2Z1q_5uW.js → RolePanel.vue_vue_type_script_setup_true_lang-BsNhkvFo.js} +1 -1
  27. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-B5lUnaMI.js → RolePanel.vue_vue_type_script_setup_true_lang-kConrKpo.js} +3 -3
  28. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-vSP23fEq.js → ScrollPanel.vue_vue_type_style_index_0_lang-DtaqM_iA.js} +1 -1
  29. package/dist/{Staff-Cwi9LQiZ.js → Staff-BsREgfrQ.js} +3 -3
  30. package/dist/{StaffInfo-XjVtyaMv.js → StaffInfo-CQtVXfvS.js} +1 -1
  31. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-wSrAuyet.js → StaffInfo.vue_vue_type_script_setup_true_lang-BRRtcGIH.js} +1 -1
  32. package/dist/{StaffPanel-C-wYcFdv.js → StaffPanel-cQTAulcP.js} +1 -1
  33. package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-DZNArmnC.js → StaffPanel.vue_vue_type_script_setup_true_lang-BLeXlrI1.js} +2 -2
  34. package/dist/{SysUser-O4tvr-Ur.js → SysUser-DN5_46io.js} +2 -2
  35. package/dist/{SysUserPanel-B853docZ.js → SysUserPanel-DTBNR42y.js} +1 -1
  36. package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-DhiYYC97.js → SysUserPanel.vue_vue_type_script_setup_true_lang-CF2pHcPP.js} +1 -1
  37. package/dist/{SystemMenu-CXR6mrXr.js → SystemMenu-D9TKZwgb.js} +2 -2
  38. package/dist/{UserInfo-BkP8pE2a.js → UserInfo-DJ5LRTMe.js} +1 -1
  39. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-D4r_umjV.js → UserInfo.vue_vue_type_style_index_0_lang-CIpPef_S.js} +1 -1
  40. package/dist/{childView-D0HwbgDT.js → childView-CGZSd19y.js} +1 -1
  41. package/dist/{childView-TRqUkSDC.js → childView-DrL_Qi-q.js} +1 -1
  42. package/dist/{childView.vue_vue_type_style_index_0_lang-BzISq0Jf.js → childView.vue_vue_type_style_index_0_lang-B8wEeuFX.js} +1 -1
  43. package/dist/{childView.vue_vue_type_style_index_0_lang-DQRgNsJY.js → childView.vue_vue_type_style_index_0_lang-D2AzjPNV.js} +1 -1
  44. package/dist/{code-rule-BV7PQWhK.js → code-rule-DVEoh1Z4.js} +1 -1
  45. package/dist/core.es.js +1 -1
  46. package/dist/{cron-task-9ZS9bi7K.js → cron-task-BBpccUV_.js} +1 -1
  47. package/dist/{frameView-DE83AN50.js → frameView-Cw6_EqfJ.js} +1 -1
  48. package/dist/index-BAkwQh8m.js +4467 -0
  49. package/dist/{layoutView-D1U-c4By.js → layoutView-CL2Ef3bw.js} +1187 -1183
  50. package/dist/{login-sPCEiTGT.js → login-BDocwo7t.js} +115 -108
  51. package/dist/{lov-view-76NcYTYl.js → lov-view-R8nnUEbA.js} +2 -2
  52. package/dist/{menuInfo-CxjfjFpm.js → menuInfo-B-nGOcSv.js} +1 -1
  53. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-C2qahH3r.js → menuInfo.vue_vue_type_style_index_0_lang-1VuzxMb0.js} +1 -1
  54. package/dist/{pda-app-BUH16bLj.js → pda-app-D5wBClj0.js} +1 -1
  55. package/dist/{resource-CCuHzoA6.js → resource-BXGSsXzw.js} +1 -1
  56. package/dist/{su-welcome-mRArONsd.js → su-welcome-DISZAkBB.js} +1 -1
  57. package/dist/sys-config-DuyYdzXL.js +290 -0
  58. package/dist/udp-core.css +2 -2
  59. package/dist/{utogether-Dm_VBQHR.js → utogether-C2KGHvut.js} +1 -1
  60. package/package.json +18 -18
  61. package/src/api/index.ts +31 -31
  62. package/src/components/udp/form.vue +2 -2
  63. package/src/components/udp/modal-form.vue +2 -1
  64. package/src/components/udp/modal-grid.vue +11 -1
  65. package/src/layout/components/lay-navbar/index.vue +239 -237
  66. package/src/layout/components/lay-search/index.vue +1 -1
  67. package/src/layout/components/lay-select-org/index.vue +64 -69
  68. package/src/layout/components/lay-sidebar/horizontal.vue +190 -191
  69. package/src/layout/components/lay-sidebar/mixNav.vue +260 -258
  70. package/src/layout/components/lay-sidebar/sidebar-logo.vue +92 -98
  71. package/src/layout/hooks/useNav.ts +173 -173
  72. package/src/main.ts +119 -119
  73. package/src/plugins/i18n/zh.ts +1 -0
  74. package/src/router/index.ts +3 -13
  75. package/src/store/modules/permission.ts +1 -4
  76. package/src/utils/propTypes.ts +42 -47
  77. package/src/utils/udp/http/index.ts +283 -281
  78. package/src/views/login/login-view.vue +300 -314
  79. package/src/views/organization/inv-org/InvOrganization.vue +68 -53
  80. package/src/views/system/sys/sys-config.vue +287 -291
  81. package/src/views/ulogin/login.vue +3 -4
  82. package/dist/InvOrganization-D90AbR3b.js +0 -66
  83. package/dist/index-DVARtten.js +0 -2623
  84. package/dist/sys-config-Cvt05yF6.js +0 -277
package/src/main.ts CHANGED
@@ -1,119 +1,119 @@
1
- /*
2
- * @Author: levi7754 levi7754@163.com
3
- * @Date: 2025-07-25 13:38:20
4
- * @LastEditors: levi7754 levi7754@163.com
5
- * @LastEditTime: 2025-08-21 17:15:41
6
- * @FilePath: \udp-front\packages\udp-core\src\main.ts
7
- * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
- */
9
- /*
10
- * @Author: wei.li
11
- * @Date: 2022-10-18 18:13:54
12
- * @LastEditors: levi7754 levi7754@163.com
13
- * @LastEditTime: 2025-07-31 17:17:32
14
- * @Description: file content
15
- */
16
- import { createApp, type Directive } from 'vue';
17
- import App from './App.vue';
18
- // import router from './router';
19
- import { setViews } from './router';
20
- import { setupStore } from './store';
21
- import { setConfig, setSystemEnv } from './config';
22
- import { useI18n } from '../src/plugins/i18n';
23
- import { setTableConfig } from '../src/plugins/vxe-table';
24
- import { injectResponsiveStorage } from './utils/storage';
25
- import hasAuthority from './utils/authority';
26
- import { getServiceApi, getBaseURL, setRouter } from './api';
27
-
28
- import 'nprogress/nprogress.css';
29
- // 一定要在main.ts中导入tailwind.css,防止vite每次hmr都会请求src/style/index.scss整体css文件导致热更新慢的问题
30
- import './style/tailwind.css';
31
- // // 引入重置样式
32
- import './style/reset.scss';
33
- // 导入公共样式
34
- import './style/index.scss';
35
-
36
- import 'viewerjs/dist/viewer.css';
37
-
38
- import VueViewer from 'v-viewer';
39
-
40
- // import SuTable from './components/SuTable/SuTable.vue';
41
-
42
- // import {
43
- // UtButton,
44
- // utLov2,
45
- // UGrid,
46
- // UtDivider,
47
- // UtModalForm2,
48
- // FormUpload2,
49
- // UtForm2
50
- // UtGrid2
51
- // UtContent,
52
- // UtModalGrid2
53
- // UtUpload2
54
- // UtIconSelect,
55
- // UtCalendar
56
- // uAttachment
57
- // } from './components/udp';
58
-
59
- const app = createApp(App);
60
-
61
- // 全局注册`@iconify/vue`图标库
62
- import { IconifyIconOffline, FontIcon } from './components/ReIcon';
63
- // 全局注册`vue-tippy`
64
- import 'tippy.js/dist/tippy.css';
65
- import 'tippy.js/animations/perspective.css';
66
- import VueTippy from 'vue-tippy';
67
-
68
- app.use(VueTippy, {
69
- defaultProps: { animation: 'perspective' }
70
- });
71
-
72
- // 自定义指令
73
- import * as directives from './directives';
74
-
75
- const setGlobal = app => {
76
- app.config.globalProperties.$hasAuthority = hasAuthority;
77
- app.config.globalProperties.$serviceApi = getServiceApi();
78
- app.config.globalProperties.$url = getBaseURL();
79
- };
80
-
81
- const setGlobalDirective = app => {
82
- Object.keys(directives).forEach(key => {
83
- app.directive(key, (directives as { [key: string]: Directive })[key]);
84
- });
85
- };
86
-
87
- const init = ({ router, config, lang, views, env, tableConfig }) => {
88
- setViews(views, router);
89
- app.use(router);
90
- setRouter(router);
91
- setConfig(app, config);
92
- setSystemEnv(env);
93
- setTableConfig(tableConfig);
94
- return new Promise(resolve => {
95
- useI18n(app, lang);
96
- app.component('IconifyIconOffline', IconifyIconOffline);
97
- app.component('FontIcon', FontIcon);
98
- // app.component('uAttachment', uAttachment).component('UGrid', UGrid);
99
- // .component('UtDivider', UtDivider)
100
- // app.component('UtModalForm2', UtModalForm2);
101
- // app.component('UtGrid2', UtGrid2);
102
- // app.component('UtForm2', UtForm2);
103
- // app.component('UtModalGrid2', UtModalGrid2);
104
- // .component('UtIconSelect', UtIconSelect)
105
- // app.component('FormUpload2', FormUpload2);
106
- // .component('UtCalendar', UtCalendar)
107
- // .component('UtModalGrid', UtModalGrid);
108
- app.use(VueViewer, { defaultOptions: { zIndex: 9999 } });
109
- setGlobal(app);
110
- setGlobalDirective(app);
111
- // 全局组件
112
- setupStore(app);
113
- injectResponsiveStorage(app, config);
114
- const result = { app, router };
115
- resolve(result);
116
- });
117
- };
118
-
119
- export default init;
1
+ /*
2
+ * @Author: levi7754 levi7754@163.com
3
+ * @Date: 2025-07-25 13:38:20
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2025-08-21 17:15:41
6
+ * @FilePath: \udp-front\packages\udp-core\src\main.ts
7
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
+ */
9
+ /*
10
+ * @Author: wei.li
11
+ * @Date: 2022-10-18 18:13:54
12
+ * @LastEditors: levi7754 levi7754@163.com
13
+ * @LastEditTime: 2025-07-31 17:17:32
14
+ * @Description: file content
15
+ */
16
+ import { createApp, type Directive } from 'vue';
17
+ import App from './App.vue';
18
+ // import router from './router';
19
+ import { setViews } from './router';
20
+ import { setupStore } from './store';
21
+ import { setConfig, setSystemEnv } from './config';
22
+ import { useI18n } from '../src/plugins/i18n';
23
+ import { setTableConfig } from '../src/plugins/vxe-table';
24
+ import { injectResponsiveStorage } from './utils/storage';
25
+ import hasAuthority from './utils/authority';
26
+ import { getServiceApi, getBaseURL, setRouter } from './api';
27
+
28
+ import 'nprogress/nprogress.css';
29
+ // 一定要在main.ts中导入tailwind.css,防止vite每次hmr都会请求src/style/index.scss整体css文件导致热更新慢的问题
30
+ import './style/tailwind.css';
31
+ // // 引入重置样式
32
+ import './style/reset.scss';
33
+ // 导入公共样式
34
+ import './style/index.scss';
35
+
36
+ import 'viewerjs/dist/viewer.css';
37
+
38
+ import VueViewer from 'v-viewer';
39
+
40
+ // import SuTable from './components/SuTable/SuTable.vue';
41
+
42
+ // import {
43
+ // UtButton,
44
+ // utLov2,
45
+ // UGrid,
46
+ // UtDivider,
47
+ // UtModalForm2
48
+ // FormUpload2,
49
+ // UtForm2
50
+ // UtGrid2
51
+ // UtContent,
52
+ // UtModalGrid2
53
+ // UtUpload2
54
+ // UtIconSelect,
55
+ // UtCalendar
56
+ // uAttachment
57
+ // } from './components/udp';
58
+
59
+ const app = createApp(App);
60
+
61
+ // 全局注册`@iconify/vue`图标库
62
+ import { IconifyIconOffline, FontIcon } from './components/ReIcon';
63
+ // 全局注册`vue-tippy`
64
+ import 'tippy.js/dist/tippy.css';
65
+ import 'tippy.js/animations/perspective.css';
66
+ import VueTippy from 'vue-tippy';
67
+
68
+ app.use(VueTippy, {
69
+ defaultProps: { animation: 'perspective' }
70
+ });
71
+
72
+ // 自定义指令
73
+ import * as directives from './directives';
74
+
75
+ const setGlobal = app => {
76
+ app.config.globalProperties.$hasAuthority = hasAuthority;
77
+ app.config.globalProperties.$serviceApi = getServiceApi();
78
+ app.config.globalProperties.$url = getBaseURL();
79
+ };
80
+
81
+ const setGlobalDirective = app => {
82
+ Object.keys(directives).forEach(key => {
83
+ app.directive(key, (directives as { [key: string]: Directive })[key]);
84
+ });
85
+ };
86
+
87
+ const init = ({ router, config, lang, views, env, tableConfig }) => {
88
+ setViews(views, router);
89
+ app.use(router);
90
+ setRouter(router);
91
+ setConfig(app, config);
92
+ setSystemEnv(env);
93
+ setTableConfig(tableConfig);
94
+ return new Promise(resolve => {
95
+ useI18n(app, lang);
96
+ app.component('IconifyIconOffline', IconifyIconOffline);
97
+ app.component('FontIcon', FontIcon);
98
+ // app.component('uAttachment', uAttachment).component('UGrid', UGrid);
99
+ // .component('UtDivider', UtDivider)
100
+ // app.component('UtModalForm2', UtModalForm2);
101
+ // app.component('UtGrid2', UtGrid2);
102
+ // app.component('UtForm2', UtForm2);
103
+ // app.component('UtModalGrid2', UtModalGrid2);
104
+ // .component('UtIconSelect', UtIconSelect)
105
+ // app.component('FormUpload2', FormUpload2);
106
+ // .component('UtCalendar', UtCalendar)
107
+ // .component('UtModalGrid', UtModalGrid);
108
+ app.use(VueViewer, { defaultOptions: { zIndex: 9999 } });
109
+ setGlobal(app);
110
+ setGlobalDirective(app);
111
+ // 全局组件
112
+ setupStore(app);
113
+ injectResponsiveStorage(app, config);
114
+ const result = { app, router };
115
+ resolve(result);
116
+ });
117
+ };
118
+
119
+ export default init;
@@ -42,6 +42,7 @@ export default {
42
42
  baseUrl: '服务路径',
43
43
  copyright: '版权信息',
44
44
  i18nEnabled: '国际化',
45
+ orgTaggle: '启用组织切换',
45
46
  defaultLanguage: '默认语言',
46
47
  roleName: '角色名称',
47
48
  roleCode: '角色编码',
@@ -3,13 +3,7 @@ import type { Router, RouteRecordRaw, RouteComponent } from 'vue-router';
3
3
  import { cookies, NProgress, openLink, isUrl, buildHierarchyTree } from '@utogether/utils';
4
4
  import { useMultiTagsStoreHook } from '../store/modules/multiTags';
5
5
  import { usePermissionStoreHook } from '../store/modules/permission';
6
- import {
7
- ascending,
8
- initRouter,
9
- findRouteByPath,
10
- formatTwoStageRoutes,
11
- formatFlatteningRoutes
12
- } from './utils';
6
+ import { ascending, initRouter, findRouteByPath, formatTwoStageRoutes, formatFlatteningRoutes } from './utils';
13
7
  // import { getEnv } from '../config';
14
8
  import { kLOGINER } from '../contant';
15
9
 
@@ -69,9 +63,7 @@ export function resetRouter() {
69
63
  const { name, meta } = route;
70
64
  if (name && router.hasRoute(name) && meta?.backstage) {
71
65
  router.removeRoute(name);
72
- router.options.routes = formatTwoStageRoutes(
73
- formatFlatteningRoutes(buildHierarchyTree(ascending(routes)))
74
- );
66
+ router.options.routes = formatTwoStageRoutes(formatFlatteningRoutes(buildHierarchyTree(ascending(routes))));
75
67
  }
76
68
  });
77
69
  usePermissionStoreHook().clearAllCachePage();
@@ -136,9 +128,7 @@ export const routerBefore = (to, _from, next) => {
136
128
  }
137
129
  if (_from?.name && _from?.name !== 'login') {
138
130
  // m.name === to.name 判断param路由跳转
139
- const cmp = to.matched.find(
140
- m => m.path === to.path || (m.name === to.name && to.params)
141
- )?.components;
131
+ const cmp = to.matched.find(m => m.path === to.path || (m.name === to.name && to.params))?.components;
142
132
  // 如果路由包含http 则是超链接 反之是普通路由
143
133
  if (externalLink) {
144
134
  openLink(to?.name as string);
@@ -80,10 +80,7 @@ export const usePermissionStore = defineStore('udp-permission', {
80
80
  const nameList = getKeyList(useMultiTagsStoreHook().multiTags, 'name');
81
81
  while (cacheLength > 0) {
82
82
  nameList.findIndex(v => v === this.cachePageList[cacheLength - 1]) === -1 &&
83
- this.cachePageList.splice(
84
- this.cachePageList.indexOf(this.cachePageList[cacheLength - 1]),
85
- 1
86
- );
83
+ this.cachePageList.splice(this.cachePageList.indexOf(this.cachePageList[cacheLength - 1]), 1);
87
84
  cacheLength--;
88
85
  }
89
86
  }, 500)();
@@ -1,47 +1,42 @@
1
- /*
2
- * @Author: levi7754 levi7754@163.com
3
- * @Date: 2023-06-19 09:14:18
4
- * @LastEditors: wei.li
5
- * @LastEditTime: 2024-07-02 08:57:49
6
- * @FilePath: /sitzone-mes/src/utils/propTypes.ts
7
- * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
- */
9
- import type { CSSProperties, VNodeChild } from 'vue';
10
- import {
11
- createTypes,
12
- toValidableType,
13
- type VueTypesInterface,
14
- type VueTypeValidableDef
15
- } from 'vue-types';
16
-
17
- export type VueNode = VNodeChild | JSX.Element;
18
-
19
- type PropTypes = VueTypesInterface & {
20
- readonly style: VueTypeValidableDef<CSSProperties>;
21
- readonly VNodeChild: VueTypeValidableDef<VueNode>;
22
- };
23
-
24
- const newPropTypes = createTypes({
25
- func: undefined,
26
- bool: undefined,
27
- string: undefined,
28
- number: undefined,
29
- object: undefined,
30
- integer: undefined
31
- }) as PropTypes;
32
-
33
- // vue-types v5.0 开始,extend()方法已经废弃,当前已改为官方推荐的ES6+方法 https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#the-extend-method
34
- export default class propTypes extends newPropTypes {
35
- // a native-like validator that supports the `.validable` method
36
- static get style() {
37
- return toValidableType('style', {
38
- type: [String, Object]
39
- });
40
- }
41
-
42
- static get VNodeChild() {
43
- return toValidableType('VNodeChild', {
44
- type: undefined
45
- });
46
- }
47
- }
1
+ /*
2
+ * @Author: levi7754 levi7754@163.com
3
+ * @Date: 2023-06-19 09:14:18
4
+ * @LastEditors: wei.li
5
+ * @LastEditTime: 2024-07-02 08:57:49
6
+ * @FilePath: /sitzone-mes/src/utils/propTypes.ts
7
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
+ */
9
+ import type { CSSProperties, VNodeChild } from 'vue';
10
+ import { createTypes, toValidableType, type VueTypesInterface, type VueTypeValidableDef } from 'vue-types';
11
+
12
+ export type VueNode = VNodeChild | JSX.Element;
13
+
14
+ type PropTypes = VueTypesInterface & {
15
+ readonly style: VueTypeValidableDef<CSSProperties>;
16
+ readonly VNodeChild: VueTypeValidableDef<VueNode>;
17
+ };
18
+
19
+ const newPropTypes = createTypes({
20
+ func: undefined,
21
+ bool: undefined,
22
+ string: undefined,
23
+ number: undefined,
24
+ object: undefined,
25
+ integer: undefined
26
+ }) as PropTypes;
27
+
28
+ // 从 vue-types v5.0 开始,extend()方法已经废弃,当前已改为官方推荐的ES6+方法 https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#the-extend-method
29
+ export default class propTypes extends newPropTypes {
30
+ // a native-like validator that supports the `.validable` method
31
+ static get style() {
32
+ return toValidableType('style', {
33
+ type: [String, Object]
34
+ });
35
+ }
36
+
37
+ static get VNodeChild() {
38
+ return toValidableType('VNodeChild', {
39
+ type: undefined
40
+ });
41
+ }
42
+ }