kui-vue
Version:
A lightweight desktop UI component library suitable for Vue.js 2.
44 lines (42 loc) • 788 B
Markdown
<cn>
### 受控
受控和 Input 同步。
</cn>
```vue
<template>
<div>
<Row>
<Col :span="12">
<Slider v-model:value="n1" :min="1" :max="20" />
</Col>
<Col :span="4">
<InputNumber
v-model="n1"
:min="1"
:max="20"
style="margin-left: 16px"
/>
</Col>
</Row>
<Row>
<Col :span="12">
<Slider v-model:value="n2" :min="0" :max="1" :step="0.01" />
</Col>
<Col :span="4">
<InputNumber
v-model:value="n2"
:min="0"
:max="1"
:step="0.01"
style="margin-left: 16px"
/>
</Col>
</Row>
</div>
</template>
<script setup>
import { ref } from "vue";
const n1 = ref(1);
const n2 = ref(0);
</script>
```