Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ChenSun1
vue-vben-admin
提交
6b996229
V
vue-vben-admin
项目概览
ChenSun1
/
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,发现更多精彩内容 >>
提交
6b996229
编写于
4月 08, 2021
作者:
V
Vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(use-loading): rendering fails when used with onMounted, fix #438
上级
67a7a76b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
37 addition
and
22 deletion
+37
-22
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
build/vite/plugin/theme.ts
build/vite/plugin/theme.ts
+2
-2
src/components/Loading/src/createLoading.ts
src/components/Loading/src/createLoading.ts
+11
-6
src/components/Loading/src/useLoading.ts
src/components/Loading/src/useLoading.ts
+1
-1
src/design/theme.less
src/design/theme.less
+5
-0
src/views/demo/comp/loading/index.vue
src/views/demo/comp/loading/index.vue
+17
-13
未找到文件。
CHANGELOG.zh_CN.md
浏览文件 @
6b996229
...
...
@@ -19,6 +19,7 @@
-
修复 tinymce 上传按钮全屏模式下消失问题
-
确保 title 在重新登录后正常改变
-
确保后台模式登录正常
-
修复 TableAction 点击事件问题
## 2.1.1 (2021-03-26)
...
...
build/vite/plugin/theme.ts
浏览文件 @
6b996229
...
...
@@ -19,7 +19,6 @@ export function configThemePlugin(isBuild: boolean): Plugin[] {
mixLighten
,
tinycolor
,
});
const
plugin
=
[
viteThemePlugin
({
resolveSelector
:
(
s
)
=>
`[data-theme]
${
s
}
`
,
...
...
@@ -41,7 +40,8 @@ export function configThemePlugin(isBuild: boolean): Plugin[] {
// black: '#0e1117',
// #8b949e
'
text-color-secondary
'
:
'
#8b949e
'
,
'
border-color-base
'
:
'
#30363d
'
,
// 'border-color-base': '#30363d',
// 'border-color-split': '#30363d',
'
item-active-bg
'
:
'
#111b26
'
,
},
}),
...
...
src/components/Loading/src/createLoading.ts
浏览文件 @
6b996229
...
...
@@ -4,7 +4,7 @@ import type { LoadingProps } from './types';
import
{
createVNode
,
render
,
reactive
,
h
}
from
'
vue
'
;
import
Loading
from
'
./index.vue
'
;
export
function
createLoading
(
props
?:
Partial
<
LoadingProps
>
,
target
?:
HTMLElement
)
{
export
function
createLoading
(
props
?:
Partial
<
LoadingProps
>
,
target
?:
HTMLElement
,
wait
=
false
)
{
let
vm
:
Nullable
<
VNode
>
=
null
;
const
data
=
reactive
({
tip
:
''
,
...
...
@@ -13,16 +13,21 @@ export function createLoading(props?: Partial<LoadingProps>, target?: HTMLElemen
});
const
LoadingWrap
=
defineComponent
({
setup
()
{
return
()
=>
{
return
h
(
Loading
,
{
...
data
});
};
render
()
{
return
h
(
Loading
,
{
...
data
});
},
});
vm
=
createVNode
(
LoadingWrap
);
render
(
vm
,
document
.
createElement
(
'
div
'
));
// TODO fix https://github.com/anncwb/vue-vben-admin/issues/438
if
(
wait
)
{
setTimeout
(()
=>
{
render
(
vm
,
document
.
createElement
(
'
div
'
));
},
0
);
}
else
{
render
(
vm
,
document
.
createElement
(
'
div
'
));
}
function
close
()
{
if
(
vm
?.
el
&&
vm
.
el
.
parentNode
)
{
...
...
src/components/Loading/src/useLoading.ts
浏览文件 @
6b996229
...
...
@@ -27,7 +27,7 @@ export function useLoading(opt: Partial<LoadingProps> | Partial<UseLoadingOption
props
=
opt
as
Partial
<
LoadingProps
>
;
}
const
instance
=
createLoading
(
props
);
const
instance
=
createLoading
(
props
,
undefined
,
true
);
const
open
=
():
void
=>
{
const
t
=
unref
(
target
);
...
...
src/design/theme.less
浏览文件 @
6b996229
...
...
@@ -18,6 +18,11 @@ html[data-theme='dark'] {
0 9px 28px 8px rgb(0 0 0 / 20%);
}
.ant-card-grid {
box-shadow: 1px 0 0 0 #434343, 0 1px 0 0 #434343, 1px 1px 0 0 #434343, 1px 0 0 0 #434343 inset,
0 1px 0 0 #434343 inset;
}
.ant-alert-message,
.ant-alert-with-description .ant-alert-message,
.ant-alert-description {
...
...
src/views/demo/comp/loading/index.vue
浏览文件 @
6b996229
<
template
>
<PageWrapper
v-loading=
"loadingRef"
loading-tip=
"加载中..."
title=
"Loading组件示例"
>
<a-alert
message=
"组件方式"
/>
<a-button
class=
"my-4 mr-4"
type=
"primary"
@
click=
"openCompFullLoading"
>
全屏 Loading
</a-button>
<a-button
class=
"my-4"
type=
"primary"
@
click=
"openCompAbsolute"
>
容器内 Loading
</a-button>
<Loading
:loading=
"loading"
:absolute=
"absolute"
:tip=
"tip"
/>
<div
ref=
"wrapEl"
>
<a-alert
message=
"组件方式"
/>
<a-button
class=
"my-4 mr-4"
type=
"primary"
@
click=
"openCompFullLoading"
>
全屏 Loading
</a-button>
<a-button
class=
"my-4"
type=
"primary"
@
click=
"openCompAbsolute"
>
容器内 Loading
</a-button>
<Loading
:loading=
"loading"
:absolute=
"absolute"
:tip=
"tip"
/>
<a-alert
message=
"函数方式"
/>
<a-alert
message=
"函数方式"
/>
<a-button
class=
"my-4 mr-4"
type=
"primary"
@
click=
"openFnFullLoading"
>
全屏 Loading
</a-button>
<a-button
class=
"my-4"
type=
"primary"
@
click=
"openFnWrapLoading"
>
容器内 Loading
</a-button>
<a-button
class=
"my-4 mr-4"
type=
"primary"
@
click=
"openFnFullLoading"
>
全屏 Loading
</a-button>
<a-button
class=
"my-4"
type=
"primary"
@
click=
"openFnWrapLoading"
>
容器内 Loading
</a-button>
<a-alert
message=
"指令方式"
/>
<a-button
class=
"my-4 mr-4"
type=
"primary"
@
click=
"openDirectiveLoading"
>
打开指令Loading
</a-button>
<a-alert
message=
"指令方式"
/>
<a-button
class=
"my-4 mr-4"
type=
"primary"
@
click=
"openDirectiveLoading"
>
打开指令Loading
</a-button>
</div>
</PageWrapper>
</
template
>
<
script
lang=
"ts"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录