bl-common-vue3 0.0.55 → 0.0.56

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.
@@ -84333,6 +84333,238 @@ var es_string_split = __webpack_require__("1276");
84333
84333
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js
84334
84334
  var es_string_match = __webpack_require__("466d");
84335
84335
 
84336
+ // CONCATENATED MODULE: ./node_modules/ant-design-vue/es/notification/index.js
84337
+
84338
+
84339
+
84340
+
84341
+
84342
+
84343
+
84344
+
84345
+ var notificationInstance = {};
84346
+ var notification_defaultDuration = 4.5;
84347
+ var notification_defaultTop = '24px';
84348
+ var defaultBottom = '24px';
84349
+ var defaultPlacement = 'topRight';
84350
+
84351
+ var defaultGetContainer = function defaultGetContainer() {
84352
+ return document.body;
84353
+ };
84354
+
84355
+ var defaultCloseIcon = null;
84356
+
84357
+ function setNotificationConfig(options) {
84358
+ var duration = options.duration,
84359
+ placement = options.placement,
84360
+ bottom = options.bottom,
84361
+ top = options.top,
84362
+ getContainer = options.getContainer,
84363
+ closeIcon = options.closeIcon;
84364
+
84365
+ if (duration !== undefined) {
84366
+ notification_defaultDuration = duration;
84367
+ }
84368
+
84369
+ if (placement !== undefined) {
84370
+ defaultPlacement = placement;
84371
+ }
84372
+
84373
+ if (bottom !== undefined) {
84374
+ defaultBottom = typeof bottom === 'number' ? "".concat(bottom, "px") : bottom;
84375
+ }
84376
+
84377
+ if (top !== undefined) {
84378
+ notification_defaultTop = typeof top === 'number' ? "".concat(top, "px") : top;
84379
+ }
84380
+
84381
+ if (getContainer !== undefined) {
84382
+ defaultGetContainer = getContainer;
84383
+ }
84384
+
84385
+ if (closeIcon !== undefined) {
84386
+ defaultCloseIcon = closeIcon;
84387
+ }
84388
+ }
84389
+
84390
+ function getPlacementStyle(placement) {
84391
+ var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : notification_defaultTop;
84392
+ var bottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultBottom;
84393
+ var style;
84394
+
84395
+ switch (placement) {
84396
+ case 'topLeft':
84397
+ style = {
84398
+ left: '0px',
84399
+ top: top,
84400
+ bottom: 'auto'
84401
+ };
84402
+ break;
84403
+
84404
+ case 'topRight':
84405
+ style = {
84406
+ right: '0px',
84407
+ top: top,
84408
+ bottom: 'auto'
84409
+ };
84410
+ break;
84411
+
84412
+ case 'bottomLeft':
84413
+ style = {
84414
+ left: '0px',
84415
+ top: 'auto',
84416
+ bottom: bottom
84417
+ };
84418
+ break;
84419
+
84420
+ default:
84421
+ style = {
84422
+ right: '0px',
84423
+ top: 'auto',
84424
+ bottom: bottom
84425
+ };
84426
+ break;
84427
+ }
84428
+
84429
+ return style;
84430
+ }
84431
+
84432
+ function getNotificationInstance(_ref, callback) {
84433
+ var prefixCls = _ref.prefixCls,
84434
+ _ref$placement = _ref.placement,
84435
+ placement = _ref$placement === void 0 ? defaultPlacement : _ref$placement,
84436
+ _ref$getContainer = _ref.getContainer,
84437
+ getContainer = _ref$getContainer === void 0 ? defaultGetContainer : _ref$getContainer,
84438
+ top = _ref.top,
84439
+ bottom = _ref.bottom,
84440
+ _ref$closeIcon = _ref.closeIcon,
84441
+ _closeIcon = _ref$closeIcon === void 0 ? defaultCloseIcon : _ref$closeIcon;
84442
+
84443
+ var cacheKey = "".concat(prefixCls, "-").concat(placement);
84444
+
84445
+ if (notificationInstance[cacheKey]) {
84446
+ callback(notificationInstance[cacheKey]);
84447
+ return;
84448
+ }
84449
+
84450
+ vc_notification.newInstance({
84451
+ prefixCls: prefixCls,
84452
+ class: "".concat(prefixCls, "-").concat(placement),
84453
+ style: getPlacementStyle(placement, top, bottom),
84454
+ getContainer: getContainer,
84455
+ closeIcon: function closeIcon() {
84456
+ var closeIconToRender = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("span", {
84457
+ "class": "".concat(prefixCls, "-close-x")
84458
+ }, [_closeIcon || Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(CloseOutlined["a" /* default */], {
84459
+ "class": "".concat(prefixCls, "-close-icon")
84460
+ }, null)]);
84461
+
84462
+ return closeIconToRender;
84463
+ }
84464
+ }, function (notification) {
84465
+ notificationInstance[cacheKey] = notification;
84466
+ callback(notification);
84467
+ });
84468
+ }
84469
+
84470
+ var typeToIcon = {
84471
+ success: icons_CheckCircleOutlined,
84472
+ info: icons_InfoCircleOutlined,
84473
+ error: icons_CloseCircleOutlined,
84474
+ warning: icons_ExclamationCircleOutlined
84475
+ };
84476
+
84477
+ function notification_notice(args) {
84478
+ var icon = args.icon,
84479
+ type = args.type,
84480
+ description = args.description,
84481
+ message = args.message,
84482
+ btn = args.btn;
84483
+ var outerPrefixCls = args.prefixCls || 'ant-notification';
84484
+ var prefixCls = "".concat(outerPrefixCls, "-notice");
84485
+ var duration = args.duration === undefined ? notification_defaultDuration : args.duration;
84486
+ var iconNode = null;
84487
+
84488
+ if (icon) {
84489
+ iconNode = function iconNode() {
84490
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("span", {
84491
+ "class": "".concat(prefixCls, "-icon")
84492
+ }, [icon]);
84493
+ };
84494
+ } else if (type) {
84495
+ var Icon = typeToIcon[type];
84496
+
84497
+ iconNode = function iconNode() {
84498
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(Icon, {
84499
+ "class": "".concat(prefixCls, "-icon ").concat(prefixCls, "-icon-").concat(type)
84500
+ }, null);
84501
+ };
84502
+ }
84503
+
84504
+ var placement = args.placement,
84505
+ top = args.top,
84506
+ bottom = args.bottom,
84507
+ getContainer = args.getContainer,
84508
+ closeIcon = args.closeIcon;
84509
+ getNotificationInstance({
84510
+ prefixCls: outerPrefixCls,
84511
+ placement: placement,
84512
+ top: top,
84513
+ bottom: bottom,
84514
+ getContainer: getContainer,
84515
+ closeIcon: closeIcon
84516
+ }, function (notification) {
84517
+ notification.notice({
84518
+ content: function content() {
84519
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("div", {
84520
+ "class": iconNode ? "".concat(prefixCls, "-with-icon") : ''
84521
+ }, [iconNode && iconNode(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("div", {
84522
+ "class": "".concat(prefixCls, "-message")
84523
+ }, [!description && iconNode ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("span", {
84524
+ "class": "".concat(prefixCls, "-message-single-line-auto-margin")
84525
+ }, null) : null, message]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("div", {
84526
+ "class": "".concat(prefixCls, "-description")
84527
+ }, [description]), btn ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("span", {
84528
+ "class": "".concat(prefixCls, "-btn")
84529
+ }, [btn]) : null]);
84530
+ },
84531
+ duration: duration,
84532
+ closable: true,
84533
+ onClose: args.onClose,
84534
+ onClick: args.onClick,
84535
+ key: args.key,
84536
+ style: args.style || {},
84537
+ class: args.class
84538
+ });
84539
+ });
84540
+ }
84541
+
84542
+ var apiBase = {
84543
+ open: notification_notice,
84544
+ close: function close(key) {
84545
+ Object.keys(notificationInstance).forEach(function (cacheKey) {
84546
+ return notificationInstance[cacheKey].removeNotice(key);
84547
+ });
84548
+ },
84549
+ config: setNotificationConfig,
84550
+ destroy: function destroy() {
84551
+ Object.keys(notificationInstance).forEach(function (cacheKey) {
84552
+ notificationInstance[cacheKey].destroy();
84553
+ delete notificationInstance[cacheKey];
84554
+ });
84555
+ }
84556
+ };
84557
+ var notification_api = apiBase;
84558
+ var iconTypes = ['success', 'info', 'warning', 'error'];
84559
+ iconTypes.forEach(function (type) {
84560
+ notification_api[type] = function (args) {
84561
+ return notification_api.open(Object(esm_extends["a" /* default */])(Object(esm_extends["a" /* default */])({}, args), {
84562
+ type: type
84563
+ }));
84564
+ };
84565
+ });
84566
+ notification_api.warn = notification_api.warning;
84567
+ /* harmony default export */ var es_notification = (notification_api);
84336
84568
  // CONCATENATED MODULE: ./src/common/utils/util.js
84337
84569
 
84338
84570
 
@@ -84346,6 +84578,7 @@ var es_string_match = __webpack_require__("466d");
84346
84578
 
84347
84579
 
84348
84580
 
84581
+
84349
84582
  var utils = {
84350
84583
  numberReg: /^\d+(\.\d+)?$/,
84351
84584
  // 数字验证正则
@@ -84495,14 +84728,19 @@ var utils = {
84495
84728
 
84496
84729
  /**
84497
84730
  * 获取按钮权限
84731
+ * action= [alias, actionKey, action]
84498
84732
  * alias 权限路由alias
84499
84733
  * actionKey 所属权限key
84500
84734
  * action 权限字段
84501
84735
  */
84502
- getBtnPermission: function getBtnPermission(_ref) {
84503
- var alias = _ref.alias,
84504
- actionKey = _ref.actionKey,
84505
- action = _ref.action;
84736
+ getBtnPermission: function getBtnPermission(action) {
84737
+ if (!action || !Array.isArray(action) || action.length < 3) {
84738
+ es_notification.error({
84739
+ message: "错误",
84740
+ description: "v-action格式错误"
84741
+ });
84742
+ return true;
84743
+ }
84506
84744
 
84507
84745
  if (!utils.BTN_PERMISSION || !Object.keys(utils.BTN_PERMISSION).length) {
84508
84746
  utils.BTN_PERMISSION = utils.getCommonLocal("BTN_PERMISSION");
@@ -84510,7 +84748,7 @@ var utils = {
84510
84748
 
84511
84749
  var permisson = utils.BTN_PERMISSION;
84512
84750
 
84513
- if (permisson && permisson[alias] && permisson[alias][actionKey] && permisson[alias][actionKey].includes(action)) {
84751
+ if (permisson && permisson[action[0]] && permisson[action[0]][action[1]] && permisson[action[0]][action[1]].includes(action[2])) {
84514
84752
  return true;
84515
84753
  }
84516
84754
 
@@ -84342,6 +84342,238 @@ var es_string_split = __webpack_require__("1276");
84342
84342
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js
84343
84343
  var es_string_match = __webpack_require__("466d");
84344
84344
 
84345
+ // CONCATENATED MODULE: ./node_modules/ant-design-vue/es/notification/index.js
84346
+
84347
+
84348
+
84349
+
84350
+
84351
+
84352
+
84353
+
84354
+ var notificationInstance = {};
84355
+ var notification_defaultDuration = 4.5;
84356
+ var notification_defaultTop = '24px';
84357
+ var defaultBottom = '24px';
84358
+ var defaultPlacement = 'topRight';
84359
+
84360
+ var defaultGetContainer = function defaultGetContainer() {
84361
+ return document.body;
84362
+ };
84363
+
84364
+ var defaultCloseIcon = null;
84365
+
84366
+ function setNotificationConfig(options) {
84367
+ var duration = options.duration,
84368
+ placement = options.placement,
84369
+ bottom = options.bottom,
84370
+ top = options.top,
84371
+ getContainer = options.getContainer,
84372
+ closeIcon = options.closeIcon;
84373
+
84374
+ if (duration !== undefined) {
84375
+ notification_defaultDuration = duration;
84376
+ }
84377
+
84378
+ if (placement !== undefined) {
84379
+ defaultPlacement = placement;
84380
+ }
84381
+
84382
+ if (bottom !== undefined) {
84383
+ defaultBottom = typeof bottom === 'number' ? "".concat(bottom, "px") : bottom;
84384
+ }
84385
+
84386
+ if (top !== undefined) {
84387
+ notification_defaultTop = typeof top === 'number' ? "".concat(top, "px") : top;
84388
+ }
84389
+
84390
+ if (getContainer !== undefined) {
84391
+ defaultGetContainer = getContainer;
84392
+ }
84393
+
84394
+ if (closeIcon !== undefined) {
84395
+ defaultCloseIcon = closeIcon;
84396
+ }
84397
+ }
84398
+
84399
+ function getPlacementStyle(placement) {
84400
+ var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : notification_defaultTop;
84401
+ var bottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultBottom;
84402
+ var style;
84403
+
84404
+ switch (placement) {
84405
+ case 'topLeft':
84406
+ style = {
84407
+ left: '0px',
84408
+ top: top,
84409
+ bottom: 'auto'
84410
+ };
84411
+ break;
84412
+
84413
+ case 'topRight':
84414
+ style = {
84415
+ right: '0px',
84416
+ top: top,
84417
+ bottom: 'auto'
84418
+ };
84419
+ break;
84420
+
84421
+ case 'bottomLeft':
84422
+ style = {
84423
+ left: '0px',
84424
+ top: 'auto',
84425
+ bottom: bottom
84426
+ };
84427
+ break;
84428
+
84429
+ default:
84430
+ style = {
84431
+ right: '0px',
84432
+ top: 'auto',
84433
+ bottom: bottom
84434
+ };
84435
+ break;
84436
+ }
84437
+
84438
+ return style;
84439
+ }
84440
+
84441
+ function getNotificationInstance(_ref, callback) {
84442
+ var prefixCls = _ref.prefixCls,
84443
+ _ref$placement = _ref.placement,
84444
+ placement = _ref$placement === void 0 ? defaultPlacement : _ref$placement,
84445
+ _ref$getContainer = _ref.getContainer,
84446
+ getContainer = _ref$getContainer === void 0 ? defaultGetContainer : _ref$getContainer,
84447
+ top = _ref.top,
84448
+ bottom = _ref.bottom,
84449
+ _ref$closeIcon = _ref.closeIcon,
84450
+ _closeIcon = _ref$closeIcon === void 0 ? defaultCloseIcon : _ref$closeIcon;
84451
+
84452
+ var cacheKey = "".concat(prefixCls, "-").concat(placement);
84453
+
84454
+ if (notificationInstance[cacheKey]) {
84455
+ callback(notificationInstance[cacheKey]);
84456
+ return;
84457
+ }
84458
+
84459
+ vc_notification.newInstance({
84460
+ prefixCls: prefixCls,
84461
+ class: "".concat(prefixCls, "-").concat(placement),
84462
+ style: getPlacementStyle(placement, top, bottom),
84463
+ getContainer: getContainer,
84464
+ closeIcon: function closeIcon() {
84465
+ var closeIconToRender = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("span", {
84466
+ "class": "".concat(prefixCls, "-close-x")
84467
+ }, [_closeIcon || Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(CloseOutlined["a" /* default */], {
84468
+ "class": "".concat(prefixCls, "-close-icon")
84469
+ }, null)]);
84470
+
84471
+ return closeIconToRender;
84472
+ }
84473
+ }, function (notification) {
84474
+ notificationInstance[cacheKey] = notification;
84475
+ callback(notification);
84476
+ });
84477
+ }
84478
+
84479
+ var typeToIcon = {
84480
+ success: icons_CheckCircleOutlined,
84481
+ info: icons_InfoCircleOutlined,
84482
+ error: icons_CloseCircleOutlined,
84483
+ warning: icons_ExclamationCircleOutlined
84484
+ };
84485
+
84486
+ function notification_notice(args) {
84487
+ var icon = args.icon,
84488
+ type = args.type,
84489
+ description = args.description,
84490
+ message = args.message,
84491
+ btn = args.btn;
84492
+ var outerPrefixCls = args.prefixCls || 'ant-notification';
84493
+ var prefixCls = "".concat(outerPrefixCls, "-notice");
84494
+ var duration = args.duration === undefined ? notification_defaultDuration : args.duration;
84495
+ var iconNode = null;
84496
+
84497
+ if (icon) {
84498
+ iconNode = function iconNode() {
84499
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("span", {
84500
+ "class": "".concat(prefixCls, "-icon")
84501
+ }, [icon]);
84502
+ };
84503
+ } else if (type) {
84504
+ var Icon = typeToIcon[type];
84505
+
84506
+ iconNode = function iconNode() {
84507
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(Icon, {
84508
+ "class": "".concat(prefixCls, "-icon ").concat(prefixCls, "-icon-").concat(type)
84509
+ }, null);
84510
+ };
84511
+ }
84512
+
84513
+ var placement = args.placement,
84514
+ top = args.top,
84515
+ bottom = args.bottom,
84516
+ getContainer = args.getContainer,
84517
+ closeIcon = args.closeIcon;
84518
+ getNotificationInstance({
84519
+ prefixCls: outerPrefixCls,
84520
+ placement: placement,
84521
+ top: top,
84522
+ bottom: bottom,
84523
+ getContainer: getContainer,
84524
+ closeIcon: closeIcon
84525
+ }, function (notification) {
84526
+ notification.notice({
84527
+ content: function content() {
84528
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("div", {
84529
+ "class": iconNode ? "".concat(prefixCls, "-with-icon") : ''
84530
+ }, [iconNode && iconNode(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("div", {
84531
+ "class": "".concat(prefixCls, "-message")
84532
+ }, [!description && iconNode ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("span", {
84533
+ "class": "".concat(prefixCls, "-message-single-line-auto-margin")
84534
+ }, null) : null, message]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("div", {
84535
+ "class": "".concat(prefixCls, "-description")
84536
+ }, [description]), btn ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("span", {
84537
+ "class": "".concat(prefixCls, "-btn")
84538
+ }, [btn]) : null]);
84539
+ },
84540
+ duration: duration,
84541
+ closable: true,
84542
+ onClose: args.onClose,
84543
+ onClick: args.onClick,
84544
+ key: args.key,
84545
+ style: args.style || {},
84546
+ class: args.class
84547
+ });
84548
+ });
84549
+ }
84550
+
84551
+ var apiBase = {
84552
+ open: notification_notice,
84553
+ close: function close(key) {
84554
+ Object.keys(notificationInstance).forEach(function (cacheKey) {
84555
+ return notificationInstance[cacheKey].removeNotice(key);
84556
+ });
84557
+ },
84558
+ config: setNotificationConfig,
84559
+ destroy: function destroy() {
84560
+ Object.keys(notificationInstance).forEach(function (cacheKey) {
84561
+ notificationInstance[cacheKey].destroy();
84562
+ delete notificationInstance[cacheKey];
84563
+ });
84564
+ }
84565
+ };
84566
+ var notification_api = apiBase;
84567
+ var iconTypes = ['success', 'info', 'warning', 'error'];
84568
+ iconTypes.forEach(function (type) {
84569
+ notification_api[type] = function (args) {
84570
+ return notification_api.open(Object(esm_extends["a" /* default */])(Object(esm_extends["a" /* default */])({}, args), {
84571
+ type: type
84572
+ }));
84573
+ };
84574
+ });
84575
+ notification_api.warn = notification_api.warning;
84576
+ /* harmony default export */ var es_notification = (notification_api);
84345
84577
  // CONCATENATED MODULE: ./src/common/utils/util.js
84346
84578
 
84347
84579
 
@@ -84355,6 +84587,7 @@ var es_string_match = __webpack_require__("466d");
84355
84587
 
84356
84588
 
84357
84589
 
84590
+
84358
84591
  var utils = {
84359
84592
  numberReg: /^\d+(\.\d+)?$/,
84360
84593
  // 数字验证正则
@@ -84504,14 +84737,19 @@ var utils = {
84504
84737
 
84505
84738
  /**
84506
84739
  * 获取按钮权限
84740
+ * action= [alias, actionKey, action]
84507
84741
  * alias 权限路由alias
84508
84742
  * actionKey 所属权限key
84509
84743
  * action 权限字段
84510
84744
  */
84511
- getBtnPermission: function getBtnPermission(_ref) {
84512
- var alias = _ref.alias,
84513
- actionKey = _ref.actionKey,
84514
- action = _ref.action;
84745
+ getBtnPermission: function getBtnPermission(action) {
84746
+ if (!action || !Array.isArray(action) || action.length < 3) {
84747
+ es_notification.error({
84748
+ message: "错误",
84749
+ description: "v-action格式错误"
84750
+ });
84751
+ return true;
84752
+ }
84515
84753
 
84516
84754
  if (!utils.BTN_PERMISSION || !Object.keys(utils.BTN_PERMISSION).length) {
84517
84755
  utils.BTN_PERMISSION = utils.getCommonLocal("BTN_PERMISSION");
@@ -84519,7 +84757,7 @@ var utils = {
84519
84757
 
84520
84758
  var permisson = utils.BTN_PERMISSION;
84521
84759
 
84522
- if (permisson && permisson[alias] && permisson[alias][actionKey] && permisson[alias][actionKey].includes(action)) {
84760
+ if (permisson && permisson[action[0]] && permisson[action[0]][action[1]] && permisson[action[0]][action[1]].includes(action[2])) {
84523
84761
  return true;
84524
84762
  }
84525
84763