Browse Source

chore(gui-v2): minor style updates on integer cell

pull/2948/head
Wing-Kam Wong 2 years ago
parent
commit
eb454825fa
  1. 17
      packages/nc-gui-v2/components/cell/Float.vue
  2. 17
      packages/nc-gui-v2/components/cell/Integer.vue

17
packages/nc-gui-v2/components/cell/Float.vue

@ -25,8 +25,19 @@ onMounted(() => {
</script>
<template>
<input v-if="editEnabled" ref="root" v-model="vModel" class="outline-none w-full h-full" type="number" />
<span v-else>{{ vModel }}</span>
<input
v-if="editEnabled"
ref="root"
v-model="vModel"
class="outline-none pa-0 border-none w-full h-full prose-sm"
type="number"
step="0.1"
/>
<span v-else class="prose-sm">{{ vModel }}</span>
</template>
<style scoped></style>
<style scoped lang="scss">
input[type='number']:focus {
@apply ring-transparent;
}
</style>

17
packages/nc-gui-v2/components/cell/Integer.vue

@ -27,8 +27,19 @@ function onKeyDown(evt: KeyboardEvent) {
</script>
<template>
<input v-if="editEnabled" ref="root" v-model="vModel" class="outline-none w-full h-full" type="number" @keydown="onKeyDown" />
<span v-else>{{ vModel }}</span>
<input
v-if="editEnabled"
ref="root"
v-model="vModel"
class="outline-none pa-0 border-none w-full h-full prose-sm"
type="number"
@keydown="onKeyDown"
/>
<span v-else class="prose-sm">{{ vModel }}</span>
</template>
<style scoped></style>
<style scoped lang="scss">
input[type='number']:focus {
@apply ring-transparent;
}
</style>

Loading…
Cancel
Save