diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index f8c8f72a..089acd16 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -176,6 +176,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'); } @@ -342,11 +343,17 @@ onUnmounted(() => { :href="appStore.officialUrl" target="_blank" size="small" + v-perms:has="['system:setting:link']" v-if="appStore.officialUrl !== '#'" > {{ t('loayouts.basic.officialUrl') }} - + {{ t('loayouts.basic.helpDoc') }} @@ -382,20 +389,26 @@ onUnmounted(() => { // text-overflow: ellipsis; white-space: nowrap; width: 148px; - - &_scrollable { - // padding-left: 100%; + > .app-name_scrollable { + 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)); + } } } } diff --git a/src/layouts/components/RightContent.vue b/src/layouts/components/RightContent.vue index 3151d286..598a4679 100644 --- a/src/layouts/components/RightContent.vue +++ b/src/layouts/components/RightContent.vue @@ -142,6 +142,7 @@ function fnChangeLocale(e: any) { type="text" style="color: inherit" @click="fnClickHelpDoc()" + v-perms:has="['system:setting:HelpDoc']" v-roles:has="[TENANTADMIN_ROLE_KEY]" > -
- - - {{ t('loayouts.basic.officialUrl') }} - - - - {{ t('loayouts.basic.helpDoc') }} - - -
diff --git a/src/views/ne/neInfo/components/EditModal.vue b/src/views/ne/neInfo/components/EditModal.vue index 085a580a..2cd20e81 100644 --- a/src/views/ne/neInfo/components/EditModal.vue +++ b/src/views/ne/neInfo/components/EditModal.vue @@ -124,8 +124,8 @@ let modalState: ModalStateType = reactive({ addr: '', port: 22, user: 'omcuser', - authMode: '2', - password: '', + authMode: '0', + password: 'a9tU53r', privateKey: '', passPhrase: '', remark: '', diff --git a/src/views/ne/neInfo/index.vue b/src/views/ne/neInfo/index.vue index 9d3cd6f3..33b1c148 100644 --- a/src/views/ne/neInfo/index.vue +++ b/src/views/ne/neInfo/index.vue @@ -283,10 +283,10 @@ function fnRecordDelete(id: string) { message.success(t('common.operateOk'), 3); // 过滤掉删除的id tableState.data = tableState.data.filter(item => { - if (id.indexOf(',')) { + if (id.indexOf(',') > -1) { return !tableState.selectedRowKeys.includes(item.id); } else { - return item.id != id; + return item.id !== id; } }); // 刷新缓存 diff --git a/src/views/system/quick-start/components/SystemConfig.vue b/src/views/system/quick-start/components/SystemConfig.vue index 627e04c9..5e06321f 100644 --- a/src/views/system/quick-start/components/SystemConfig.vue +++ b/src/views/system/quick-start/components/SystemConfig.vue @@ -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)); + } } } } diff --git a/src/views/system/setting/components/change-help-doc.vue b/src/views/system/setting/components/change-help-doc.vue index 171c8f77..9e891b0d 100644 --- a/src/views/system/setting/components/change-help-doc.vue +++ b/src/views/system/setting/components/change-help-doc.vue @@ -120,6 +120,7 @@ onMounted(() => { { v-model:value="state.language" style="width: 100px" size="small" + :disabled="!appStore.i18nOpen" v-perms:has="['system:setting:i18n']" > .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(() => { - + { 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)); + } } } } diff --git a/src/views/system/setting/index.vue b/src/views/system/setting/index.vue index 60b2ee1e..973867dd 100644 --- a/src/views/system/setting/index.vue +++ b/src/views/system/setting/index.vue @@ -31,14 +31,18 @@ const { t } = useI18n(); {{ t('views.system.setting.sysLoginBg') }} - - {{ t('views.system.setting.sysHelpDoc') }} - - - - {{ t('views.system.setting.sysOfficialUrl') }} - - +
+ + {{ t('views.system.setting.sysHelpDoc') }} + + +
+
+ + {{ t('views.system.setting.sysOfficialUrl') }} + + +
{{ t('views.system.setting.i18n') }}