ai.touchui-vue 1.38.0 → 1.40.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/lib/ai.touchui-vue.common.js +488 -312
- package/lib/date-picker.js +23 -16
- package/lib/filter.js +6 -4
- package/lib/float.js +39 -9
- package/lib/import.js +19 -11
- package/lib/index.js +1 -1
- package/lib/input.js +5 -8
- package/lib/progress.js +8 -2
- package/lib/select.js +210 -96
- package/lib/table.js +112 -96
- package/lib/theme/css/theme/B-Design.css +1 -1
- package/lib/theme/css/theme/aiplan.css +1 -1
- package/lib/theme/css/theme/aiplangd.css +1 -1
- package/lib/theme/css/theme/chbn.css +1 -1
- package/lib/theme/css/theme/default.css +1 -1
- package/lib/theme/css/theme/dt.css +1 -1
- package/lib/theme/css/theme/ecloud.css +1 -1
- package/lib/theme/css/theme/hongkong.css +1 -1
- package/lib/theme/css/theme/logistics.css +1 -1
- package/lib/theme/css/theme/narrow.css +1 -1
- package/lib/theme/css/theme/sdpf.css +1 -1
- package/lib/theme/css/theme/upc.css +1 -1
- package/lib/theme/css/theme/website.css +1 -1
- package/lib/theme/css/theme/workbench-gz.css +1 -1
- package/lib/theme/css/theme/zj.css +1 -1
- package/lib/utils/print.js +21 -7
- package/lib/utils/validate.js +4 -22
- package/package.json +1 -1
- package/packages/date-picker/src/.DS_Store +0 -0
- package/packages/date-picker/src/date-picker.vue +16 -10
- package/packages/filter/src/filter.vue +4 -2
- package/packages/float/src/main.vue +37 -7
- package/packages/import/src/import.vue +1 -1
- package/packages/input/src/input.vue +3 -6
- package/packages/progress/src/progress.vue +5 -0
- package/packages/select/src/select.vue +95 -19
- package/packages/table/src/table.vue +17 -5
- package/packages/theme/lib/css/theme/B-Design.css +1 -1
- package/packages/theme/lib/css/theme/aiplan.css +1 -1
- package/packages/theme/lib/css/theme/aiplangd.css +1 -1
- package/packages/theme/lib/css/theme/chbn.css +1 -1
- package/packages/theme/lib/css/theme/default.css +1 -1
- package/packages/theme/lib/css/theme/dt.css +1 -1
- package/packages/theme/lib/css/theme/ecloud.css +1 -1
- package/packages/theme/lib/css/theme/hongkong.css +1 -1
- package/packages/theme/lib/css/theme/logistics.css +1 -1
- package/packages/theme/lib/css/theme/narrow.css +1 -1
- package/packages/theme/lib/css/theme/sdpf.css +1 -1
- package/packages/theme/lib/css/theme/upc.css +1 -1
- package/packages/theme/lib/css/theme/website.css +1 -1
- package/packages/theme/lib/css/theme/workbench-gz.css +1 -1
- package/packages/theme/lib/css/theme/zj.css +1 -1
- package/packages/theme/src/less/element/pic.less +1 -0
- package/packages/theme/src/less/element/progress.less +1 -1
- package/packages/theme/src/less/element/select.less +8 -0
- package/src/index.js +1 -1
- package/src/utils/print.js +21 -7
- package/src/utils/validate.js +4 -22
package/lib/table.js
CHANGED
|
@@ -245,7 +245,7 @@ module.exports = require("ai.touchui-vue/lib/locale");
|
|
|
245
245
|
// ESM COMPAT FLAG
|
|
246
246
|
__webpack_require__.r(__webpack_exports__);
|
|
247
247
|
|
|
248
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/table/src/table.vue?vue&type=template&id=
|
|
248
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/table/src/table.vue?vue&type=template&id=2e5c7c80
|
|
249
249
|
var render = function () {
|
|
250
250
|
var _vm = this
|
|
251
251
|
var _h = _vm.$createElement
|
|
@@ -1064,7 +1064,7 @@ var staticRenderFns = []
|
|
|
1064
1064
|
render._withStripped = true
|
|
1065
1065
|
|
|
1066
1066
|
|
|
1067
|
-
// CONCATENATED MODULE: ./packages/table/src/table.vue?vue&type=template&id=
|
|
1067
|
+
// CONCATENATED MODULE: ./packages/table/src/table.vue?vue&type=template&id=2e5c7c80
|
|
1068
1068
|
|
|
1069
1069
|
// EXTERNAL MODULE: external "vue"
|
|
1070
1070
|
var external_vue_ = __webpack_require__(4);
|
|
@@ -3984,6 +3984,12 @@ function db(fn) {
|
|
|
3984
3984
|
|
|
3985
3985
|
methods: {
|
|
3986
3986
|
init: function init() {
|
|
3987
|
+
if (Number(this.fixTop) > 0 && this.$refs.leftTable) {
|
|
3988
|
+
this.$refs.leftTable.style.top = 0;
|
|
3989
|
+
}
|
|
3990
|
+
if (Number(this.fixTop) > 0 && this.$refs.rightTable) {
|
|
3991
|
+
this.$refs.rightTable.style.top = 0;
|
|
3992
|
+
}
|
|
3987
3993
|
if (this.$refs && this.$refs.tbody) {
|
|
3988
3994
|
// 监听 slot 中的 DOM 变化
|
|
3989
3995
|
var tbody = this.$refs.tbody.$el || this.$refs.tbody;
|
|
@@ -4162,12 +4168,18 @@ function db(fn) {
|
|
|
4162
4168
|
}
|
|
4163
4169
|
},
|
|
4164
4170
|
setFixDiv: function setFixDiv() {
|
|
4171
|
+
var _this8 = this;
|
|
4172
|
+
|
|
4165
4173
|
if (Number(this.fixTop) > 0 && this.$refs.top && this.$refs.topTable) {
|
|
4166
4174
|
if (this.hasVScroll()) {
|
|
4167
4175
|
this.$refs.top.style.width = this.$refs.body.offsetWidth - this.getBarWidth() + 'px';
|
|
4168
4176
|
}
|
|
4169
|
-
this.$refs.topTable.style.width =
|
|
4170
|
-
this.$refs.table.style.width =
|
|
4177
|
+
this.$refs.topTable.style.width = '';
|
|
4178
|
+
this.$refs.table.style.width = '';
|
|
4179
|
+
this.$nextTick(function () {
|
|
4180
|
+
_this8.$refs.topTable.style.width = _this8.$refs.table.offsetWidth + 'px';
|
|
4181
|
+
_this8.$refs.table.style.width = _this8.$refs.table.offsetWidth + 'px';
|
|
4182
|
+
});
|
|
4171
4183
|
}
|
|
4172
4184
|
if (Number(this.fixRight) > 0 && this.$refs.right && this.$el) {
|
|
4173
4185
|
if (this.hasHScroll()) {
|
|
@@ -4203,7 +4215,7 @@ function db(fn) {
|
|
|
4203
4215
|
}
|
|
4204
4216
|
},
|
|
4205
4217
|
formatData: function formatData() {
|
|
4206
|
-
var
|
|
4218
|
+
var _this9 = this;
|
|
4207
4219
|
|
|
4208
4220
|
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
4209
4221
|
|
|
@@ -4252,30 +4264,30 @@ function db(fn) {
|
|
|
4252
4264
|
setData(dataTemp);
|
|
4253
4265
|
this.iData = arr;
|
|
4254
4266
|
setTimeout(function () {
|
|
4255
|
-
|
|
4267
|
+
_this9.changeIDataType = 'default';
|
|
4256
4268
|
}, 100);
|
|
4257
4269
|
},
|
|
4258
4270
|
|
|
4259
4271
|
// 设置全选或者不全选
|
|
4260
4272
|
toggleAllSelection: function toggleAllSelection(checked) {
|
|
4261
|
-
var
|
|
4273
|
+
var _this10 = this;
|
|
4262
4274
|
|
|
4263
4275
|
this.iData.map(function (item) {
|
|
4264
4276
|
if (!item.disabled) {
|
|
4265
|
-
|
|
4277
|
+
_this10.$set(item, '_checked', checked);
|
|
4266
4278
|
}
|
|
4267
4279
|
});
|
|
4268
4280
|
},
|
|
4269
4281
|
|
|
4270
4282
|
// 全选中事件
|
|
4271
4283
|
handleSelectionAllChange: function handleSelectionAllChange(checked) {
|
|
4272
|
-
var
|
|
4284
|
+
var _this11 = this;
|
|
4273
4285
|
|
|
4274
4286
|
this.isSelectAll = checked;
|
|
4275
4287
|
this.toggleAllSelection(checked);
|
|
4276
4288
|
this.iData.map(function (item) {
|
|
4277
4289
|
if (!item._checked) {
|
|
4278
|
-
|
|
4290
|
+
_this11.removeFromCache(item);
|
|
4279
4291
|
}
|
|
4280
4292
|
});
|
|
4281
4293
|
this.$emit('change', this.checked, checked);
|
|
@@ -4296,14 +4308,18 @@ function db(fn) {
|
|
|
4296
4308
|
|
|
4297
4309
|
// 行勾选事件
|
|
4298
4310
|
handleTableRowChecked: function handleTableRowChecked(checked, dataIndex) {
|
|
4311
|
+
var _this12 = this;
|
|
4312
|
+
|
|
4299
4313
|
var current = this.iData[dataIndex];
|
|
4300
4314
|
if (!checked) {
|
|
4301
4315
|
this.removeFromCache(this.iData[dataIndex]);
|
|
4302
4316
|
}
|
|
4303
4317
|
this.setSelectAll();
|
|
4304
|
-
this.$
|
|
4305
|
-
|
|
4306
|
-
|
|
4318
|
+
this.$nextTick(function () {
|
|
4319
|
+
_this12.$emit('change', _this12.checked, checked, current);
|
|
4320
|
+
_this12.$emit('selectionChange', _this12.selectionValueType === 'tree' ? _this12.buildHierarchyTree(_this12.checked) : _this12.checked, current);
|
|
4321
|
+
_this12.$emit('selection-change', _this12.selectionValueType === 'tree' ? _this12.buildHierarchyTree(_this12.checked) : _this12.checked, current);
|
|
4322
|
+
});
|
|
4307
4323
|
},
|
|
4308
4324
|
|
|
4309
4325
|
// 从记录中移除
|
|
@@ -4339,7 +4355,7 @@ function db(fn) {
|
|
|
4339
4355
|
|
|
4340
4356
|
// table 点击事件
|
|
4341
4357
|
handleTableClick: function handleTableClick(event, eventPath) {
|
|
4342
|
-
var
|
|
4358
|
+
var _this13 = this;
|
|
4343
4359
|
|
|
4344
4360
|
if (this.stopClick) {
|
|
4345
4361
|
return;
|
|
@@ -4351,49 +4367,49 @@ function db(fn) {
|
|
|
4351
4367
|
if (String(dom.tagName).toLowerCase() === 'tr') {
|
|
4352
4368
|
(function () {
|
|
4353
4369
|
|
|
4354
|
-
|
|
4370
|
+
_this13.lastSelectedRow = dom;
|
|
4355
4371
|
var rowIndex = Number(getDataSet(dom).index);
|
|
4356
4372
|
|
|
4357
|
-
if (
|
|
4373
|
+
if (_this13.rowSelectable || _this13.selectable) {
|
|
4358
4374
|
|
|
4359
4375
|
// 行点击事件
|
|
4360
|
-
|
|
4361
|
-
if (
|
|
4362
|
-
|
|
4376
|
+
_this13.$emit('row-click', _this13.iData[rowIndex], rowIndex, event);
|
|
4377
|
+
if (_this13.highlightCurrentRow) {
|
|
4378
|
+
_this13.iData.map(function (item, index) {
|
|
4363
4379
|
if (index === rowIndex) {
|
|
4364
|
-
if (
|
|
4380
|
+
if (_this13.clearable) {
|
|
4365
4381
|
if (item._on) {
|
|
4366
4382
|
item._on = false;
|
|
4367
4383
|
} else {
|
|
4368
|
-
|
|
4384
|
+
_this13.$set(item, '_on', true);
|
|
4369
4385
|
}
|
|
4370
4386
|
} else {
|
|
4371
|
-
|
|
4387
|
+
_this13.$set(item, '_on', true);
|
|
4372
4388
|
}
|
|
4373
4389
|
} else {
|
|
4374
|
-
|
|
4390
|
+
_this13.$set(item, '_on', false);
|
|
4375
4391
|
}
|
|
4376
4392
|
});
|
|
4377
4393
|
}
|
|
4378
4394
|
|
|
4379
4395
|
// 多选联动
|
|
4380
|
-
if (
|
|
4381
|
-
|
|
4382
|
-
|
|
4396
|
+
if (_this13.hasSelection && !_this13.iData[rowIndex].disabled) {
|
|
4397
|
+
_this13.iData[rowIndex]._checked = !_this13.iData[rowIndex]._checked;
|
|
4398
|
+
_this13.handleTableRowChecked(_this13.iData[rowIndex]._checked, rowIndex);
|
|
4383
4399
|
}
|
|
4384
4400
|
|
|
4385
4401
|
// 单选联动
|
|
4386
|
-
if (
|
|
4387
|
-
if (
|
|
4388
|
-
|
|
4402
|
+
if (_this13.hasRadio && !_this13.iData[rowIndex].disabled) {
|
|
4403
|
+
if (_this13.clickRadio(_this13.iData[rowIndex], rowIndex)) {
|
|
4404
|
+
_this13.selectRadio(rowIndex);
|
|
4389
4405
|
}
|
|
4390
4406
|
}
|
|
4391
4407
|
}
|
|
4392
4408
|
|
|
4393
|
-
if (
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4409
|
+
if (_this13.autoShowDetail) {
|
|
4410
|
+
_this13.current = _this13.iData[rowIndex];
|
|
4411
|
+
_this13.currentIndex = rowIndex;
|
|
4412
|
+
_this13.$refs.detail.open();
|
|
4397
4413
|
}
|
|
4398
4414
|
})();
|
|
4399
4415
|
} else if (String(dom.tagName).toLowerCase() === 'td' && (this.cellSelectable || this.selectable)) {
|
|
@@ -4430,7 +4446,7 @@ function db(fn) {
|
|
|
4430
4446
|
|
|
4431
4447
|
// table鼠标悬移事件
|
|
4432
4448
|
handleTableMouseover: function handleTableMouseover(event) {
|
|
4433
|
-
var
|
|
4449
|
+
var _this14 = this;
|
|
4434
4450
|
|
|
4435
4451
|
if (!this.$pc) return;
|
|
4436
4452
|
if (this.rowSelectable || this.selectable) {
|
|
@@ -4439,11 +4455,11 @@ function db(fn) {
|
|
|
4439
4455
|
var dom = composedPath[i];
|
|
4440
4456
|
if (String(dom.tagName).toLowerCase() === 'tr' && (this.rowSelectable || this.selectable)) {
|
|
4441
4457
|
(function () {
|
|
4442
|
-
|
|
4458
|
+
_this14.lastSelectedRow = dom;
|
|
4443
4459
|
var rowIndex = Number(getDataSet(dom).index);
|
|
4444
|
-
|
|
4460
|
+
_this14.iData.map(function (item, index) {
|
|
4445
4461
|
if (index === rowIndex) {
|
|
4446
|
-
|
|
4462
|
+
_this14.$set(item, '_hover', true);
|
|
4447
4463
|
}
|
|
4448
4464
|
});
|
|
4449
4465
|
})();
|
|
@@ -4454,7 +4470,7 @@ function db(fn) {
|
|
|
4454
4470
|
|
|
4455
4471
|
// table鼠标悬移事件
|
|
4456
4472
|
handleTableMouseout: function handleTableMouseout(event) {
|
|
4457
|
-
var
|
|
4473
|
+
var _this15 = this;
|
|
4458
4474
|
|
|
4459
4475
|
if (!this.$pc) return;
|
|
4460
4476
|
if (this.rowSelectable || this.selectable || this.autoShowDetail || this.longTapAction) {
|
|
@@ -4463,17 +4479,17 @@ function db(fn) {
|
|
|
4463
4479
|
var dom = composedPath[i];
|
|
4464
4480
|
if (String(dom.tagName).toLowerCase() === 'tr' && (this.rowSelectable || this.selectable || this.autoShowDetail || this.longTapAction)) {
|
|
4465
4481
|
(function () {
|
|
4466
|
-
|
|
4482
|
+
_this15.lastSelectedRow = dom;
|
|
4467
4483
|
var rowIndex = Number(getDataSet(dom).index);
|
|
4468
|
-
|
|
4469
|
-
|
|
4484
|
+
_this15.changeIDataType = 'change';
|
|
4485
|
+
_this15.iData.map(function (item, index) {
|
|
4470
4486
|
if (index === rowIndex) {
|
|
4471
|
-
|
|
4472
|
-
|
|
4487
|
+
_this15.$set(item, '_hover', false);
|
|
4488
|
+
_this15.$set(item, '_active', false);
|
|
4473
4489
|
}
|
|
4474
4490
|
});
|
|
4475
|
-
|
|
4476
|
-
|
|
4491
|
+
_this15.$nextTick(function () {
|
|
4492
|
+
_this15.changeIDataType = 'default';
|
|
4477
4493
|
});
|
|
4478
4494
|
})();
|
|
4479
4495
|
}
|
|
@@ -4483,7 +4499,7 @@ function db(fn) {
|
|
|
4483
4499
|
|
|
4484
4500
|
// table鼠标按下事件
|
|
4485
4501
|
handleTableMousedown: function handleTableMousedown(event) {
|
|
4486
|
-
var
|
|
4502
|
+
var _this16 = this;
|
|
4487
4503
|
|
|
4488
4504
|
if ((this.$pad || this.$phone) && event.type === 'touchstart' || this.$pc && event.type === 'mousedown') {
|
|
4489
4505
|
if (this.rowSelectable || this.selectable || this.autoShowDetail || this.longTapAction) {
|
|
@@ -4492,48 +4508,48 @@ function db(fn) {
|
|
|
4492
4508
|
var dom = composedPath[i];
|
|
4493
4509
|
if (String(dom.tagName).toLowerCase() === 'tr' && (this.rowSelectable || this.selectable || this.autoShowDetail || this.longTapAction)) {
|
|
4494
4510
|
(function () {
|
|
4495
|
-
|
|
4511
|
+
_this16.lastSelectedRow = dom;
|
|
4496
4512
|
var rowIndex = Number(getDataSet(dom).index);
|
|
4497
|
-
if (
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
if (
|
|
4513
|
+
if (_this16.$phone) {
|
|
4514
|
+
_this16.isStartLongtap = true;
|
|
4515
|
+
_this16.longtapTimer = setTimeout(function () {
|
|
4516
|
+
if (_this16.isStartLongtap) {
|
|
4501
4517
|
event.preventDefault();
|
|
4502
|
-
|
|
4503
|
-
|
|
4518
|
+
_this16.$emit('contextmenu', _this16.iData[rowIndex], rowIndex, event);
|
|
4519
|
+
_this16.stopClick = true;
|
|
4504
4520
|
|
|
4505
|
-
|
|
4506
|
-
|
|
4521
|
+
_this16.changeIDataType = 'change';
|
|
4522
|
+
_this16.iData.map(function (item, index) {
|
|
4507
4523
|
if (index === rowIndex) {
|
|
4508
|
-
|
|
4524
|
+
_this16.$set(item, '_active', false);
|
|
4509
4525
|
}
|
|
4510
4526
|
});
|
|
4511
|
-
|
|
4512
|
-
|
|
4527
|
+
_this16.$nextTick(function () {
|
|
4528
|
+
_this16.changeIDataType = 'default';
|
|
4513
4529
|
});
|
|
4514
4530
|
|
|
4515
4531
|
// 弹出功能列表
|
|
4516
|
-
if (
|
|
4532
|
+
if (_this16.type === 'v' && (_this16.columns.some(function (item) {
|
|
4517
4533
|
return item.type === 'action';
|
|
4518
|
-
}) &&
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4534
|
+
}) && _this16.contextAction || _this16.contextSelection !== null)) {
|
|
4535
|
+
_this16.current = _this16.iData[rowIndex];
|
|
4536
|
+
_this16.currentIndex = rowIndex;
|
|
4537
|
+
_this16.$refs.action.open();
|
|
4522
4538
|
}
|
|
4523
4539
|
}
|
|
4524
|
-
|
|
4540
|
+
_this16.isStartLongtap = false;
|
|
4525
4541
|
}, 300);
|
|
4526
4542
|
}
|
|
4527
|
-
|
|
4528
|
-
if (
|
|
4529
|
-
|
|
4543
|
+
_this16.changeIDataType = 'change';
|
|
4544
|
+
if (_this16.rowSelectable || _this16.selectable || _this16.autoShowDetail) {
|
|
4545
|
+
_this16.iData.map(function (item, index) {
|
|
4530
4546
|
if (index === rowIndex) {
|
|
4531
|
-
|
|
4547
|
+
_this16.$set(item, '_active', true);
|
|
4532
4548
|
}
|
|
4533
4549
|
});
|
|
4534
4550
|
}
|
|
4535
|
-
|
|
4536
|
-
|
|
4551
|
+
_this16.$nextTick(function () {
|
|
4552
|
+
_this16.changeIDataType = 'default';
|
|
4537
4553
|
});
|
|
4538
4554
|
})();
|
|
4539
4555
|
}
|
|
@@ -4544,7 +4560,7 @@ function db(fn) {
|
|
|
4544
4560
|
|
|
4545
4561
|
// table鼠标松开事件
|
|
4546
4562
|
handleTableMouseup: function handleTableMouseup(event) {
|
|
4547
|
-
var
|
|
4563
|
+
var _this17 = this;
|
|
4548
4564
|
|
|
4549
4565
|
if ((this.$pad || this.$phone) && event.type === 'touchend' || this.$pc && event.type === 'mouseup') {
|
|
4550
4566
|
if (this.rowSelectable || this.selectable || this.autoShowDetail || this.longTapAction) {
|
|
@@ -4553,20 +4569,20 @@ function db(fn) {
|
|
|
4553
4569
|
var dom = composedPath[i];
|
|
4554
4570
|
if (String(dom.tagName).toLowerCase() === 'tr' && (this.rowSelectable || this.selectable || this.autoShowDetail || this.longTapAction)) {
|
|
4555
4571
|
(function () {
|
|
4556
|
-
|
|
4572
|
+
_this17.lastSelectedRow = dom;
|
|
4557
4573
|
var rowIndex = Number(getDataSet(dom).index);
|
|
4558
|
-
|
|
4559
|
-
|
|
4574
|
+
_this17.changeIDataType = 'change';
|
|
4575
|
+
_this17.iData.map(function (item, index) {
|
|
4560
4576
|
if (index === rowIndex) {
|
|
4561
|
-
|
|
4577
|
+
_this17.$set(item, '_active', false);
|
|
4562
4578
|
}
|
|
4563
4579
|
});
|
|
4564
|
-
|
|
4565
|
-
|
|
4580
|
+
_this17.$nextTick(function () {
|
|
4581
|
+
_this17.changeIDataType = 'default';
|
|
4566
4582
|
});
|
|
4567
|
-
if (
|
|
4568
|
-
|
|
4569
|
-
clearInterval(
|
|
4583
|
+
if (_this17.$phone) {
|
|
4584
|
+
_this17.isStartLongtap = false;
|
|
4585
|
+
clearInterval(_this17.longtapTimer);
|
|
4570
4586
|
}
|
|
4571
4587
|
})();
|
|
4572
4588
|
}
|
|
@@ -4577,7 +4593,7 @@ function db(fn) {
|
|
|
4577
4593
|
|
|
4578
4594
|
// table鼠标移动事件
|
|
4579
4595
|
handleTableMousemove: function handleTableMousemove(event) {
|
|
4580
|
-
var
|
|
4596
|
+
var _this18 = this;
|
|
4581
4597
|
|
|
4582
4598
|
this.isStartLongtap = false;
|
|
4583
4599
|
if (this.rowSelectable || this.selectable || this.autoShowDetail) {
|
|
@@ -4586,16 +4602,16 @@ function db(fn) {
|
|
|
4586
4602
|
var dom = composedPath[i];
|
|
4587
4603
|
if (String(dom.tagName).toLowerCase() === 'tr' && (this.rowSelectable || this.selectable || this.autoShowDetail)) {
|
|
4588
4604
|
(function () {
|
|
4589
|
-
|
|
4605
|
+
_this18.lastSelectedRow = dom;
|
|
4590
4606
|
var rowIndex = Number(getDataSet(dom).index);
|
|
4591
|
-
|
|
4592
|
-
|
|
4607
|
+
_this18.changeIDataType = 'change';
|
|
4608
|
+
_this18.iData.map(function (item, index) {
|
|
4593
4609
|
if (index === rowIndex) {
|
|
4594
|
-
|
|
4610
|
+
_this18.$set(item, '_active', false);
|
|
4595
4611
|
}
|
|
4596
4612
|
});
|
|
4597
|
-
|
|
4598
|
-
|
|
4613
|
+
_this18.$nextTick(function () {
|
|
4614
|
+
_this18.changeIDataType = 'default';
|
|
4599
4615
|
});
|
|
4600
4616
|
})();
|
|
4601
4617
|
}
|
|
@@ -4627,21 +4643,21 @@ function db(fn) {
|
|
|
4627
4643
|
}
|
|
4628
4644
|
},
|
|
4629
4645
|
handleSortClick: function handleSortClick(item, index) {
|
|
4630
|
-
var
|
|
4646
|
+
var _this19 = this;
|
|
4631
4647
|
|
|
4632
4648
|
var orderType = item.orderType;
|
|
4633
4649
|
this.columns.map(function (column, columnIndex) {
|
|
4634
4650
|
if (columnIndex === index) {
|
|
4635
4651
|
if (!orderType) {
|
|
4636
|
-
|
|
4652
|
+
_this19.$set(column, 'orderType', 'asc');
|
|
4637
4653
|
} else if (orderType === 'asc') {
|
|
4638
|
-
|
|
4654
|
+
_this19.$set(column, 'orderType', 'desc');
|
|
4639
4655
|
} else if (orderType === 'desc') {
|
|
4640
|
-
|
|
4656
|
+
_this19.$set(column, 'orderType', '');
|
|
4641
4657
|
}
|
|
4642
4658
|
} else {
|
|
4643
4659
|
if (column.sortable) {
|
|
4644
|
-
|
|
4660
|
+
_this19.$set(column, 'orderType', '');
|
|
4645
4661
|
}
|
|
4646
4662
|
}
|
|
4647
4663
|
});
|
|
@@ -4802,12 +4818,12 @@ function db(fn) {
|
|
|
4802
4818
|
|
|
4803
4819
|
// 展开所有
|
|
4804
4820
|
expandAll: function expandAll() {
|
|
4805
|
-
var
|
|
4821
|
+
var _this20 = this;
|
|
4806
4822
|
|
|
4807
4823
|
if (this.iData.length > 0) {
|
|
4808
4824
|
this.iData.forEach(function (item, index) {
|
|
4809
4825
|
if (item._hasChild && item._level === 1 && item._show === true) {
|
|
4810
|
-
|
|
4826
|
+
_this20.$refs.tbody.expandAll(item, index, false);
|
|
4811
4827
|
}
|
|
4812
4828
|
});
|
|
4813
4829
|
}
|
|
@@ -4815,12 +4831,12 @@ function db(fn) {
|
|
|
4815
4831
|
|
|
4816
4832
|
// 折叠所有
|
|
4817
4833
|
collapseAll: function collapseAll() {
|
|
4818
|
-
var
|
|
4834
|
+
var _this21 = this;
|
|
4819
4835
|
|
|
4820
4836
|
if (this.iData.length > 0) {
|
|
4821
4837
|
this.iData.forEach(function (item, index) {
|
|
4822
4838
|
if (item._hasChild && item._level === 1 && item._show === true) {
|
|
4823
|
-
|
|
4839
|
+
_this21.$refs.tbody.collapseAll(item, index, false);
|
|
4824
4840
|
}
|
|
4825
4841
|
});
|
|
4826
4842
|
}
|