Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d49e3e81
authored
Feb 23, 2025
by
Netfan
Committed by
GitHub
Feb 23, 2025
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: loading and spinner style fixed and improved (#5588)
1 parent
579b1b48
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
12 deletions
packages/@core/ui-kit/shadcn-ui/src/components/spinner/loading.vue
packages/effects/common-ui/src/components/loading/loading.vue
packages/effects/common-ui/src/components/loading/spinner.vue
packages/@core/ui-kit/shadcn-ui/src/components/spinner/loading.vue
View file @
d49e3e8
...
...
@@ -88,7 +88,7 @@ function onTransitionEnd() {
</span>
</slot>
<div
v-if=
"text"
class=
"mt-4 text-xs"
>
{{
text
}}
</div>
<div
v-if=
"text"
class=
"
text-primary
mt-4 text-xs"
>
{{
text
}}
</div>
<slot></slot>
</div>
</
template
>
...
...
packages/effects/common-ui/src/components/loading/loading.vue
View file @
d49e3e8
<
script
lang=
"ts"
setup
>
import
{
VbenLoading
}
from
'@vben-core/shadcn-ui'
;
import
{
cn
}
from
'@vben-core/shared/utils'
;
defineOptions
({
name
:
'Loading'
});
defineProps
<
{
spinning
:
boolean
;
interface
LoadingProps
{
class
?:
string
;
/**
* @zh_CN 最小加载时间
* @en_US Minimum loading time
*/
minLoadingTime
?:
number
;
/**
* @zh_CN loading状态开启
*/
spinning
?:
boolean
;
/**
* @zh_CN 文字
*/
text
?:
string
;
}
>
();
}
defineOptions
({
name
:
'Loading'
});
const
props
=
defineProps
<
LoadingProps
>
();
</
script
>
<
template
>
<div
class=
"relative min-h-20
"
>
<div
:class=
"cn('relative min-h-20', props.class)
"
>
<slot></slot>
<VbenLoading
:spinning=
"spinning"
:text=
"text"
>
<VbenLoading
:min-loading-time=
"props.minLoadingTime"
:spinning=
"props.spinning"
:text=
"props.text"
>
<template
v-if=
"$slots.icon"
#
icon
>
<slot
name=
"icon"
></slot>
</
template
>
...
...
packages/effects/common-ui/src/components/loading/spinner.vue
View file @
d49e3e8
<
script
lang=
"ts"
setup
>
import
{
VbenSpinner
}
from
'@vben-core/shadcn-ui'
;
import
{
cn
}
from
'@vben-core/shared/utils'
;
interface
SpinnerProps
{
class
?:
string
;
/**
* @zh_CN 最小加载时间
* @en_US Minimum loading time
*/
minLoadingTime
?:
number
;
/**
* @zh_CN loading状态开启
*/
spinning
?:
boolean
;
}
defineOptions
({
name
:
'Spinner'
});
defineProps
({
spinning
:
Boolean
,
});
const
props
=
defineProps
<
SpinnerProps
>
();
</
script
>
<
template
>
<div
class=
"relative min-h-20
"
>
<div
:class=
"cn('relative min-h-20', props.class)
"
>
<slot></slot>
<VbenSpinner
:spinning=
"spinning"
/>
<VbenSpinner
:min-loading-time=
"props.minLoadingTime"
:spinning=
"props.spinning"
/>
</div>
</
template
>
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment