Skip to content

Commit 2819d95

Browse files
committed
release 1.1.1
1 parent f249948 commit 2819d95

File tree

3 files changed

+39
-15
lines changed

3 files changed

+39
-15
lines changed

dist/data-tables.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,13 @@ return /******/ (function(modules) { // webpackBootstrap
506506
offset: 0
507507
}, this.actionsDef);
508508

509+
this.innerRowActionDef = this.rowActionDef.map(function (el) {
510+
if (!el.type) {
511+
el.type = 'text';
512+
}
513+
return el;
514+
});
515+
509516
this.innerCheckboxFilterDef = (0, _assign2.default)({}, {
510517
props: undefined,
511518
def: [],
@@ -550,6 +557,9 @@ return /******/ (function(modules) { // webpackBootstrap
550557
return true;
551558
}
552559
},
560+
tableProps: {
561+
type: Object
562+
},
553563
actionsDef: {
554564
type: Object,
555565
default: function _default() {
@@ -583,6 +593,7 @@ return /******/ (function(modules) { // webpackBootstrap
583593
default: true
584594
},
585595
actionColWidth: String,
596+
actionColFixed: [String, Boolean],
586597
colNotRowClick: {
587598
type: Array,
588599
default: function _default() {
@@ -1524,7 +1535,7 @@ return /******/ (function(modules) { // webpackBootstrap
15241535
_vm.searchKey = $$v
15251536
}
15261537
}
1527-
})], 1) : _vm._e()], 1), _c('el-table', {
1538+
})], 1) : _vm._e()], 1), _c('el-table', _vm._b({
15281539
staticStyle: {
15291540
"width": "100%"
15301541
},
@@ -1542,28 +1553,29 @@ return /******/ (function(modules) { // webpackBootstrap
15421553
"select-all": _vm.handleSelectAll,
15431554
"current-change": _vm.handleCurrentRowChange
15441555
}
1545-
}, [_vm._t("default"), (_vm.hasActionCol) ? _c('el-table-column', {
1556+
}, 'el-table', _vm.tableProps), [_vm._t("default"), (_vm.hasActionCol) ? _c('el-table-column', {
15461557
attrs: {
15471558
"label": _vm.actionColLabel,
15481559
"prop": "innerRowActions",
1549-
"min-width": _vm.actionColWidth
1560+
"min-width": _vm.actionColWidth,
1561+
"fixed": _vm.actionColFixed
15501562
},
15511563
inlineTemplate: {
15521564
render: function() {
15531565
var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
15541566
return _c('div', {
15551567
staticClass: "action-list"
1556-
}, _vm._l((_vm.rowActionDef), function(action) {
1557-
return _c('span', [_c('el-button', {
1568+
}, _vm._l((_vm.innerRowActionDef), function(action) {
1569+
return _c('span', [_c('el-button', _vm._b({
15581570
attrs: {
1559-
"type": "text"
1571+
"type": action.type
15601572
},
15611573
on: {
15621574
"click": function($event) {
15631575
action.handler(_vm.row)
15641576
}
15651577
}
1566-
}, [_vm._v(_vm._s(action.name))])], 1)
1578+
}, 'el-button', action.buttonProps), [_vm._v(_vm._s(action.name))])], 1)
15671579
}))
15681580

15691581
},

docs/demo.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48374,6 +48374,13 @@
4837448374
offset: 0
4837548375
}, this.actionsDef);
4837648376

48377+
this.innerRowActionDef = this.rowActionDef.map(function (el) {
48378+
if (!el.type) {
48379+
el.type = 'text';
48380+
}
48381+
return el;
48382+
});
48383+
4837748384
this.innerCheckboxFilterDef = (0, _assign2.default)({}, {
4837848385
props: undefined,
4837948386
def: [],
@@ -48418,6 +48425,9 @@
4841848425
return true;
4841948426
}
4842048427
},
48428+
tableProps: {
48429+
type: Object
48430+
},
4842148431
actionsDef: {
4842248432
type: Object,
4842348433
default: function _default() {
@@ -48451,6 +48461,7 @@
4845148461
default: true
4845248462
},
4845348463
actionColWidth: String,
48464+
actionColFixed: [String, Boolean],
4845448465
colNotRowClick: {
4845548466
type: Array,
4845648467
default: function _default() {
@@ -49392,7 +49403,7 @@
4939249403
_vm.searchKey = $$v
4939349404
}
4939449405
}
49395-
})], 1) : _vm._e()], 1), _c('el-table', {
49406+
})], 1) : _vm._e()], 1), _c('el-table', _vm._b({
4939649407
staticStyle: {
4939749408
"width": "100%"
4939849409
},
@@ -49410,28 +49421,29 @@
4941049421
"select-all": _vm.handleSelectAll,
4941149422
"current-change": _vm.handleCurrentRowChange
4941249423
}
49413-
}, [_vm._t("default"), (_vm.hasActionCol) ? _c('el-table-column', {
49424+
}, 'el-table', _vm.tableProps), [_vm._t("default"), (_vm.hasActionCol) ? _c('el-table-column', {
4941449425
attrs: {
4941549426
"label": _vm.actionColLabel,
4941649427
"prop": "innerRowActions",
49417-
"min-width": _vm.actionColWidth
49428+
"min-width": _vm.actionColWidth,
49429+
"fixed": _vm.actionColFixed
4941849430
},
4941949431
inlineTemplate: {
4942049432
render: function() {
4942149433
var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
4942249434
return _c('div', {
4942349435
staticClass: "action-list"
49424-
}, _vm._l((_vm.rowActionDef), function(action) {
49425-
return _c('span', [_c('el-button', {
49436+
}, _vm._l((_vm.innerRowActionDef), function(action) {
49437+
return _c('span', [_c('el-button', _vm._b({
4942649438
attrs: {
49427-
"type": "text"
49439+
"type": action.type
4942849440
},
4942949441
on: {
4943049442
"click": function($event) {
4943149443
action.handler(_vm.row)
4943249444
}
4943349445
}
49434-
}, [_vm._v(_vm._s(action.name))])], 1)
49446+
}, 'el-button', action.buttonProps), [_vm._v(_vm._s(action.name))])], 1)
4943549447
}))
4943649448

4943749449
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-data-tables",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "vue2.0 DataTables, based on element-ui, el-table + el-pagination + custom filter and sort",
55
"author": "njleonzhang <scream3616@sina.com>",
66
"main": "dist/data-tables.js",

0 commit comments

Comments
 (0)