fix: optimization
* fix: Style optimization * perf: SCAN login setting views Style optimization * fix: markdown preview i18n --------- Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
This commit is contained in:
parent
d31fed92d7
commit
10a35876bf
@ -1,8 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<MdPreview noIconfont noPrettier :codeFoldable="false" v-bind="$attrs" />
|
<MdPreview :language="language" noIconfont noPrettier :codeFoldable="false" v-bind="$attrs" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { MdPreview } from 'md-editor-v3'
|
import { computed } from 'vue'
|
||||||
|
import { MdPreview, config } from 'md-editor-v3'
|
||||||
|
import { getBrowserLang } from '@/locales/index'
|
||||||
|
import useStore from '@/stores'
|
||||||
|
// 引入公共库中的语言配置
|
||||||
|
import ZH_TW from '@vavt/cm-extension/dist/locale/zh-TW'
|
||||||
|
|
||||||
defineOptions({ name: 'MdPreview' })
|
defineOptions({ name: 'MdPreview' })
|
||||||
|
const { user } = useStore()
|
||||||
|
const language = computed(() => user.getLanguage() || getBrowserLang() || '')
|
||||||
|
config({
|
||||||
|
editorConfig: {
|
||||||
|
languageUserDefined: {
|
||||||
|
'zh-Hant': ZH_TW
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -53,7 +53,7 @@ export default {
|
|||||||
permissionType: {
|
permissionType: {
|
||||||
label: 'Permission',
|
label: 'Permission',
|
||||||
privateDesc: 'Only the current user can use',
|
privateDesc: 'Only the current user can use',
|
||||||
publicDesc: 'All users can use, but can not be edited',
|
publicDesc: 'All users can use',
|
||||||
requiredMessage: 'Permission cannot be empty'
|
requiredMessage: 'Permission cannot be empty'
|
||||||
},
|
},
|
||||||
model_type: {
|
model_type: {
|
||||||
|
|||||||
@ -53,7 +53,7 @@ export default {
|
|||||||
permissionType: {
|
permissionType: {
|
||||||
label: '权限',
|
label: '权限',
|
||||||
privateDesc: '仅当前用户使用',
|
privateDesc: '仅当前用户使用',
|
||||||
publicDesc: '所有用户都可使用,不能编辑',
|
publicDesc: '所有用户都可使用',
|
||||||
requiredMessage: '权限不能为空'
|
requiredMessage: '权限不能为空'
|
||||||
},
|
},
|
||||||
model_type: {
|
model_type: {
|
||||||
|
|||||||
@ -53,7 +53,7 @@ export default {
|
|||||||
permissionType: {
|
permissionType: {
|
||||||
label: '權限',
|
label: '權限',
|
||||||
privateDesc: '僅當前使用者使用',
|
privateDesc: '僅當前使用者使用',
|
||||||
publicDesc: '所有使用者都可使用,但不能編輯',
|
publicDesc: '所有使用者都可使用',
|
||||||
requiredMessage: '權限不能為空'
|
requiredMessage: '權限不能為空'
|
||||||
},
|
},
|
||||||
model_type: {
|
model_type: {
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
<span>{{
|
<span>{{
|
||||||
$t('views.applicationOverview.appInfo.SettingDisplayDialog.languageLabel')
|
$t('views.applicationOverview.appInfo.SettingDisplayDialog.languageLabel')
|
||||||
}}</span>
|
}}</span>
|
||||||
<el-select v-model="form.language">
|
<el-select v-model="form.language" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in langList"
|
v-for="item in langList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
|
|||||||
@ -50,7 +50,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4>
|
<h4 class="ellipsis">
|
||||||
{{ detail?.name || $t('views.application.applicationForm.form.appName.label') }}
|
{{ detail?.name || $t('views.application.applicationForm.form.appName.label') }}
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
@ -174,7 +174,7 @@
|
|||||||
<h5 class="mb-8">
|
<h5 class="mb-8">
|
||||||
{{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.languageLabel') }}
|
{{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.languageLabel') }}
|
||||||
</h5>
|
</h5>
|
||||||
<el-select v-model="form.language">
|
<el-select v-model="form.language" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in langList"
|
v-for="item in langList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -383,7 +383,7 @@ import type { FormInstance, FormRules, UploadFiles } from 'element-plus'
|
|||||||
import { isAppIcon, isWorkFlow } from '@/utils/application'
|
import { isAppIcon, isWorkFlow } from '@/utils/application'
|
||||||
import applicationXpackApi from '@/api/application-xpack'
|
import applicationXpackApi from '@/api/application-xpack'
|
||||||
import { MsgSuccess, MsgError } from '@/utils/message'
|
import { MsgSuccess, MsgError } from '@/utils/message'
|
||||||
import { getBrowserLang, langList, t } from '@/locales'
|
import { langList, t } from '@/locales'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
|
|
||||||
@ -398,7 +398,7 @@ const emit = defineEmits(['refresh'])
|
|||||||
|
|
||||||
const defaultSetting = {
|
const defaultSetting = {
|
||||||
show_source: false,
|
show_source: false,
|
||||||
language: getBrowserLang(),
|
language: '',
|
||||||
show_history: true,
|
show_history: true,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
show_guide: true,
|
show_guide: true,
|
||||||
@ -427,7 +427,7 @@ const form = ref<any>({
|
|||||||
|
|
||||||
const xpackForm = ref<any>({
|
const xpackForm = ref<any>({
|
||||||
show_source: false,
|
show_source: false,
|
||||||
language: getBrowserLang(),
|
language: '',
|
||||||
show_history: false,
|
show_history: false,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
show_guide: false,
|
show_guide: false,
|
||||||
|
|||||||
@ -9,7 +9,7 @@ template
|
|||||||
>
|
>
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="flex align-center" style="margin-left: -8px">
|
<div class="flex align-center" style="margin-left: -8px">
|
||||||
<h4>{{ currentPlatform.name + ' ' + $t('common.setting') }}</h4>
|
<h4>{{ currentPlatform.name }}</h4>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -225,5 +225,4 @@ function saveConfig() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
// 保持原有的样式
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-loading="loading">
|
<div v-loading="loading" class="scan-height">
|
||||||
<el-card shadow="hover" class="border-none cursor" style="--el-card-padding: 16px 24px">
|
<el-scrollbar>
|
||||||
<div v-for="item in platforms" :key="item.key" class="mb-16">
|
<div v-for="item in platforms" :key="item.key" class="mb-16">
|
||||||
<el-card class="mb-16" shadow="hover" style="--el-card-padding: 16px">
|
<el-card class="border-none mb-16" shadow="none">
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div class="flex align-center ml-8 mr-8">
|
<div class="flex align-center">
|
||||||
<img :src="item.logoSrc" alt="" class="icon" />
|
<img :src="item.logoSrc" alt="" width="24px" />
|
||||||
<h5 style="margin-left: 8px">{{ item.name }}</h5>
|
<h5 class="ml-8">{{ item.name }}</h5>
|
||||||
<el-tag v-if="item.isValid" type="success" class="ml-4"
|
<el-tag v-if="item.isValid" type="success" class="ml-8"
|
||||||
>{{ $t('views.system.authentication.scanTheQRCode.effective') }}
|
>{{ $t('views.system.authentication.scanTheQRCode.effective') }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</div>
|
</div>
|
||||||
@ -81,7 +81,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
<EditModel ref="EditModelRef" @refresh="refresh" />
|
<EditModel ref="EditModelRef" @refresh="refresh" />
|
||||||
</el-card>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -230,46 +230,7 @@ function showDialog(platform: Platform) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.icon {
|
.scan-height {
|
||||||
width: 24px;
|
height: calc(100vh - var(--app-header-height) - var(--app-view-padding) * 2 - 70px);
|
||||||
height: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flex-between {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flex {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.align-center {
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ml-4 {
|
|
||||||
margin-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ml-8 {
|
|
||||||
margin-left: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mr-8 {
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mb-16 {
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.border-t {
|
|
||||||
border-top: 1px solid #ebeef5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vertical-middle {
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="authentication-setting p-16-24">
|
<div class="authentication-setting p-16-24">
|
||||||
<h4>{{ $t('views.system.authentication.title') }}</h4>
|
<h4>{{ $t('views.system.authentication.title') }}</h4>
|
||||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
<el-tabs v-model="activeName" class="mt-4" @tab-click="handleClick">
|
||||||
<template v-for="(item, index) in tabList" :key="index">
|
<template v-for="(item, index) in tabList" :key="index">
|
||||||
<el-tab-pane :label="item.label" :name="item.name">
|
<el-tab-pane :label="item.label" :name="item.name">
|
||||||
<component :is="item.component" />
|
<component :is="item.component" />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user