✨(component): update
This commit is contained in:
parent
472389772a
commit
406fb7e828
@ -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",
|
||||||
|
@ -166,16 +166,19 @@ 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)
|
labelWidth += 15;
|
||||||
: props.labelWidth;
|
return {
|
||||||
labelWidth += 15;
|
"margin-left": `${labelWidth}px`,
|
||||||
return {
|
};
|
||||||
marginLeft: labelWidth + "px",
|
} else {
|
||||||
};
|
return {
|
||||||
}
|
"margin-left": "0px",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -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{
|
||||||
|
@ -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);
|
||||||
|
@ -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 海量数据
|
||||||
|
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user