fix: update numeric demo style (#1526)

This commit is contained in:
James 2024-04-08 10:08:45 +08:00 committed by GitHub
parent 78851649f4
commit 01519cb175
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 41 additions and 16 deletions

View File

@ -1,9 +1,9 @@
<template> <template>
<div class="numeric-controls-demo"> <div class="numeric-controls-demo">
<p>1. 隐藏加减按钮</p> <p>隐藏加减按钮:</p>
<tiny-numeric v-model="value1" :controls="controls" show-left></tiny-numeric> <tiny-numeric v-model="value1" :controls="controls" show-left class="numeric-class"></tiny-numeric>
<p>2. 加减按钮全置于右侧</p> <p>加减按钮全置于右侧:</p>
<tiny-numeric v-model="value2" controls-position="right"></tiny-numeric> <tiny-numeric v-model="value2" controls-position="right" class="numeric-class"></tiny-numeric>
</div> </div>
</template> </template>
@ -15,3 +15,9 @@ const controls = ref(false)
const value1 = ref(1) const value1 = ref(1)
const value2 = ref(2) const value2 = ref(2)
</script> </script>
<style scoped>
.numeric-class {
margin: 4px 0px;
}
</style>

View File

@ -1,9 +1,9 @@
<template> <template>
<div class="numeric-controls-demo"> <div class="numeric-controls-demo">
<p>1. 隐藏加减按钮</p> <p>隐藏加减按钮:</p>
<tiny-numeric v-model="value1" :controls="controls" show-left></tiny-numeric> <tiny-numeric v-model="value1" :controls="controls" show-left class="numeric-class"></tiny-numeric>
<p>2. 加减按钮全置于右侧</p> <p>加减按钮全置于右侧:</p>
<tiny-numeric v-model="value2" controls-position="right"></tiny-numeric> <tiny-numeric v-model="value2" controls-position="right" class="numeric-class"></tiny-numeric>
</div> </div>
</template> </template>
@ -23,3 +23,9 @@ export default {
} }
} }
</script> </script>
<style scoped>
.numeric-class {
margin: 4px 0px;
}
</style>

View File

@ -1,8 +1,8 @@
<template> <template>
<p>1数值精度</p> <p>数值精度:</p>
<tiny-numeric v-model="value" :precision="precision"></tiny-numeric> <tiny-numeric v-model="value" :precision="precision" class="numeric-class"></tiny-numeric>
<p>2数值格式</p> <p>数值格式:</p>
<tiny-numeric style="width: 300px" v-model="value1" :format="format"></tiny-numeric> <tiny-numeric style="width: 300px" v-model="value1" :format="format" class="numeric-class"></tiny-numeric>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -26,3 +26,9 @@ const format = reactive({
suffix: '@' // suffix: '@' //
}) })
</script> </script>
<style scoped>
.numeric-class {
margin: 4px 0px;
}
</style>

View File

@ -1,9 +1,9 @@
<template> <template>
<div> <div>
<p>1数值精度</p> <p>数值精度:</p>
<tiny-numeric v-model="value" :precision="precision"></tiny-numeric> <tiny-numeric v-model="value" :precision="precision" class="numeric-class"></tiny-numeric>
<p>2数值格式</p> <p>数值格式:</p>
<tiny-numeric style="width: 300px" v-model="value1" :format="format"></tiny-numeric> <tiny-numeric style="width: 300px" v-model="value1" :format="format" class="numeric-class"></tiny-numeric>
</div> </div>
</template> </template>
@ -36,3 +36,9 @@ export default {
} }
} }
</script> </script>
<style scoped>
.numeric-class {
margin: 4px 0px;
}
</style>

View File

@ -205,6 +205,7 @@
border-left: 1px solid var(--ti-numeric-input-unit-border-left-color); border-left: 1px solid var(--ti-numeric-input-unit-border-left-color);
margin: 0 1px 0 0; margin: 0 1px 0 0;
background: var(--ti-numeric-input-unit-bg-color); background: var(--ti-numeric-input-unit-bg-color);
border-radius: var(--ti-numeric-input-border-radius);
} }
&.is-disabled &__decrease, &.is-disabled &__decrease,