@skyfox2000/webui 1.0.13 → 1.2.0

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 (162) hide show
  1. package/lib/assets/modules/file-upload-CBUcsUnR.js +170 -0
  2. package/lib/assets/modules/form-validate-CgX7aR7T.js +297 -0
  3. package/lib/assets/modules/index-Civhd8xG.js +112 -0
  4. package/lib/assets/modules/index-DQMdt51R.js +726 -0
  5. package/lib/assets/modules/{index-BEWJ_qAH.js → index-DmWrkTXX.js} +1 -1
  6. package/lib/assets/modules/{menuTabs-BXdbFZor.js → menuTabs-BRYvFWA-.js} +131 -121
  7. package/lib/assets/modules/settingInfo-BZakNKIN.js +999 -0
  8. package/lib/assets/modules/uploadList-B7XoxGOh.js +278 -0
  9. package/lib/components/common/icon/index.vue.d.ts +1 -1
  10. package/lib/components/content/dialog/index.vue.d.ts +1 -1
  11. package/lib/components/content/drawer/index.vue.d.ts +1 -1
  12. package/lib/components/content/form/index.vue.d.ts +1 -1
  13. package/lib/components/content/search/index.vue.d.ts +1 -1
  14. package/lib/components/content/table/index.vue.d.ts +1 -1
  15. package/lib/components/content/table/tableOperate.vue.d.ts +1 -1
  16. package/lib/components/content/toolbar/icontool.vue.d.ts +1 -1
  17. package/lib/components/content/toolbar/index.vue.d.ts +1 -1
  18. package/lib/components/content/tree/index.vue.d.ts +1 -1
  19. package/lib/components/form/transfer/transferTable.vue.d.ts +1 -1
  20. package/lib/components/form/treeSelect/index.vue.d.ts +1 -1
  21. package/lib/components/form/upload/uploadList.vue.d.ts +1 -1
  22. package/lib/const/options.d.ts +32 -0
  23. package/lib/directives/enter-submit.d.ts +4 -0
  24. package/lib/directives/index.d.ts +2 -0
  25. package/lib/directives/permission.d.ts +5 -0
  26. package/lib/es/AceEditor/index.js +9 -8
  27. package/lib/es/BasicLayout/index.js +28 -24
  28. package/lib/es/Error403/index.js +15 -10
  29. package/lib/es/Error404/index.js +15 -10
  30. package/lib/es/ExcelForm/index.js +380 -175
  31. package/lib/es/UploadForm/index.js +23 -20
  32. package/lib/index.d.ts +42 -2
  33. package/lib/router/index.d.ts +16 -0
  34. package/lib/stores/appInfo.d.ts +34 -0
  35. package/lib/stores/hostInfo.d.ts +9 -0
  36. package/lib/stores/pageInfo.d.ts +18 -0
  37. package/lib/stores/pinia.d.ts +3 -0
  38. package/lib/stores/settingInfo.d.ts +8 -0
  39. package/lib/stores/userInfo.d.ts +21 -0
  40. package/lib/typings/data.d.ts +80 -0
  41. package/lib/typings/form.d.ts +171 -0
  42. package/lib/typings/menu.d.ts +7 -0
  43. package/lib/typings/option.d.ts +175 -0
  44. package/lib/typings/page.d.ts +69 -0
  45. package/lib/typings/table.d.ts +181 -0
  46. package/lib/typings/tools.d.ts +130 -0
  47. package/lib/typings/tree.d.ts +72 -0
  48. package/lib/typings/upload.d.ts +161 -0
  49. package/lib/typings/urls.d.ts +69 -0
  50. package/lib/utils/cache.d.ts +23 -0
  51. package/lib/utils/data.d.ts +6 -0
  52. package/lib/utils/download.d.ts +4 -0
  53. package/lib/utils/eventbus.d.ts +16 -0
  54. package/lib/utils/export-table.d.ts +12 -0
  55. package/lib/utils/file-upload.d.ts +15 -0
  56. package/lib/utils/form-excel.d.ts +30 -0
  57. package/lib/utils/form-validate.d.ts +29 -0
  58. package/lib/utils/form.d.ts +9 -0
  59. package/lib/utils/icon-loader.d.ts +125 -0
  60. package/lib/utils/isEmpty.d.ts +1 -0
  61. package/lib/utils/main-openapis.d.ts +9 -0
  62. package/lib/utils/menu.d.ts +6 -0
  63. package/lib/utils/options.d.ts +10 -0
  64. package/lib/utils/page.d.ts +25 -0
  65. package/lib/utils/table.d.ts +21 -0
  66. package/lib/utils/tools.d.ts +18 -0
  67. package/lib/utils/tree.d.ts +3 -0
  68. package/lib/vite-env.d.ts +8 -0
  69. package/lib/webui.css +1 -1
  70. package/lib/webui.es.js +1020 -854
  71. package/package.json +7 -6
  72. package/src/components/common/icon/appicon.vue +1 -1
  73. package/src/components/common/icon/fullscreen.vue +2 -1
  74. package/src/components/common/icon/index.vue +1 -1
  75. package/src/components/common/icon/layoutIcon.vue +1 -1
  76. package/src/components/common/icon/projectIcon.vue +1 -1
  77. package/src/components/common/icon/toolIcon.vue +1 -1
  78. package/src/components/content/dialog/excelForm.vue +2 -2
  79. package/src/components/content/dialog/index.vue +1 -1
  80. package/src/components/content/dialog/uploadForm.vue +7 -6
  81. package/src/components/content/drawer/index.vue +43 -18
  82. package/src/components/content/form/formItem.vue +1 -1
  83. package/src/components/content/form/index.vue +1 -1
  84. package/src/components/content/search/index.vue +1 -1
  85. package/src/components/content/search/searchItem.vue +1 -1
  86. package/src/components/content/table/index.vue +8 -5
  87. package/src/components/content/table/tableOperate.vue +8 -4
  88. package/src/components/content/toolbar/icontool.vue +2 -2
  89. package/src/components/content/toolbar/index.vue +9 -5
  90. package/src/components/content/tree/index.vue +1 -1
  91. package/src/components/error/error403.vue +2 -2
  92. package/src/components/error/error404.vue +2 -2
  93. package/src/components/form/autoComplete/index.vue +1 -1
  94. package/src/components/form/cascader/index.vue +1 -2
  95. package/src/components/form/checkbox/index.vue +11 -5
  96. package/src/components/form/datePicker/index.vue +1 -1
  97. package/src/components/form/input/index.vue +1 -1
  98. package/src/components/form/input/inputNumber.vue +1 -1
  99. package/src/components/form/input/inputPassword.vue +1 -1
  100. package/src/components/form/radio/index.vue +1 -1
  101. package/src/components/form/radio/radioStatus.vue +1 -1
  102. package/src/components/form/rangePicker/index.vue +1 -1
  103. package/src/components/form/select/index.vue +1 -1
  104. package/src/components/form/switch/index.vue +7 -3
  105. package/src/components/form/textarea/index.vue +1 -1
  106. package/src/components/form/transfer/index.vue +1 -1
  107. package/src/components/form/transfer/transferTable.vue +42 -22
  108. package/src/components/form/treeSelect/index.vue +2 -3
  109. package/src/components/form/upload/uploadList.vue +1 -1
  110. package/src/components/layout/breadcrumb/index.vue +1 -1
  111. package/src/components/layout/header/headerExits.vue +1 -1
  112. package/src/components/layout/header/index.vue +1 -1
  113. package/src/components/layout/header/user.vue +2 -1
  114. package/src/components/layout/menu/index.vue +9 -3
  115. package/src/components/layout/menu/menuTabs.vue +10 -12
  116. package/src/components/layout/page/basicLayout.vue +1 -1
  117. package/src/const/options.ts +114 -0
  118. package/src/directives/enter-submit.ts +13 -0
  119. package/src/directives/index.ts +26 -0
  120. package/src/directives/permission.ts +144 -0
  121. package/src/index.ts +201 -0
  122. package/src/router/index.ts +196 -0
  123. package/src/stores/appInfo.ts +471 -0
  124. package/src/stores/hostInfo.ts +117 -0
  125. package/src/stores/pageInfo.ts +131 -0
  126. package/src/stores/pinia.ts +10 -0
  127. package/src/stores/settingInfo.ts +53 -0
  128. package/src/stores/userInfo.ts +392 -0
  129. package/src/typings/data.d.ts +81 -0
  130. package/src/typings/form.d.ts +172 -0
  131. package/src/typings/menu.d.ts +7 -0
  132. package/src/typings/option.d.ts +177 -0
  133. package/src/typings/page.d.ts +70 -0
  134. package/src/typings/table.d.ts +182 -0
  135. package/src/typings/tools.d.ts +131 -0
  136. package/src/typings/tree.d.ts +73 -0
  137. package/src/typings/upload.d.ts +162 -0
  138. package/src/typings/urls.d.ts +70 -0
  139. package/src/utils/cache.ts +175 -0
  140. package/src/utils/data.ts +189 -0
  141. package/src/utils/download.ts +80 -0
  142. package/src/utils/eventbus.ts +78 -0
  143. package/src/utils/export-table.ts +155 -0
  144. package/src/utils/file-upload.ts +304 -0
  145. package/src/utils/form-excel.ts +523 -0
  146. package/src/utils/form-validate.ts +368 -0
  147. package/src/utils/form.ts +188 -0
  148. package/src/utils/icon-loader.ts +412 -0
  149. package/src/utils/isEmpty.ts +18 -0
  150. package/src/utils/main-openapis.ts +72 -0
  151. package/src/utils/menu.ts +89 -0
  152. package/src/utils/options.ts +324 -0
  153. package/src/utils/page.ts +262 -0
  154. package/src/utils/table.ts +274 -0
  155. package/src/utils/tools.ts +362 -0
  156. package/src/utils/tree.ts +28 -0
  157. package/tsconfig.json +1 -8
  158. package/vite.config.ts +7 -4
  159. package/lib/assets/modules/index-BahGnrAq.js +0 -415
  160. package/lib/assets/modules/index-BoKIa2sr.js +0 -109
  161. package/lib/assets/modules/index-D47Ci-T3.js +0 -107
  162. package/lib/assets/modules/uploadList-Dzlg47V0.js +0 -182
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyfox2000/webui",
3
- "version": "1.0.13",
3
+ "version": "1.2.0",
4
4
  "description": "后台前端通用组件定义",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -30,11 +30,14 @@
30
30
  "build:dts": "vue-tsc -b && vite-dts-declaration",
31
31
  "build:types": "vue-tsc --declaration --emitDeclarationOnly"
32
32
  },
33
- "dependencies": {},
34
33
  "peerDependencies": {
35
34
  "@skyfox2000/fapi": "^1.1.19",
36
- "@skyfox2000/microbase": "^1.0.15",
37
- "@skyfox2000/webbase": "^1.1.18",
35
+ "@skyfox2000/microbase": "^1.2.0",
36
+ "@vue-office/excel": "^1.7.14",
37
+ "@json2csv/plainjs": "^7.0.6",
38
+ "async-validator": "^4.2.5",
39
+ "exceljs": "^4.4.0",
40
+ "ace-builds": "^1.42.0",
38
41
  "ant-design-vue": "^4.2.6",
39
42
  "dayjs": "^1.11.13",
40
43
  "pinia": "^2.3.0",
@@ -43,8 +46,6 @@
43
46
  "vue-draggable-next": "^2.2.1",
44
47
  "vue-m-message": "^4.0.2",
45
48
  "vue-router": "^4.5.1",
46
- "@vue-office/excel": "^1.7.14",
47
- "ace-builds": "^1.42.0",
48
49
  "vue3-ace-editor": "^2.2.4"
49
50
  },
50
51
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  <script lang="ts" setup>
2
2
  import { SERVER_HOST } from '@skyfox2000/fapi';
3
- import { createFromIconfont } from '@skyfox2000/webbase';
3
+ import { createFromIconfont } from '@/utils/icon-loader';
4
4
 
5
5
  const props = defineProps({
6
6
  icon: {
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { onFullscreenClick, useSettingInfo } from '@skyfox2000/webbase';
2
+ import { onFullscreenClick } from '@/index';
3
+ import { useSettingInfo } from '@/stores/settingInfo';
3
4
  import ToolIcon from './toolIcon.vue';
4
5
  const settingStore = useSettingInfo();
5
6
  </script>
@@ -8,7 +8,7 @@
8
8
 
9
9
  import { ref, computed, inject, watch, useAttrs } from 'vue';
10
10
  import Tooltip from '../tooltip/index.vue';
11
- import { getIconTransform } from '@skyfox2000/webbase';
11
+ import { getIconTransform } from '@/utils/icon-loader';
12
12
 
13
13
  // 关闭自动继承属性到根元素
14
14
  defineOptions({
@@ -1,6 +1,6 @@
1
1
  <script lang="ts" setup>
2
2
  import { SERVER_HOST } from '@skyfox2000/fapi';
3
- import { createFromIconfont } from '@skyfox2000/webbase';
3
+ import { createFromIconfont } from '@/utils/icon-loader';
4
4
 
5
5
  const props = defineProps({
6
6
  icon: {
@@ -1,6 +1,6 @@
1
1
  <script lang="ts" setup>
2
2
  import { SERVER_HOST } from '@skyfox2000/fapi';
3
- import { createFromIconfont } from '@skyfox2000/webbase';
3
+ import { createFromIconfont } from '@/utils/icon-loader';
4
4
 
5
5
  const props = defineProps({
6
6
  icon: {
@@ -1,6 +1,6 @@
1
1
  <script lang="ts" setup>
2
2
  import { SERVER_HOST } from '@skyfox2000/fapi';
3
- import { createFromIconfont } from '@skyfox2000/webbase';
3
+ import { createFromIconfont } from '@/utils/icon-loader';
4
4
 
5
5
  const props = defineProps({
6
6
  icon: {
@@ -14,14 +14,14 @@ import {
14
14
  ExcelFileParams,
15
15
  processExcelFile,
16
16
  path,
17
- } from '@skyfox2000/webbase';
17
+ UploadFile,
18
+ } from '@/index';
18
19
  import { AnyData, ResStatus } from '@skyfox2000/fapi';
19
20
  import message from 'vue-m-message';
20
21
  //引入相关样式
21
22
  import type { UploadProps } from 'ant-design-vue';
22
23
  import VueOfficeExcel from '@vue-office/excel';
23
24
  import '@vue-office/excel/lib/index.css';
24
- import { UploadFile } from '@skyfox2000/webbase';
25
25
 
26
26
  type AlertType = 'success' | 'info' | 'warning' | 'error';
27
27
 
@@ -2,7 +2,7 @@
2
2
  import { watch, ref, onMounted, provide } from 'vue';
3
3
  import { Button } from '../../common';
4
4
  import { Modal, Space } from 'ant-design-vue';
5
- import { onFormSave, onFormSaveAs, onFormClose, EditorControl, ProviderKeys } from '@skyfox2000/webbase';
5
+ import { onFormSave, onFormSaveAs, onFormClose, EditorControl, ProviderKeys } from '@/index';
6
6
  import { AnyData } from '@skyfox2000/fapi';
7
7
 
8
8
  const props = defineProps<{
@@ -2,12 +2,10 @@
2
2
  import { watch, ref, onMounted } from 'vue';
3
3
  import { Button } from '../../common';
4
4
  import { Modal, Space } from 'ant-design-vue';
5
- import { AsyncUploader, EditorControl, GridControl, gridRowUpdate } from '@skyfox2000/webbase';
5
+ import { AsyncUploader, EditorControl, GridControl, gridRowUpdate, UploadStatus, UploadFile } from '@/index';
6
6
  import { AnyData, ApiResponse, IUrlInfo, ResStatus } from '@skyfox2000/fapi';
7
7
  import { UploadList } from '../../form';
8
- import { UploadFile } from '@skyfox2000/webbase';
9
8
  import message from 'vue-m-message';
10
- import { UploadStatus } from '@skyfox2000/webbase';
11
9
 
12
10
  const props = defineProps<{
13
11
  /**
@@ -103,7 +101,7 @@ const dialogUpload = async () => {
103
101
  // 开始上传文件
104
102
  await uploader.uploadFiles(
105
103
  fileList.value,
106
- (_) => { },
104
+ (_) => {},
107
105
  (files) => {
108
106
  uploadFormCtrl.isFormLoading.value = false;
109
107
  let err_count = 0;
@@ -185,9 +183,12 @@ const dialogClose = () => {
185
183
  };
186
184
  </script>
187
185
  <template>
188
- <Modal title="文件上传" v-model:open="open"
186
+ <Modal
187
+ title="文件上传"
188
+ v-model:open="open"
189
189
  :wrapClassName="'modal mx-auto ' + ($attrs.width ? 'w-[' + $attrs.width + ']' : 'w-[430px]')"
190
- @close="dialogClose">
190
+ @close="dialogClose"
191
+ >
191
192
  <UploadList v-model:file-list="fileList" :download-url="downloadUrl!" :max-count="maxCount" :file-ext="fileExt" />
192
193
  <template #footer>
193
194
  <Space>
@@ -4,7 +4,7 @@ import { Button } from '../../common';
4
4
  import { Drawer, Space, theme } from 'ant-design-vue';
5
5
  const { useToken } = theme;
6
6
  const { token } = useToken();
7
- import { EditorControl, onFormSave, onFormSaveAs, onFormClose, ProviderKeys } from '@skyfox2000/webbase';
7
+ import { EditorControl, onFormSave, onFormSaveAs, onFormClose, ProviderKeys } from '@/index';
8
8
  import { AnyData } from '@skyfox2000/fapi';
9
9
  import { ToolIcon } from '../../common';
10
10
 
@@ -40,7 +40,7 @@ provide(ProviderKeys.EditorControl, editorCtrl);
40
40
 
41
41
  watch(
42
42
  () => editorCtrl.visible.value,
43
- (newVal) => {
43
+ (newVal: boolean) => {
44
44
  open.value = newVal ?? false;
45
45
  },
46
46
  );
@@ -54,22 +54,40 @@ const drawerClose = () => {
54
54
  };
55
55
  </script>
56
56
  <template>
57
- <Drawer v-model:open="open" :get-container="false" :closable="false" :header-style="{
58
- height: '40px',
59
- padding: '10px 6px 10px 16px',
60
- backgroundColor: token.colorBgLayout,
61
- }" :body-style="{
62
- padding: '10px 16px',
63
- }" :footer-style="{
57
+ <Drawer
58
+ v-model:open="open"
59
+ :get-container="false"
60
+ :closable="false"
61
+ :header-style="{
62
+ height: '40px',
63
+ padding: '10px 6px 10px 16px',
64
+ backgroundColor: token.colorBgLayout,
65
+ }"
66
+ :body-style="{
67
+ padding: '10px 16px',
68
+ }"
69
+ :footer-style="{
64
70
  textAlign: 'right',
65
- }" :style="{
71
+ }"
72
+ :style="{
66
73
  position: 'absolute',
67
74
  boxShadow: 'rgba(0, 0, 0, 0.3) -2px 0px 8px',
68
- }" width="420px" @close="drawerClose">
75
+ }"
76
+ width="420px"
77
+ @close="drawerClose"
78
+ >
69
79
  <template #extra>
70
80
  <div class="hover:bg-gray-200 w-[24px] h-[24px] rounded-md">
71
- <ToolIcon class="top-[-2px] left-[2px] w-6 h-6" icon="icon-new" :angle="45" fontsize="24px" clickable
72
- color="#666" :position="[0, 0]" @click="() => onFormClose(editorCtrl)" />
81
+ <ToolIcon
82
+ class="top-[-2px] left-[2px] w-6 h-6"
83
+ icon="icon-new"
84
+ :angle="45"
85
+ fontsize="24px"
86
+ clickable
87
+ color="#666"
88
+ :position="[0, 0]"
89
+ @click="() => onFormClose(editorCtrl)"
90
+ />
73
91
  </div>
74
92
  </template>
75
93
  <template #default>
@@ -78,13 +96,20 @@ const drawerClose = () => {
78
96
  <template #footer>
79
97
  <Space>
80
98
  <Button @click="() => onFormClose(editorCtrl)" v-if="cancelText !== ''">{{ cancelText ?? '取消' }}</Button>
81
- <Button @click="() => onFormSaveAs(editorCtrl)"
82
- v-if="saveAsText !== '' && editorCtrl.saveAsBtnVisible !== false" type="primary"
83
- :loading="editorCtrl.isFormSaving.value">
99
+ <Button
100
+ @click="() => onFormSaveAs(editorCtrl)"
101
+ v-if="saveAsText !== '' && editorCtrl.saveAsBtnVisible !== false"
102
+ type="primary"
103
+ :loading="editorCtrl.isFormSaving.value"
104
+ >
84
105
  {{ saveAsText ?? '另存为' }}
85
106
  </Button>
86
- <Button @click="() => onFormSave(editorCtrl)" v-if="saveText !== '' && editorCtrl.saveBtnVisible !== false"
87
- type="primary" :loading="editorCtrl.isFormSaving.value">
107
+ <Button
108
+ @click="() => onFormSave(editorCtrl)"
109
+ v-if="saveText !== '' && editorCtrl.saveBtnVisible !== false"
110
+ type="primary"
111
+ :loading="editorCtrl.isFormSaving.value"
112
+ >
88
113
  {{ saveText ?? '保存' }}
89
114
  </Button>
90
115
  </Space>
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { EditorControl, ProviderKeys, useFormItemFactory, ValidateRuleItem } from '@skyfox2000/webbase';
2
+ import { EditorControl, ProviderKeys, useFormItemFactory, ValidateRuleItem } from '@/index';
3
3
  import { FormItem, message } from 'ant-design-vue';
4
4
  import { Helper } from '../../common';
5
5
  import { computed, inject, ref, useAttrs } from 'vue';
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { EditorControl, ProviderKeys, onFormSave } from '@skyfox2000/webbase';
2
+ import { EditorControl, ProviderKeys, onFormSave } from '@/index';
3
3
  import { AnyData } from '@skyfox2000/fapi';
4
4
  import { Form } from 'ant-design-vue';
5
5
  import { inject } from 'vue';
@@ -3,7 +3,7 @@ import { onMounted, ref, watch, useSlots, VNode } from 'vue';
3
3
  import { Form, Space } from 'ant-design-vue';
4
4
  import SearchItem from './searchItem.vue';
5
5
  import { Button } from '../../common';
6
- import { GridControl } from '@skyfox2000/webbase';
6
+ import { GridControl } from '@/index';
7
7
  import { AnyData } from '@skyfox2000/fapi';
8
8
 
9
9
  /**
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { inject, useAttrs } from 'vue';
3
- import { ProviderKeys, EditorControl, useFormItemFactory } from '@skyfox2000/webbase';
3
+ import { ProviderKeys, EditorControl, useFormItemFactory } from '@/index';
4
4
  import { FormItem } from 'ant-design-vue';
5
5
  import { AnyData } from '@skyfox2000/fapi';
6
6
 
@@ -1,7 +1,8 @@
1
1
  <script lang="ts" setup>
2
- import { onMounted, Ref, ref, watch, provide, useAttrs, onActivated } from 'vue';
2
+ import { onMounted, Ref, ref, watch, provide, useAttrs, onActivated, computed } from 'vue';
3
3
  import { Table, TablePaginationConfig, TableProps } from 'ant-design-vue';
4
4
  import {
5
+ AppRouter,
5
6
  gridQueryFind,
6
7
  gridStatusUpdate,
7
8
  PrimaryKey,
@@ -9,13 +10,12 @@ import {
9
10
  gridQueryList,
10
11
  GridControl,
11
12
  filterColumns,
12
- AppRouter,
13
- } from '@skyfox2000/webbase';
13
+ } from '@/index';
14
14
  import TableOperate from './tableOperate.vue';
15
15
  import Toolbar from '../toolbar/index.vue';
16
16
  import Switch from '../../form/switch/index.vue';
17
17
  import { AnyData } from '@skyfox2000/fapi';
18
- import { ProviderKeys } from '@skyfox2000/webbase';
18
+ import { ProviderKeys } from '@/index';
19
19
 
20
20
  const props = defineProps<{
21
21
  /**
@@ -55,6 +55,9 @@ const attrs = useAttrs(); // 手动获取 $attrs
55
55
 
56
56
  const gridCtrl = props.gridCtrl;
57
57
 
58
+ // 响应式获取当前路由路径
59
+ const currentPath = computed(() => AppRouter.currentRoute.value.path);
60
+
58
61
  if (gridCtrl) {
59
62
  gridCtrl.pageNo.value = 1;
60
63
  gridCtrl.total.value = 0;
@@ -199,7 +202,7 @@ onMounted(async () => {
199
202
  <template v-if="gridCtrl && bodyCell?.column?.dataIndex === 'enabled'">
200
203
  <Switch
201
204
  v-model:checked="bodyCell.record.Enabled"
202
- v-auth:disable="{ url: AppRouter.currentRoute.value.path, role: ['Super', 'Admin'], permit: ':enabled' }"
205
+ v-auth:disable="{ url: currentPath, role: ['Super', 'Admin'], permit: ':enabled' }"
203
206
  :disabled="statusDisabled ? statusDisabled(bodyCell.record) : false"
204
207
  :data="OPTIONS.EnableDisable"
205
208
  @click="gridStatusUpdate(gridCtrl, bodyCell.record)"
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts" generic="T">
2
2
  import {
3
+ AppRouter,
3
4
  ButtonTool,
4
5
  getToolGroup,
5
6
  getToolVisible,
@@ -8,9 +9,9 @@ import {
8
9
  onGridRowEdit,
9
10
  onGridRowDelete,
10
11
  GridControl,
11
- AppRouter,
12
- } from '@skyfox2000/webbase';
12
+ } from '@/index';
13
13
  import { ConfigProvider, Button, Space, DropdownButton, Menu, MenuItem, Popconfirm } from 'ant-design-vue';
14
+ import { computed } from 'vue';
14
15
 
15
16
  const props = defineProps<{
16
17
  /**
@@ -25,6 +26,9 @@ const props = defineProps<{
25
26
 
26
27
  const gridCtrl = props.gridCtrl;
27
28
 
29
+ // 响应式获取当前路由路径
30
+ const currentPath = computed(() => AppRouter.currentRoute.value.path);
31
+
28
32
  /// 兼容其它按钮操作参数
29
33
  const defaultOperates: ButtonTool[] = [
30
34
  {
@@ -96,7 +100,7 @@ const disabled = (item: ButtonTool): boolean => {
96
100
  :danger="item.danger"
97
101
  v-if="getToolVisible(item, props.record)"
98
102
  :disabled="disabled(item)"
99
- v-auth="{ url: AppRouter.currentRoute.value.path, role: item.role, permit: item.permit }"
103
+ v-auth="{ url: currentPath, role: item.role, permit: item.permit }"
100
104
  @click="onToolClicked(item, gridCtrl.page, gridCtrl, props.record)"
101
105
  size="small"
102
106
  :style="{
@@ -117,7 +121,7 @@ const disabled = (item: ButtonTool): boolean => {
117
121
  <MenuItem
118
122
  v-if="getToolVisible(item, props.record)"
119
123
  :disabled="disabled(item)"
120
- v-auth="{ url: AppRouter.currentRoute.value.path, role: item.role, permit: item.permit }"
124
+ v-auth="{ url: currentPath, role: item.role, permit: item.permit }"
121
125
  @click="onToolClicked(item, gridCtrl.page, gridCtrl, props.record)"
122
126
  >
123
127
  {{ item.label }}
@@ -6,14 +6,14 @@ import {
6
6
  AppRouter,
7
7
  filterColumns,
8
8
  onColumnVisibleChanged,
9
- useSettingInfo,
10
9
  getToolStatus,
11
10
  getToolByKey,
12
11
  getToolVisible,
13
12
  useToolFactory,
14
13
  onToolClicked,
15
14
  GridControl,
16
- } from '@skyfox2000/webbase';
15
+ useSettingInfo,
16
+ } from '@/index';
17
17
  import { Button, ToolIcon } from '../../common';
18
18
  import { Dropdown, Menu, MenuItem } from 'ant-design-vue';
19
19
 
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts" generic="T">
2
2
  import {
3
+ AppRouter,
3
4
  ButtonTool,
4
5
  EditorControl,
5
6
  GridControl,
@@ -7,12 +8,11 @@ import {
7
8
  getToolStatus,
8
9
  onToolClicked,
9
10
  openNewForm,
10
- AppRouter,
11
- } from '@skyfox2000/webbase';
11
+ } from '@/index';
12
12
  import { Dropdown, Menu, MenuItem, Space } from 'ant-design-vue';
13
13
  import { Button } from '../../common';
14
14
  import IconTool from './icontool.vue';
15
- import { ref, watch } from 'vue';
15
+ import { ref, watch, computed } from 'vue';
16
16
 
17
17
  const props = defineProps<{
18
18
  /**
@@ -29,6 +29,9 @@ const gridCtrl = props.gridCtrl;
29
29
  const pageCtrl = gridCtrl.page;
30
30
  const editorCtrl = props.editorCtrl;
31
31
 
32
+ // 响应式获取当前路由路径
33
+ const currentPath = computed(() => AppRouter.currentRoute.value.path);
34
+
32
35
  const defaultButtons: ButtonTool[] = [
33
36
  {
34
37
  key: 'New',
@@ -69,6 +72,7 @@ watch(
69
72
  <template>
70
73
  <div class="flex justify-between mb-[10px]">
71
74
  <Space>
75
+ {{ currentPath }}
72
76
  <Button
73
77
  v-for="item in ToolbarButtons"
74
78
  :key="item.key"
@@ -76,7 +80,7 @@ watch(
76
80
  :danger="item.danger"
77
81
  :disabled="getToolStatus(item)"
78
82
  :icon="item.icon"
79
- v-auth="{ url: AppRouter.currentRoute.value.path, role: item.role, permit: item.permit }"
83
+ v-auth="{ url: currentPath, role: item.role, permit: item.permit }"
80
84
  @click="onToolClicked(item, pageCtrl, gridCtrl)"
81
85
  >
82
86
  {{ item.label }}
@@ -88,7 +92,7 @@ watch(
88
92
  v-for="item in ToolbarMenus"
89
93
  :key="item.key"
90
94
  :disabled="getToolStatus(item)"
91
- v-auth="{ url: AppRouter.currentRoute.value.path, role: item.role, permit: item.permit }"
95
+ v-auth="{ url: currentPath, role: item.role, permit: item.permit }"
92
96
  @click="onToolClicked(item, pageCtrl, gridCtrl)"
93
97
  >
94
98
  {{ item.label }}
@@ -2,7 +2,7 @@
2
2
  import { onMounted, ref, useAttrs, watch } from 'vue';
3
3
  import { Tree } from 'ant-design-vue';
4
4
  import { ToolIcon } from '../../common';
5
- import { TreeControl, TreeNode, queryTree } from '@skyfox2000/webbase';
5
+ import { TreeControl, TreeNode, queryTree } from '@/index';
6
6
  import { TreeDataNode } from 'ant-design-vue/es/vc-tree-select/interface';
7
7
  import { EventDataNode } from 'ant-design-vue/es/vc-tree/interface';
8
8
  import { fieldMapping } from '@skyfox2000/fapi';
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
+ import { AppRouter } from '@/index';
2
3
  import { Result, Button } from 'ant-design-vue';
3
- import { AppRouter } from '@skyfox2000/webbase';
4
4
  const onClicked = () => {
5
5
  AppRouter.back();
6
6
  };
@@ -11,4 +11,4 @@ const onClicked = () => {
11
11
  <Button type="primary" @click="onClicked">点击返回</Button>
12
12
  </template>
13
13
  </Result>
14
- </template>
14
+ </template>
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
+ import { AppRouter } from '@/index';
2
3
  import { Result, Button } from 'ant-design-vue';
3
- import { AppRouter } from '@skyfox2000/webbase';
4
4
  const onClicked = () => {
5
5
  AppRouter.back();
6
6
  };
@@ -11,4 +11,4 @@ const onClicked = () => {
11
11
  <Button type="primary" @click="onClicked">点击返回</Button>
12
12
  </template>
13
13
  </Result>
14
- </template>
14
+ </template>
@@ -12,7 +12,7 @@ import {
12
12
  getSelectedLabels,
13
13
  formValidate,
14
14
  outFormDataFields,
15
- } from '@skyfox2000/webbase';
15
+ } from '@/index';
16
16
  import { ReqParams, IUrlInfo } from '@skyfox2000/fapi';
17
17
 
18
18
  const props = defineProps({
@@ -8,7 +8,7 @@ import {
8
8
  loadOption,
9
9
  unloadOption,
10
10
  formValidate,
11
- } from '@skyfox2000/webbase';
11
+ } from '@/index';
12
12
  import { Cascader } from 'ant-design-vue';
13
13
  import { DefaultOptionType, ValueType } from 'ant-design-vue/es/vc-cascader/Cascader';
14
14
  import { IUrlInfo } from '@skyfox2000/fapi';
@@ -42,7 +42,6 @@ watch(
42
42
  { immediate: true },
43
43
  );
44
44
 
45
-
46
45
  const emit = defineEmits(['change', 'update:labels', 'update:value']);
47
46
  inputFactory.inputEmit = emit;
48
47
  /**
@@ -10,9 +10,9 @@ import {
10
10
  SelectValue,
11
11
  unloadOption,
12
12
  useInputFactory,
13
- } from '@skyfox2000/webbase';
13
+ OptionCommProps,
14
+ } from '@/index';
14
15
  import { CheckboxValueType } from 'ant-design-vue/es/checkbox/interface';
15
- import { OptionCommProps } from '@skyfox2000/webbase';
16
16
  import { IUrlInfo } from '@skyfox2000/fapi';
17
17
 
18
18
  const props = defineProps({
@@ -83,14 +83,20 @@ onUnmounted(() => {
83
83
  </div> -->
84
84
  <CheckboxGroup @change="onChanged" class="w-full mb-[-3px]" v-bind="attrs">
85
85
  <template v-if="checkboxOptions.length > 0">
86
- <Checkbox v-for="item in checkboxOptions" :key="item.value" :value="item.value"
87
- :disabled="item.disabled || (item.value && disabledItems && disabledItems.indexOf(item.value.toString()) > -1)"
86
+ <Checkbox
87
+ v-for="item in checkboxOptions"
88
+ :key="item.value"
89
+ :value="item.value"
90
+ :disabled="
91
+ item.disabled || (item.value && disabledItems && disabledItems.indexOf(item.value.toString()) > -1)
92
+ "
88
93
  :class="[
89
94
  errInfo?.errClass === 'error' ? 'error !text-red-400' : '',
90
95
  'text-nowrap',
91
96
  'pb-1',
92
97
  wrap ? `w-1/${props.wrap}` : '',
93
- ]">
98
+ ]"
99
+ >
94
100
  {{ item.label }}
95
101
  </Checkbox>
96
102
  </template>
@@ -2,7 +2,7 @@
2
2
  import { ref } from 'vue';
3
3
  import { DatePicker } from 'ant-design-vue';
4
4
  import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
5
- import { formValidate, useInputFactory } from '@skyfox2000/webbase';
5
+ import { formValidate, useInputFactory } from '@/index';
6
6
  const props = defineProps<{
7
7
  valueFormat?: string;
8
8
  }>();
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { formValidate, useInputFactory } from '@skyfox2000/webbase';
2
+ import { formValidate, useInputFactory } from '@/index';
3
3
  import { Input } from 'ant-design-vue';
4
4
  import { ref, watch } from 'vue';
5
5
 
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { formValidate, useInputFactory } from '@skyfox2000/webbase';
2
+ import { formValidate, useInputFactory } from '@/index';
3
3
  import { InputNumber } from 'ant-design-vue';
4
4
 
5
5
  const { editorCtrl, labelText, errInfo } = useInputFactory();
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { formValidate, useInputFactory } from '@skyfox2000/webbase';
2
+ import { formValidate, useInputFactory } from '@/index';
3
3
  import { InputPassword } from 'ant-design-vue';
4
4
 
5
5
  const { editorCtrl, labelText, errInfo } = useInputFactory();
@@ -10,7 +10,7 @@ import {
10
10
  useInputFactory,
11
11
  getSelectedLabels,
12
12
  SelectValue,
13
- } from '@skyfox2000/webbase';
13
+ } from '@/index';
14
14
  import { IUrlInfo } from '@skyfox2000/fapi';
15
15
 
16
16
  const props = defineProps({
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { ref, PropType } from 'vue';
3
3
  import Radio from './index.vue';
4
- import { OPTIONS } from '@skyfox2000/webbase';
4
+ import { OPTIONS } from '@/index';
5
5
 
6
6
  const props = defineProps({
7
7
  /**
@@ -2,7 +2,7 @@
2
2
  import { computed } from 'vue';
3
3
  import { RangePicker } from 'ant-design-vue';
4
4
  import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
5
- import { useInputFactory } from '@skyfox2000/webbase';
5
+ import { useInputFactory } from '@/index';
6
6
  import dayjs, { Dayjs } from 'dayjs';
7
7
 
8
8
  const props = withDefaults(
@@ -14,7 +14,7 @@ import {
14
14
  formValidate,
15
15
  OPTIONS,
16
16
  isEmpty,
17
- } from '@skyfox2000/webbase';
17
+ } from '@/index';
18
18
  import { IUrlInfo } from '@skyfox2000/fapi';
19
19
 
20
20
  type SelectValueType = string | number | string[] | number[] | null;