Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-vue-admin
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-vue-admin
Commits
6b996229
提交
6b996229
authored
4月 08, 2021
作者:
Vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(use-loading): rendering fails when used with onMounted, fix #438
上级
67a7a76b
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
37 行增加
和
22 行删除
+37
-22
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
theme.ts
build/vite/plugin/theme.ts
+2
-2
createLoading.ts
src/components/Loading/src/createLoading.ts
+11
-6
useLoading.ts
src/components/Loading/src/useLoading.ts
+1
-1
theme.less
src/design/theme.less
+5
-0
index.vue
src/views/demo/comp/loading/index.vue
+17
-13
没有找到文件。
CHANGELOG.zh_CN.md
浏览文件 @
6b996229
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
-
修复 tinymce 上传按钮全屏模式下消失问题
-
修复 tinymce 上传按钮全屏模式下消失问题
-
确保 title 在重新登录后正常改变
-
确保 title 在重新登录后正常改变
-
确保后台模式登录正常
-
确保后台模式登录正常
-
修复 TableAction 点击事件问题
## 2.1.1 (2021-03-26)
## 2.1.1 (2021-03-26)
...
...
build/vite/plugin/theme.ts
浏览文件 @
6b996229
...
@@ -19,7 +19,6 @@ export function configThemePlugin(isBuild: boolean): Plugin[] {
...
@@ -19,7 +19,6 @@ export function configThemePlugin(isBuild: boolean): Plugin[] {
mixLighten
,
mixLighten
,
tinycolor
,
tinycolor
,
});
});
const
plugin
=
[
const
plugin
=
[
viteThemePlugin
({
viteThemePlugin
({
resolveSelector
:
(
s
)
=>
`[data-theme]
${
s
}
`
,
resolveSelector
:
(
s
)
=>
`[data-theme]
${
s
}
`
,
...
@@ -41,7 +40,8 @@ export function configThemePlugin(isBuild: boolean): Plugin[] {
...
@@ -41,7 +40,8 @@ export function configThemePlugin(isBuild: boolean): Plugin[] {
// black: '#0e1117',
// black: '#0e1117',
// #8b949e
// #8b949e
'text-color-secondary'
:
'#8b949e'
,
'text-color-secondary'
:
'#8b949e'
,
'border-color-base'
:
'#30363d'
,
// 'border-color-base': '#30363d',
// 'border-color-split': '#30363d',
'item-active-bg'
:
'#111b26'
,
'item-active-bg'
:
'#111b26'
,
},
},
}),
}),
...
...
src/components/Loading/src/createLoading.ts
浏览文件 @
6b996229
...
@@ -4,7 +4,7 @@ import type { LoadingProps } from './types';
...
@@ -4,7 +4,7 @@ import type { LoadingProps } from './types';
import
{
createVNode
,
render
,
reactive
,
h
}
from
'vue'
;
import
{
createVNode
,
render
,
reactive
,
h
}
from
'vue'
;
import
Loading
from
'./index.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
;
let
vm
:
Nullable
<
VNode
>
=
null
;
const
data
=
reactive
({
const
data
=
reactive
({
tip
:
''
,
tip
:
''
,
...
@@ -13,16 +13,21 @@ export function createLoading(props?: Partial<LoadingProps>, target?: HTMLElemen
...
@@ -13,16 +13,21 @@ export function createLoading(props?: Partial<LoadingProps>, target?: HTMLElemen
});
});
const
LoadingWrap
=
defineComponent
({
const
LoadingWrap
=
defineComponent
({
setup
()
{
render
()
{
return
()
=>
{
return
h
(
Loading
,
{
...
data
});
return
h
(
Loading
,
{
...
data
});
};
},
},
});
});
vm
=
createVNode
(
LoadingWrap
);
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
()
{
function
close
()
{
if
(
vm
?.
el
&&
vm
.
el
.
parentNode
)
{
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
...
@@ -27,7 +27,7 @@ export function useLoading(opt: Partial<LoadingProps> | Partial<UseLoadingOption
props
=
opt
as
Partial
<
LoadingProps
>
;
props
=
opt
as
Partial
<
LoadingProps
>
;
}
}
const
instance
=
createLoading
(
props
);
const
instance
=
createLoading
(
props
,
undefined
,
true
);
const
open
=
():
void
=>
{
const
open
=
():
void
=>
{
const
t
=
unref
(
target
);
const
t
=
unref
(
target
);
...
...
src/design/theme.less
浏览文件 @
6b996229
...
@@ -18,6 +18,11 @@ html[data-theme='dark'] {
...
@@ -18,6 +18,11 @@ html[data-theme='dark'] {
0 9px 28px 8px rgb(0 0 0 / 20%);
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-message,
.ant-alert-with-description .ant-alert-message,
.ant-alert-with-description .ant-alert-message,
.ant-alert-description {
.ant-alert-description {
...
...
src/views/demo/comp/loading/index.vue
浏览文件 @
6b996229
<
template
>
<
template
>
<PageWrapper
v-loading=
"loadingRef"
loading-tip=
"加载中..."
title=
"Loading组件示例"
>
<PageWrapper
v-loading=
"loadingRef"
loading-tip=
"加载中..."
title=
"Loading组件示例"
>
<a-alert
message=
"组件方式"
/>
<div
ref=
"wrapEl"
>
<a-button
class=
"my-4 mr-4"
type=
"primary"
@
click=
"openCompFullLoading"
>
<a-alert
message=
"组件方式"
/>
全屏 Loading
<a-button
class=
"my-4 mr-4"
type=
"primary"
@
click=
"openCompFullLoading"
>
</a-button>
全屏 Loading
<a-button
class=
"my-4"
type=
"primary"
@
click=
"openCompAbsolute"
>
容器内 Loading
</a-button>
</a-button>
<Loading
:loading=
"loading"
:absolute=
"absolute"
:tip=
"tip"
/>
<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 mr-4"
type=
"primary"
@
click=
"openFnFullLoading"
>
<a-button
class=
"my-4"
type=
"primary"
@
click=
"openFnWrapLoading"
>
容器内 Loading
</a-button>
全屏 Loading
</a-button>
<a-button
class=
"my-4"
type=
"primary"
@
click=
"openFnWrapLoading"
>
容器内 Loading
</a-button>
<a-alert
message=
"指令方式"
/>
<a-alert
message=
"指令方式"
/>
<a-button
class=
"my-4 mr-4"
type=
"primary"
@
click=
"openDirectiveLoading"
>
<a-button
class=
"my-4 mr-4"
type=
"primary"
@
click=
"openDirectiveLoading"
>
打开指令Loading
打开指令Loading
</a-button>
</a-button>
</div>
</PageWrapper>
</PageWrapper>
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论