mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
fix: 修改语言挂载问题
This commit is contained in:
+1
@@ -24,4 +24,5 @@ import {
|
||||
import { MessageContent } from '@/components/MessageContent'
|
||||
import { DialogContent } from '@/components/DialogContent'
|
||||
import { LoadingContent } from '@/components/LoadingContent'
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,3 @@
|
||||
import AppProvider from './AppProvider.vue';
|
||||
|
||||
export { AppProvider };
|
||||
@@ -53,23 +53,28 @@ const filterBtnList = computed(() => {
|
||||
const isFull = computed(() => {
|
||||
return props.narrow && screenfullFn(true)
|
||||
})
|
||||
const btnList = [
|
||||
{
|
||||
title: '关闭',
|
||||
key: 'close',
|
||||
icon: CloseIcon
|
||||
},
|
||||
{
|
||||
title: '缩小',
|
||||
key: 'remove',
|
||||
icon: RemoveIcon
|
||||
},
|
||||
{
|
||||
title: isFull ? '缩小' : '放大',
|
||||
key: props.narrow ? 'fullResize' : 'resize',
|
||||
icon: ResizeIcon
|
||||
}
|
||||
]
|
||||
|
||||
const btnList: {
|
||||
title: string,
|
||||
key: "close" | "remove" | "resize" | "fullResize",
|
||||
icon: any
|
||||
}[] = [
|
||||
{
|
||||
title: '关闭',
|
||||
key: 'close',
|
||||
icon: CloseIcon
|
||||
},
|
||||
{
|
||||
title: '缩小',
|
||||
key: 'remove',
|
||||
icon: RemoveIcon
|
||||
},
|
||||
{
|
||||
title: isFull ? '缩小' : '放大',
|
||||
key: props.narrow ? 'fullResize' : 'resize',
|
||||
icon: ResizeIcon
|
||||
}
|
||||
]
|
||||
|
||||
const handleClick = (key: 'close' | 'remove' | 'resize' | 'fullResize') => {
|
||||
if (key === 'fullResize') screenfullFn()
|
||||
@@ -80,7 +85,7 @@ const handleClick = (key: 'close' | 'remove' | 'resize' | 'fullResize') => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@include go('apple-control-btn') {
|
||||
@include go("apple-control-btn") {
|
||||
display: flex;
|
||||
&:hover {
|
||||
.btn {
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
import AppProvider from './Application.vue';
|
||||
|
||||
export { AppProvider };
|
||||
@@ -1,12 +1,6 @@
|
||||
<template></template>
|
||||
<script lang="ts">
|
||||
import { useDialog } from 'naive-ui';
|
||||
|
||||
export default {
|
||||
name: 'DialogContent',
|
||||
setup() {
|
||||
//挂载在 window 方便与在js中使用
|
||||
window['$dialog'] = useDialog();
|
||||
},
|
||||
};
|
||||
<script lang="ts" setup>
|
||||
import { useDialog } from 'naive-ui';
|
||||
//挂载在 window 方便与在js中使用
|
||||
window['$dialog'] = useDialog();
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
import I18n from './index.vue';
|
||||
|
||||
export { I18n };
|
||||
@@ -0,0 +1,7 @@
|
||||
<template></template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useI18n } from 'vue-i18n'
|
||||
const { t } = useI18n()
|
||||
window['$t'] = t
|
||||
</script>
|
||||
@@ -1,12 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { useLoadingBar } from 'naive-ui'
|
||||
<template></template>
|
||||
|
||||
export default {
|
||||
name: 'LoadingContent',
|
||||
setup() {
|
||||
// 挂载在 window 方便与在js中使用
|
||||
window['$loading'] = useLoadingBar()
|
||||
window['$loading'].finish()
|
||||
}
|
||||
}
|
||||
<script lang="ts" setup>
|
||||
import { useLoadingBar } from 'naive-ui'
|
||||
// 挂载在 window 方便与在js中使用
|
||||
window['$loading'] = useLoadingBar()
|
||||
window['$loading'].finish()
|
||||
</script>
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { useMessage } from 'naive-ui';
|
||||
<template></template>
|
||||
|
||||
export default {
|
||||
name: 'MessageContent',
|
||||
setup() {
|
||||
//挂载在 window 方便与在js中使用
|
||||
window['$message'] = useMessage();
|
||||
},
|
||||
};
|
||||
<script lang="ts" setup>
|
||||
import { useMessage } from 'naive-ui';
|
||||
//挂载在 window 方便与在js中使用
|
||||
window['$message'] = useMessage();
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user