修改代码格式
Former-commit-id: 0e64bfc1c59aebc6bd015d864f20d980b904f9ff [formerly 0e64bfc1c59aebc6bd015d864f20d980b904f9ff [formerly 0e64bfc1c59aebc6bd015d864f20d980b904f9ff [formerly 0e64bfc1c59aebc6bd015d864f20d980b904f9ff [formerly d13d6e57180fbb88e4d138a10665fa9f74ff9a43 [formerly a287323227fe49f19b1d8924f51e4f0d76f35e63]]]]] Former-commit-id: 7b479c95b42db5ecea064b78e917c398d09d4786 Former-commit-id: 6fc9a09eae34051907101d998c957d085bdf388c Former-commit-id: 1be2b7bdfcc7f83b48a7201846cda469b5c464c1 [formerly 9e1cc925f45eee78ea1b7765b58c284067a59bc5] Former-commit-id: 9486aff65127ee994482ba806adce7fca171310d Former-commit-id: 9406b9ec706cc4311b1a87c40b8cf4fa5a11e9dd Former-commit-id: 6ace059932c6865eb91673fb7bf84aca2d822725 Former-commit-id: e159b3d518a4f24602919bbde6dd313c929864e1 Former-commit-id: 09656f37effcf523dbde72b3f31a1be0795ea274
This commit is contained in:
@@ -6,24 +6,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="scss">
|
||||
.d2-contentmenu-list {
|
||||
.d2-contentmenu-item {
|
||||
padding: 8px 20px;
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
background: #ecf5ff;
|
||||
color: #66b1ff;
|
||||
}
|
||||
.d2-contentmenu-item-title {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
@@ -43,3 +26,22 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.d2-contentmenu-list {
|
||||
.d2-contentmenu-item {
|
||||
padding: 8px 20px 8px 15px;
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
background: #ecf5ff;
|
||||
color: #66b1ff;
|
||||
}
|
||||
.d2-contentmenu-item-title {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,17 +3,7 @@
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
<style>
|
||||
.d2-contextmenu {
|
||||
position: absolute;
|
||||
padding: 5px 0;
|
||||
z-index: 2018;
|
||||
background: white;
|
||||
border: 1px solid #ebeef5;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'd2-contextmenu',
|
||||
@@ -34,9 +24,8 @@ export default {
|
||||
computed: {
|
||||
flag: {
|
||||
get () {
|
||||
console.log('change flag')
|
||||
if (this.visible) {
|
||||
// 注册全局监听事件[目前只考虑鼠标解除触发]
|
||||
// 注册全局监听事件 [ 目前只考虑鼠标解除触发 ]
|
||||
window.addEventListener('mousedown', this.watchContextmenu)
|
||||
}
|
||||
return this.visible
|
||||
@@ -65,3 +54,15 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.d2-contextmenu {
|
||||
position: absolute;
|
||||
padding: 5px 0;
|
||||
z-index: 2018;
|
||||
background: #FFF;
|
||||
border: 1px solid #cfd7e5;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,8 +2,13 @@
|
||||
<div class="d2-multiple-page-control-group" flex>
|
||||
<div class="d2-multiple-page-control-content" flex-box="1">
|
||||
<div class="d2-multiple-page-control-content-inner">
|
||||
<d2-contextmenu :visible.sync="contextmenuFlag" :x="contentmenuX" :y="contentmenuY">
|
||||
<d2-contextmenu-list :menulist="contextmenuList" @rowClick="contextmenuClick"></d2-contextmenu-list>
|
||||
<d2-contextmenu
|
||||
:visible.sync="contextmenuFlag"
|
||||
:x="contentmenuX"
|
||||
:y="contentmenuY">
|
||||
<d2-contextmenu-list
|
||||
:menulist="contextmenuList"
|
||||
@rowClick="contextmenuClick"/>
|
||||
</d2-contextmenu>
|
||||
<el-tabs
|
||||
class="d2-multiple-page-control"
|
||||
@@ -18,9 +23,7 @@
|
||||
v-for="(page, index) in pageOpenedList"
|
||||
:key="index"
|
||||
:label="page.meta.title || '未命名'"
|
||||
:name="page.name"
|
||||
>
|
||||
</el-tab-pane>
|
||||
:name="page.name"/>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user