(component): update

This commit is contained in:
就眠儀式 2022-10-16 10:22:17 +08:00
parent 3ff243b446
commit e181ba7ad2
6 changed files with 35 additions and 11 deletions

View File

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

View File

@ -5,7 +5,14 @@ export default {
</script>
<script setup lang="ts">
import { inject, Ref, computed, ref, ComputedRef, WritableComputedRef } from "vue";
import {
inject,
Ref,
computed,
ref,
ComputedRef,
WritableComputedRef,
} from "vue";
const props = defineProps<{
id: string;
@ -36,7 +43,7 @@ const getStyle = computed<any>(() => {
let prevIndex = activeIndex > 0 ? activeIndex - 1 : allChildNum - 1;
let nextIndex = activeIndex + 1 < allChildNum ? activeIndex + 1 : 0;
let animation = anim.value;
if (activeIndex === currentIndex) {
if (animation === "updown") {
return {

View File

@ -1,7 +1,7 @@
<script lang="ts">
export default {
name: "TableRow",
};
}
</script>
<script lang="ts" setup>
@ -9,7 +9,6 @@ import { Recordable } from "../../types";
import { LayIcon } from "@layui/icons-vue";
import { computed, ref, StyleValue, useSlots, WritableComputedRef } from "vue";
import LayCheckbox from "../checkbox/index.vue";
import LayDropdown from "../dropdown/index.vue";
import LayTooltip from "../tooltip/index.vue";
import LayRadio from "../radio/index.vue";
@ -599,8 +598,8 @@ const radioProps = props.getRadioProps(props.data, props.index);
>
<table-row
:id="id"
:index="childrenIndex"
:data="children"
:index="childrenIndex"
:columns="columns"
:indent-size="indentSize"
:current-indent-size="childrenIndentSize"

View File

@ -18,7 +18,6 @@ import {
onBeforeUnmount,
} from "vue";
import { Recordable } from "../../types";
import { LayIcon } from "@layui/icons-vue";
import LayCheckbox from "../checkbox/index.vue";
import LayDropdown from "../dropdown/index.vue";
import LayEmpty from "../empty/index.vue";
@ -811,11 +810,11 @@ onBeforeUnmount(() => {
</colgroup>
<tbody>
<!-- 渲染 -->
<template v-for="(data, index) in tableDataSource" :key="index">
<template v-for="(children, index) in tableDataSource" :key="index">
<table-row
:id="id"
:index="index"
:data="data"
:data="children"
:columns="tableBodyColumns"
:indent-size="indentSize"
:currentIndentSize="currentIndentSize"

View File

@ -285,8 +285,7 @@ const filetoDataURL = (file: File, fn: Function) => {
const uploadChange = (e: any) => {
e.preventDefault();
const files = e.target.files || e.dataTransfer.files;
const _files = [...files];
const _files = [...(e.target.files || e.dataTransfer.files)];
if (props.multiple && props.number != 0 && props.number < _files.length) {
errorF(numberErrorMsg);
return;

View File

@ -5,11 +5,31 @@
<lay-timeline-item title="🐛 尾版本号:日常问题更新。" simple></lay-timeline-item>
<lay-timeline-item title="🌟 次版本号:带有新特性的向下兼容的版本。" simple></lay-timeline-item>
<lay-timeline-item title="♻️ 主版本号:含有破坏性更新和新特性,不在发布周期内。" simple></lay-timeline-item>
<lay-timeline-item title="♻️ 其他说明:含有破坏性更新和新特性,不在发布周期内。" simple></lay-timeline-item>
</lay-timeline>
::: demo
<template>
<lay-timeline>
<lay-timeline-item title="1.7.x">
<ul>
<a name="1-7-0"></a>
<li>
<h3>1.7.0 <span class="layui-badge-rim">2022-10-15</span></h3>
<ul>
<li>
<li>table 组件</li>
<ul>
<li>[新增] ** 属性。</li>
<li>[新增] ** 方法。</li>
</ul>
</li>
<li>[修复] upload 组件 drag 为 true 时, 获取不到拖拽文件 files 集合, 并直接预览上传资源。</li>
<li>[其他] global 整体组件源码逻辑优化, 更好的兼容 typescript 类型。</li>
</ul>
</li>
</ul>
</lay-timeline-item>
<lay-timeline-item title="1.6.x">
<ul>
<a name="1-6-8"></a>