(component): update

This commit is contained in:
就眠儀式 2022-07-24 22:43:44 +08:00
parent 472389772a
commit 406fb7e828
6 changed files with 35 additions and 27 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@layui/layui-vue", "name": "@layui/layui-vue",
"version": "1.3.6", "version": "1.3.7",
"author": "就眠儀式", "author": "就眠儀式",
"license": "MIT", "license": "MIT",
"description": "a component library for Vue 3 base on layui-vue", "description": "a component library for Vue 3 base on layui-vue",

View File

@ -166,15 +166,18 @@ onMounted(() => {
}); });
const getMarginLeft = computed(() => { const getMarginLeft = computed(() => {
if (props.mode === "block") { if (props.mode == "block") {
let labelWidth = if(props.labelPosition != "top") {
typeof props.labelWidth === "string" let labelWidth = typeof props.labelWidth === "string" ? parseFloat(props.labelWidth) : props.labelWidth;
? parseFloat(props.labelWidth)
: props.labelWidth;
labelWidth += 15; labelWidth += 15;
return { return {
marginLeft: labelWidth + "px", "margin-left": `${labelWidth}px`,
}; };
} else {
return {
"margin-left": "0px",
}
}
} }
}); });
</script> </script>

View File

@ -222,8 +222,9 @@ dl.layui-anim-upbit > dd .layui-form-checkbox,
padding: 0 10px; padding: 0 10px;
cursor: pointer; cursor: pointer;
.layui-input-wrapper:focus-within { .layui-input {
border-color: var(--input-border-color); height: 30px !important;
line-height: 30px !important;
} }
} }
.layui-form-select{ .layui-form-select{

View File

@ -68,11 +68,7 @@ const open = function () {
const emit = defineEmits(["update:modelValue", "change", "search", "create"]); const emit = defineEmits(["update:modelValue", "change", "search", "create"]);
const selectItem = ref<SelectItem>({ const selectItem = ref<SelectItem>({
value: !props.multiple value: !props.multiple? props.modelValue : props.modelValue ? ([] as any[]).concat(props.modelValue) : [],
? props.modelValue
: props.modelValue
? ([] as any[]).concat(props.modelValue)
: [],
label: props.multiple ? [] : null, label: props.multiple ? [] : null,
multiple: props.multiple, multiple: props.multiple,
} as SelectItem); } as SelectItem);

View File

@ -101,7 +101,7 @@ export default {
::: :::
::: title 关键词变化事件,可作为远程搜索处理算法 ::: title 检索回调
::: :::
::: demo ::: demo
@ -132,7 +132,7 @@ export default {
::: :::
::: title 选择项自定义搜索内容可以在keyword属性中传入拼音用于支持拼音搜索 ::: title 定义标识
::: :::
::: demo ::: demo
@ -160,7 +160,7 @@ export default {
::: :::
::: title 传入items属性进行选项渲染 ::: title 传入选项
::: :::
::: demo ::: demo
@ -182,7 +182,8 @@ export default {
{label:'选项3',value:3,keyword:'选项xuanxiang3',disabled:true}, {label:'选项3',value:3,keyword:'选项xuanxiang3',disabled:true},
]) ])
return { return {
selected,items items,
selected,
} }
} }
} }
@ -191,15 +192,13 @@ export default {
::: :::
::: title 传入create属性和接收create事件用于开启创建子项功能 ::: title 创建回调
::: :::
::: demo ::: demo
<template> <template>
<lay-select v-model="selected" :items="items" :create="true" @create="createEvent"> <lay-select v-model="selected" :items="items" :create="true" @create="createEvent"></lay-select>
</lay-select>
当前元素: {{items.map(o=>o.label).join()}}
</template> </template>
<script> <script>
@ -226,7 +225,6 @@ export default {
} }
</script> </script>
::: :::
::: title 海量数据 ::: title 海量数据

View File

@ -11,6 +11,16 @@
<template> <template>
<lay-timeline> <lay-timeline>
<lay-timeline-item title="1.3.x"> <lay-timeline-item title="1.3.x">
<ul>
<a name="1-3-7"></a>
<li>
<h3>1.3.7 <span class="layui-badge-rim">2022-07-24</span></h3>
<ul>
<li>[修复] form 组件 position 属性 top 值的布局。</li>
<li>[优化] select 组件 multiple 属性为 true 时的 Search 样式。</li>
</ul>
</li>
</ul>
<ul> <ul>
<a name="1-3-6"></a> <a name="1-3-6"></a>
<li> <li>