Merge remote-tracking branch 'origin/main' into multi-tenant

This commit is contained in:
lai
2024-07-24 18:01:08 +08:00
15 changed files with 101 additions and 74 deletions

View File

@@ -206,6 +206,7 @@ function fnCheckAppNameOverflow() {
if (!text) return;
if (text.offsetWidth > container.offsetWidth) {
text.classList.add('app-name_scrollable');
text.setAttribute('data-content', text.innerText);
} else {
text.classList.remove('app-name_scrollable');
}
@@ -398,18 +399,25 @@ onMounted(() => {
font-size: 18px;
> .app-name_scrollable {
// padding-left: 100%;
padding-right: 12px;
display: inline-block;
animation: scrollable-animation linear 6s infinite both;
}
@keyframes scrollable-animation {
0% {
transform: translate3d(0, 0, 0);
&::after {
content: attr(data-content);
position: absolute;
top: 0;
right: -100%;
transition: right 0.3s ease;
}
100% {
transform: translate3d(-100%, 0, 0);
@keyframes scrollable-animation {
0% {
transform: translateX(0);
}
100% {
transform: translateX(calc(-100% - 12px));
}
}
}
}

View File

@@ -120,6 +120,7 @@ onMounted(() => {
<a-form-item>
<a-select
v-model:value="state.language"
:disabled="!appStore.i18nOpen"
style="width: 100px"
size="small"
v-perms:has="['system:setting:i18n']"
@@ -168,6 +169,7 @@ onMounted(() => {
v-model:value="state.language"
style="width: 100px"
size="small"
:disabled="!appStore.i18nOpen"
v-perms:has="['system:setting:i18n']"
>
<a-select-option

View File

@@ -184,12 +184,15 @@ watch(
/**检查系统名称是否超出范围进行滚动 */
function fnCheckAppNameOverflow() {
const container: HTMLDivElement | null = document.querySelector('.header-icon > .app-name');
const container: HTMLDivElement | null = document.querySelector(
'.header-icon > .app-name'
);
if (!container) return;
const text: HTMLDivElement | null = container.querySelector('.marquee');
if (!text) return;
if (text.offsetWidth > container.offsetWidth) {
text.classList.add('app-name_scrollable');
text.setAttribute('data-content', text.innerText);
} else {
text.classList.remove('app-name_scrollable');
}
@@ -201,7 +204,7 @@ watch(
);
onMounted(() => {
fnCheckAppNameOverflow()
fnCheckAppNameOverflow();
Object.assign(state, {
language: currentLocale.value,
filePath: '',
@@ -240,7 +243,11 @@ onMounted(() => {
</div>
</a-form-item>
<a-form-item v-perms:has="['system:setting:i18n']">
<a-select v-model:value="state.language" style="width: 100px">
<a-select
v-model:value="state.language"
:disabled="!appStore.i18nOpen"
style="width: 100px"
>
<a-select-option
v-for="opt in optionsLocale"
:key="opt.value"
@@ -362,18 +369,25 @@ onMounted(() => {
font-size: 18px;
> .app-name_scrollable {
// padding-left: 100%;
padding-right: 12px;
display: inline-block;
animation: scrollable-animation linear 6s infinite both;
}
@keyframes scrollable-animation {
0% {
transform: translate3d(0, 0, 0);
&::after {
content: attr(data-content);
position: absolute;
top: 0;
right: -100%;
transition: right 0.3s ease;
}
100% {
transform: translate3d(-100%, 0, 0);
@keyframes scrollable-animation {
0% {
transform: translateX(0);
}
100% {
transform: translateX(calc(-100% - 12px));
}
}
}
}

View File

@@ -31,14 +31,18 @@ const { t } = useI18n();
{{ t('views.system.setting.sysLoginBg') }}
</a-divider>
<ChangeLogoBG></ChangeLogoBG>
<a-divider orientation="left">
{{ t('views.system.setting.sysHelpDoc') }}
</a-divider>
<ChangeHelpDoc></ChangeHelpDoc>
<a-divider orientation="left">
{{ t('views.system.setting.sysOfficialUrl') }}
</a-divider>
<ChangeOfficialUrl></ChangeOfficialUrl>
<div v-perms:has="['system:setting:HelpDoc']">
<a-divider orientation="left">
{{ t('views.system.setting.sysHelpDoc') }}
</a-divider>
<ChangeHelpDoc></ChangeHelpDoc>
</div>
<div v-perms:has="['system:setting:link']">
<a-divider orientation="left">
{{ t('views.system.setting.sysOfficialUrl') }}
</a-divider>
<ChangeOfficialUrl></ChangeOfficialUrl>
</div>
<div v-perms:has="['system:setting:i18n']">
<a-divider orientation="left">
{{ t('views.system.setting.i18n') }}