✨(component): update
This commit is contained in:
parent
472389772a
commit
406fb7e828
@ -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",
|
||||
|
@ -166,15 +166,18 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
const getMarginLeft = computed(() => {
|
||||
if (props.mode === "block") {
|
||||
let labelWidth =
|
||||
typeof props.labelWidth === "string"
|
||||
? parseFloat(props.labelWidth)
|
||||
: props.labelWidth;
|
||||
if (props.mode == "block") {
|
||||
if(props.labelPosition != "top") {
|
||||
let labelWidth = typeof props.labelWidth === "string" ? parseFloat(props.labelWidth) : props.labelWidth;
|
||||
labelWidth += 15;
|
||||
return {
|
||||
marginLeft: labelWidth + "px",
|
||||
"margin-left": `${labelWidth}px`,
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
"margin-left": "0px",
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
@ -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{
|
||||
|
@ -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);
|
||||
|
@ -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 海量数据
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user