web-component-gallery 2.1.13 → 2.1.15

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.
@@ -61,7 +61,7 @@ export default {
61
61
  const formRules = {}
62
62
  this.visibleFormItems
63
63
  .forEach(node => {
64
- if (!node.rules || node.rules.length === 0) return
64
+ // if (!node.rules || node.rules.length === 0) return
65
65
  formRules[node.model] = setFormItemRule.call(this, node)
66
66
  })
67
67
  return formRules
@@ -1,4 +1,3 @@
1
- // 大屏主题颜色配置
2
1
  @sc-primary-1: #0189F3;
3
2
  @sc-primary-2: #034C86;
4
3
  @sc-primary-3: #72BBFF;
@@ -209,12 +209,16 @@ export default {
209
209
  !this.$scopedSlots.ATableTitle && ( domElement.style.padding = '0' )
210
210
  },
211
211
  onSelectChange(selectedKey, selectedRecord) {
212
- const {setAttrs, selectedRecords} = this
213
- const setRecords = selectedRecords.filter(recordItem =>
214
- selectedKey.includes(recordItem[setAttrs.rowKey])
215
- )
216
- setRecords.length < selectedKey.length && selectedRecords.push(selectedRecord[selectedRecord.length - 1])
217
- this.$emit('selectedRecords', selectedKey, selectedRecords)
212
+ const currentIds = new Set(this.selectedRecords.map(r => r.id))
213
+ const newIds = new Set(selectedKey)
214
+
215
+ this.selectedRecords = newIds.size > currentIds.size
216
+ ? [...this.selectedRecords, ...selectedRecord.filter(r =>
217
+ newIds.has(r.id) && !currentIds.has(r.id)
218
+ )]
219
+ : this.selectedRecords.filter(r => newIds.has(r.id))
220
+
221
+ this.$emit('selectedRecords', selectedKey, this.selectedRecords)
218
222
  },
219
223
  paginationChange(current, pageSize) {
220
224
  this.pagination = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-component-gallery",
3
- "version": "2.1.13",
3
+ "version": "2.1.15",
4
4
  "description": "基础vue、antdvue、less实现的私有组件库",
5
5
  "main": "dist/index.umd.js",
6
6
  "files": [