♻️: rename inputTag to tagInput

This commit is contained in:
sight 2022-08-06 09:25:11 +08:00
parent 24b2cbd143
commit d30a3b0012
4 changed files with 50 additions and 1 deletions

View File

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
export default { export default {
name: "LayInputTag", name: "LayTagInput",
}; };
</script> </script>
<script lang="ts" setup> <script lang="ts" setup>

View File

@ -89,6 +89,7 @@ import LayPageHeader from "./component/pageHeader/index";
import LayCascader from "./component/cascader/index"; import LayCascader from "./component/cascader/index";
import LayAffix from "./component/affix/index"; import LayAffix from "./component/affix/index";
import LayTag from "./component/tag/index"; import LayTag from "./component/tag/index";
import LayTagInput from "./component/tagInput/index";
import LayConfigProvider from "./provider"; import LayConfigProvider from "./provider";
import { InstallOptions } from "./types"; import { InstallOptions } from "./types";
@ -176,6 +177,7 @@ const components: Record<string, Plugin> = {
LayCascader, LayCascader,
LayAffix, LayAffix,
LayTag, LayTag,
LayTagInput,
}; };
const install = (app: App, options?: InstallOptions): void => { const install = (app: App, options?: InstallOptions): void => {
@ -270,6 +272,7 @@ export {
LayCascader, LayCascader,
LayAffix, LayAffix,
LayTag, LayTag,
LayTagInput,
install, install,
}; };

View File

@ -0,0 +1,41 @@
::: anchor
:::
::: title 基本介绍
:::
::: describe 通过鼠标或键盘,输入范围内的数值。
:::
::: title 基础使用
:::
::: demo 使用 `lay-input` 标签, 创建输入框. FIXME 上游组件变动,已不适用,待重构
<template>
<lay-tag-input v-model="data1" v-model:inputValue="inputValue" style="width:60%"></lay-tag-input>
</template>
<script>
import { ref,watch } from 'vue'
export default {
setup() {
const data1 = ref(['Vue', 'React']);
const inputValue = ref();
watch(data1, (val) => {
console.log("tagData",val)
})
watch(inputValue, (val) => {
console.log("inputValue",val)
})
return {
data1,
inputValue
}
}
}
</script>
:::

View File

@ -424,6 +424,11 @@ const zhCN = [
component: () => import("../document/zh-CN/components/tag.md"), component: () => import("../document/zh-CN/components/tag.md"),
meta: { title: "标签" }, meta: { title: "标签" },
}, },
{
path: "/zh-CN/components/tagInput",
component: () => import("../document/zh-CN/components/tagInput.md"),
meta: { title: "标签" },
},
], ],
}, },
], ],