@panpanzhao/component-ui 0.0.21 → 0.0.22

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.
@@ -1 +1 @@
1
- .table .el-table__fixed{height:100%!important}.table .el-radio .el-radio__label{padding-left:0}.tool{white-space:nowrap}.tool .el-button+.el-button,.tool .el-button+.el-dropdown,.tool .el-link+.el-dropdown,.tool .el-link+.el-link{margin-left:10px}.table-page_tools{text-align:center}
1
+ .table .el-table__fixed{height:100%!important}.table .el-radio .el-radio__label{padding-left:0}.table .tool{white-space:nowrap}.table .tool .el-button+.el-button,.table .tool .el-button+.el-dropdown,.table .tool .el-link+.el-dropdown,.table .tool .el-link+.el-link{margin-left:10px}.table__body{margin:5px 0}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.uuid = void 0;
4
+ exports.uuid = exports.isPermission = void 0;
5
5
  // 参考 https://github.com/streamich/v4-uuid
6
6
  var str = function str() {
7
7
  return ('00000000000000000' + (Math.random() * 0xffffffffffffffff).toString(16)).slice(-16);
@@ -11,4 +11,11 @@ var uuid = function uuid() {
11
11
  var b = str();
12
12
  return a.slice(0, 8) + '-' + a.slice(8, 12) + '-4' + a.slice(13) + '-a' + b.slice(1, 4) + '-' + b.slice(4);
13
13
  };
14
- exports.uuid = uuid;
14
+ exports.uuid = uuid;
15
+ var isPermission = function isPermission(code, permission) {
16
+ if (!code || !permission) {
17
+ return true;
18
+ }
19
+ return permission.includes(code);
20
+ };
21
+ exports.isPermission = isPermission;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panpanzhao/component-ui",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "A Component Library for Vue.js.",
5
5
  "main": "lib/component-ui.common.js",
6
6
  "unpkg": "lib/index.js",