@v2coding/ui 1.4.3 → 1.5.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.
@@ -2529,11 +2529,11 @@ var DefaultVType = {
2529
2529
  newComplexCipher: function newComplexCipher() {
2530
2530
  return {
2531
2531
  validator: function validator(rule, value, callback) {
2532
- // 密码长度不少于8位且必须包含大小写字母、数字和特殊字符
2533
- var passwordPattern = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+\-=,.;'\":\\\\/<>\?])[A-Za-z\d~!@#$%^&*()_+\-=,.;'\":\\\\/<>\?]{8,}$/;
2532
+ // 密码长度不少于8位且必须包含字母、数字和特殊字符
2533
+ var passwordPattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+\-=,.;'\":\\\\/<>\?])[A-Za-z\d~!@#$%^&*()_+\-=,.;'\":\\\\/<>\?]{8,}$/;
2534
2534
 
2535
2535
  if (!passwordPattern.test(value)) {
2536
- callback(new Error('密码长度不少于8位且必须包含大小写字母、数字和特殊字符'));
2536
+ callback(new Error('密码长度不少于8位且必须包含字母、数字和特殊字符'));
2537
2537
  } else {
2538
2538
  callback();
2539
2539
  }
@@ -9206,7 +9206,8 @@ var DefaultTypes = {
9206
9206
  index = arg.index,
9207
9207
  h = arg.h;
9208
9208
  var buttons = attrs.buttons || props.buttons;
9209
- var render = attrs.render || props.render; // 使用 buttons 配置
9209
+ var render = attrs.render || props.render;
9210
+ var limit = Math.max(attrs.limit || props.limit || 7, 3); // 使用 buttons 配置
9210
9211
 
9211
9212
  if (buttons) {
9212
9213
  var _buttons = Array.isArray(buttons) ? buttons : [buttons];
@@ -9263,8 +9264,8 @@ var DefaultTypes = {
9263
9264
  Objects.isFunction(btn.handle) && btn.handle(rowData, index);
9264
9265
  };
9265
9266
 
9266
- var hasMore = _buttons.length > 7;
9267
- return h(Fragment$1, null, [].concat(_toConsumableArray(_buttons.slice(0, hasMore ? 5 : 7).map(function (_ref8, i) {
9267
+ var hasMore = _buttons.length > limit;
9268
+ return h(Fragment$1, null, [].concat(_toConsumableArray(_buttons.slice(0, hasMore ? limit - 2 : limit).map(function (_ref8, i) {
9268
9269
  var text = _ref8.text,
9269
9270
  key = _ref8.key,
9270
9271
  props = _objectWithoutProperties(_ref8, _excluded$3);
@@ -9310,7 +9311,7 @@ var DefaultTypes = {
9310
9311
  }
9311
9312
  })]), h('el-dropdown-menu', {
9312
9313
  slot: 'dropdown'
9313
- }, _buttons.slice(5).map(function (_ref9) {
9314
+ }, _buttons.slice(limit - 2).map(function (_ref9) {
9314
9315
  var text = _ref9.text,
9315
9316
  key = _ref9.key,
9316
9317
  props = _objectWithoutProperties(_ref9, _excluded2$1);
@@ -11788,7 +11789,7 @@ var mixin = {
11788
11789
  var children = _ref2.children,
11789
11790
  menu = _objectWithoutProperties(_ref2, _excluded2);
11790
11791
 
11791
- if ([1, 2, 100].includes(menu.type)) {
11792
+ if ([1, 2, 4, 5, 100].includes(menu.type)) {
11792
11793
  if (Array.isArray(children) && children.length > 0) {
11793
11794
  menu.children = _this5.filterMenu(children);
11794
11795
  }
@@ -11804,7 +11805,7 @@ var mixin = {
11804
11805
  return;
11805
11806
  }
11806
11807
 
11807
- if (!this.isMenu(route, [2, 100])) {
11808
+ if (!this.isMenu(route, [2, 4, 5, 100])) {
11808
11809
  return;
11809
11810
  }
11810
11811
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v2coding/ui",
3
- "version": "1.4.3",
3
+ "version": "1.5.0",
4
4
  "description": "",
5
5
  "main": "dist/v2coding-ui.ssr.js",
6
6
  "browser": "dist/v2coding-ui.esm.js",