(component): 更新日志

This commit is contained in:
就眠儀式 2022-11-11 00:32:39 +08:00
parent 90a4f5cf81
commit 5a9aef0923
3 changed files with 20 additions and 5 deletions

View File

@ -20,6 +20,7 @@ import {
cloneVNode, cloneVNode,
useAttrs, useAttrs,
StyleValue, StyleValue,
PropType,
} from "vue"; } from "vue";
import { import {
computed, computed,
@ -45,7 +46,7 @@ import {
} from "./interface"; } from "./interface";
import TeleportWrapper from "../_components/teleportWrapper.vue"; import TeleportWrapper from "../_components/teleportWrapper.vue";
import { useFirstElement, isScrollElement, getScrollElements } from "./util"; import { useFirstElement, isScrollElement, getScrollElements } from "./util";
import RenderFunction from "../_components/renderFunction"; import RenderFunction, { RenderFunc } from "../_components/renderFunction";
import { transformPlacement } from "./util"; import { transformPlacement } from "./util";
export type DropdownTrigger = "click" | "hover" | "focus" | "contextMenu"; export type DropdownTrigger = "click" | "hover" | "focus" | "contextMenu";
@ -573,7 +574,7 @@ onClickOutside(dropdownRef, (e) => {
hide(); hide();
}); });
const onlyChildRenderFunc = computed(() => { const onlyChildRenderFunc = () => {
const slotContent = slots.default ? slots.default() : []; const slotContent = slots.default ? slots.default() : [];
const transformedSlotContent = slotContent.map((vnode) => const transformedSlotContent = slotContent.map((vnode) =>
cloneVNode( cloneVNode(
@ -592,8 +593,8 @@ const onlyChildRenderFunc = computed(() => {
); );
children.value = transformedSlotContent; children.value = transformedSlotContent;
return () => h(Fragment, children.value); return h(Fragment, children.value);
}); };
onMounted(() => { onMounted(() => {
if (props.updateAtScroll) { if (props.updateAtScroll) {

View File

@ -40,7 +40,7 @@ export default {
<template> <template>
<lay-space direction="vertical" fill wrap> <lay-space direction="vertical" fill wrap>
<lay-button v-for="idx of 5" type="normal" fluid="true">按钮 {{idx}}</lay-button> <lay-button v-for="idx of 5" type="normal" :fluid="true">按钮 {{idx}}</lay-button>
</lay-space> </lay-space>
</template> </template>

View File

@ -11,6 +11,20 @@
<template> <template>
<lay-timeline> <lay-timeline>
<lay-timeline-item title="1.7.x"> <lay-timeline-item title="1.7.x">
<ul>
<a name="1-7-7"></a>
<li>
<h3>1.7.7 <span class="layui-badge-rim">2022-11-10</span></h3>
<ul>
<li>[新增] upload 组件 text 属性, 设置上传描述。</li>
<li>[新增] upload 组件 dragText 属性, 设置拖拽面板提示信息。</li>
<li>[修复] input-number 组件 step 设置为小数时精度丢失的问题。</li>
<li>[修复] tooltip 组件临近屏幕边界, 三角位置显示错误。</li>
<li>[优化] select-option 组件 default 插槽。</li>
<li>
</ul>
</li>
</ul>
<ul> <ul>
<a name="1-7-6"></a> <a name="1-7-6"></a>
<li> <li>