(component): 发布 1.7.3 版本

This commit is contained in:
就眠儀式 2022-10-27 11:40:08 +08:00
parent 2c28f178e4
commit c608b4f575
9 changed files with 61 additions and 38 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@layui/layui-vue",
"version": "1.7.2",
"version": "1.7.3",
"author": "就眠儀式",
"license": "MIT",
"description": "a component library for Vue 3 base on layui-vue",
@ -34,7 +34,7 @@
},
"dependencies": {
"@layui/icons-vue": "^1.0.9",
"@layui/layer-vue": "^1.4.6",
"@layui/layer-vue": "^1.4.7",
"@vueuse/core": "^9.2.0",
"@umijs/ssr-darkreader": "^4.9.45",
"@ctrl/tinycolor": "^3.4.1",

View File

@ -883,10 +883,10 @@ onBeforeUnmount(() => {
</tr>
</tbody>
</table>
<lay-empty
v-if="tableDataSource.length == 0 && loading == false"
></lay-empty>
<div :style="{ width: tableBodyEmptyWidth }"></div>
<template v-if="tableDataSource.length == 0 && loading == false">
<lay-empty></lay-empty>
<div :style="{ width: tableBodyEmptyWidth }"></div>
</template>
<template v-if="loading == true">
<div class="layui-table-loading">
<i

View File

@ -26,6 +26,7 @@ import { layer } from "@layui/layer-vue"
const baseNotifiy = function() {
layer.notifiy({
title:"这是标题",
time: 2000,
content:"默认就是右上,也是用得最多的"
})
}

View File

@ -11,6 +11,18 @@
<template>
<lay-timeline>
<lay-timeline-item title="1.7.x">
<ul>
<a name="1-7-3"></a>
<li>
<h3>1.7.3 <span class="layui-badge-rim">2022-10-27</span></h3>
<ul>
<li>[修复] table 组件 滚动条 拖拽时 header 产生错位。</li>
<li>[修复] layer 组件 notifiy 类型 css 丢失的问题。</li>
<li>[优化] layer 组件 notifiy 类型 class 命名规范。</li>
<li>[升级] layer-vue 1.4.7 版本。</li>
</ul>
</li>
</ul>
<ul>
<a name="1-7-2"></a>
<li>

View File

@ -1,6 +1,6 @@
{
"name": "@layui/layer-vue",
"version": "1.4.6",
"version": "1.4.7",
"description": "a component library for Vue 3 base on layui-vue",
"homepage": "http://www.layui-vue.com",
"module": "lib/layer-vue.es.js",

View File

@ -1,5 +1,5 @@
<template>
<div class="layer-notifiy" ref="notifyRef">
<div class="layui-layer-notifiy-wrapper" ref="notifyRef">
<h2 class="title">
<i v-if="icon" :class="iconClass"></i>
{{ title }}
@ -27,14 +27,18 @@ export interface LayNotifyProps {
icon?: string | number | undefined;
iconClass: string[];
}
const props = withDefaults(defineProps<LayNotifyProps>(), {
isHtmlFragment: false,
});
const emit = defineEmits(["close"]);
const notifyRef = shallowRef<HTMLElement | null>(null);
const close = () => {
emit("close");
};
function addClass(obj: HTMLElement, cls: string) {
// class .
let obj_class = obj.className,
@ -44,7 +48,6 @@ function addClass(obj: HTMLElement, cls: string) {
obj.className = added; // class.
}
const notifyRef = shallowRef<HTMLElement | null>(null);
onMounted(() => {
nextTick(() => {
setTimeout(() => {
@ -52,7 +55,7 @@ onMounted(() => {
if (!notifyRef.value?.parentElement?.parentElement) return;
addClass(
notifyRef.value?.parentElement?.parentElement,
"layui-layer-notify"
"layui-layer-notifiy-transition"
);
}, 300);
});

View File

@ -45,7 +45,7 @@ import useResize from "../composable/useResize";
import useMove from "../composable/useMove";
import { zIndexKey } from "../tokens";
export interface LayModalProps {
export interface LayerProps {
id?: string;
title?: string | boolean | Function;
icon?: string | number;
@ -100,7 +100,7 @@ export interface LayModalProps {
restore?: Function;
}
const props = withDefaults(defineProps<LayModalProps>(), {
const props = withDefaults(defineProps<LayerProps>(), {
title: "标题",
setTop: false,
offset: () => ["50%", "50%"],
@ -381,18 +381,17 @@ watch(
* @param icon 图标类型
*/
const boxClasses = computed(() => {
return [
type === 0 ? "layui-layer-dialog" : "",
type === 1 ? "layui-layer-page" : "",
type === 2 ? "layui-layer-iframe" : "",
type === 3 ? "layui-layer-loading" : "",
type === 4 ? "layui-layer-drawer" : "",
type === 5 ? "layui-layer-photos" : "",
type === 6 ? "layui-layer-notifiy-border" : "",
props.isMessage ? "layui-layer-msg" : "",
props.isMessage && !props.icon ? "layui-layer-hui" : "",
props.skin,
];
return [{
"layui-layer-dialog": type === 0,
"layui-layer-page": type === 1,
"layui-layer-iframe": type === 2,
"layui-layer-loading": type === 3,
"layui-layer-drawer": type === 4,
"layui-layer-photos": type === 5,
"layui-layer-notifiy": type === 6,
"layui-layer-msg": props.isMessage,
"layui-layer-hui": props.isMessage && !props.icon,
},props.skin];
});
/**
@ -707,4 +706,4 @@ defineExpose({ reset, open, close });
</div>
</transition>
</div>
</template>
</template>

View File

@ -1064,7 +1064,12 @@
}
}
.layer-notifiy {
.layui-layer-notifiy {
border: none;
box-shadow: none;
}
.layui-layer-notifiy-wrapper {
min-width: 330px;
padding: 14px 26px 14px 13px;
box-sizing: border-box;
@ -1073,7 +1078,8 @@
border: 1px solid #ebeef5;
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
}
.layer-notifiy .title {
.layui-layer-notifiy-wrapper .title {
font-weight: 700;
font-size: 16px;
color: #303133;
@ -1081,17 +1087,20 @@
display: flex;
align-items: center;
}
.layer-notifiy .content {
.layui-layer-notifiy-wrapper .content {
font-size: 14px;
line-height: 21px;
margin: 6px 0 0 8px;
color: #606266;
text-align: justify;
}
.layer-notifiy .content img{
.layui-layer-notifiy-wrapper .content img{
max-width: 100%;
}
.layer-notifiy .layui-layer-close {
.layui-layer-notifiy-wrapper .layui-layer-close {
background-position: 1px -40px;
cursor: pointer;
width: 16px;
@ -1101,17 +1110,15 @@
right: 10px;
}
.layer-notifiy .layui-layer-close:hover {
.layui-layer-notifiy-wrapper .layui-layer-close:hover {
opacity: 0.7;
}
.layui-layer-notify{
.layui-layer-notifiy-transition {
transition: top 0.3s ease-in-out;
}
.layui-layer-notifiy-border{
border: none;
box-shadow: none;
}
.layer-notifiy .title .layui-layer-ico{
.layui-layer-notifiy-wrapper .title .layui-layer-ico{
height: 30px !important;
width: 30px !important;
display: inline-block;

View File

@ -77,7 +77,7 @@ importers:
specifiers:
'@ctrl/tinycolor': ^3.4.1
'@layui/icons-vue': ^1.0.9
'@layui/layer-vue': ^1.4.5
'@layui/layer-vue': ^1.4.7
'@umijs/ssr-darkreader': ^4.9.45
'@vueuse/core': ^9.2.0
async-validator: ^4.1.1
@ -1512,6 +1512,7 @@ packages:
/@commitlint/load/17.1.2:
resolution: {integrity: sha512-sk2p/jFYAWLChIfOIp/MGSIn/WzZ0vkc3afw+l4X8hGEYkvDe4gQUUAVxjl/6xMRn0HgnSLMZ04xXh5pkTsmgg==}
engines: {node: '>=v14'}
requiresBuild: true
dependencies:
'@commitlint/config-validator': 17.1.0
'@commitlint/execute-rule': 17.0.0