(component): update

This commit is contained in:
就眠儀式 2022-09-24 13:43:40 +08:00
parent 4db23c9f8a
commit ec5f744a2e
5 changed files with 11 additions and 34 deletions

View File

@ -10,7 +10,9 @@ import { provide, computed, WritableComputedRef, ref } from "vue";
import LayInput from "../input/index.vue"; import LayInput from "../input/index.vue";
import LayTagInput from "../tagInput/index.vue"; import LayTagInput from "../tagInput/index.vue";
import LayDropdown from "../dropdown/index.vue"; import LayDropdown from "../dropdown/index.vue";
import LaySelectOption, { LaySelectOptionProps } from "../selectOption/index.vue"; import LaySelectOption, {
LaySelectOptionProps,
} from "../selectOption/index.vue";
export interface LaySelectProps { export interface LaySelectProps {
name?: string; name?: string;

View File

@ -21,7 +21,9 @@ const props = withDefaults(defineProps<LaySelectOptionProps>(), {
label: "", label: "",
}); });
const selectedValue: WritableComputedRef<any> = inject("selectedValue") as WritableComputedRef<any>; const selectedValue: WritableComputedRef<any> = inject(
"selectedValue"
) as WritableComputedRef<any>;
const searchValue: Ref<string> = inject("searchValue") as Ref<string>; const searchValue: Ref<string> = inject("searchValue") as Ref<string>;
const multiple: ComputedRef = inject("multiple") as ComputedRef; const multiple: ComputedRef = inject("multiple") as ComputedRef;

View File

@ -263,8 +263,8 @@ defineExpose({
<span v-if="allowClear && tagData?.length" class="layui-tag-input-clear"> <span v-if="allowClear && tagData?.length" class="layui-tag-input-clear">
<lay-icon type="layui-icon-close-fill" @click.stop="handleClearClick" /> <lay-icon type="layui-icon-close-fill" @click.stop="handleClearClick" />
</span> </span>
<span class="layui-tag-input-suffix" v-if="$slots.suffix"> <span class="layui-tag-input-suffix" v-if="$slots.suffix">
<slot name="suffix"></slot> <slot name="suffix"></slot>
</span> </span>
</div> </div>
</template> </template>

View File

@ -34,33 +34,6 @@ export default {
::: :::
::: title 只读状态
:::
::: demo 使用 `lay-tag-input` 标签, 创建标签输入框。
<template>
<lay-tag-input v-model="data3" v-model:inputValue="inputValue3" :readonly="true"></lay-tag-input>
</template>
<script>
import { ref,watch } from 'vue'
export default {
setup() {
const data3 = ref(['Vue', 'React']);
const inputValue3 = ref("");
return {
data3,
inputValue3
}
}
}
</script>
:::
::: title 禁用状态 ::: title 禁用状态
::: :::
@ -88,7 +61,7 @@ export default {
::: :::
::: title 禁用状态 ::: title 允许清空
::: :::
::: demo 使用 `lay-tag-input` 标签, 创建标签输入框。 ::: demo 使用 `lay-tag-input` 标签, 创建标签输入框。

View File

@ -14,7 +14,7 @@
<ul> <ul>
<a name="1-5-0"></a> <a name="1-5-0"></a>
<li> <li>
<h3>1.5.0 <span class="layui-badge-rim">2022-05-27</span></h3> <h3>1.5.0 <span class="layui-badge-rim">2022-10-01</span></h3>
<ul> <ul>
<li>[新增] tag-input 标签输入框组件, 用于录入事物的属性与纬度。</li> <li>[新增] tag-input 标签输入框组件, 用于录入事物的属性与纬度。</li>
<li>[新增] table 组件 header 插槽, 用于在工具栏与表格之间插入元素。</li> <li>[新增] table 组件 header 插槽, 用于在工具栏与表格之间插入元素。</li>