Skip to content

Commit

Permalink
Merge pull request #745 from TencentBlueKing/develop
Browse files Browse the repository at this point in the history
merge develop  to master
  • Loading branch information
ielgnaw authored Dec 7, 2022
2 parents aacb154 + 514cbfd commit 8e27470
Show file tree
Hide file tree
Showing 247 changed files with 4,500 additions and 5,717 deletions.
2 changes: 1 addition & 1 deletion .bk.development.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// 本地开发前,请复制此文件并命名为 .bk.local.env。并正确填写以下变量

// 本地开发地质
BK_APP_HOST = localhost.xxx.com
BK_APP_HOST = localhost

// iam host
BK_IAM_HOST = BK_IAM_HOST
Expand Down
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
lib/server/model/migrations/
lib/client/src/bk-cion/
lib/client/src/bk-icon/
lib/client/src/components/render-nocode/common/
lib/client/src/components/flow/flow-canvas/*.js
lib/client/common.html
Expand Down
2 changes: 1 addition & 1 deletion bk.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module.exports = {
historyApiFallback: {
rewrites: [
{ from: /^\/$/, to: '/index.html' },
{ from: /^\/preview/, to: '/preview.html' }
{ from: /^\/preview\//, to: '/preview.html' }
]
}
},
Expand Down
12 changes: 7 additions & 5 deletions lib/client/require-monaco.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@
})
window.MonacoEnvironment = {
getWorkerUrl: function (workerId, label) {
return `data:text/javascript;charset=utf-8,${encodeURIComponent(`
self.MonacoEnvironment = {
baseUrl: '${urlPrefix}/monaco-editor/min//'
}
importScripts('${urlPrefix}/monaco-editor/min/vs/base/worker/workerMain.js')`
return `data:text/javascript;charset=utf-8,${encodeURIComponent(
`
self.MonacoEnvironment = {
baseUrl: '${urlPrefix}/monaco-editor/min//'
}
importScripts('${urlPrefix}/monaco-editor/min/vs/base/worker/workerMain.js')
`
)}`
}
}
Expand Down
26 changes: 2 additions & 24 deletions lib/client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,13 @@
</section>
<section v-else-if="authed">
<div id="app" :class="systemCls">
<home-header v-if="homeHeaderNav"></home-header>
<app-header v-else></app-header>
<app-header></app-header>
<not-exist v-if="isNotExist" :message="notExistMsg" />
<template v-else>
<apply-page v-if="isNotPermission" :auth-result="authResult" />
<router-view v-if="!isNotPermission" :name="topView" v-show="!mainContentLoading" />
</template>
</div>
<bk-fixed-navbar
:ext-cls="hasFooterBar ? 'nav-footer-bar' : 'no-footer-bar'"
:style="showFixedNavBar ? 'transform: translateY(-50%); opacity: 1' : 'transform: translateY(100%); opacity: 0'"
:position="position"
:nav-items="navItems"></bk-fixed-navbar>
<div class="nav-icon" @click="toggerNavbar" :class="hasFooterBar ? 'nav-icon-footer' : 'nav-icon-bottom'">
<i class="bk-drag-icon bk-drag-arrow-down toggle-arrow" :class="showFixedNavBar ? 'nav-icon-down' : 'nav-icon-up'" />
</div>
</section>
</template>
<script>
Expand Down Expand Up @@ -72,16 +63,13 @@
}
],
routerNameData: ['/home', '/help'],
homeHeaderNav: true,
appTabData: [{ name: '产品介绍', url: '/', routerName: 'home' }, { name: '帮助文档', url: '/help', routerName: 'intro' }],
isNotPermission: false,
authResult: {
requiredPermissions: []
},
isNotExist: false,
notExistMsg: '',
hasFooterBar: false,
showFixedNavBar: true
notExistMsg: ''
}
},
Expand All @@ -105,12 +93,6 @@
watch: {
'$route': {
handler (value) {
if (value.matched[0]) {
this.$nextTick(() => {
this.hasFooterBar = !!document.getElementsByClassName('footer').length
})
this.homeHeaderNav = this.routerNameData.includes(value.matched[0].path) || this.routerNameData.includes(value.fullPath + value.name)
}
this.isNotPermission = false
this.isNotExist = false
},
Expand Down Expand Up @@ -149,10 +131,6 @@
notExistHold (msg) {
this.isNotExist = true
this.notExistMsg = msg
},
toggerNavbar () {
this.showFixedNavBar = !this.showFixedNavBar
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/client/src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ axios.interceptors.response.use(undefined, error => {
if (response) {
const { config } = response
if (config.globalError) {
bkMessage({ theme: 'error', message })
bkMessage({ theme: 'error', message, ellipsisLine: 3 })
}
}
return Promise.reject(error)
Expand Down
Loading

0 comments on commit 8e27470

Please sign in to comment.