evui 3.1.55 → 3.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evui",
3
- "version": "3.1.55",
3
+ "version": "3.2.0",
4
4
  "description": "A EXEM Library project",
5
5
  "author": "exem <dev_client@ex-em.com>",
6
6
  "license": "MIT",
@@ -106,14 +106,8 @@ import { onMounted, onBeforeUnmount, watch, onDeactivated } from 'vue';
106
106
  });
107
107
 
108
108
  const redrawChart = () => {
109
- if (isInit) {
110
- evChart.update({
111
- updateSeries: false,
112
- updateSelTip: {
113
- update: false,
114
- keepDomain: false,
115
- },
116
- });
109
+ if (evChart && 'resize' in evChart && isInit) {
110
+ evChart.resize();
117
111
  }
118
112
  };
119
113
 
@@ -90,7 +90,6 @@ class EvChart {
90
90
  this.axesRange = this.getAxesRange();
91
91
  this.labelOffset = this.getLabelOffset();
92
92
 
93
- this.initScale();
94
93
  this.drawChart();
95
94
 
96
95
  if (tooltip.use) {
@@ -131,6 +130,7 @@ class EvChart {
131
130
  * @returns {undefined}
132
131
  */
133
132
  drawChart(hitInfo) {
133
+ this.initScale();
134
134
  this.labelRange = this.getAxesLabelRange();
135
135
  this.axesSteps = this.calculateSteps();
136
136
  this.drawAxis(hitInfo);
@@ -644,8 +644,8 @@ class EvChart {
644
644
  this.bufferCtx.restore();
645
645
  this.bufferCtx.save();
646
646
 
647
- this.getChartDOMRect();
648
647
  this.initScale();
648
+ this.chartRect = this.getChartRect();
649
649
  this.drawChart();
650
650
  }
651
651
 
@@ -658,7 +658,6 @@ class EvChart {
658
658
  render(hitInfo) {
659
659
  this.clear();
660
660
  this.chartRect = this.getChartRect();
661
- this.initScale();
662
661
  this.drawChart(hitInfo);
663
662
  }
664
663
 
@@ -151,7 +151,6 @@ class Bar {
151
151
  this.drawBar({
152
152
  ctx,
153
153
  positions: { x, y, w, h },
154
- isTop: item.isTop,
155
154
  });
156
155
 
157
156
  if (showValue.use) {
@@ -213,7 +212,6 @@ class Bar {
213
212
  this.drawBar({
214
213
  ctx,
215
214
  positions: { x, y, w, h: this.isHorizontal ? -h : h },
216
- isTop: item.data.isTop,
217
215
  });
218
216
 
219
217
  if (showValue.use) {
@@ -411,7 +409,7 @@ class Bar {
411
409
  ctx.restore();
412
410
  }
413
411
 
414
- drawBar({ ctx, positions, isTop }) {
412
+ drawBar({ ctx, positions }) {
415
413
  const isHorizontal = this.isHorizontal;
416
414
  const isStackBar = 'stackIndex' in this;
417
415
  const isBorderRadius = this.borderRadius && this.borderRadius > 0;
@@ -423,7 +421,7 @@ class Bar {
423
421
  return;
424
422
  }
425
423
 
426
- if ((!isStackBar && isBorderRadius) || (isStackBar && isBorderRadius && isTop)) {
424
+ if (isBorderRadius && !isStackBar) {
427
425
  try {
428
426
  this.drawRoundedRect(ctx, positions);
429
427
  } catch (e) {
@@ -311,7 +311,6 @@ class Line {
311
311
  * @returns {array}
312
312
  */
313
313
  findItems({ xsp, width }) {
314
- console.log(this.data);
315
314
  const xep = xsp + width;
316
315
 
317
316
  return this.data.filter(seriesData => (xsp - 1 <= seriesData.xp) && (seriesData.xp <= xep + 1));
@@ -69,18 +69,19 @@ class Scatter {
69
69
  return item;
70
70
  }, this.data[0]);
71
71
 
72
- const color = this.color;
73
- const pointFillColor = this.pointFill;
74
72
  const getOpacity = (colorStr) => {
75
73
  const noneDownplayOpacity = colorStr.includes('rgba') ? Util.getOpacity(colorStr) : 1;
76
74
  return this.state === 'downplay' ? 0.1 : noneDownplayOpacity;
77
75
  };
78
76
 
79
- ctx.fillStyle = Util.colorStringToRgba(pointFillColor, getOpacity(pointFillColor));
80
- ctx.strokeStyle = Util.colorStringToRgba(color, getOpacity(color));
81
-
82
77
  this.data.forEach((curr) => {
83
78
  if (curr.xp !== null && curr.yp !== null) {
79
+ const color = curr.dataColor || this.color;
80
+ ctx.strokeStyle = Util.colorStringToRgba(color, getOpacity(color));
81
+
82
+ const pointFillColor = curr.dataColor || this.pointFill;
83
+ ctx.fillStyle = Util.colorStringToRgba(pointFillColor, getOpacity(pointFillColor));
84
+
84
85
  Canvas.drawPoint(ctx, this.pointStyle, this.pointSize, curr.xp, curr.yp);
85
86
  }
86
87
  });
@@ -102,6 +103,72 @@ class Scatter {
102
103
 
103
104
  return items;
104
105
  }
106
+
107
+ /**
108
+ * Draw item highlight
109
+ * @param {object} item object for drawing series data
110
+ * @param {object} context canvas context
111
+ * @param {boolean} isMax determines if this series has max value
112
+ *
113
+ * @returns {undefined}
114
+ */
115
+ itemHighlight(item, context) {
116
+ const gdata = item.data;
117
+ const ctx = context;
118
+
119
+ const x = gdata.xp;
120
+ const y = gdata.yp;
121
+
122
+ ctx.save();
123
+ if (x !== null && y !== null) {
124
+ const color = gdata.dataColor || this.color;
125
+ const pointFillColor = gdata.dataColor || this.pointFill;
126
+
127
+ ctx.strokeStyle = Util.colorStringToRgba(color, 0);
128
+
129
+ ctx.fillStyle = Util.colorStringToRgba(pointFillColor, this.highlight.maxShadowOpacity);
130
+ Canvas.drawPoint(ctx, this.pointStyle, this.highlight.maxShadowSize, x, y);
131
+
132
+ ctx.fillStyle = color;
133
+ Canvas.drawPoint(ctx, this.pointStyle, this.highlight.maxSize, x, y);
134
+
135
+ ctx.fillStyle = '#fff';
136
+ Canvas.drawPoint(ctx, this.pointStyle, this.highlight.defaultSize, x, y);
137
+ }
138
+
139
+ ctx.restore();
140
+ }
141
+
142
+ /**
143
+ * Find graph item for tooltip
144
+ * @param {array} offset mouse position
145
+ *
146
+ * @returns {object} graph item
147
+ */
148
+ findGraphData(offset) {
149
+ const xp = offset[0];
150
+ const yp = offset[1];
151
+ const item = { data: null, hit: false, color: this.color };
152
+ const pointSize = this.pointSize;
153
+ const gdata = this.data;
154
+
155
+ const foundItem = gdata.find((data) => {
156
+ const x = data.xp;
157
+ const y = data.yp;
158
+
159
+ return (x - pointSize <= xp)
160
+ && (xp <= x + pointSize)
161
+ && (y - pointSize <= yp)
162
+ && (yp <= y + pointSize);
163
+ });
164
+
165
+ if (foundItem) {
166
+ item.data = foundItem;
167
+ item.hit = true;
168
+ }
169
+
170
+ return item;
171
+ }
105
172
  }
106
173
 
107
174
  export default Scatter;
@@ -19,6 +19,16 @@ const modules = {
19
19
  } else {
20
20
  this.createPieDataSet(data, type);
21
21
  }
22
+ } else if (typeKey === 'scatter') {
23
+ type.forEach((sId) => {
24
+ const series = this.seriesList[sId];
25
+ const sData = data[sId];
26
+
27
+ if (series && sData) {
28
+ series.data = this.addSeriesDSforScatter(sData);
29
+ series.minMax = this.getSeriesMinMax(series.data);
30
+ }
31
+ });
22
32
  } else {
23
33
  type.forEach((sId) => {
24
34
  const series = this.seriesList[sId];
@@ -26,7 +36,7 @@ const modules = {
26
36
 
27
37
  if (series && sData) {
28
38
  if (series.isExistGrp && series.stackIndex) {
29
- series.data = this.addSeriesStackDS(sData, label, series);
39
+ series.data = this.addSeriesStackDS(sData, label, series.bsIds, series.stackIndex);
30
40
  } else {
31
41
  series.data = this.addSeriesDS(sData, label);
32
42
  }
@@ -173,12 +183,12 @@ const modules = {
173
183
  * Take data and label to create stack data for each series
174
184
  * @param {object} data chart series info
175
185
  * @param {object} label chart label
176
- * @param {object} series series Information
186
+ * @param {array} bsIds stacked base data ID List
187
+ * @param {number} sIdx series ordered index
177
188
  *
178
189
  * @returns {array} data for each series
179
190
  */
180
- addSeriesStackDS(data, label, series) {
181
- const bsIds = series.bsIds; // stacked base data ID List
191
+ addSeriesStackDS(data, label, bsIds, sIdx = 0) {
182
192
  const isHorizontal = this.options.horizontal;
183
193
  const sdata = [];
184
194
 
@@ -201,8 +211,6 @@ const modules = {
201
211
  };
202
212
 
203
213
  data.forEach((curr, index) => {
204
- const { stackIndex, show: isShowSeries } = series;
205
- const isTop = true; // is top position on stack (Stacked or not, default is true)
206
214
  const baseIndex = bsIds.length - 1 < 0 ? 0 : bsIds.length - 1;
207
215
  let bdata = getBaseDataPosition(baseIndex, index); // base(previous) series data
208
216
  let odata = curr; // current series original data
@@ -216,7 +224,7 @@ const modules = {
216
224
  }
217
225
 
218
226
  const oData = odata?.value ?? odata;
219
- if (stackIndex > 0) {
227
+ if (sIdx > 0) {
220
228
  if (oData != null) {
221
229
  gdata = bdata + oData;
222
230
  } else {
@@ -228,14 +236,7 @@ const modules = {
228
236
  gdata = oData;
229
237
  }
230
238
 
231
- if (gdata && isShowSeries) {
232
- for (let idx = baseIndex; idx > -1; idx--) {
233
- const prevSeriesData = this.seriesList[bsIds[idx]];
234
- prevSeriesData.data[index].isTop = false;
235
- }
236
- }
237
-
238
- sdata.push(this.addData(gdata, ldata, odata, bdata, isTop));
239
+ sdata.push(this.addData(gdata, ldata, odata, bdata));
239
240
  }
240
241
  });
241
242
 
@@ -270,17 +271,33 @@ const modules = {
270
271
  return sdata;
271
272
  },
272
273
 
274
+ /**
275
+ * Take data to create data for each series
276
+ * @param {array} data data array for each series
277
+ * @returns {array} data info added position and etc
278
+ */
279
+ addSeriesDSforScatter(data) {
280
+ return data.map((item) => {
281
+ const ldata = item.x;
282
+ const gdata = {
283
+ value: item.y,
284
+ color: item?.color || null,
285
+ };
286
+
287
+ return this.addData(gdata, ldata, gdata);
288
+ });
289
+ },
290
+
273
291
  /**
274
292
  * Take data to create data object for graph
275
293
  * @param {object} gdata graph data (y-axis value for vertical chart)
276
294
  * @param {object} ldata label data (x-axis value for vertical chart)
277
295
  * @param {object} odata original data (without stacked value)
278
296
  * @param {object} bdata base data (stacked value)
279
- * @param {boolean} isTop is top position on stack (Stacked or not, default is true)
280
297
 
281
298
  * @returns {object} data for each graph point
282
299
  */
283
- addData(gdata, ldata, odata = null, bdata = null, isTop = true) {
300
+ addData(gdata, ldata, odata = null, bdata = null) {
284
301
  let data;
285
302
  let gdataValue = null;
286
303
  let odataValue = null;
@@ -312,7 +329,6 @@ const modules = {
312
329
  data.w = null;
313
330
  data.h = null;
314
331
  data.dataColor = gdataColor ?? odataColor;
315
- data.isTop = isTop;
316
332
 
317
333
  return data;
318
334
  },
@@ -494,17 +510,17 @@ const modules = {
494
510
 
495
511
  if (smm && series.show) {
496
512
  if (!isHorizontal) {
497
- if (smm.minX && ((!minmax.x[axisX].min || (smm.minX < minmax.x[axisX].min)))) {
513
+ if (smm.minX && ((minmax.x[axisX].min === null || (smm.minX < minmax.x[axisX].min)))) {
498
514
  minmax.x[axisX].min = smm.minX;
499
515
  }
500
- if (!minmax.y[axisY].min || (smm.minY < minmax.y[axisY].min)) {
516
+ if (minmax.y[axisY].min === null || (smm.minY < minmax.y[axisY].min)) {
501
517
  minmax.y[axisY].min = smm.minY;
502
518
  }
503
519
  } else {
504
- if (!minmax.x[axisX].min || (smm.minX < minmax.x[axisX].min)) {
520
+ if (minmax.x[axisX].min === null || (smm.minX < minmax.x[axisX].min)) {
505
521
  minmax.x[axisX].min = smm.minX;
506
522
  }
507
- if (smm.minY && (!minmax.y[axisY].min || (smm.minY < minmax.y[axisY].min))) {
523
+ if (smm.minY && (minmax.y[axisY].min === null || (smm.minY < minmax.y[axisY].min))) {
508
524
  minmax.y[axisY].min = smm.minY;
509
525
  }
510
526
  }
@@ -62,7 +62,7 @@ const modules = {
62
62
  this.drawSelectionArea(this.dragInfoBackup);
63
63
  }
64
64
 
65
- if (indicator.use && type !== 'pie') {
65
+ if (indicator.use && type !== 'pie' && type !== 'scatter') {
66
66
  this.drawIndicator(offset, indicator.color);
67
67
  }
68
68
  };
@@ -147,6 +147,7 @@ const modules = {
147
147
  const { dragSelection, type } = this.options;
148
148
 
149
149
  if (dragSelection.use && (type === 'scatter' || type === 'line')) {
150
+ this.removeSelectionArea();
150
151
  this.dragStart(e, type);
151
152
  }
152
153
  };
@@ -270,8 +271,7 @@ const modules = {
270
271
  }
271
272
 
272
273
  if (!this.options.dragSelection.keepDisplay) {
273
- this.dragInfoBackup = null;
274
- this.overlayClear();
274
+ this.removeSelectionArea();
275
275
  }
276
276
 
277
277
  this.dragInfo = null;
@@ -299,6 +299,14 @@ const modules = {
299
299
  ctx.globalAlpha = 1;
300
300
  },
301
301
 
302
+ /** Remove drag selection area
303
+ *
304
+ */
305
+ removeSelectionArea() {
306
+ this.dragInfoBackup = null;
307
+ this.overlayClear();
308
+ },
309
+
302
310
  /**
303
311
  * Computing mouse position on canvas
304
312
  *
@@ -312,10 +312,20 @@ class Scale {
312
312
  if (this.type === 'x') {
313
313
  fromPos = Canvas.calculateX(from ?? minX, axisMin, axisMax, xArea, minX);
314
314
  toPos = Canvas.calculateX(to ?? maxX, axisMin, axisMax, xArea, minX);
315
+
316
+ if (fromPos === null || toPos === null) {
317
+ return;
318
+ }
319
+
315
320
  this.drawXPlotBand(fromPos, toPos, minX, maxX, minY, maxY);
316
321
  } else {
317
322
  fromPos = Canvas.calculateY(from ?? axisMin, axisMin, axisMax, yArea, maxY);
318
323
  toPos = Canvas.calculateY(to ?? axisMax, axisMin, axisMax, yArea, maxY);
324
+
325
+ if (fromPos === null || toPos === null) {
326
+ return;
327
+ }
328
+
319
329
  this.drawYPlotBand(fromPos, toPos, minX, maxX, minY, maxY);
320
330
  }
321
331
 
@@ -341,9 +351,19 @@ class Scale {
341
351
  let dataPos;
342
352
  if (this.type === 'x') {
343
353
  dataPos = Canvas.calculateX(value, axisMin, axisMax, xArea, minX);
354
+
355
+ if (dataPos === null) {
356
+ return;
357
+ }
358
+
344
359
  this.drawXPlotLine(dataPos, minX, maxX, minY, maxY);
345
360
  } else {
346
361
  dataPos = Canvas.calculateY(value, axisMin, axisMax, yArea, maxY);
362
+
363
+ if (dataPos === null) {
364
+ return;
365
+ }
366
+
347
367
  this.drawYPlotLine(dataPos, minX, maxX, minY, maxY);
348
368
  }
349
369
 
@@ -98,7 +98,13 @@ const DEFAULT_DATA = {
98
98
  export const useModel = () => {
99
99
  const { emit } = getCurrentInstance();
100
100
 
101
- const getNormalizedOptions = options => defaultsDeep({}, options, DEFAULT_OPTIONS);
101
+ const getNormalizedOptions = (options) => {
102
+ if (options.type === 'scatter') {
103
+ DEFAULT_OPTIONS.tooltip.use = false;
104
+ }
105
+
106
+ return defaultsDeep({}, options, DEFAULT_OPTIONS);
107
+ };
102
108
  const getNormalizedData = data => defaultsDeep(data, DEFAULT_DATA);
103
109
 
104
110
  const eventListeners = {
@@ -9,11 +9,7 @@
9
9
  <template #toolbarWrapper>
10
10
  <slot
11
11
  name="toolbar"
12
- :item="{
13
- onRefresh: onRefresh,
14
- onDelete: onDelete,
15
- onSearch: onSearch,
16
- }"
12
+ :item="{ onSearch: onSearch }"
17
13
  >
18
14
  </slot>
19
15
  </template>
@@ -97,7 +93,7 @@
97
93
  <span
98
94
  :title="column.caption"
99
95
  class="column-name"
100
- @click.stop="onSort(column.field)"
96
+ @click.stop="onSort(column)"
101
97
  >
102
98
  {{ column.caption }}
103
99
  </span>
@@ -206,9 +202,6 @@
206
202
  :item="{
207
203
  row,
208
204
  column,
209
- onRowDelete: onRowDelete,
210
- onRowEdit: onRowEdit,
211
- onDetailPopup: onDetailPopup,
212
205
  }"
213
206
  >
214
207
  </slot>
@@ -253,18 +246,12 @@
253
246
  @apply-filter="onApplyFilter"
254
247
  @before-close="onCloseFilterWindow"
255
248
  />
256
- <ev-window
257
- v-model:visible="isDetailPopWin"
258
- title="DETAIL POPUP"
259
- >
260
- <div>{{detailPopData}}</div>
261
- </ev-window>
262
249
  </div>
263
250
  </div>
264
251
  </template>
265
252
 
266
253
  <script>
267
- import { reactive, ref, toRefs, computed, watch, onMounted, getCurrentInstance } from 'vue';
254
+ import { reactive, toRefs, computed, watch, onMounted } from 'vue';
268
255
  import FilterWindow from './grid.filter.window';
269
256
  import Toolbar from './grid.toolbar';
270
257
  import {
@@ -331,7 +318,6 @@ export default {
331
318
  getColumnIndex,
332
319
  setPixelUnit,
333
320
  } = commonFunctions();
334
- const { ctx } = getCurrentInstance();
335
321
  const showHeader = computed(() =>
336
322
  (props.option.showHeader === undefined ? true : props.option.showHeader));
337
323
  const stripeStyle = computed(() => (props.option.style?.stripe || false));
@@ -625,51 +611,6 @@ export default {
625
611
  setStore([], false);
626
612
  }, 500);
627
613
  };
628
- const onRefresh = () => {
629
- console.log('On click refresh button');
630
- };
631
- const onDelete = () => {
632
- ctx.$messagebox({
633
- title: 'Delete',
634
- message: 'Are you sure you want to delete checked item?',
635
- iconClass: 'ev-icon-trash3',
636
- onClose: (type) => {
637
- if (type === 'ok') {
638
- stores.originStore = stores.store.filter(item => !item[1]);
639
- setStore([], false);
640
- }
641
- },
642
- });
643
- };
644
- const onRowDelete = (index) => {
645
- ctx.$messagebox({
646
- title: 'Delete',
647
- message: 'Are you sure you want to delete this item?',
648
- iconClass: 'ev-icon-trash3',
649
- onClose: (type) => {
650
- if (type === 'ok') {
651
- stores.originStore = stores.store.filter(item => item[0] !== index);
652
- setStore([], false);
653
- }
654
- },
655
- });
656
- // emit
657
- };
658
- const onRowEdit = (row) => {
659
- ctx.$messagebox({
660
- title: 'Edit',
661
- message: row[2],
662
- iconClass: 'ev-icon-pencil',
663
- showCancelBtn: false,
664
- });
665
- // emit
666
- };
667
- const isDetailPopWin = ref(false);
668
- const detailPopData = ref('');
669
- const onDetailPopup = (row) => {
670
- isDetailPopWin.value = true;
671
- detailPopData.value = row[2];
672
- };
673
614
  const isFilterButton = field => filterInfo.isFiltering && field !== 'db-icon' && field !== 'user-icon';
674
615
  return {
675
616
  showHeader,
@@ -685,8 +626,6 @@ export default {
685
626
  ...toRefs(checkInfo),
686
627
  ...toRefs(sortInfo),
687
628
  ...toRefs(contextInfo),
688
- isDetailPopWin,
689
- detailPopData,
690
629
  isRenderer,
691
630
  getComponentName,
692
631
  getConvertValue,
@@ -713,12 +652,7 @@ export default {
713
652
  updateData,
714
653
  setContextMenu,
715
654
  onContextMenu,
716
- onRefresh,
717
- onDelete,
718
655
  onSearch,
719
- onRowEdit,
720
- onRowDelete,
721
- onDetailPopup,
722
656
  isFilterButton,
723
657
  };
724
658
  },
@@ -475,17 +475,20 @@ export const sortEvent = (params) => {
475
475
  /**
476
476
  * sort 이벤트를 처리한다.
477
477
  *
478
- * @param {string} field - 컬럼 field
478
+ * @param {object} column - 컬럼 정보
479
479
  */
480
- const onSort = (field) => {
481
- if (sortInfo.sortField !== field) {
482
- order.orders = ['asc', 'desc', 'init'];
483
- sortInfo.sortField = field;
484
- }
485
- sortInfo.sortOrder = order.dequeue();
486
- order.enqueue(sortInfo.sortOrder);
480
+ const onSort = (column) => {
481
+ const sortable = column.sortable === undefined ? true : column.sortable;
482
+ if (sortable) {
483
+ if (sortInfo.sortField !== column?.field) {
484
+ order.orders = ['asc', 'desc', 'init'];
485
+ sortInfo.sortField = column?.field;
486
+ }
487
+ sortInfo.sortOrder = order.dequeue();
488
+ order.enqueue(sortInfo.sortOrder);
487
489
 
488
- sortInfo.isSorting = true;
490
+ sortInfo.isSorting = true;
491
+ }
489
492
  };
490
493
  /**
491
494
  * 설정값에 따라 해당 컬럼 데이터에 대해 정렬한다.
@@ -61,7 +61,7 @@
61
61
  :class="{ 'on': isPasswordVisible }"
62
62
  @click="changePasswordVisible"
63
63
  >
64
- <i class="ev-icon-radio-on"/>
64
+ <i :class="isPasswordVisible ? 'ev-icon-visibility' : 'ev-icon-visibility-off'"/>
65
65
  </span>
66
66
  <span
67
67
  v-if="type === 'search'"
@@ -246,6 +246,7 @@ export default {
246
246
  treeStore: [],
247
247
  viewStore: [],
248
248
  filterStore: [],
249
+ searchStore: computed(() => stores.treeStore.filter(item => item.isFilter)),
249
250
  treeRows: props.rows,
250
251
  showTreeStore: computed(() => stores.treeStore.filter(item => item.show)),
251
252
  orderedColumns: computed(() =>
@@ -330,20 +331,22 @@ export default {
330
331
 
331
332
  const {
332
333
  onSearch,
333
- } = filterEvent({ stores, getConvertValue, calculatedColumn, updateVScroll });
334
+ } = filterEvent({ checkInfo, stores, getConvertValue, calculatedColumn, updateVScroll });
334
335
 
335
336
  watch(
336
337
  () => props.checked,
337
338
  (value) => {
338
- const store = stores.treeStore;
339
+ let store = stores.treeStore;
340
+ if (stores.searchStore.length > 0) {
341
+ store = stores.searchStore;
342
+ }
343
+ const isCheck = store.every(n => n.checked === true);
339
344
  checkInfo.isHeaderChecked = false;
340
345
  checkInfo.checkedRows = value;
341
346
  for (let ix = 0; ix < store.length; ix++) {
342
347
  store[ix].checked = value.includes(store[ix]);
343
348
  }
344
- if (value.length && store.length === value.length) {
345
- checkInfo.isHeaderChecked = true;
346
- }
349
+ checkInfo.isHeaderChecked = isCheck;
347
350
  },
348
351
  );
349
352
  watch(