Skip to content

Commit 8e14b21

Browse files
committed
feat: 通过size属性设置input和button样式
1 parent 973638d commit 8e14b21

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/components/editTable/index.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
?
8787
<col.editable.widget
8888
vModel={row[column.prop]}
89+
size={'small'}
8990
on-input={this.onInput.bind(this, { row, column, index })}
9091
on-blur={
9192
trigger === 'blur' ? this.onBlur.bind(this, { row, column, index }) : () => {}
@@ -125,16 +126,12 @@
125126
<style lang="scss" scoped>
126127
.edit-table {
127128
/deep/ .edit-col {
128-
.el-input__inner {
129-
height: 32px;
130-
line-height: 32px;
131-
}
129+
/*小技巧:通过按钮和Input的尺寸来进行样式优化*/
132130
.el-input-number .el-input__inner {
133131
text-align: left;
134132
}
135133
.el-input-number {
136134
width: 100%;
137-
line-height: 32px;
138135
}
139136
}
140137
}

0 commit comments

Comments
 (0)