File tree Expand file tree Collapse file tree 5 files changed +10
-32
lines changed
internal/vite-config/src/plugins
business/layouts/src/basic/content Expand file tree Collapse file tree 5 files changed +10
-32
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ RUN echo "Builder Success 🎉"
20
20
21
21
FROM nginx:stable-alpine as production
22
22
23
+ RUN echo "types { application/javascript js mjs; }" > /etc/nginx/conf.d/mjs.conf
23
24
COPY --from=builder /app/apps/antd-view/dist /usr/share/nginx/html
24
25
25
26
COPY ./deploy/nginx.conf /etc/nginx/nginx.conf
Original file line number Diff line number Diff line change 1
1
import type {
2
2
NormalizedOutputOptions ,
3
- OutputAsset ,
4
3
OutputBundle ,
5
4
OutputChunk ,
6
5
} from 'rollup' ;
@@ -45,25 +44,14 @@ async function viteLicensePlugin(
45
44
` . trim ( ) ;
46
45
47
46
for ( const [ , fileContent ] of Object . entries ( bundle ) ) {
48
- if (
49
- fileContent . type === 'asset' ||
50
- ( fileContent . type === 'chunk' && fileContent . isEntry )
51
- ) {
47
+ if ( fileContent . type === 'chunk' && fileContent . isEntry ) {
52
48
const chunkContent = fileContent as OutputChunk ;
53
- const assetContent = fileContent as OutputAsset ;
54
49
// 插入版权信息
55
- const content =
56
- typeof assetContent . source === 'string'
57
- ? assetContent . source
58
- : chunkContent . code ;
50
+ const content = chunkContent . code ;
59
51
const updatedContent = `${ copyrightText } ${ EOL } ${ content } ` ;
60
52
61
53
// 更新bundle
62
- if ( assetContent . source === undefined ) {
63
- ( fileContent as OutputChunk ) . code = updatedContent ;
64
- } else {
65
- ( fileContent as OutputAsset ) . source = updatedContent ;
66
- }
54
+ ( fileContent as OutputChunk ) . code = updatedContent ;
67
55
}
68
56
}
69
57
} ,
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ defineOptions({ name: 'LayoutContent' });
12
12
13
13
const { keepAlive } = usePreferences ();
14
14
const tabsStore = useTabsStore ();
15
- const { onTransitionEnd, spinning } = useContentSpinner ();
15
+ const { spinning } = useContentSpinner ();
16
16
17
17
const { getCacheTabs, getExcludeTabs, renderRouteView } =
18
18
storeToRefs (tabsStore );
@@ -51,12 +51,7 @@ function getTransitionName(route: RouteLocationNormalizedLoaded) {
51
51
/>
52
52
<IFrameRouterView />
53
53
<RouterView v-slot =" { Component, route }" >
54
- <Transition
55
- :name =" getTransitionName(route)"
56
- appear
57
- mode =" out-in"
58
- @transitionend =" onTransitionEnd"
59
- >
54
+ <Transition :name =" getTransitionName(route)" appear mode =" out-in" >
60
55
<KeepAlive
61
56
v-if =" keepAlive"
62
57
:exclude =" getExcludeTabs"
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import { preferences } from '@vben-core/preferences';
5
5
6
6
function useContentSpinner ( ) {
7
7
const spinning = ref ( false ) ;
8
- const isStartTransition = ref ( false ) ;
9
8
const startTime = ref ( 0 ) ;
10
9
const router = useRouter ( ) ;
11
10
const minShowTime = 500 ;
@@ -29,7 +28,6 @@ function useContentSpinner() {
29
28
if ( to . meta . loaded || ! enableLoading . value ) {
30
29
return true ;
31
30
}
32
- isStartTransition . value = false ;
33
31
startTime . value = performance . now ( ) ;
34
32
spinning . value = true ;
35
33
return true ;
@@ -40,17 +38,13 @@ function useContentSpinner() {
40
38
return true ;
41
39
}
42
40
43
- // 未进入过渡动画
44
- if ( ! isStartTransition . value ) {
45
- // 关闭加载动画
46
- onEnd ( ) ;
47
- }
41
+ // 关闭加载动画
42
+ onEnd ( ) ;
48
43
49
- isStartTransition . value = false ;
50
44
return true ;
51
45
} ) ;
52
46
53
- return { onTransitionEnd : onEnd , spinning } ;
47
+ return { spinning } ;
54
48
}
55
49
56
50
export { useContentSpinner } ;
Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ preferences:
181
181
name : 动画
182
182
loading : 页面切换 Loading
183
183
transition : 页面切换动画
184
- progress : 页面加载进度条
184
+ progress : 页面切换进度条
185
185
theme :
186
186
name : 主题
187
187
builtin : 内置主题
You can’t perform that action at this time.
0 commit comments