Skip to content

Commit

Permalink
fix: 代码优化
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 7929
  • Loading branch information
yuri0528 committed May 15, 2024
1 parent 5a2ac72 commit 67ccbd3
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 57 deletions.
6 changes: 3 additions & 3 deletions src/pages/src/components/SyncRecords.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div v-bkloading="{ loading: dataRecordConfig.loading, zIndex: 9 }" class="sync-records-wrapper user-scroll-y">
<div v-bkloading="{ loading: dataRecordConfig.loading, zIndex: 9 }" class="sync-records-wrapper">
<div class="data-record-content">
<bk-table
class="user-info-table"
Expand Down Expand Up @@ -65,6 +65,7 @@
:width="800"
quick-close
:before-close="beforeClose"
transfer
>
<template #header>
<div class="logs-header">
Expand Down Expand Up @@ -220,7 +221,6 @@ const handleLogDetails = async (row) => {
};
const beforeClose = () => {
logsDetails.value = {};
logConfig.value.isShow = false;
};
Expand Down Expand Up @@ -251,7 +251,7 @@ onBeforeUnmount(() => {
<style lang="less" scoped>
.sync-records-wrapper {
width: 100%;
height: calc(100vh - 140px);
height: calc(100vh - 52px);
padding: 28px 30px;
:deep(.user-info-table) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/src/views/setting/LoginSetting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ const handleDataSource = () => {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 24px 0 50px !important;
padding-right: 24px;
.bk-button {
padding: 5px 17px !important;
Expand Down
3 changes: 0 additions & 3 deletions src/pages/src/views/setting/auth-config/Local.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.details-wrapper {
position: relative;
height: calc(100vh - 84px);
padding: 24px;
background: #F5F7FA;

.div-flex {
Expand Down Expand Up @@ -31,7 +29,6 @@
.footer {
position: fixed;
bottom: 0;
left: 0;
z-index: 9;
width: 100%;
height: 48px;
Expand Down
3 changes: 2 additions & 1 deletion src/pages/src/views/setting/auth-config/Local.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<div class="details-wrapper user-scroll-y">
<div class="details-wrapper">
<bk-form
class="px-[24px] pt-[24px] pb-[60px]"
form-type="vertical"
ref="formRef"
:model="formData"
Expand Down
3 changes: 1 addition & 2 deletions src/pages/src/views/setting/auth-config/LocalView.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div v-bkloading="{ loading: isLoading, zIndex: 9 }" class="details-info-wrapper user-scroll-y">
<div v-bkloading="{ loading: isLoading, zIndex: 9 }" class="details-info-wrapper">
<ViewRow :title="$t('基础信息')">
<LabelContent :label="$t('名称')">{{ idpsName }}</LabelContent>
<LabelContent :label="$t('是否启用')">
Expand Down Expand Up @@ -99,7 +99,6 @@ onMounted(async () => {

<style lang="less" scoped>
.details-info-wrapper {
height: calc(100vh - 52px);
padding: 28px 40px;
.row-wrapper {
Expand Down
6 changes: 4 additions & 2 deletions src/pages/src/views/setting/auth-config/WeCom.less
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
.details-wrapper {
height: calc(100vh - 85px);
padding: 20px 24px;
background: #F5F7FA;

.auth-source-form {
padding: 20px 24px 60px;
}

.item-flex-header {
display: flex;
align-items: center;
Expand Down Expand Up @@ -65,7 +68,6 @@
.footer {
position: fixed;
bottom: 0;
left: 0;
z-index: 9;
width: 100%;
height: 48px;
Expand Down
3 changes: 1 addition & 2 deletions src/pages/src/views/setting/auth-config/WeComView.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<bk-loading class="details-wrapper user-scroll-y" :loading="isLoading">
<bk-loading class="details-wrapper" :loading="isLoading">
<div class="details-type">
<img :src="authSourceData.plugin?.logo">
<div>
Expand Down Expand Up @@ -120,7 +120,6 @@ const processMatchRules = (list) => {

<style lang="less" scoped>
.details-wrapper {
height: calc(100vh - 52px);
padding: 28px 40px;
.details-type {
Expand Down
5 changes: 3 additions & 2 deletions src/pages/src/views/tenant/OperationDetails.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="operation-wrapper user-scroll-y">
<div class="operation-wrapper">
<bk-form
class="operation-content"
ref="formRef"
Expand Down Expand Up @@ -199,6 +199,8 @@ const handleError = (file) => {
// 校验表单
async function handleSubmit() {
await formRef.value.validate();
if (isEmail.value) {
return handleBlur();
}
Expand All @@ -207,7 +209,6 @@ async function handleSubmit() {
return changeTelError(true);
}
await formRef.value.validate();
if (telError.value) return;
state.isLoading = true;
Expand Down
41 changes: 13 additions & 28 deletions src/pages/src/views/tenant/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,21 @@
:is-show="detailsConfig.isShow"
:title="detailsConfig.title"
:before-close="handleBeforeClose"
render-directive="if"
quick-close
transfer
>
<template #header>
<span>{{ detailsConfig.title }}</span>
<div v-if="isView">
<bk-button
outline
theme="primary"
@click="handleClick('edit', state.tenantsData)"
>{{ $t('编辑') }}</bk-button
>
<div class="flex items-center justify-between w-[100%] pr-[16px]">
<span>{{ detailsConfig.title }}</span>
<div v-if="isView">
<bk-button
outline
theme="primary"
@click="handleClick('edit', state.tenantsData)"
>{{ $t('编辑') }}</bk-button
>
</div>
</div>
</template>
<template #default>
Expand All @@ -160,7 +164,7 @@
</bk-sideslider>
<!-- 重置管理员密码 -->
<bk-dialog
class="dialog-wrapper"
:width="640"
:is-show="adminPasswordConfig.isShow"
:title="adminPasswordConfig.title"
:is-loading="adminPasswordConfig.isLoading"
Expand Down Expand Up @@ -667,19 +671,6 @@ const {
}
}
.details-wrapper {
:deep(.bk-sideslider-title) {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 24px 0 50px !important;
.bk-button {
padding: 5px 17px !important;
}
}
}
.details-edit-wrapper {
// :deep(.bk-modal-content) {
// height: calc(100vh - 52px);
Expand All @@ -697,12 +688,6 @@ const {
// }
}
.dialog-wrapper {
// :deep(.bk-modal-content) {
// overflow: visible !important;
// }
}
.error {
position: absolute;
left: 0;
Expand Down
40 changes: 27 additions & 13 deletions src/pages/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2705,10 +2705,10 @@ binary-extensions@^2.0.0:
resolved "https://mirrors.tencent.com/npm/binary-extensions/-/binary-extensions-2.3.0.tgz"
integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==

bkui-vue@0.0.2-beta.124:
version "0.0.2-beta.124"
resolved "https://mirrors.tencent.com/npm/bkui-vue/-/bkui-vue-0.0.2-beta.124.tgz"
integrity sha512-Nv8D8UiUonnhTB8PJ5KNEKhLHDypjO8fJ+wkWH4qcJk4SHTQ6+Bud6W/6f8+RFxGq3VCYVSNpIqEGYUiEe/6fQ==
bkui-vue@1.0.3-beta.68.dialog.1:
version "1.0.3-beta.68.dialog.1"
resolved "https://mirrors.tencent.com/npm/bkui-vue/-/bkui-vue-1.0.3-beta.68.dialog.1.tgz"
integrity sha512-JIfk4QehhlYwnzJUjlTu+ziIQOap6Pi40by21dhJJYZ8pvNfmEVKGRsc7c4PNcZxS+fjhvSfdK4NOhhthNjESQ==
dependencies:
"@floating-ui/dom" "~1.5.0"
"@popperjs/core" "~2.11.8"
Expand Down Expand Up @@ -6006,7 +6006,28 @@ minimalistic-assert@^1.0.0:
resolved "https://mirrors.tencent.com/npm/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz"
integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==

minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2:
minimatch@^3.0.4:
version "3.1.2"
resolved "https://mirrors.tencent.com/npm/minimatch/-/minimatch-3.1.2.tgz"
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
dependencies:
brace-expansion "^1.1.7"

minimatch@^3.0.5:
version "3.1.2"
resolved "https://mirrors.tencent.com/npm/minimatch/-/minimatch-3.1.2.tgz"
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
dependencies:
brace-expansion "^1.1.7"

minimatch@^3.1.1:
version "3.1.2"
resolved "https://mirrors.tencent.com/npm/minimatch/-/minimatch-3.1.2.tgz"
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
dependencies:
brace-expansion "^1.1.7"

minimatch@^3.1.2:
version "3.1.2"
resolved "https://mirrors.tencent.com/npm/minimatch/-/minimatch-3.1.2.tgz"
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
Expand All @@ -6020,14 +6041,7 @@ minimatch@^5.0.1:
dependencies:
brace-expansion "^2.0.1"

minimatch@^9.0.1:
version "9.0.4"
resolved "https://mirrors.tencent.com/npm/minimatch/-/minimatch-9.0.4.tgz"
integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==
dependencies:
brace-expansion "^2.0.1"

minimatch@^9.0.4:
minimatch@^9.0.1, minimatch@^9.0.4:
version "9.0.4"
resolved "https://mirrors.tencent.com/npm/minimatch/-/minimatch-9.0.4.tgz"
integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==
Expand Down

0 comments on commit 67ccbd3

Please sign in to comment.