Skip to content

Commit

Permalink
feat: 应用列表按照新版设计稿重构 (#1267)
Browse files Browse the repository at this point in the history
  • Loading branch information
leafage-collb authored Apr 19, 2024
1 parent 42c899b commit 67380b9
Show file tree
Hide file tree
Showing 19 changed files with 1,067 additions and 1,078 deletions.
17 changes: 14 additions & 3 deletions webfe/package_vue/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
id="app"
:style="{
'--app-notice-height': `${isShowNotice ? GLOBAL.NOTICE_HEIGHT : 0}px`,
'--app-content-pd': `${isShowNotice ? GLOBAL.NOTICE_HEIGHT + 50 : 50}px`
'--app-content-pd': `${isShowNotice ? GLOBAL.NOTICE_HEIGHT + 50 : 50}px`,
'background-color': isDefaultBackgroundColor ? '#F5F7FA' : '',
}"
>
<!-- 通知中心 -->
Expand All @@ -16,8 +17,11 @@
<paas-header />
<div
style="min-height: calc(100% - 70px); overflow: auto;"
:style="{'padding-top': `${pluginPaddingTop}px`}"
:class="{ 'plugin-min-width': isPlugin }"
:style="{ 'padding-top': `${pluginPaddingTop}px` }"
:class="{
'plugin-min-width': isPlugin,
'full-screen-height-cls': isDefaultBackgroundColor
}"
>
<router-view />
</div>
Expand Down Expand Up @@ -64,6 +68,9 @@ export default {
}
return 0;
},
isDefaultBackgroundColor() {
return this.$route.meta?.isDefaultBackgroundColor;
},
},
watch: {
$route: {
Expand Down Expand Up @@ -156,6 +163,10 @@ export default {
z-index: 1001;
}
.full-screen-height-cls {
background-color: #F5F7FA;
}
.gray-bg {
background: #fafbfd;
}
Expand Down
30 changes: 25 additions & 5 deletions webfe/package_vue/src/assets/iconfont/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -1229,9 +1229,9 @@ <h2 class="page-title">
<span class="icon paasng-icon paasng-insights"></span>
<p class="icon-text">insights</p>
</li>
<li class="icon-item" title="close">
<span class="icon paasng-icon paasng-close"></span>
<p class="icon-text">close</p>
<li class="icon-item" title="bold-close">
<span class="icon paasng-icon paasng-bold-close"></span>
<p class="icon-text">bold-close</p>
</li>
<li class="icon-item" title="time">
<span class="icon paasng-icon paasng-time"></span>
Expand Down Expand Up @@ -1465,6 +1465,14 @@ <h2 class="page-title">
<span class="icon paasng-icon paasng-gitlab-3"></span>
<p class="icon-text">gitlab-3</p>
</li>
<li class="icon-item" title="jiangxu">
<span class="icon paasng-icon paasng-jiangxu"></span>
<p class="icon-text">jiangxu</p>
</li>
<li class="icon-item" title="shengxu">
<span class="icon paasng-icon paasng-shengxu"></span>
<p class="icon-text">shengxu</p>
</li>
</ul>
<h3 class="describe-title">为什么使用</h3>
<ul class="use-describe">
Expand Down Expand Up @@ -3152,9 +3160,9 @@ <h3 class="describe-title">如何使用</h3>
</li>
<li class="colorful-icon">
<svg class="icon svg-icon">
<use xlink:href="#paasng-close"></use>
<use xlink:href="#paasng-bold-close"></use>
</svg>
<p class="icon-text">close</p>
<p class="icon-text">bold-close</p>
</li>
<li class="colorful-icon">
<svg class="icon svg-icon">
Expand Down Expand Up @@ -3504,6 +3512,18 @@ <h3 class="describe-title">如何使用</h3>
</svg>
<p class="icon-text">gitlab-3</p>
</li>
<li class="colorful-icon">
<svg class="icon svg-icon">
<use xlink:href="#paasng-jiangxu"></use>
</svg>
<p class="icon-text">jiangxu</p>
</li>
<li class="colorful-icon">
<svg class="icon svg-icon">
<use xlink:href="#paasng-shengxu"></use>
</svg>
<p class="icon-text">shengxu</p>
</li>
</ul>
<h3 class="describe-title">为什么使用</h3>
<ul class="use-describe">
Expand Down
Binary file modified webfe/package_vue/src/assets/iconfont/fonts/iconcool.eot
Binary file not shown.
6 changes: 6 additions & 0 deletions webfe/package_vue/src/assets/iconfont/fonts/iconcool.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified webfe/package_vue/src/assets/iconfont/fonts/iconcool.ttf
Binary file not shown.
Binary file modified webfe/package_vue/src/assets/iconfont/fonts/iconcool.woff
Binary file not shown.
2 changes: 1 addition & 1 deletion webfe/package_vue/src/assets/iconfont/iconcool.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion webfe/package_vue/src/assets/iconfont/iconcool.json

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion webfe/package_vue/src/assets/iconfont/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ url("fonts/iconcool.eot?#iefix") format("embedded-opentype");
.paasng-insights:before {
content: "\e21d";
}
.paasng-close:before {
.paasng-bold-close:before {
content: "\e21b";
}
.paasng-time:before {
Expand Down Expand Up @@ -1034,3 +1034,9 @@ url("fonts/iconcool.eot?#iefix") format("embedded-opentype");
.paasng-gitlab-3:before {
content: "\e266";
}
.paasng-jiangxu:before {
content: "\e26d";
}
.paasng-shengxu:before {
content: "\e26c";
}
9 changes: 9 additions & 0 deletions webfe/package_vue/src/common/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,12 @@ export const PERSISTENT_STORAGE_SIZE_MAP = {
'2Gi': '2GB',
'4Gi': '4GB',
};

/**
* 应用类型
*/
export const PAAS_APP_TYPE = {
default: '普通应用',
cloud_native: '云原生应用',
engineless_app: '外链应用',
};
86 changes: 43 additions & 43 deletions webfe/package_vue/src/components/loader/loading/apps.vue
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
<template>
<content-loader
:width="baseWidth"
:height="552"
:speed="loadingConf.speed"
:primaryColor="loadingConf.primaryColor"
:secondaryColor="loadingConf.secondaryColor"
>
<rect x="0" y="55" rx="2" ry="2" :width="baseWidth" height="64" />
<rect x="0" y="131" rx="2" ry="2" :width="baseWidth" height="64" />
<rect x="0" y="207" rx="2" ry="2" :width="baseWidth" height="64" />
<rect x="0" y="283" rx="2" ry="2" :width="baseWidth" height="64" />
<rect x="0" y="359" rx="2" ry="2" :width="baseWidth" height="64" />
<rect x="0" y="435" rx="2" ry="2" :width="baseWidth" height="64" />
<rect x="0" y="0" rx="1" ry="1" width="88" height="28" />
<rect x="100" y="0" rx="1" ry="1" width="110" height="28" />
<rect x="505" y="2" rx="1" ry="1" width="150" height="28" />
<rect x="1092" y="0" rx="2" ry="2" width="88" height="32" />
<rect x="665" y="0" rx="2" ry="2" width="417" height="32" />
<rect x="0" y="520" rx="2" ry="2" width="104" height="32" />
<rect x="1076" y="520" rx="2" ry="2" width="104" height="32" />
</content-loader>
<content-loader
:width="baseWidth"
:height="552"
:speed="loadingConf.speed"
:primary-color="loadingConf.primaryColor"
:secondary-color="loadingConf.secondaryColor"
>
<rect x="0" y="55" rx="2" ry="2" :width="baseWidth" height="64" />
<rect x="0" y="131" rx="2" ry="2" :width="baseWidth" height="64" />
<rect x="0" y="207" rx="2" ry="2" :width="baseWidth" height="64" />
<rect x="0" y="283" rx="2" ry="2" :width="baseWidth" height="64" />
<rect x="0" y="359" rx="2" ry="2" :width="baseWidth" height="64" />
<rect x="0" y="435" rx="2" ry="2" :width="baseWidth" height="64" />
<rect x="0" y="0" rx="1" ry="1" width="88" height="28" />
<rect x="100" y="0" rx="1" ry="1" width="110" height="28" />
<rect :x="baseWidth - 690" y="0" rx="1" ry="1" width="150" height="32" />
<rect :x="baseWidth - 88" y="0" rx="2" ry="2" width="88" height="32" />
<rect :x="baseWidth - 525" y="0" rx="2" ry="2" width="417" height="32" />
<rect x="0" y="520" rx="2" ry="2" width="104" height="32" />
<rect :x="baseWidth - 104" y="520" rx="2" ry="2" width="104" height="32" />
</content-loader>
</template>

<script>
import { ContentLoader } from 'vue-content-loader'
export default {
components: {
ContentLoader
},
props: {
baseWidth: {
type: Number,
default: 1180
},
contentWidth: {
type: Number,
default: 1180
}
},
computed: {
loadingConf () {
return this.$store.state.loadingConf
}
}
}
</script>
import { ContentLoader } from 'vue-content-loader';
export default {
components: {
ContentLoader,
},
props: {
baseWidth: {
type: Number,
default: 1180,
},
contentWidth: {
type: Number,
default: 1180,
},
},
computed: {
loadingConf() {
return this.$store.state.loadingConf;
},
},
};
</script>
3 changes: 3 additions & 0 deletions webfe/package_vue/src/components/paas-module-bar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
<div slot="footer">
<bk-button
theme="primary"
:loading="delAppDialog.isLoading"
:disabled="!formRemoveValidated"
@click="submitRemoveModule"
>
Expand Down Expand Up @@ -260,6 +261,7 @@ export default defineComponent({
};
const submitRemoveModule = async () => {
delAppDialog.isLoading = true;
try {
await store.dispatch('module/deleteModule', {
appCode: props.appCode,
Expand Down Expand Up @@ -289,6 +291,7 @@ export default defineComponent({
});
} finally {
delAppDialog.visiable = false;
delAppDialog.isLoading = false;
}
};
Expand Down
128 changes: 128 additions & 0 deletions webfe/package_vue/src/components/teble-header-filters/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<template>
<bk-popover
ref="popover"
theme="light navigation-message"
ext-cls="custom-table-filter-cls"
placement="bottom"
:arrow="false"
offset="40, 0"
trigger="click"
>
<div class="filter-view">
<span class="label">{{ label }}</span>
<span
id="filter-icon"
:class="[iconClass, { 'is-selected': selected !== 'all' }]"
></span>
</div>
<template #content>
<ul class="panel-list-cls">
<li
v-for="item in filterList"
:key="item.value"
:class="['panel-item', { selected: item.value === selected }, { disabled: item.disabled }]"
@click="handleSelect(item)"
>
{{ item.text }}
</li>
</ul>
</template>
</bk-popover>
</template>

<script>
export default {
name: 'CustomtableFilter',
props: {
active: {
type: String,
},
label: {
type: String,
},
iconClass: {
type: String,
},
filterList: {
type: Array,
default: () => [],
},
},
data() {
return {
selected: '',
};
},
watch: {
active: {
immediate: true,
handler(newValue) {
this.selected = newValue;
},
},
},
methods: {
handleSelect(data) {
if (data.disabled) return;
this.$refs.popover.instance.hide();
this.$emit('filter-change', data);
},
},
};
</script>

<style lang="scss">
.custom-table-filter-cls {
top: -12px !important;
.tippy-tooltip.light-theme {
box-shadow: 0 0 6px 0 #dcdee5 !important;
border-radius: 4px !important;
}
.panel-list-cls {
color: #26323d;
min-width: 70px;
background-color: #fff;
padding: 5px 0;
margin: 0;
max-height: 250px;
list-style: none;
overflow-y: auto;
.panel-item {
padding: 0 10px;
font-size: 12px;
line-height: 26px;
cursor: pointer;
&:hover {
background-color: #eaf3ff;
color: #3a84ff;
}
&.selected {
background-color: #f4f6fa;
color: #3a84ff;
}
&.disabled {
cursor: not-allowed;
color: #c4c6cc;
}
}
}
}
.filter-view {
#filter-icon {
display: inline-block;
width: 20px;
height: 20px;
line-height: 20px;
font-size: 14px;
text-align: center;
cursor: pointer;
color: #c4c6cc;
&.is-selected {
color: #3a84ff;
}
}
}
</style>
Loading

0 comments on commit 67380b9

Please sign in to comment.