Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
球球不吃虾
vue-vben-admin
提交
8fd1994b
V
vue-vben-admin
项目概览
球球不吃虾
/
vue-vben-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-vben-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
8fd1994b
编写于
10月 19, 2020
作者:
V
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: bump 2.0.0-rc.3
上级
2f12556d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
61 addition
and
7 deletion
+61
-7
CHANGELOG.en_US.md
CHANGELOG.en_US.md
+23
-0
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+24
-0
package.json
package.json
+1
-1
src/hooks/event/useWindowSize.ts
src/hooks/event/useWindowSize.ts
+13
-6
未找到文件。
CHANGELOG.en_US.md
浏览文件 @
8fd1994b
# 2.0.0-rc.3 (2020-10-19)
### ✨ Features
-
Added excel component and excel/xml/csv/html export example
-
Added excel import example
-
Added global error handling
-
Added markdown components and examples
-
The menu name can be displayed when adding a new folding menu
### Docs
-
add project doc
### 🎫 Chores
-
update deps
### 🐛 Bug Fixes
-
Fix the adaptive problem of the top menu
-
Fix window system packaging error
# 2.0.0-rc.2 (2020-10-17)
### ✨ Features
...
...
CHANGELOG.zh_CN.md
浏览文件 @
8fd1994b
# 2.0.0-rc.3 (2020-10-19)
### ✨ Features
-
新增 excel 组件及 excel/xml/csv/html 导出示例
-
新增 excel 导入示例
-
新增全局错误处理
-
新增 markdown 组件及示例
-
新增折叠菜单时可显示菜单名
### Docs
-
添加项目文档
### 🎫 Chores
-
升级依赖
-
其他细节优化
### 🐛 Bug Fixes
-
修复顶部菜单自适应问题
-
修复 window 系统打包报错问题
# 2.0.0-rc.2 (2020-10-17)
### ✨ Features
...
...
package.json
浏览文件 @
8fd1994b
{
"name"
:
"vben-admin-2.0"
,
"version"
:
"2.0.0-rc.
2
"
,
"version"
:
"2.0.0-rc.
3
"
,
"scripts"
:
{
"bootstrap"
:
"yarn install"
,
"serve"
:
"cross-env ts-node --files -P ./build/tsconfig.json ./build/script/preserve && cross-env NODE_ENV=development vite"
,
...
...
src/hooks/event/useWindowSize.ts
浏览文件 @
8fd1994b
...
...
@@ -4,7 +4,6 @@ import { tryOnMounted, tryOnUnmounted } from '/@/utils/helper/vueHelper';
import
{
ref
}
from
'
vue
'
;
import
{
useDebounce
}
from
'
/@/hooks/core/useDebounce
'
;
import
{
CancelFn
}
from
'
../core/types
'
;
interface
WindowSizeOptions
{
once
?:
boolean
;
...
...
@@ -12,25 +11,33 @@ interface WindowSizeOptions {
listenerOptions
?:
AddEventListenerOptions
|
boolean
;
}
export
function
useWindowSizeFn
<
T
>
(
fn
:
Fn
<
T
>
,
wait
=
150
,
options
?:
WindowSizeOptions
)
:
CancelFn
{
export
function
useWindowSizeFn
<
T
>
(
fn
:
Fn
<
T
>
,
wait
=
150
,
options
?:
WindowSizeOptions
)
{
let
handler
=
()
=>
{
fn
();
};
const
[
handleSize
,
cancel
]
=
useDebounce
(
handler
,
wait
,
options
);
handler
=
handleSize
;
tryOnMounted
(
()
=>
{
const
start
=
()
=>
{
if
(
options
&&
options
.
immediate
)
{
handler
();
}
window
.
addEventListener
(
'
resize
'
,
handler
);
}
)
;
};
tryOnUnmounted
(
()
=>
{
const
stop
=
()
=>
{
window
.
removeEventListener
(
'
resize
'
,
handler
);
cancel
();
};
tryOnMounted
(()
=>
{
start
();
});
tryOnUnmounted
(()
=>
{
stop
();
});
return
cancel
;
return
[
start
,
stop
]
;
}
export
const
useWindowSize
=
(
wait
=
150
,
options
?:
WindowSizeOptions
)
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录