(component): release 1.4.5

This commit is contained in:
就眠儀式 2022-08-26 11:52:03 +08:00
parent cbb0912a19
commit 762e797614
4 changed files with 30 additions and 10 deletions

View File

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

View File

@ -6,7 +6,17 @@ export default {
<script setup lang="ts">
import "./index.less";
import { withDefaults, provide, useSlots, ref, computed, VNode, Ref, Component, watch } from "vue";
import {
withDefaults,
provide,
useSlots,
ref,
computed,
VNode,
Ref,
Component,
watch,
} from "vue";
import CarouselItem from "../carouselItem/index.vue";
const slot = useSlots() as any;

View File

@ -214,4 +214,4 @@ watch(
</button>
</span>
</div>
</template>
</template>

View File

@ -181,10 +181,10 @@ const localUploadTransaction = (option: localUploadTransaction) => {
return;
}
if (Array.isArray(files) && files.length > 0) {
for (let i = 0; i < files.length; i++) {
let _file = files[i];
formData.append(props.field + "[" + i + "]", _file);
}
for (let i = 0; i < files.length; i++) {
let _file = files[i];
formData.append(props.field + "[" + i + "]", _file);
}
}
if (props.data && props.data instanceof Object) {
let _requestDate = props.data;
@ -245,7 +245,11 @@ const localUpload = (option: localUploadOption, callback: Function) => {
}
} else if (xhr.readyState === 4) {
let successText = xhr.responseText ? xhr.responseText : uploadSuccess;
if ((xhr.status >= 200 && xhr.status <= 300) || xhr.status === 304 || xhr.status == 0) {
if (
(xhr.status >= 200 && xhr.status <= 300) ||
xhr.status === 304 ||
xhr.status == 0
) {
let data = xhr.responseText;
emit("done", { currentTimeStamp, msg: successText, data: data });
}
@ -308,8 +312,14 @@ const getUploadChange = (e: any) => {
activeUploadFilesImgs.value.push(res);
});
}
let arm1 = props.cut && props.acceptMime.indexOf("image") != -1 && props.multiple == false;
let arm2 = props.cut && props.acceptMime.indexOf("image") != -1 && props.multiple == true;
let arm1 =
props.cut &&
props.acceptMime.indexOf("image") != -1 &&
props.multiple == false;
let arm2 =
props.cut &&
props.acceptMime.indexOf("image") != -1 &&
props.multiple == true;
if (arm1) {
innerCutVisible.value = true;
setTimeout(() => {