refactor: 删除没有用到的组件import
This commit is contained in:
parent
06933114d5
commit
b728671136
|
@ -3,7 +3,7 @@
|
||||||
<div class="title-bar" :style="{'height': titleBarHeight + 'px'}">
|
<div class="title-bar" :style="{'height': titleBarHeight + 'px'}">
|
||||||
<slot name="title">
|
<slot name="title">
|
||||||
<span :style="{'line-height': titleBarHeight - 10 + 'px'}" class="title-left">
|
<span :style="{'line-height': titleBarHeight - 10 + 'px'}" class="title-left">
|
||||||
{{title}}
|
{{ title }}
|
||||||
</span>
|
</span>
|
||||||
<span :style="{'line-height': titleBarHeight - 10 + 'px'}" class="title-right">
|
<span :style="{'line-height': titleBarHeight - 10 + 'px'}" class="title-right">
|
||||||
<i class="el-icon-plus" @click="addFuc" v-permission="envAddPermission"/>
|
<i class="el-icon-plus" @click="addFuc" v-permission="envAddPermission"/>
|
||||||
|
@ -29,124 +29,123 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MsAsideContainer from "./MsAsideContainer";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsAsideItem",
|
name: "MsAsideItem",
|
||||||
components: {MsAsideContainer},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectIndex: -1
|
selectIndex: -1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
width: {
|
||||||
|
type: Number,
|
||||||
|
default: 200
|
||||||
|
},
|
||||||
|
titleBarHeight: {
|
||||||
|
type: Number,
|
||||||
|
default: 40
|
||||||
|
},
|
||||||
|
itemBarHeight: {
|
||||||
|
type: Number,
|
||||||
|
default: 35
|
||||||
|
},
|
||||||
|
title: String,
|
||||||
|
data: Array,
|
||||||
|
deleteFuc: Function,
|
||||||
|
addFuc: Function,
|
||||||
|
itemOperators: {
|
||||||
|
type: Array,
|
||||||
|
default() {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
icon: 'el-icon-delete',
|
||||||
|
func: this.deleteFuc,
|
||||||
|
permissions: []
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
enableAsideHidden: {
|
||||||
width: {
|
type: Boolean,
|
||||||
type: Number,
|
default: true
|
||||||
default: 200
|
|
||||||
},
|
|
||||||
titleBarHeight: {
|
|
||||||
type: Number,
|
|
||||||
default: 40
|
|
||||||
},
|
|
||||||
itemBarHeight: {
|
|
||||||
type: Number,
|
|
||||||
default: 35
|
|
||||||
},
|
|
||||||
title: String,
|
|
||||||
data: Array,
|
|
||||||
deleteFuc: Function,
|
|
||||||
addFuc: Function,
|
|
||||||
itemOperators: {
|
|
||||||
type: Array,
|
|
||||||
default() {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
icon: 'el-icon-delete',
|
|
||||||
func: this.deleteFuc,
|
|
||||||
permissions: []
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
enableAsideHidden: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
},
|
|
||||||
envAddPermission: {
|
|
||||||
type: Array,
|
|
||||||
default() {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
envAddPermission: {
|
||||||
itemSelected(index, item) {
|
type: Array,
|
||||||
this.selectIndex = index;
|
default() {
|
||||||
this.$emit('itemSelected', item);
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
itemSelected(index, item) {
|
||||||
|
this.selectIndex = index;
|
||||||
|
this.$emit('itemSelected', item);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
.ms-aside-container {
|
.ms-aside-container {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-bar {
|
.title-bar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #e9ebef;
|
background: #e9ebef;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-bar {
|
.item-bar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #F9F9F9;
|
background: #F9F9F9;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: solid 1px #e6e6e6;
|
border: solid 1px #e6e6e6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-bar:hover .item-right {
|
.item-bar:hover .item-right {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-right, .item-right {
|
.title-right, .item-right {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right {
|
.item-right {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right i {
|
.item-right i {
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
i:hover {
|
i:hover {
|
||||||
color: #409EFF;
|
color: #409EFF;
|
||||||
font-size: large;
|
font-size: large;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-selected {
|
.item-selected {
|
||||||
background: #ECF5FF;
|
background: #ECF5FF;
|
||||||
border-left: solid #409EFF 5px;
|
border-left: solid #409EFF 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-selected .item-right {
|
.item-selected .item-right {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-input {
|
.item-input {
|
||||||
border: hidden;
|
border: hidden;
|
||||||
display: inline;
|
display: inline;
|
||||||
background-color: rgba(0, 0, 0, 0);
|
background-color: rgba(0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-input:focus {
|
.item-input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -35,9 +35,6 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import draggable from 'vuedraggable';
|
import draggable from 'vuedraggable';
|
||||||
import MsContainer from "../../components/MsContainer";
|
|
||||||
import MsAsideContainer from "../../components/MsAsideContainer";
|
|
||||||
import MsMainContainer from "../../components/MsMainContainer";
|
|
||||||
import MsAsideItem from "../../components/MsAsideItem";
|
import MsAsideItem from "../../components/MsAsideItem";
|
||||||
import EnvironmentEdit from "../../components/environment/EnvironmentEdit";
|
import EnvironmentEdit from "../../components/environment/EnvironmentEdit";
|
||||||
import {listenGoBack, removeGoBackListener, getUUID} from "../../utils";
|
import {listenGoBack, removeGoBackListener, getUUID} from "../../utils";
|
||||||
|
@ -55,9 +52,6 @@ export default {
|
||||||
MsAsideItem,
|
MsAsideItem,
|
||||||
EnvironmentGlobalScript,
|
EnvironmentGlobalScript,
|
||||||
GlobalAssertions,
|
GlobalAssertions,
|
||||||
MsMainContainer,
|
|
||||||
MsAsideContainer,
|
|
||||||
MsContainer,
|
|
||||||
draggable,
|
draggable,
|
||||||
MsDialogHeader
|
MsDialogHeader
|
||||||
},
|
},
|
||||||
|
|
|
@ -110,8 +110,6 @@ import TemplateSelect from "./TemplateSelect";
|
||||||
import MsTableButton from "metersphere-frontend/src/components/MsTableButton";
|
import MsTableButton from "metersphere-frontend/src/components/MsTableButton";
|
||||||
import MsTableOperatorButton from "metersphere-frontend/src/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "metersphere-frontend/src/components/MsTableOperatorButton";
|
||||||
import MsDeleteConfirm from "metersphere-frontend/src/components/MsDeleteConfirm";
|
import MsDeleteConfirm from "metersphere-frontend/src/components/MsDeleteConfirm";
|
||||||
import MsMainContainer from "metersphere-frontend/src/components/MsMainContainer";
|
|
||||||
import MsContainer from "metersphere-frontend/src/components/MsContainer";
|
|
||||||
import MsTableOperator from "metersphere-frontend/src/components/MsTableOperator";
|
import MsTableOperator from "metersphere-frontend/src/components/MsTableOperator";
|
||||||
import MsTablePagination from "metersphere-frontend/src/components/pagination/TablePagination";
|
import MsTablePagination from "metersphere-frontend/src/components/pagination/TablePagination";
|
||||||
import MsTableHeader from "metersphere-frontend/src/components/MsTableHeader";
|
import MsTableHeader from "metersphere-frontend/src/components/MsTableHeader";
|
||||||
|
@ -136,8 +134,6 @@ export default {
|
||||||
MsTableButton,
|
MsTableButton,
|
||||||
MsTableOperatorButton,
|
MsTableOperatorButton,
|
||||||
MsDeleteConfirm,
|
MsDeleteConfirm,
|
||||||
MsMainContainer,
|
|
||||||
MsContainer,
|
|
||||||
MsTableOperator,
|
MsTableOperator,
|
||||||
MsTablePagination,
|
MsTablePagination,
|
||||||
MsTableHeader,
|
MsTableHeader,
|
||||||
|
|
|
@ -186,8 +186,6 @@ import {
|
||||||
getCurrentUserId,
|
getCurrentUserId,
|
||||||
getCurrentWorkspaceId
|
getCurrentWorkspaceId
|
||||||
} from "metersphere-frontend/src/utils/token";
|
} from "metersphere-frontend/src/utils/token";
|
||||||
import MsContainer from "metersphere-frontend/src/components/MsContainer";
|
|
||||||
import MsMainContainer from "metersphere-frontend/src/components/MsMainContainer";
|
|
||||||
import MsDeleteConfirm from "metersphere-frontend/src/components/MsDeleteConfirm";
|
import MsDeleteConfirm from "metersphere-frontend/src/components/MsDeleteConfirm";
|
||||||
import MsTableOperatorButton from "metersphere-frontend/src/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "metersphere-frontend/src/components/MsTableOperatorButton";
|
||||||
import {GROUP_PROJECT, PROJECT_ID} from "metersphere-frontend/src/utils/constants";
|
import {GROUP_PROJECT, PROJECT_ID} from "metersphere-frontend/src/utils/constants";
|
||||||
|
@ -217,10 +215,8 @@ export default {
|
||||||
MsTableButton,
|
MsTableButton,
|
||||||
MsTableOperatorButton,
|
MsTableOperatorButton,
|
||||||
MsDeleteConfirm,
|
MsDeleteConfirm,
|
||||||
MsMainContainer,
|
|
||||||
MsRolesTag,
|
MsRolesTag,
|
||||||
EditProject,
|
EditProject,
|
||||||
MsContainer,
|
|
||||||
MsTableOperator,
|
MsTableOperator,
|
||||||
MsTablePagination,
|
MsTablePagination,
|
||||||
MsTableHeader,
|
MsTableHeader,
|
||||||
|
|
Loading…
Reference in New Issue