升级 icons-vue 1.0.3

This commit is contained in:
就眠儀式 2022-01-20 01:04:42 +08:00
parent f941f1f765
commit ff03ee05a8
3 changed files with 18 additions and 8 deletions

View File

@ -11,7 +11,17 @@
<template>
<lay-timeline>
<lay-timeline-item title="0.3.x">
<ul>
<ul>
<a name="0-3-5"> </a>
<li>
<h3>0.3.5 <span class="layui-badge-rim">2022-01-19</span></h3>
<ul>
<li>[修复] dropdown 下拉菜单 content 显示位置问题。</li>
<li>[升级] icons-vue 1.0.3 版本。</li>
</ul>
</li>
</ul>
<ul>
<a name="0-3-4"> </a>
<li>
<h3>0.3.4 <span class="layui-badge-rim">2022-01-19</span></h3>

View File

@ -33,7 +33,7 @@
},
"dependencies": {
"@layui/hooks-vue": "^0.1.6",
"@layui/icons-vue": "^1.0.2",
"@layui/icons-vue": "^1.0.3",
"@layui/layer-vue": "^1.2.5",
"async-validator": "^4.0.7",
"countup.js": "^2.0.8",

View File

@ -3,7 +3,7 @@
* <p>
* @param elem dom
* */
export function getTop(elem) {
export function getTop(elem: any) : any {
return (
elem.offsetTop + ((elem.offsetParent && getTop(elem.offsetParent)) || 0)
);
@ -14,7 +14,7 @@ export function getTop(elem) {
* <p>
* @param elem dom
* */
export function getLeft(elem) {
export function getLeft(elem: any) : any {
return (
elem.offsetLeft + ((elem.offsetParent && getLeft(elem.offsetParent)) || 0)
);
@ -27,7 +27,7 @@ export function getLeft(elem) {
* @param events
* @param handler
* */
export function on(elem, events, handler) {
export function on(elem: any, events: any, handler: any) {
[]
.concat(events)
.forEach((event) => elem.addEventListener(event, handler, false));
@ -40,8 +40,8 @@ export function on(elem, events, handler) {
* @param events
* @param handler
* */
export function once(elem, events, handler) {
const listener = function (_this, args) {
export function once(elem: any, events: any, handler: any) {
const listener = function (_this: any, args: any) {
handler.apply(_this, args);
off(elem, events, listener);
};
@ -55,7 +55,7 @@ export function once(elem, events, handler) {
* @param events
* @param handler
* */
export function off(elem, events, handler) {
export function off(elem: any, events: any, handler: any) {
[]
.concat(events)
.forEach((event) => elem.removeEventListener(event, handler, false));