Skip to content

Commit cc2f5a4

Browse files
author
Ken Berkeley
committed
fix CSS in HeaderSettings
1 parent 2a79412 commit cc2f5a4

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

doc/en/details/props-data.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ watch: {
1515
const { supportNested } = this
1616
// support nested components feature with extra magic
1717
if (supportNested) {
18+
const MAGIC_FIELD = '__nested__'
1819
data.forEach(item => {
19-
if (!item.__nested__) {
20-
this.$set(item, '__nested__', {
21-
comp: '', // name of the current nested component
20+
if (!item[MAGIC_FIELD]) {
21+
this.$set(item, MAGIC_FIELD, {
22+
comp: undefined, // current nested component
2223
visible: false,
2324
$toggle (comp, visible) {
2425
switch (arguments.length) {
@@ -31,6 +32,7 @@ watch: {
3132
this.visible = comp
3233
break
3334
case 'string':
35+
case 'object':
3436
this.comp = comp
3537
this.visible = !this.visible
3638
break
@@ -44,7 +46,7 @@ watch: {
4446
}
4547
})
4648
// omit the implementation of accordion...
47-
Object.defineProperty(item, '__nested__', { enumerable: false })
49+
Object.defineProperty(item, MAGIC_FIELD, { enumerable: false })
4850
}
4951
})
5052
}

doc/zh-cn/details/props-data.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ watch: {
1212
const { supportNested } = this
1313
// support nested components feature with extra magic
1414
if (supportNested) {
15+
const MAGIC_FIELD = '__nested__'
1516
data.forEach(item => {
16-
if (!item.__nested__) {
17-
this.$set(item, '__nested__', {
18-
comp: '', // name of the current nested component
17+
if (!item[MAGIC_FIELD]) {
18+
this.$set(item, MAGIC_FIELD, {
19+
comp: undefined, // current nested component
1920
visible: false,
2021
$toggle (comp, visible) {
2122
switch (arguments.length) {
@@ -28,6 +29,7 @@ watch: {
2829
this.visible = comp
2930
break
3031
case 'string':
32+
case 'object':
3133
this.comp = comp
3234
this.visible = !this.visible
3335
break
@@ -41,7 +43,7 @@ watch: {
4143
}
4244
})
4345
// 省略手风琴的实现...
44-
Object.defineProperty(item, '__nested__', { enumerable: false })
46+
Object.defineProperty(item, MAGIC_FIELD, { enumerable: false })
4547
}
4648
})
4749
}

src/HeaderSettings/ColumnGroup.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ export default {
5151
<style>
5252
.-col-group {
5353
display: inline-block;
54-
width: 150px;
54+
margin-bottom: 5px;
5555
padding: 0;
56+
width: 150px;
5657
vertical-align: top;
5758
}
5859
.-col-group-title {

src/HeaderSettings/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
:group-name="groupName" :columns="columns">
1212
</column-group>
1313
</div>
14-
<div class="clearfix" style="margin: 10px">
14+
<div class="clearfix" style="margin: 10px 0">
1515
<div class="btn-group btn-group-sm pull-right">
1616
<button class="btn btn-default" type="button" @click="apply()">
1717
{{ $i18nForDatatable('Apply') }}

0 commit comments

Comments
 (0)