Skip to content

Commit

Permalink
fix(table): fix can't get table column index
Browse files Browse the repository at this point in the history
  • Loading branch information
ysfscream committed Apr 21, 2021
1 parent e5788d0 commit bd2462f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
4 changes: 4 additions & 0 deletions example/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
<emqx-button type="primary" size="small">test</emqx-button>
<emqx-button type="primary" size="mini">test</emqx-button>
</div>
<div class="show-item">
<emqx-button icon="el-icon-search" circle></emqx-button>
<emqx-button icon="el-icon-plus" circle size="mini"></emqx-button>
</div>
<h2>Input</h2>
<div class="show-item">
<emqx-input v-model="testInput" placeholder="test" style="margin-bottom: 20px"></emqx-input>
Expand Down
4 changes: 3 additions & 1 deletion packages/Option/src/option.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template>
<el-option class="emqx-option"></el-option>
<el-option class="emqx-option">
<slot></slot>
</el-option>
</template>

<script lang="ts">
Expand Down
2 changes: 1 addition & 1 deletion packages/TableColumn/src/table-column.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<el-table-column class="emqx-table-column">
<template v-if="$slots.default" #default="scope">
<slot :row="scope.row"></slot>
<slot :row="scope.row" :index="scope.$index"></slot>
</template>
</el-table-column>
</template>
Expand Down
13 changes: 13 additions & 0 deletions packages/styles/components/button.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
.emqx-button.el-button {
border-radius: 8px;
&.is-circle {
padding: 16px;
width: 47px;
height: 47px;
i {
font-size: 14px;
}
}
&.el-button--mini.is-circle {
width: 32px;
height: 32px;
padding: 8px;
}
}

0 comments on commit bd2462f

Please sign in to comment.