✨(component): 发布 1.7.3 版本
This commit is contained in:
parent
2c28f178e4
commit
c608b4f575
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@layui/layui-vue",
|
"name": "@layui/layui-vue",
|
||||||
"version": "1.7.2",
|
"version": "1.7.3",
|
||||||
"author": "就眠儀式",
|
"author": "就眠儀式",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "a component library for Vue 3 base on layui-vue",
|
"description": "a component library for Vue 3 base on layui-vue",
|
||||||
@ -34,7 +34,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@layui/icons-vue": "^1.0.9",
|
"@layui/icons-vue": "^1.0.9",
|
||||||
"@layui/layer-vue": "^1.4.6",
|
"@layui/layer-vue": "^1.4.7",
|
||||||
"@vueuse/core": "^9.2.0",
|
"@vueuse/core": "^9.2.0",
|
||||||
"@umijs/ssr-darkreader": "^4.9.45",
|
"@umijs/ssr-darkreader": "^4.9.45",
|
||||||
"@ctrl/tinycolor": "^3.4.1",
|
"@ctrl/tinycolor": "^3.4.1",
|
||||||
|
@ -883,10 +883,10 @@ onBeforeUnmount(() => {
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<lay-empty
|
<template v-if="tableDataSource.length == 0 && loading == false">
|
||||||
v-if="tableDataSource.length == 0 && loading == false"
|
<lay-empty></lay-empty>
|
||||||
></lay-empty>
|
<div :style="{ width: tableBodyEmptyWidth }"></div>
|
||||||
<div :style="{ width: tableBodyEmptyWidth }"></div>
|
</template>
|
||||||
<template v-if="loading == true">
|
<template v-if="loading == true">
|
||||||
<div class="layui-table-loading">
|
<div class="layui-table-loading">
|
||||||
<i
|
<i
|
||||||
|
@ -26,6 +26,7 @@ import { layer } from "@layui/layer-vue"
|
|||||||
const baseNotifiy = function() {
|
const baseNotifiy = function() {
|
||||||
layer.notifiy({
|
layer.notifiy({
|
||||||
title:"这是标题",
|
title:"这是标题",
|
||||||
|
time: 2000,
|
||||||
content:"默认就是右上,也是用得最多的"
|
content:"默认就是右上,也是用得最多的"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,18 @@
|
|||||||
<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-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>
|
<ul>
|
||||||
<a name="1-7-2"></a>
|
<a name="1-7-2"></a>
|
||||||
<li>
|
<li>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@layui/layer-vue",
|
"name": "@layui/layer-vue",
|
||||||
"version": "1.4.6",
|
"version": "1.4.7",
|
||||||
"description": "a component library for Vue 3 base on layui-vue",
|
"description": "a component library for Vue 3 base on layui-vue",
|
||||||
"homepage": "http://www.layui-vue.com",
|
"homepage": "http://www.layui-vue.com",
|
||||||
"module": "lib/layer-vue.es.js",
|
"module": "lib/layer-vue.es.js",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="layer-notifiy" ref="notifyRef">
|
<div class="layui-layer-notifiy-wrapper" ref="notifyRef">
|
||||||
<h2 class="title">
|
<h2 class="title">
|
||||||
<i v-if="icon" :class="iconClass"></i>
|
<i v-if="icon" :class="iconClass"></i>
|
||||||
{{ title }}
|
{{ title }}
|
||||||
@ -27,14 +27,18 @@ export interface LayNotifyProps {
|
|||||||
icon?: string | number | undefined;
|
icon?: string | number | undefined;
|
||||||
iconClass: string[];
|
iconClass: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<LayNotifyProps>(), {
|
const props = withDefaults(defineProps<LayNotifyProps>(), {
|
||||||
isHtmlFragment: false,
|
isHtmlFragment: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(["close"]);
|
const emit = defineEmits(["close"]);
|
||||||
|
const notifyRef = shallowRef<HTMLElement | null>(null);
|
||||||
|
|
||||||
const close = () => {
|
const close = () => {
|
||||||
emit("close");
|
emit("close");
|
||||||
};
|
};
|
||||||
|
|
||||||
function addClass(obj: HTMLElement, cls: string) {
|
function addClass(obj: HTMLElement, cls: string) {
|
||||||
//获取 class 内容.
|
//获取 class 内容.
|
||||||
let obj_class = obj.className,
|
let obj_class = obj.className,
|
||||||
@ -44,7 +48,6 @@ function addClass(obj: HTMLElement, cls: string) {
|
|||||||
obj.className = added; //替换原来的 class.
|
obj.className = added; //替换原来的 class.
|
||||||
}
|
}
|
||||||
|
|
||||||
const notifyRef = shallowRef<HTMLElement | null>(null);
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -52,7 +55,7 @@ onMounted(() => {
|
|||||||
if (!notifyRef.value?.parentElement?.parentElement) return;
|
if (!notifyRef.value?.parentElement?.parentElement) return;
|
||||||
addClass(
|
addClass(
|
||||||
notifyRef.value?.parentElement?.parentElement,
|
notifyRef.value?.parentElement?.parentElement,
|
||||||
"layui-layer-notify"
|
"layui-layer-notifiy-transition"
|
||||||
);
|
);
|
||||||
}, 300);
|
}, 300);
|
||||||
});
|
});
|
||||||
|
@ -45,7 +45,7 @@ import useResize from "../composable/useResize";
|
|||||||
import useMove from "../composable/useMove";
|
import useMove from "../composable/useMove";
|
||||||
import { zIndexKey } from "../tokens";
|
import { zIndexKey } from "../tokens";
|
||||||
|
|
||||||
export interface LayModalProps {
|
export interface LayerProps {
|
||||||
id?: string;
|
id?: string;
|
||||||
title?: string | boolean | Function;
|
title?: string | boolean | Function;
|
||||||
icon?: string | number;
|
icon?: string | number;
|
||||||
@ -100,7 +100,7 @@ export interface LayModalProps {
|
|||||||
restore?: Function;
|
restore?: Function;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<LayModalProps>(), {
|
const props = withDefaults(defineProps<LayerProps>(), {
|
||||||
title: "标题",
|
title: "标题",
|
||||||
setTop: false,
|
setTop: false,
|
||||||
offset: () => ["50%", "50%"],
|
offset: () => ["50%", "50%"],
|
||||||
@ -381,18 +381,17 @@ watch(
|
|||||||
* @param icon 图标类型
|
* @param icon 图标类型
|
||||||
*/
|
*/
|
||||||
const boxClasses = computed(() => {
|
const boxClasses = computed(() => {
|
||||||
return [
|
return [{
|
||||||
type === 0 ? "layui-layer-dialog" : "",
|
"layui-layer-dialog": type === 0,
|
||||||
type === 1 ? "layui-layer-page" : "",
|
"layui-layer-page": type === 1,
|
||||||
type === 2 ? "layui-layer-iframe" : "",
|
"layui-layer-iframe": type === 2,
|
||||||
type === 3 ? "layui-layer-loading" : "",
|
"layui-layer-loading": type === 3,
|
||||||
type === 4 ? "layui-layer-drawer" : "",
|
"layui-layer-drawer": type === 4,
|
||||||
type === 5 ? "layui-layer-photos" : "",
|
"layui-layer-photos": type === 5,
|
||||||
type === 6 ? "layui-layer-notifiy-border" : "",
|
"layui-layer-notifiy": type === 6,
|
||||||
props.isMessage ? "layui-layer-msg" : "",
|
"layui-layer-msg": props.isMessage,
|
||||||
props.isMessage && !props.icon ? "layui-layer-hui" : "",
|
"layui-layer-hui": props.isMessage && !props.icon,
|
||||||
props.skin,
|
},props.skin];
|
||||||
];
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1064,7 +1064,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.layer-notifiy {
|
.layui-layer-notifiy {
|
||||||
|
border: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-notifiy-wrapper {
|
||||||
min-width: 330px;
|
min-width: 330px;
|
||||||
padding: 14px 26px 14px 13px;
|
padding: 14px 26px 14px 13px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@ -1073,7 +1078,8 @@
|
|||||||
border: 1px solid #ebeef5;
|
border: 1px solid #ebeef5;
|
||||||
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
|
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
|
||||||
}
|
}
|
||||||
.layer-notifiy .title {
|
|
||||||
|
.layui-layer-notifiy-wrapper .title {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
@ -1081,17 +1087,20 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.layer-notifiy .content {
|
|
||||||
|
.layui-layer-notifiy-wrapper .content {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 21px;
|
line-height: 21px;
|
||||||
margin: 6px 0 0 8px;
|
margin: 6px 0 0 8px;
|
||||||
color: #606266;
|
color: #606266;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
}
|
}
|
||||||
.layer-notifiy .content img{
|
|
||||||
|
.layui-layer-notifiy-wrapper .content img{
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
.layer-notifiy .layui-layer-close {
|
|
||||||
|
.layui-layer-notifiy-wrapper .layui-layer-close {
|
||||||
background-position: 1px -40px;
|
background-position: 1px -40px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
@ -1101,17 +1110,15 @@
|
|||||||
right: 10px;
|
right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layer-notifiy .layui-layer-close:hover {
|
.layui-layer-notifiy-wrapper .layui-layer-close:hover {
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
.layui-layer-notify{
|
|
||||||
|
.layui-layer-notifiy-transition {
|
||||||
transition: top 0.3s ease-in-out;
|
transition: top 0.3s ease-in-out;
|
||||||
}
|
}
|
||||||
.layui-layer-notifiy-border{
|
|
||||||
border: none;
|
.layui-layer-notifiy-wrapper .title .layui-layer-ico{
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
.layer-notifiy .title .layui-layer-ico{
|
|
||||||
height: 30px !important;
|
height: 30px !important;
|
||||||
width: 30px !important;
|
width: 30px !important;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -77,7 +77,7 @@ importers:
|
|||||||
specifiers:
|
specifiers:
|
||||||
'@ctrl/tinycolor': ^3.4.1
|
'@ctrl/tinycolor': ^3.4.1
|
||||||
'@layui/icons-vue': ^1.0.9
|
'@layui/icons-vue': ^1.0.9
|
||||||
'@layui/layer-vue': ^1.4.5
|
'@layui/layer-vue': ^1.4.7
|
||||||
'@umijs/ssr-darkreader': ^4.9.45
|
'@umijs/ssr-darkreader': ^4.9.45
|
||||||
'@vueuse/core': ^9.2.0
|
'@vueuse/core': ^9.2.0
|
||||||
async-validator: ^4.1.1
|
async-validator: ^4.1.1
|
||||||
@ -1512,6 +1512,7 @@ packages:
|
|||||||
/@commitlint/load/17.1.2:
|
/@commitlint/load/17.1.2:
|
||||||
resolution: {integrity: sha512-sk2p/jFYAWLChIfOIp/MGSIn/WzZ0vkc3afw+l4X8hGEYkvDe4gQUUAVxjl/6xMRn0HgnSLMZ04xXh5pkTsmgg==}
|
resolution: {integrity: sha512-sk2p/jFYAWLChIfOIp/MGSIn/WzZ0vkc3afw+l4X8hGEYkvDe4gQUUAVxjl/6xMRn0HgnSLMZ04xXh5pkTsmgg==}
|
||||||
engines: {node: '>=v14'}
|
engines: {node: '>=v14'}
|
||||||
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@commitlint/config-validator': 17.1.0
|
'@commitlint/config-validator': 17.1.0
|
||||||
'@commitlint/execute-rule': 17.0.0
|
'@commitlint/execute-rule': 17.0.0
|
||||||
|
Loading…
Reference in New Issue
Block a user