@skyfox2000/webui 1.0.9 → 1.0.10

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/lib/webui.es.js CHANGED
@@ -452,6 +452,7 @@ const _a = /* @__PURE__ */ C({
452
452
  label: "编辑",
453
453
  type: "primary",
454
454
  visible: !0,
455
+ role: ["Super", "Admin"],
455
456
  permit: ":edit",
456
457
  click: () => Re(a, r.record)
457
458
  },
@@ -461,6 +462,7 @@ const _a = /* @__PURE__ */ C({
461
462
  type: "primary",
462
463
  visible: !0,
463
464
  danger: !0,
465
+ role: ["Super", "Admin"],
464
466
  permit: ":delete",
465
467
  confirm: !0,
466
468
  confirmText: "是否删除此记录?",
@@ -753,6 +755,7 @@ const _a = /* @__PURE__ */ C({
753
755
  type: "primary",
754
756
  icon: "icon-new",
755
757
  danger: !0,
758
+ role: ["Super", "Admin"],
756
759
  permit: ":new",
757
760
  // 默认仅受权限码控制
758
761
  click: () => je(o)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyfox2000/webui",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "后台前端通用组件定义",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -31,6 +31,7 @@ const defaultOperates: ButtonTool[] = [
31
31
  label: '编辑',
32
32
  type: 'primary',
33
33
  visible: true,
34
+ role: ['Super', 'Admin'],
34
35
  permit: ':edit',
35
36
  click: () => onGridRowEdit<T>(gridCtrl, props.record as T),
36
37
  },
@@ -40,6 +41,7 @@ const defaultOperates: ButtonTool[] = [
40
41
  type: 'primary',
41
42
  visible: true,
42
43
  danger: true,
44
+ role: ['Super', 'Admin'],
43
45
  permit: ':delete',
44
46
  confirm: true,
45
47
  confirmText: '是否删除此记录?',
@@ -35,6 +35,7 @@ const defaultButtons: ButtonTool[] = [
35
35
  type: 'primary',
36
36
  icon: 'icon-new',
37
37
  danger: true,
38
+ role: ['Super', 'Admin'],
38
39
  permit: ':new', // 默认仅受权限码控制
39
40
  click: () => {
40
41
  return openNewForm(editorCtrl);