(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",
"version": "1.3.6",
"version": "1.3.7",
"author": "就眠儀式",
"license": "MIT",
"description": "a component library for Vue 3 base on layui-vue",

View File

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

View File

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

View File

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

View File

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

View File

@ -11,6 +11,16 @@
<template>
<lay-timeline>
<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>
<a name="1-3-6"></a>
<li>