kui-vue
Version:
A lightweight desktop UI component library suitable for Vue.js 2.
43 lines (41 loc) • 1.04 kB
Markdown
<cn>
### 主题
使用 `theme` 设定主题 ,`shape` 呈现圆角
</cn>
```vue
<template>
<Space vertical block>
<Checkbox label="Circle" v-model="isCircle" @change="setShape" />
<Input placeholder="请输入内容..." theme="light" :shape="shape" />
<Input placeholder="disabled..." disabled theme="light" :shape="shape" />
<Input
placeholder="请输入内容..."
theme="light"
:icon="Search"
:shape="shape"
/>
<Input
placeholder="请输入内容..."
theme="light"
clearable
:shape="shape"
@search="onSearch"
/>
<TextArea placeholder="请输入内容..." theme="light" :rows="3" />
</Space>
</template>
<script setup>
import { Search } from "kui-icons";
import { message } from "kui-vue";
import { ref } from "vue";
const isCircle = ref();
const shape = ref();
const setShape = ({ checked }) => {
shape.value = checked ? "circle" : null;
};
const onSearch = (value) => {
message.info("This is search event");
console.log(value);
};
</script>
```