(component): 发布 1.6.2 版本

This commit is contained in:
就眠儀式
2022-10-07 19:00:47 +08:00
parent 0ca86f1fc6
commit 6319433874
5 changed files with 23 additions and 59 deletions

View File

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

View File

@@ -6,7 +6,7 @@ export default {
<script setup lang="ts">
import "./index.less";
import { Ref, ref } from "vue";
import { computed, Ref, ref, watch } from "vue";
import { LayIconList as icons } from "@layui/icons-vue";
import LayDropdown from "../dropdown/index.vue";
import LayInput from "../input/index.vue";
@@ -23,14 +23,14 @@ const props = withDefaults(defineProps<LayIconPickerProps>(), {
page: false,
});
const emit = defineEmits(["update:modelValue", "change"]);
const selectedIcon: Ref<string> = ref(props.modelValue as string);
const selectedIcon = computed(() => props.modelValue);
const dropdownRef = ref<any>(null);
const selectIcon = function (icon: string): void {
emit("update:modelValue", icon);
emit("change", icon);
selectedIcon.value = icon;
dropdownRef.value?.hide();
};

View File

@@ -298,9 +298,7 @@ const getUploadChange = (e: any) => {
if (_cache && _cache.length > 0) {
for (let i = 0; i < _cache.length; i++) {
let _sizeErrorFile = _cache[i];
let errorMsg = `文件 ${
_sizeErrorFile.name
} ${sizeErrorMsg},文件最大不可超过${props.size}kb`;
let errorMsg = `文件 ${_sizeErrorFile.name} ${sizeErrorMsg},文件最大不可超过${props.size}KB`;
errorF(errorMsg);
return;
}