fix(系统设置): 修改插件管理上传图标

--bug=1015858 --user=王孝刚 【系统设置】github#16910,上传按钮前的图标错误,如图
https://www.tapd.cn/55049933/s/1224499
This commit is contained in:
wxg0103 2022-08-16 17:49:19 +08:00 committed by f2c-ci-robot[bot]
parent 486bf33705
commit 1242b6cdfa
1 changed files with 142 additions and 140 deletions

View File

@ -3,14 +3,14 @@
<div class="ms-table-header"> <div class="ms-table-header">
<el-row v-if="title" class="table-title" type="flex" justify="space-between" align="middle"> <el-row v-if="title" class="table-title" type="flex" justify="space-between" align="middle">
<slot name="title"> <slot name="title">
{{title}} {{ title }}
</slot> </slot>
</el-row> </el-row>
<el-row type="flex" justify="space-between" align="middle"> <el-row type="flex" justify="space-between" align="middle">
<span class="operate-button"> <span class="operate-button">
<ms-table-button v-permission="createPermission" v-if="showCreate" icon="el-icon-circle-plus-outline" <ms-table-button v-permission="createPermission" v-if="showCreate" icon="el-icon-circle-plus-outline"
:content="createTip" @click="create"/> :content="createTip" @click="create"/>
<ms-table-button icon="el-icon-download" v-if="showImport" v-permission="uploadPermission" <ms-table-button icon="el-icon-upload2" v-if="showImport" v-permission="uploadPermission"
:content="importTip" @click="importData"/> :content="importTip" @click="importData"/>
<ms-table-button v-if="showRun" icon="el-icon-video-play" <ms-table-button v-if="showRun" icon="el-icon-video-play"
type="primary" type="primary"
@ -23,7 +23,8 @@
</span> </span>
<span> <span>
<slot name="searchBarBefore"></slot> <slot name="searchBarBefore"></slot>
<ms-table-search-bar :condition.sync="condition" @change="search" class="search-bar" :tip="tip" v-if="haveSearch"/> <ms-table-search-bar :condition.sync="condition" @change="search" class="search-bar" :tip="tip"
v-if="haveSearch"/>
<ms-table-adv-search-bar :condition.sync="condition" @search="search" v-if="isCombine" ref="searchBar"/> <ms-table-adv-search-bar :condition.sync="condition" @search="search" v-if="isCombine" ref="searchBar"/>
</span> </span>
</el-row> </el-row>
@ -32,160 +33,161 @@
</template> </template>
<script> <script>
import MsTableSearchBar from './MsTableSearchBar'; import MsTableSearchBar from './MsTableSearchBar';
import MsTableButton from './MsTableButton'; import MsTableButton from './MsTableButton';
import MsTableAdvSearchBar from "./search/MsTableAdvSearchBar"; import MsTableAdvSearchBar from "./search/MsTableAdvSearchBar";
import {getCurrentProjectID} from "@/common/js/utils"; import {getCurrentProjectID} from "@/common/js/utils";
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/); const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
const VersionSelect = requireComponent.keys().length > 0 ? requireComponent("./version/VersionSelect.vue") : {}; const VersionSelect = requireComponent.keys().length > 0 ? requireComponent("./version/VersionSelect.vue") : {};
export default { export default {
name: "MsTableHeader", name: "MsTableHeader",
components: {MsTableAdvSearchBar, MsTableSearchBar, MsTableButton,'VersionSelect': VersionSelect.default}, components: {MsTableAdvSearchBar, MsTableSearchBar, MsTableButton, 'VersionSelect': VersionSelect.default},
data() { data() {
return { return {
version:this.currentVersion version: this.currentVersion
}; };
}, },
props: { props: {
title: { title: {
type: String, type: String,
default() { default() {
return null; return null;
}
},
showCreate: {
type: Boolean,
default: true
},
showImport: {
type: Boolean,
default: false
},
showRun: {
type: Boolean,
default: false
},
condition: {
type: Object
},
createTip: {
type: String,
default() {
return this.$t('commons.create');
}
},
importTip: {
type: String,
default() {
return this.$t('commons.import');
}
},
createPermission: {
type: Array,
default() {
return []
}
},
uploadPermission: {
type: Array,
default() {
return []
}
},
runTip: {
type: String,
},
currentVersion:{
type: String,
},
isShowVersion:{
type: Boolean,
default: false
},
isTesterPermission: {
type: Boolean,
default: false
},
tip: {
String,
default() {
return this.$t('commons.search_by_name');
}
},
haveSearch: {
Boolean,
default() {
return true;
}
},
versionOptions:{
type: Array,
default() {
return []
}
} }
}, },
methods: { showCreate: {
search(value) { type: Boolean,
this.$emit('update:condition', this.condition); default: true
this.$emit('search', value); },
}, showImport: {
create() { type: Boolean,
this.$emit('create'); default: false
}, },
importData() { showRun: {
this.$emit('import'); type: Boolean,
}, default: false
runTest() { },
this.$emit('runTest') condition: {
}, type: Object
historicalDataUpgrade() { },
this.$emit('historicalDataUpgrade'); createTip: {
}, type: String,
changeVersion(type){ default() {
this.$emit('changeVersion',type); return this.$t('commons.create');
},
resetSearchData() {
if (this.$refs.searchBar) {
this.$refs.searchBar.reset();
}
} }
}, },
computed: { importTip: {
isCombine() { type: String,
return this.condition.components !== undefined && this.condition.components.length > 0; default() {
}, return this.$t('commons.import');
projectId() { }
return getCurrentProjectID(); },
}, createPermission: {
type: Array,
default() {
return []
}
},
uploadPermission: {
type: Array,
default() {
return []
}
},
runTip: {
type: String,
},
currentVersion: {
type: String,
},
isShowVersion: {
type: Boolean,
default: false
},
isTesterPermission: {
type: Boolean,
default: false
},
tip: {
String,
default() {
return this.$t('commons.search_by_name');
}
},
haveSearch: {
Boolean,
default() {
return true;
}
},
versionOptions: {
type: Array,
default() {
return []
}
} }
},
methods: {
search(value) {
this.$emit('update:condition', this.condition);
this.$emit('search', value);
},
create() {
this.$emit('create');
},
importData() {
this.$emit('import');
},
runTest() {
this.$emit('runTest')
},
historicalDataUpgrade() {
this.$emit('historicalDataUpgrade');
},
changeVersion(type) {
this.$emit('changeVersion', type);
},
resetSearchData() {
if (this.$refs.searchBar) {
this.$refs.searchBar.reset();
}
}
},
computed: {
isCombine() {
return this.condition.components !== undefined && this.condition.components.length > 0;
},
projectId() {
return getCurrentProjectID();
},
} }
}
</script> </script>
<style> <style>
.table-title { .table-title {
height: 40px; height: 40px;
font-weight: bold; font-weight: bold;
font-size: 18px; font-size: 18px;
} }
</style> </style>
<style scoped> <style scoped>
.operate-button { .operate-button {
margin-bottom: -5px; margin-bottom: -5px;
} }
.search-bar { .search-bar {
width: 240px width: 240px
} }
.version-select {
padding-left: 10px; .version-select {
} padding-left: 10px;
}
</style> </style>