mali-ui-plus 1.0.122 → 1.0.124

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.
@@ -10669,7 +10669,7 @@ var GlobalConfig = {
10669
10669
  ;// CONCATENATED MODULE: ./node_modules/vxe-table/es/tools/log.js
10670
10670
 
10671
10671
  function getLog(message, params) {
10672
- return "[vxe-table v".concat("4.4.2-beta.8", "] ").concat(conf.i18n(message, params));
10672
+ return "[vxe-table v".concat("4.4.4", "] ").concat(conf.i18n(message, params));
10673
10673
  }
10674
10674
  function outLog(type) {
10675
10675
  return function (message, params) {
@@ -10874,7 +10874,7 @@ var ColumnInfo = /** @class */function () {
10874
10874
  return this.field || (this.type ? "type=".concat(this.type) : null);
10875
10875
  };
10876
10876
  ColumnInfo.prototype.update = function (name, value) {
10877
- // 不支持双向的属性
10877
+ // 不支持直接修改的属性
10878
10878
  if (name !== 'filters') {
10879
10879
  if (name === 'field') {
10880
10880
  // 兼容旧属性
@@ -11233,12 +11233,20 @@ function isColumnInfo(column) {
11233
11233
  function createColumn($xetable, options, renderOptions) {
11234
11234
  return isColumnInfo(options) ? options : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(new ColumnInfo($xetable, options, renderOptions));
11235
11235
  }
11236
- function watchColumn(props, column) {
11236
+ function watchColumn($xetable, props, column) {
11237
11237
  Object.keys(props).forEach(function (name) {
11238
11238
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(function () {
11239
11239
  return props[name];
11240
11240
  }, function (value) {
11241
11241
  column.update(name, value);
11242
+ if ($xetable) {
11243
+ if (name === 'filters') {
11244
+ $xetable.setFilter(column, value);
11245
+ $xetable.handleUpdateDataQueue();
11246
+ } else if (['visible', 'fixed', 'width', 'minWidth', 'maxWidth'].includes(name)) {
11247
+ $xetable.handleRefreshColumnQueue();
11248
+ }
11249
+ }
11242
11250
  });
11243
11251
  });
11244
11252
  }
@@ -12270,7 +12278,7 @@ var config = new VXETableConfig();
12270
12278
  var v = 'v4';
12271
12279
  var VXETable = {
12272
12280
  v: v,
12273
- version: "4.4.2-beta.8",
12281
+ version: "4.4.4",
12274
12282
  setup: setup,
12275
12283
  interceptor: interceptor,
12276
12284
  renderer: renderer,
@@ -12746,8 +12754,8 @@ var tableFilterHook = {
12746
12754
  */
12747
12755
  setFilter: function (fieldOrColumn, options) {
12748
12756
  var column = handleFieldOrColumn($xetable, fieldOrColumn);
12749
- if (column && column.filters && options) {
12750
- column.filters = toFilters(options);
12757
+ if (column && column.filters) {
12758
+ column.filters = toFilters(options || []);
12751
12759
  }
12752
12760
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
12753
12761
  },
@@ -22627,7 +22635,15 @@ var validatorHook = {
22627
22635
  }
22628
22636
  } else {
22629
22637
  var isArrType = type === 'array';
22630
- var hasEmpty = isArrType || xe_utils_default().isArray(cellValue_1) ? !xe_utils_default().isArray(cellValue_1) || !cellValue_1.length : eqEmptyValue(cellValue_1);
22638
+ var isArrVal = xe_utils_default().isArray(cellValue_1);
22639
+ var hasEmpty = true;
22640
+ if (isArrType || isArrVal) {
22641
+ hasEmpty = !isArrVal || !cellValue_1.length;
22642
+ } else if (xe_utils_default().isString(cellValue_1)) {
22643
+ hasEmpty = eqEmptyValue(cellValue_1.trim());
22644
+ } else {
22645
+ hasEmpty = eqEmptyValue(cellValue_1);
22646
+ }
22631
22647
  if (required ? hasEmpty || validErrorRuleValue(rule, cellValue_1) : !hasEmpty && validErrorRuleValue(rule, cellValue_1)) {
22632
22648
  validRuleErr = true;
22633
22649
  errorRules.push(new Rule(rule));
@@ -23736,7 +23752,7 @@ var columnProps = {
23736
23752
  var column = cell.createColumn($xetable, props);
23737
23753
  column.slots = slots;
23738
23754
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xegrid', null);
23739
- watchColumn(props, column);
23755
+ watchColumn($xetable, props, column);
23740
23756
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(function () {
23741
23757
  assemColumn($xetable, refElem.value, column, colgroup);
23742
23758
  });
@@ -23791,7 +23807,7 @@ dynamicApp.component('VxeTableColumn', column);
23791
23807
  column.children = [];
23792
23808
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('xecolgroup', xecolumn);
23793
23809
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xegrid', null);
23794
- watchColumn(props, column);
23810
+ watchColumn($xetable, props, column);
23795
23811
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(function () {
23796
23812
  assemColumn($xetable, refElem.value, column, colgroup);
23797
23813
  });
@@ -28529,7 +28545,15 @@ function getResetValue(value, resetValue) {
28529
28545
  }
28530
28546
  } else {
28531
28547
  var isArrType = type === 'array';
28532
- var hasEmpty = isArrType || xe_utils_default().isArray(itemValue_1) ? !xe_utils_default().isArray(itemValue_1) || !itemValue_1.length : eqEmptyValue(itemValue_1);
28548
+ var isArrVal = xe_utils_default().isArray(itemValue_1);
28549
+ var hasEmpty = true;
28550
+ if (isArrType || isArrVal) {
28551
+ hasEmpty = !isArrVal || !itemValue_1.length;
28552
+ } else if (xe_utils_default().isString(itemValue_1)) {
28553
+ hasEmpty = eqEmptyValue(itemValue_1.trim());
28554
+ } else {
28555
+ hasEmpty = eqEmptyValue(itemValue_1);
28556
+ }
28533
28557
  if (required ? hasEmpty || validErrorRuleValue(rule, itemValue_1) : !hasEmpty && validErrorRuleValue(rule, itemValue_1)) {
28534
28558
  errorRules.push(new form_Rule(rule));
28535
28559
  }
@@ -32111,6 +32135,10 @@ var orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
32111
32135
  mergeList: [],
32112
32136
  // 合并表尾数据的对象集
32113
32137
  mergeFooterList: [],
32138
+ // 刷新列标识,当列筛选被改变时,触发表格刷新数据
32139
+ upDataFlag: 0,
32140
+ // 刷新列标识,当列的特定属性被改变时,触发表格刷新列
32141
+ reColumnFlag: 0,
32114
32142
  // 初始化标识
32115
32143
  initStore: {
32116
32144
  filter: false,
@@ -33581,7 +33609,7 @@ var orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
33581
33609
  var emptyBlockElem = emptyBlockRef ? emptyBlockRef.value : null;
33582
33610
  if (isNodeElement(wrapperElem)) {
33583
33611
  if (customMaxHeight) {
33584
- wrapperElem.style.maxHeight = "".concat(fixedType ? customMaxHeight - headerHeight - (showFooter ? 0 : scrollbarHeight) : customMaxHeight - headerHeight, "px");
33612
+ wrapperElem.style.maxHeight = "".concat(fixedType ? customMaxHeight - headerHeight - (showFooter ? 0 : scrollbarHeight) : customMaxHeight - headerHeight - footerHeight, "px");
33585
33613
  } else {
33586
33614
  if (customHeight > 0) {
33587
33615
  wrapperElem.style.height = "".concat(fixedType ? (customHeight > 0 ? customHeight - headerHeight - footerHeight : tableHeight) - (showFooter ? 0 : scrollbarHeight) : customHeight - headerHeight - footerHeight, "px");
@@ -37318,6 +37346,12 @@ var orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
37318
37346
  tablePrivateMethods.analyColumnWidth();
37319
37347
  return tableMethods.refreshColumn();
37320
37348
  },
37349
+ handleUpdateDataQueue: function () {
37350
+ reactData.upDataFlag++;
37351
+ },
37352
+ handleRefreshColumnQueue: function () {
37353
+ reactData.reColumnFlag++;
37354
+ },
37321
37355
  preventEvent: function (evnt, type, args, next, end) {
37322
37356
  var evntList = VXETable.interceptor.get(type);
37323
37357
  var rest;
@@ -38378,6 +38412,20 @@ var orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER';
38378
38412
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(tableColumnFlag, function () {
38379
38413
  tablePrivateMethods.analyColumnWidth();
38380
38414
  });
38415
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(function () {
38416
+ return reactData.upDataFlag;
38417
+ }, function () {
38418
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(function () {
38419
+ tableMethods.updateData();
38420
+ });
38421
+ });
38422
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(function () {
38423
+ return reactData.reColumnFlag;
38424
+ }, function () {
38425
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(function () {
38426
+ tableMethods.refreshColumn();
38427
+ });
38428
+ });
38381
38429
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(function () {
38382
38430
  return props.showHeader;
38383
38431
  }, function () {
@@ -42051,6 +42099,9 @@ const MlWeekPickervue_type_script_lang_ts_setup_true_hoisted_1 = {
42051
42099
  const MlWeekPicker_exports_ = MlWeekPickervue_type_script_lang_ts_setup_true;
42052
42100
 
42053
42101
  /* harmony default export */ var MlWeekPicker = (MlWeekPicker_exports_);
42102
+ // EXTERNAL MODULE: ./node_modules/dayjs/dayjs.min.js
42103
+ var dayjs_min = __webpack_require__(5743);
42104
+ var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
42054
42105
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-41.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/ml-date-range-picker/MlDateRangePicker.vue?vue&type=script&lang=ts&setup=true
42055
42106
 
42056
42107
 
@@ -42061,6 +42112,7 @@ const MlDateRangePickervue_type_script_lang_ts_setup_true_hoisted_1 = {
42061
42112
 
42062
42113
 
42063
42114
 
42115
+
42064
42116
  /* harmony default export */ var MlDateRangePickervue_type_script_lang_ts_setup_true = (/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
42065
42117
  __name: 'MlDateRangePicker',
42066
42118
  props: {
@@ -42095,6 +42147,10 @@ const MlDateRangePickervue_type_script_lang_ts_setup_true_hoisted_1 = {
42095
42147
  type: Boolean,
42096
42148
  default: false
42097
42149
  },
42150
+ shortcuts: {
42151
+ type: Boolean,
42152
+ default: true
42153
+ },
42098
42154
  readonly: {
42099
42155
  type: Boolean,
42100
42156
  default: null
@@ -42113,12 +42169,70 @@ const MlDateRangePickervue_type_script_lang_ts_setup_true_hoisted_1 = {
42113
42169
  const $xeformiteminfo = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeformiteminfo', null);
42114
42170
  const mlForm = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('mlForm', null);
42115
42171
  const selectVals = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)([]);
42172
+ const currDate = xe_utils_default().toStringDate(xe_utils_default().toDateString(Date.now(), 'yyyy-MM-dd'));
42173
+ const defaultShortcuts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)([{
42174
+ text: '昨日',
42175
+ onClick(picker) {
42176
+ picker.emit('pick', [dayjs_min_default()(xe_utils_default().getWhatDay(currDate, -1)), dayjs_min_default()(xe_utils_default().getWhatDay(currDate, -1))]);
42177
+ }
42178
+ }, {
42179
+ text: '前日',
42180
+ onClick(picker) {
42181
+ picker.emit('pick', [dayjs_min_default()(xe_utils_default().getWhatDay(currDate, -2)), dayjs_min_default()(xe_utils_default().getWhatDay(currDate, -2))]);
42182
+ }
42183
+ }, {
42184
+ text: '本周',
42185
+ onClick(picker) {
42186
+ picker.emit('pick', [dayjs_min_default()(xe_utils_default().getWhatWeek(currDate, 0, 0, 0)), dayjs_min_default()(xe_utils_default().getWhatWeek(currDate, 0, 6, 0))]);
42187
+ }
42188
+ }, {
42189
+ text: '上周',
42190
+ onClick(picker) {
42191
+ picker.emit('pick', [dayjs_min_default()(xe_utils_default().getWhatWeek(currDate, -1, 0, 0)), dayjs_min_default()(xe_utils_default().getWhatWeek(currDate, -1, 6, 0))]);
42192
+ }
42193
+ }, {
42194
+ text: '本月',
42195
+ onClick(picker) {
42196
+ picker.emit('pick', [dayjs_min_default()(xe_utils_default().getWhatMonth(currDate, 0, 'first')), dayjs_min_default()(xe_utils_default().getWhatMonth(currDate, 0, 'last'))]);
42197
+ }
42198
+ }, {
42199
+ text: '上月',
42200
+ onClick(picker) {
42201
+ picker.emit('pick', [dayjs_min_default()(xe_utils_default().getWhatMonth(currDate, -1, 'first')), dayjs_min_default()(xe_utils_default().getWhatMonth(currDate, -1, 'last'))]);
42202
+ }
42203
+ }, {
42204
+ text: '过去7天',
42205
+ onClick(picker) {
42206
+ picker.emit('pick', [dayjs_min_default()(xe_utils_default().getWhatDay(currDate, -7)), dayjs_min_default()(currDate)]);
42207
+ }
42208
+ }, {
42209
+ text: '过去30天',
42210
+ onClick(picker) {
42211
+ picker.emit('pick', [dayjs_min_default()(xe_utils_default().getWhatDay(currDate, -30)), dayjs_min_default()(currDate)]);
42212
+ }
42213
+ }, {
42214
+ text: '过去90天',
42215
+ onClick(picker) {
42216
+ picker.emit('pick', [dayjs_min_default()(xe_utils_default().getWhatDay(currDate, -90)), dayjs_min_default()(currDate)]);
42217
+ }
42218
+ }, {
42219
+ text: '今年至今',
42220
+ onClick(picker) {
42221
+ picker.emit('pick', [dayjs_min_default()(xe_utils_default().getWhatYear(currDate, 0, 'first')), dayjs_min_default()(currDate)]);
42222
+ }
42223
+ }]);
42116
42224
  const isReadonly = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
42117
42225
  if (props.readonly === null) {
42118
42226
  return $xeform ? $xeform.props.readonly : false;
42119
42227
  }
42120
42228
  return props.readonly;
42121
42229
  });
42230
+ const shortcutOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
42231
+ if (props.shortcuts) {
42232
+ return defaultShortcuts;
42233
+ }
42234
+ return [];
42235
+ });
42122
42236
  const selectLabel = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
42123
42237
  if (isReadonly.value) {
42124
42238
  if (props.startDate && props.endDate) {
@@ -42198,10 +42312,11 @@ const MlDateRangePickervue_type_script_lang_ts_setup_true_hoisted_1 = {
42198
42312
  "range-separator": "至",
42199
42313
  "start-placeholder": __props.placeholder[0],
42200
42314
  "end-placeholder": __props.placeholder[1],
42315
+ shortcuts: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.unref)(shortcutOpts),
42201
42316
  disabled: __props.disabled,
42202
42317
  clearable: __props.clearable,
42203
42318
  onChange: changeEvent
42204
- }, null, 8, ["modelValue", "start-placeholder", "end-placeholder", "disabled", "clearable"]));
42319
+ }, null, 8, ["modelValue", "start-placeholder", "end-placeholder", "shortcuts", "disabled", "clearable"]));
42205
42320
  };
42206
42321
  }
42207
42322
  }));
@@ -68600,7 +68715,11 @@ const MlTreevue_type_script_lang_ts_setup_true_hoisted_2 = {
68600
68715
  type: Array,
68601
68716
  default: () => []
68602
68717
  },
68603
- expandedKeys: {
68718
+ expandedRowKeys: {
68719
+ type: Array,
68720
+ default: null
68721
+ },
68722
+ selectedRowKeys: {
68604
68723
  type: Array,
68605
68724
  default: null
68606
68725
  },
@@ -68608,7 +68727,7 @@ const MlTreevue_type_script_lang_ts_setup_true_hoisted_2 = {
68608
68727
  indeterminateToChecked: Boolean,
68609
68728
  nodeProps: Object
68610
68729
  },
68611
- emits: ["update:expandedKeys", "update:checkRowKeys", "checkbox-all", "checkbox-change", "select-change", "expand-change"],
68730
+ emits: ["update:expandedRowKeys", "update:checkRowKeys", "checkbox-all", "checkbox-change", "select-change", "expand-change"],
68612
68731
  setup(__props, {
68613
68732
  expose,
68614
68733
  emit
@@ -68663,7 +68782,7 @@ const MlTreevue_type_script_lang_ts_setup_true_hoisted_2 = {
68663
68782
  });
68664
68783
  }
68665
68784
  expandRowKeys.value = keys;
68666
- emit('update:expandedKeys', keys);
68785
+ emit('update:expandedRowKeys', keys);
68667
68786
  };
68668
68787
  const selectEvent = row => {
68669
68788
  emit('select-change', {
@@ -68673,13 +68792,13 @@ const MlTreevue_type_script_lang_ts_setup_true_hoisted_2 = {
68673
68792
  });
68674
68793
  };
68675
68794
  const expandEvent = row => {
68676
- const expandedKeys = [];
68677
- expandRowKeys.value = expandedKeys;
68678
- emit('update:expandedKeys', expandedKeys);
68795
+ const keys = [];
68796
+ expandRowKeys.value = keys;
68797
+ emit('update:expandedRowKeys', keys);
68679
68798
  emit('expand-change', {
68680
68799
  row,
68681
68800
  expanded: [],
68682
- expandedKeys: []
68801
+ expandedKeys: keys
68683
68802
  });
68684
68803
  };
68685
68804
  const checkAllEvent = () => {
@@ -68848,7 +68967,7 @@ const MlTreevue_type_script_lang_ts_setup_true_hoisted_2 = {
68848
68967
  checkedRowKeys.value = props.checkRowKeys;
68849
68968
  setCheckboxRowKeys(props.checkRowKeys);
68850
68969
  });
68851
- (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.expandedKeys, value => {
68970
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.expandedRowKeys, value => {
68852
68971
  expandRowKeys.value = value;
68853
68972
  });
68854
68973
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.data, () => {
@@ -68862,7 +68981,7 @@ const MlTreevue_type_script_lang_ts_setup_true_hoisted_2 = {
68862
68981
  if (props.expandAll) {
68863
68982
  setAllTreeExpand(true);
68864
68983
  } else {
68865
- expandRowKeys.value = props.expandedKeys;
68984
+ expandRowKeys.value = props.expandedRowKeys;
68866
68985
  }
68867
68986
  selectRowKeys.value = props.checkRowKeys || [];
68868
68987
  checkedRowKeys.value = props.checkRowKeys || [];
@@ -75415,7 +75534,7 @@ function index_config(options) {
75415
75534
  return config_0;
75416
75535
  }
75417
75536
  const MaliUI = {
75418
- version: "1.0.121",
75537
+ version: "1.0.123",
75419
75538
  install: index_install,
75420
75539
  config: index_config,
75421
75540
  renderer: index_esm.renderer,