Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
球球不吃虾
vue-vben-admin
提交
b49950a3
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 搜索 >>
提交
b49950a3
编写于
11月 21, 2020
作者:
V
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: fix useTimeoutFn not work
上级
f7aa93f5
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
64 addition
and
14 deletion
+64
-14
src/components/Container/src/LazyContainer.vue
src/components/Container/src/LazyContainer.vue
+4
-4
src/components/Container/src/collapse/CollapseContainer.vue
src/components/Container/src/collapse/CollapseContainer.vue
+1
-1
src/components/Modal/src/Modal.tsx
src/components/Modal/src/Modal.tsx
+1
-1
src/components/Table/src/hooks/useDataSource.ts
src/components/Table/src/hooks/useDataSource.ts
+1
-1
src/components/Verify/src/DragVerify.tsx
src/components/Verify/src/DragVerify.tsx
+1
-1
src/components/Verify/src/ImgRotate.tsx
src/components/Verify/src/ImgRotate.tsx
+1
-1
src/components/Verify/src/VerifyModal.vue
src/components/Verify/src/VerifyModal.vue
+1
-1
src/hooks/core/useTimeout.ts
src/hooks/core/useTimeout.ts
+43
-0
src/hooks/web/useApexCharts.ts
src/hooks/web/useApexCharts.ts
+1
-1
src/hooks/web/useECharts.ts
src/hooks/web/useECharts.ts
+1
-1
src/hooks/web/useMessage.tsx
src/hooks/web/useMessage.tsx
+7
-0
src/hooks/web/useTabs.ts
src/hooks/web/useTabs.ts
+1
-1
src/layouts/logo/index.vue
src/layouts/logo/index.vue
+1
-1
未找到文件。
src/components/Container/src/LazyContainer.vue
浏览文件 @
b49950a3
...
...
@@ -22,7 +22,7 @@
import
{
defineComponent
,
reactive
,
onMounted
,
ref
,
toRef
,
toRefs
}
from
'
vue
'
;
import
{
Skeleton
}
from
'
ant-design-vue
'
;
import
{
useTimeoutFn
}
from
'
@vueuse/core
'
;
import
{
useTimeoutFn
}
from
'
/@/hooks/core/useTimeout
'
;
import
{
useIntersectionObserver
}
from
'
/@/hooks/event/useIntersectionObserver
'
;
interface
State
{
isInit
:
boolean
;
...
...
@@ -40,9 +40,9 @@
// The viewport where the component is located. If the component is scrolling in the page container, the viewport is the container
viewport
:
{
type
:
(
typeof
window
!==
'
undefined
'
?
window
.
HTMLElement
:
Object
)
as
PropType
<
HTMLElement
>
,
type
:
(
typeof
window
!==
'
undefined
'
?
window
.
HTMLElement
:
Object
)
as
PropType
<
HTMLElement
>
,
default
:
()
=>
null
,
},
...
...
src/components/Container/src/collapse/CollapseContainer.vue
浏览文件 @
b49950a3
...
...
@@ -32,7 +32,7 @@
import
{
triggerWindowResize
}
from
'
/@/utils/event/triggerWindowResizeEvent
'
;
// hook
import
{
useTimeoutFn
}
from
'
@vueuse/core
'
;
import
{
useTimeoutFn
}
from
'
/@/hooks/core/useTimeout
'
;
export
default
defineComponent
({
components
:
{
...
...
src/components/Modal/src/Modal.tsx
浏览文件 @
b49950a3
import
{
Modal
}
from
'
ant-design-vue
'
;
import
{
defineComponent
,
watchEffect
}
from
'
vue
'
;
import
{
basicProps
}
from
'
./props
'
;
import
{
useTimeoutFn
}
from
'
@vueuse/core
'
;
import
{
useTimeoutFn
}
from
'
/@/hooks/core/useTimeout
'
;
import
{
extendSlots
}
from
'
/@/utils/helper/tsxHelper
'
;
export
default
defineComponent
({
...
...
src/components/Table/src/hooks/useDataSource.ts
浏览文件 @
b49950a3
...
...
@@ -3,7 +3,7 @@ import type { PaginationProps } from '../types/pagination';
import
{
watch
,
ref
,
unref
,
ComputedRef
,
computed
,
onMounted
,
Ref
}
from
'
vue
'
;
import
{
useTimeoutFn
}
from
'
@vueuse/core
'
;
import
{
useTimeoutFn
}
from
'
/@/hooks/core/useTimeout
'
;
import
{
buildUUID
}
from
'
/@/utils/uuid
'
;
import
{
isFunction
,
isBoolean
}
from
'
/@/utils/is
'
;
...
...
src/components/Verify/src/DragVerify.tsx
浏览文件 @
b49950a3
import
{
defineComponent
,
ref
,
computed
,
unref
,
reactive
,
watch
,
watchEffect
}
from
'
vue
'
;
import
{
useTimeoutFn
}
from
'
@vueuse/core
'
;
import
{
useTimeoutFn
}
from
'
/@/hooks/core/useTimeout
'
;
import
{
useEventListener
}
from
'
/@/hooks/event/useEventListener
'
;
import
{
basicProps
}
from
'
./props
'
;
import
{
getSlot
}
from
'
/@/utils/helper/tsxHelper
'
;
...
...
src/components/Verify/src/ImgRotate.tsx
浏览文件 @
b49950a3
import
type
{
MoveData
,
DragVerifyActionType
}
from
'
./types
'
;
import
{
defineComponent
,
computed
,
unref
,
reactive
,
watch
,
ref
,
getCurrentInstance
}
from
'
vue
'
;
import
{
useTimeoutFn
}
from
'
@vueuse/core
'
;
import
{
useTimeoutFn
}
from
'
/@/hooks/core/useTimeout
'
;
import
BasicDragVerify
from
'
./DragVerify
'
;
...
...
src/components/Verify/src/VerifyModal.vue
浏览文件 @
b49950a3
<
script
lang=
"tsx"
>
import
{
defineComponent
,
ref
,
unref
}
from
'
vue
'
;
import
{
BasicModal
}
from
'
/@/components/Modal/index
'
;
import
{
useTimeoutFn
}
from
'
@vueuse/core
'
;
import
{
useTimeoutFn
}
from
'
/@/hooks/core/useTimeout
'
;
import
{
RotateDragVerify
,
DragVerifyActionType
}
from
'
/@/components/Verify/index
'
;
export
default
defineComponent
({
...
...
src/hooks/core/useTimeout.ts
0 → 100644
浏览文件 @
b49950a3
import
{
ref
,
watch
}
from
'
vue
'
;
import
{
tryOnUnmounted
}
from
'
/@/utils/helper/vueHelper
'
;
import
{
isFunction
}
from
'
/@/utils/is
'
;
export
function
useTimeoutFn
(
handle
:
Fn
<
any
>
,
wait
:
number
)
{
if
(
!
isFunction
(
handle
))
{
throw
new
Error
(
'
handle is not Function!
'
);
}
const
{
readyRef
,
stop
,
start
}
=
useTimeoutRef
(
wait
);
watch
(
readyRef
,
(
maturity
)
=>
{
maturity
&&
handle
();
},
{
immediate
:
false
}
);
return
{
readyRef
,
stop
,
start
};
}
export
function
useTimeoutRef
(
wait
:
number
)
{
const
readyRef
=
ref
(
false
);
let
timer
:
ReturnType
<
typeof
setTimeout
>
|
undefined
;
function
stop
():
void
{
readyRef
.
value
=
false
;
timer
&&
window
.
clearTimeout
(
timer
);
}
function
start
():
void
{
stop
();
timer
=
setTimeout
(()
=>
{
readyRef
.
value
=
true
;
},
wait
);
}
start
();
tryOnUnmounted
(
stop
);
return
{
readyRef
,
stop
,
start
};
}
src/hooks/web/useApexCharts.ts
浏览文件 @
b49950a3
import
{
useTimeoutFn
}
from
'
@vueuse/core
'
;
import
{
useTimeoutFn
}
from
'
/@/hooks/core/useTimeout
'
;
import
{
tryOnUnmounted
}
from
'
/@/utils/helper/vueHelper
'
;
import
{
unref
,
Ref
,
nextTick
}
from
'
vue
'
;
...
...
src/hooks/web/useECharts.ts
浏览文件 @
b49950a3
import
{
useTimeoutFn
}
from
'
@vueuse/core
'
;
import
{
useTimeoutFn
}
from
'
/@/hooks/core/useTimeout
'
;
import
{
tryOnUnmounted
}
from
'
/@/utils/helper/vueHelper
'
;
import
{
unref
,
Ref
,
nextTick
}
from
'
vue
'
;
import
type
{
EChartOption
,
ECharts
}
from
'
echarts
'
;
...
...
src/hooks/web/useMessage.tsx
浏览文件 @
b49950a3
...
...
@@ -46,6 +46,7 @@ function getIcon(iconType: string) {
return
<
CloseCircleFilled
class
=
"modal-icon-error"
/>;
}
}
function
renderContent
({
content
}:
Pick
<
ModalOptionsEx
,
'
content
'
>
)
{
return
<
div
innerHTML
=
{
`<div>
${
content
as
string
}
</div>`
}
></
div
>;
}
...
...
@@ -64,6 +65,7 @@ function createConfirm(options: ModalOptionsEx): ConfirmOptions {
};
return
Modal
.
confirm
(
opt
)
as
any
;
}
const
baseOptions
=
{
okText
:
'
确定
'
,
centered
:
true
,
...
...
@@ -77,15 +79,19 @@ function createModalOptions(options: ModalOptionsPartial, icon: string): ModalOp
icon
:
getIcon
(
icon
),
};
}
function
createSuccessModal
(
options
:
ModalOptionsPartial
)
{
return
Modal
.
success
(
createModalOptions
(
options
,
'
success
'
));
}
function
createErrorModal
(
options
:
ModalOptionsPartial
)
{
return
Modal
.
error
(
createModalOptions
(
options
,
'
close
'
));
}
function
createInfoModal
(
options
:
ModalOptionsPartial
)
{
return
Modal
.
info
(
createModalOptions
(
options
,
'
info
'
));
}
function
createWarningModal
(
options
:
ModalOptionsPartial
)
{
return
Modal
.
warning
(
createModalOptions
(
options
,
'
warning
'
));
}
...
...
@@ -94,6 +100,7 @@ notification.config({
placement
:
'
topRight
'
,
duration
:
3
,
});
/**
* @description: message
*/
...
...
src/hooks/web/useTabs.ts
浏览文件 @
b49950a3
import
{
useTimeoutFn
}
from
'
@vueuse/core
'
;
import
{
useTimeoutFn
}
from
'
/@/hooks/core/useTimeout
'
;
import
{
PageEnum
}
from
'
/@/enums/pageEnum
'
;
import
{
TabItem
,
tabStore
}
from
'
/@/store/modules/tab
'
;
import
{
appStore
}
from
'
/@/store/modules/app
'
;
...
...
src/layouts/logo/index.vue
浏览文件 @
b49950a3
...
...
@@ -8,7 +8,7 @@
import
{
computed
,
defineComponent
,
PropType
,
ref
,
watch
}
from
'
vue
'
;
// hooks
import
{
useSetting
}
from
'
/@/hooks/core/useSetting
'
;
import
{
useTimeoutFn
}
from
'
@vueuse/core
'
;
import
{
useTimeoutFn
}
from
'
/@/hooks/core/useTimeout
'
;
import
{
useGo
}
from
'
/@/hooks/web/usePage
'
;
import
{
PageEnum
}
from
'
/@/enums/pageEnum
'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录