hrsass-components 1.7.65 → 1.7.67

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.
@@ -65,7 +65,7 @@ var contentStyle = _interopDefault(require('!!raw-loader!tinymce/skins/content/d
65
65
  var SvgPanZoom = _interopDefault(require('svg-pan-zoom'));
66
66
  var saveSvgAsPng = require('save-svg-as-png');
67
67
 
68
- var version = "1.7.65";
68
+ var version = "1.7.67";
69
69
 
70
70
  /**
71
71
  * 版本号
@@ -4726,9 +4726,9 @@ var SchemeProps = {
4726
4726
  };
4727
4727
 
4728
4728
  var TableToolbar = {
4729
- name: 'HrTableToolbar',
4729
+ name: "HrTableToolbar",
4730
4730
  props: initDefaultProps(ToolbarProps, {
4731
- prefixCls: 'hr-table-base-toolbar',
4731
+ prefixCls: "hr-table-base-toolbar",
4732
4732
  showDownload: false,
4733
4733
  //是否显示下载
4734
4734
  hasReset: false,
@@ -4760,7 +4760,7 @@ var TableToolbar = {
4760
4760
  data: function data(val) {
4761
4761
  val && val.length && this._initResize();
4762
4762
  },
4763
- '$slots.default': {
4763
+ "$slots.default": {
4764
4764
  handler: function handler(val) {
4765
4765
  var slots = val && val.filter(function (o) {
4766
4766
  return o.tag;
@@ -4776,11 +4776,11 @@ var TableToolbar = {
4776
4776
  return this.data;
4777
4777
  },
4778
4778
  set: function set(val) {
4779
- this.$emit('input', val);
4779
+ this.$emit("input", val);
4780
4780
  }
4781
4781
  },
4782
4782
  showScheme: function showScheme() {
4783
- console.log('showMore', this.schemeList, this.schemeList.length > 0);
4783
+ console.log("showMore", this.schemeList, this.schemeList.length > 0);
4784
4784
  return this.schemeList.length > 0;
4785
4785
  }
4786
4786
  },
@@ -4798,7 +4798,7 @@ var TableToolbar = {
4798
4798
  if (this.resized) {
4799
4799
  return;
4800
4800
  }
4801
- console.log('init resize');
4801
+ console.log("init resize");
4802
4802
  this.resized = true;
4803
4803
  this.$nextTick(function () {
4804
4804
  resizeDetector.addListener(_this.$refs.searchContainerRef.parentElement, _this._resize);
@@ -4830,16 +4830,16 @@ var TableToolbar = {
4830
4830
  reset: function reset(dataVal, slots) {
4831
4831
  var _this3 = this;
4832
4832
  dataVal.map(function (item) {
4833
- _this3.$set(item, 'value', undefined);
4833
+ _this3.$set(item, "value", undefined);
4834
4834
  });
4835
- slots["default"] && this.$emit('reset');
4835
+ slots["default"] && this.$emit("reset");
4836
4836
  this.$nextTick(function () {
4837
- _this3.$emit('change');
4837
+ _this3.$emit("change");
4838
4838
  });
4839
4839
  },
4840
4840
  //选择方案
4841
4841
  selectSchemeHander: function selectSchemeHander(obj) {
4842
- this.$emit('schemeSearch', obj);
4842
+ this.$emit("schemeSearch", obj);
4843
4843
  },
4844
4844
  renderSearch: function renderSearch() {
4845
4845
  var _this4 = this;
@@ -4864,24 +4864,20 @@ var TableToolbar = {
4864
4864
  var count = compList.length;
4865
4865
  if (count < 1) return null;
4866
4866
  var span = this.span;
4867
- var rowCount = 24 / span - 1;
4868
- if (span == 24) {
4869
- rowCount = 1;
4870
- }
4871
4867
  var showCount = count < defaultShowCount ? count : defaultShowCount;
4872
4868
  // 如果有方案,展示所有搜索条件
4873
4869
  if (showScheme) {
4874
4870
  showCount = defaultShowCount;
4875
4871
  }
4876
4872
  var btns = h("div", {
4877
- "class": classNames("".concat(prefixCls, "-btns"), _defineProperty({}, "".concat(prefixCls, "-btns-right"), this.span === 24))
4873
+ "class": classNames("".concat(prefixCls, "-btns"), _defineProperty({}, "".concat(prefixCls, "-btns-right"), showCount % (24 / this.span) === 0))
4878
4874
  }, [h(antDesignVue.Button, {
4879
4875
  attrs: {
4880
4876
  type: "primary"
4881
4877
  },
4882
4878
  on: {
4883
4879
  "click": function click() {
4884
- _this4.$emit('change');
4880
+ _this4.$emit("change");
4885
4881
  }
4886
4882
  }
4887
4883
  }, [locale.search]), hasReset && h(antDesignVue.Button, {
@@ -4892,7 +4888,7 @@ var TableToolbar = {
4892
4888
  }
4893
4889
  }, [locale.reset]), (isExpand || showCount < count) && h(antDesignVue.Button, {
4894
4890
  attrs: {
4895
- icon: isExpand ? 'up' : 'down',
4891
+ icon: isExpand ? "up" : "down",
4896
4892
  type: "link"
4897
4893
  },
4898
4894
  on: {
@@ -4902,14 +4898,15 @@ var TableToolbar = {
4902
4898
  }
4903
4899
  }, [isExpand ? locale.fold : locale.more])]);
4904
4900
  var colComp = [],
4905
- emptyCount = 0;
4901
+ emptyCount = 0,
4902
+ emptyCol = [];
4906
4903
  return h("div", {
4907
4904
  "class": "search-container",
4908
4905
  ref: "searchContainerRef"
4909
4906
  }, [h("div", {
4910
4907
  style: {
4911
- height: !showScheme || isExpandMore ? 'auto' : '35px',
4912
- 'overflow': 'hidden'
4908
+ height: !showScheme || isExpandMore ? "auto" : "35px",
4909
+ overflow: "hidden"
4913
4910
  }
4914
4911
  }, [this.renderScheme(), h(antDesignVue.Form, {
4915
4912
  attrs: {
@@ -4921,24 +4918,26 @@ var TableToolbar = {
4921
4918
  }
4922
4919
  }, [compList.map(function (item, index) {
4923
4920
  if (!isExpand && index >= showCount) return;
4924
- if (rowCount > 1 && (index + emptyCount + 1) % (rowCount + 1) === 0) {
4925
- emptyCount++;
4926
- colComp.push(h(antDesignVue.Col, {
4927
- attrs: {
4928
- span: span
4929
- }
4930
- }, [h("div", {
4931
- "class": "ant-row ant-form-item"
4932
- }, [h("div", {
4933
- "class": "empty-item"
4934
- })])]));
4935
- }
4921
+ // if (
4922
+ // rowCount > 1 &&
4923
+ // (index + emptyCount + 1) % (rowCount + 1) === 0
4924
+ // ) {
4925
+ // emptyCount++
4926
+
4927
+ // colComp.push(
4928
+ // <Col span={span}>
4929
+ // <div class="ant-row ant-form-item">
4930
+ // <div class="empty-item" />
4931
+ // </div>
4932
+ // </Col>
4933
+ // )
4934
+ // }
4936
4935
  var slot, title;
4937
4936
  if (hasSlots) {
4938
4937
  slot = item;
4939
- title = item.data.attrs ? item.data.attrs.label : '';
4938
+ title = item.data.attrs ? item.data.attrs.label : "";
4940
4939
  } else {
4941
- title = item.name || '';
4940
+ title = item.name || "";
4942
4941
  }
4943
4942
  colComp.push(h(antDesignVue.Col, {
4944
4943
  attrs: {
@@ -4960,20 +4959,41 @@ var TableToolbar = {
4960
4959
  value: item.value,
4961
4960
  name: item.controlType,
4962
4961
  code: item.codeType,
4963
- tableName: item.codeType || '',
4962
+ tableName: item.codeType || "",
4964
4963
  placeholder: item.placeholder
4965
4964
  },
4966
4965
  on: {
4967
4966
  "search": function search(val) {
4968
- return _this4.$emit('change');
4967
+ return _this4.$emit("change");
4969
4968
  },
4970
4969
  "change": function change(val) {
4971
- _this4.$set(item, 'value', val);
4970
+ _this4.$set(item, "value", val);
4972
4971
  }
4973
4972
  }
4974
4973
  })])]));
4975
4974
  }), colComp.map(function (item) {
4976
4975
  return item;
4976
+ }), compList.length > 0 && function () {
4977
+ var spanCount = 24 / span;
4978
+ if (showCount % spanCount === 0 && span < 24) {
4979
+ emptyCount = spanCount - 1;
4980
+ if (emptyCount > 0) {
4981
+ var emptyColumns = Array(emptyCount).fill().map(function () {
4982
+ return h(antDesignVue.Col, {
4983
+ attrs: {
4984
+ span: span
4985
+ }
4986
+ }, [h("div", {
4987
+ "class": "ant-row ant-form-item"
4988
+ }, [h("div", {
4989
+ "class": "empty-item"
4990
+ })])]);
4991
+ });
4992
+ emptyCol.push.apply(emptyCol, _toConsumableArray(emptyColumns));
4993
+ }
4994
+ }
4995
+ }(), emptyCol.map(function (item) {
4996
+ return item;
4977
4997
  }), h(antDesignVue.Col, {
4978
4998
  attrs: {
4979
4999
  span: span
@@ -4983,7 +5003,7 @@ var TableToolbar = {
4983
5003
  }, [locale.selected, h("span", [selectedRows.length]), locale.items, h("a", {
4984
5004
  on: {
4985
5005
  "click": function click() {
4986
- _this4.$emit('resultClick');
5006
+ _this4.$emit("resultClick");
4987
5007
  }
4988
5008
  }
4989
5009
  }, [locale.view])])])])])]);
@@ -5008,7 +5028,7 @@ var TableToolbar = {
5008
5028
  }, [h("ul", [h("li", {
5009
5029
  key: "all",
5010
5030
  "class": {
5011
- 'cur': !selectedSchemeId
5031
+ cur: !selectedSchemeId
5012
5032
  },
5013
5033
  on: {
5014
5034
  "click": function click() {
@@ -5018,7 +5038,7 @@ var TableToolbar = {
5018
5038
  }, [locale.all]), _list.map(function (scheme) {
5019
5039
  return h("li", {
5020
5040
  "class": {
5021
- 'cur': selectedSchemeId === scheme.id
5041
+ cur: selectedSchemeId === scheme.id
5022
5042
  },
5023
5043
  key: scheme.id,
5024
5044
  on: {
@@ -5050,11 +5070,11 @@ var TableToolbar = {
5050
5070
  }, [this.renderSearch(), ($slots["default"] || dataVal.length > 0) && h(antDesignVue.Row, {
5051
5071
  "class": "".concat(prefixCls, "-icons"),
5052
5072
  style: {
5053
- width: schemeList.length > 0 ? '130px' : '106px'
5073
+ width: schemeList.length > 0 ? "130px" : "106px"
5054
5074
  }
5055
5075
  }, [schemeList.length > 0 && h(antDesignVue.Icon, {
5056
5076
  attrs: {
5057
- type: isExpandMore ? 'up-circle' : 'down-circle',
5077
+ type: isExpandMore ? "up-circle" : "down-circle",
5058
5078
  title: isExpandMore ? locale.fold : locale.more
5059
5079
  },
5060
5080
  on: {
@@ -5069,7 +5089,7 @@ var TableToolbar = {
5069
5089
  },
5070
5090
  on: {
5071
5091
  "click": function click(e) {
5072
- _this6.$emit('downloadClick', e);
5092
+ _this6.$emit("downloadClick", e);
5073
5093
  }
5074
5094
  }
5075
5095
  }), showFilter && h(antDesignVue.Icon, {
@@ -5079,7 +5099,7 @@ var TableToolbar = {
5079
5099
  },
5080
5100
  on: {
5081
5101
  "click": function click() {
5082
- _this6.$emit('filterClick');
5102
+ _this6.$emit("filterClick");
5083
5103
  }
5084
5104
  }
5085
5105
  }), h(antDesignVue.Icon, {
@@ -5089,7 +5109,7 @@ var TableToolbar = {
5089
5109
  },
5090
5110
  on: {
5091
5111
  "click": function click() {
5092
- _this6.$emit('settingClick');
5112
+ _this6.$emit("settingClick");
5093
5113
  }
5094
5114
  }
5095
5115
  })])]);
@@ -7855,8 +7875,9 @@ var index = {
7855
7875
  //是否显示筛选
7856
7876
  autoLoad: true,
7857
7877
  //自动加载数据
7878
+ // action: { fixed: false, width: 100 }, //操作列宽度和锁定
7858
7879
  action: {
7859
- fixed: false,
7880
+ fixed: 'right',
7860
7881
  width: 100
7861
7882
  },
7862
7883
  //操作列宽度和锁定
@@ -8164,6 +8185,7 @@ var index = {
8164
8185
  var lockLen = columnList.filter(function (o) {
8165
8186
  return o.checked != false && o.lock;
8166
8187
  }).length;
8188
+ if (action.fixed) lockLen++;
8167
8189
  if (lockLen > 0) {
8168
8190
  var paddingWidth = dataSource.length > 0 ? 17 : 0;
8169
8191
  var columns = columnList.filter(function (o) {
@@ -8189,7 +8211,7 @@ var index = {
8189
8211
  }
8190
8212
  }
8191
8213
  var tableWidth = this.$refs.tableBase ? this.$refs.tableBase.$el.clientWidth : 0;
8192
- var resultWidth = selectionWidth + width + actionWidth;
8214
+ var resultWidth = selectionWidth + width + actionWidth + widthLessColumns.length * 100;
8193
8215
  result = resultWidth > tableWidth ? resultWidth : null;
8194
8216
  }
8195
8217
  this.setState({