@skyfox2000/webui 1.0.10 → 1.0.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyfox2000/webui",
3
- "version": "1.0.10",
3
+ "version": "1.0.13",
4
4
  "description": "后台前端通用组件定义",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -34,7 +34,7 @@
34
34
  "peerDependencies": {
35
35
  "@skyfox2000/fapi": "^1.1.19",
36
36
  "@skyfox2000/microbase": "^1.0.15",
37
- "@skyfox2000/webbase": "^1.1.15",
37
+ "@skyfox2000/webbase": "^1.1.18",
38
38
  "ant-design-vue": "^4.2.6",
39
39
  "dayjs": "^1.11.13",
40
40
  "pinia": "^2.3.0",
@@ -9,6 +9,7 @@ import {
9
9
  gridQueryList,
10
10
  GridControl,
11
11
  filterColumns,
12
+ AppRouter,
12
13
  } from '@skyfox2000/webbase';
13
14
  import TableOperate from './tableOperate.vue';
14
15
  import Toolbar from '../toolbar/index.vue';
@@ -198,8 +199,7 @@ onMounted(async () => {
198
199
  <template v-if="gridCtrl && bodyCell?.column?.dataIndex === 'enabled'">
199
200
  <Switch
200
201
  v-model:checked="bodyCell.record.Enabled"
201
- v-role="['Super', 'Admin']"
202
- v-permit:disable="':enabled'"
202
+ v-auth:disable="{ url: AppRouter.currentRoute.value.path, role: ['Super', 'Admin'], permit: ':enabled' }"
203
203
  :disabled="statusDisabled ? statusDisabled(bodyCell.record) : false"
204
204
  :data="OPTIONS.EnableDisable"
205
205
  @click="gridStatusUpdate(gridCtrl, bodyCell.record)"
@@ -8,6 +8,7 @@ import {
8
8
  onGridRowEdit,
9
9
  onGridRowDelete,
10
10
  GridControl,
11
+ AppRouter,
11
12
  } from '@skyfox2000/webbase';
12
13
  import { ConfigProvider, Button, Space, DropdownButton, Menu, MenuItem, Popconfirm } from 'ant-design-vue';
13
14
 
@@ -95,8 +96,7 @@ const disabled = (item: ButtonTool): boolean => {
95
96
  :danger="item.danger"
96
97
  v-if="getToolVisible(item, props.record)"
97
98
  :disabled="disabled(item)"
98
- v-role="item.role"
99
- v-permit="item.permit"
99
+ v-auth="{ url: AppRouter.currentRoute.value.path, role: item.role, permit: item.permit }"
100
100
  @click="onToolClicked(item, gridCtrl.page, gridCtrl, props.record)"
101
101
  size="small"
102
102
  :style="{
@@ -117,8 +117,7 @@ const disabled = (item: ButtonTool): boolean => {
117
117
  <MenuItem
118
118
  v-if="getToolVisible(item, props.record)"
119
119
  :disabled="disabled(item)"
120
- v-role="item.role"
121
- v-permit="item.permit"
120
+ v-auth="{ url: AppRouter.currentRoute.value.path, role: item.role, permit: item.permit }"
122
121
  @click="onToolClicked(item, gridCtrl.page, gridCtrl, props.record)"
123
122
  >
124
123
  {{ item.label }}
@@ -7,6 +7,7 @@ import {
7
7
  getToolStatus,
8
8
  onToolClicked,
9
9
  openNewForm,
10
+ AppRouter,
10
11
  } from '@skyfox2000/webbase';
11
12
  import { Dropdown, Menu, MenuItem, Space } from 'ant-design-vue';
12
13
  import { Button } from '../../common';
@@ -75,8 +76,7 @@ watch(
75
76
  :danger="item.danger"
76
77
  :disabled="getToolStatus(item)"
77
78
  :icon="item.icon"
78
- v-role="item.role"
79
- v-permit="item.permit"
79
+ v-auth="{ url: AppRouter.currentRoute.value.path, role: item.role, permit: item.permit }"
80
80
  @click="onToolClicked(item, pageCtrl, gridCtrl)"
81
81
  >
82
82
  {{ item.label }}
@@ -88,8 +88,7 @@ watch(
88
88
  v-for="item in ToolbarMenus"
89
89
  :key="item.key"
90
90
  :disabled="getToolStatus(item)"
91
- v-role="item.role"
92
- v-permit="item.permit"
91
+ v-auth="{ url: AppRouter.currentRoute.value.path, role: item.role, permit: item.permit }"
93
92
  @click="onToolClicked(item, pageCtrl, gridCtrl)"
94
93
  >
95
94
  {{ item.label }}