mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-23 07:40:18 +00:00
perf(Terminal):优化终端初始化操作的时机
This commit is contained in:
parent
77327601e1
commit
8c6e17ac85
@ -6,23 +6,20 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, watch } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import iconfontInit from '/@/utils/iconfont'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { setTitleFromRoute } from '/@/utils/common'
|
||||
import { useConfig } from '/@/stores/config'
|
||||
import { useTerminal } from '/@/stores/terminal'
|
||||
import { setTitleFromRoute } from '/@/utils/common'
|
||||
import iconfontInit from '/@/utils/iconfont'
|
||||
// modules import mark, Please do not remove.
|
||||
|
||||
const config = useConfig()
|
||||
const route = useRoute()
|
||||
const terminal = useTerminal()
|
||||
const config = useConfig()
|
||||
|
||||
// 初始化 element 的语言包
|
||||
const { getLocaleMessage } = useI18n()
|
||||
const lang = getLocaleMessage(config.lang.defaultLang) as any
|
||||
onMounted(() => {
|
||||
iconfontInit()
|
||||
terminal.init()
|
||||
|
||||
// Modules onMounted mark, Please do not remove.
|
||||
})
|
||||
|
@ -182,7 +182,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { TimelineItemProps } from 'element-plus'
|
||||
import { ElMessageBox, ElScrollbar } from 'element-plus'
|
||||
import { ref, reactive, nextTick } from 'vue'
|
||||
import { nextTick, onMounted, reactive, ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { postChangeTerminalConfig } from '/@/api/common'
|
||||
import FormItem from '/@/components/formItem/index.vue'
|
||||
@ -313,6 +313,10 @@ const getSourceContent = (type: SourceType) => {
|
||||
}
|
||||
return content
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
terminal.init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
Loading…
Reference in New Issue
Block a user