Skip to content

Commit 9e49f09

Browse files
committed
fix(table): fix can't get table column index
1 parent 3717cef commit 9e49f09

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

example/App.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
<emqx-button type="primary" size="small">test</emqx-button>
1111
<emqx-button type="primary" size="mini">test</emqx-button>
1212
</div>
13+
<div class="show-item">
14+
<emqx-button icon="el-icon-search" circle></emqx-button>
15+
<emqx-button icon="el-icon-plus" circle size="mini"></emqx-button>
16+
</div>
1317
<h2>Input</h2>
1418
<div class="show-item">
1519
<emqx-input v-model="testInput" placeholder="test" style="margin-bottom: 20px"></emqx-input>

packages/Option/src/option.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<template>
2-
<el-option class="emqx-option"></el-option>
2+
<el-option class="emqx-option">
3+
<slot></slot>
4+
</el-option>
35
</template>
46

57
<script lang="ts">

packages/TableColumn/src/table-column.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<el-table-column class="emqx-table-column">
33
<template v-if="$slots.default" #default="scope">
4-
<slot :row="scope.row"></slot>
4+
<slot :row="scope.row" :index="scope.$index"></slot>
55
</template>
66
</el-table-column>
77
</template>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
11
.emqx-button.el-button {
22
border-radius: 8px;
3+
&.is-circle {
4+
padding: 16px;
5+
width: 47px;
6+
height: 47px;
7+
i {
8+
font-size: 14px;
9+
}
10+
}
11+
&.el-button--mini.is-circle {
12+
width: 32px;
13+
height: 32px;
14+
padding: 8px;
15+
}
316
}

0 commit comments

Comments
 (0)