Skip to content

Commit

Permalink
style(input): add input number scss file
Browse files Browse the repository at this point in the history
  • Loading branch information
ysfscream committed Jun 2, 2021
1 parent c104d02 commit fafd9ae
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
5 changes: 4 additions & 1 deletion example/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
<h2>Input</h2>
<div class="show-item">
<emqx-input v-model="testInput" placeholder="test" style="margin-bottom: 20px"></emqx-input>
<emqx-input v-model="testInput" placeholder="test" type="textarea"></emqx-input>
<emqx-input v-model="testInput" placeholder="test" type="textarea" style="margin-bottom: 20px"></emqx-input>
<emqx-input-number v-model="testInputNumber" :max="5"></emqx-input-number>
</div>
<h2>Layout</h2>
<div class="show-item">
Expand Down Expand Up @@ -220,6 +221,7 @@ export default defineComponent({
name: 'App',
setup() {
const testInput = ref('')
const testInputNumber = ref(0)
const testSelect = ref('')
const testSwitch = ref(true)
const dialogVisible = ref(false)
Expand Down Expand Up @@ -313,6 +315,7 @@ export default defineComponent({
const radio = ref('1')
return {
testInput,
testInputNumber,
testSelect,
testOptions,
testSwitch,
Expand Down
29 changes: 0 additions & 29 deletions packages/InputNumber/src/input-number.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,3 @@ export default defineComponent({
components: { ElInputNumber },
})
</script>

<style lang="scss">
.emqx-input-number {
$border-radius: 8px;
&.el-input-number {
width: 100%;
.el-input__inner {
text-align: left;
}
&.is-controls-right {
.el-input-number__increase {
border-radius: 0 $border-radius 0 0;
}
.el-input-number__decrease {
border-radius: 0 0 $border-radius 0;
}
}
}
.el-input__inner {
border-radius: $border-radius;
}
.el-input-number__decrease {
border-radius: $border-radius 0 0 $border-radius;
}
.el-input-number__increase {
border-radius: 0 $border-radius $border-radius 0;
}
}
</style>
1 change: 1 addition & 0 deletions packages/styles/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
@import "card.scss";
@import "header.scss";
@import "input.scss";
@import "input-number.scss";
@import "menu-item.scss";
@import "select.scss";
@import "tags.scss";
Expand Down
25 changes: 25 additions & 0 deletions packages/styles/components/input-number.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.emqx-input-number {
&.el-input-number {
width: 100%;
.el-input__inner {
text-align: left;
}
&.is-controls-right {
.el-input-number__increase {
border-radius: 0 8px 0 0;
}
.el-input-number__decrease {
border-radius: 0 0 8px 0;
}
}
}
.el-input__inner {
border-radius: 8px;
}
.el-input-number__decrease {
border-radius: 8px 0 0 8px;
}
.el-input-number__increase {
border-radius: 0 8px 8px 0;
}
}

0 comments on commit fafd9ae

Please sign in to comment.