Commit f920be43 authored by luo ying's avatar luo ying

修改按钮组件

parent 64592405
...@@ -74,7 +74,6 @@ ...@@ -74,7 +74,6 @@
<slot name="leftBottom" v-if="leftOneName"> <slot name="leftBottom" v-if="leftOneName">
<Icon :type="leftOneIcon" class="iconStyle" /> <Icon :type="leftOneIcon" class="iconStyle" />
{{ leftOneName }} {{ leftOneName }}
<!-- v-show="leftBtmicon" -->
</slot> </slot>
</span> </span>
<span class="overdue f14 fwBold mr20"> <span class="overdue f14 fwBold mr20">
...@@ -84,9 +83,9 @@ ...@@ -84,9 +83,9 @@
</slot> </slot>
</span> </span>
</div> </div>
<span class="rightMore"> <div class="rightMore">
<slot name="rightBottom"> </slot> <slot name="rightBottom"> </slot>
</span> </div>
</div> </div>
</div> </div>
</div> </div>
...@@ -283,7 +282,7 @@ export default { ...@@ -283,7 +282,7 @@ export default {
} }
} }
.bottomCard { .bottomCard {
justify-content: space-between; // justify-content: space-between;
padding-bottom: 20px; padding-bottom: 20px;
padding-left: 14px; padding-left: 14px;
.leftBtm { .leftBtm {
...@@ -307,9 +306,6 @@ export default { ...@@ -307,9 +306,6 @@ export default {
} }
.cardBox:hover { .cardBox:hover {
box-shadow: 0px 0px 10px rgba(38, 128, 235, 0.4); box-shadow: 0px 0px 10px rgba(38, 128, 235, 0.4);
// .topCard {
// background: rgba(38, 128, 235, 0.4);
// }
} }
.borderCss { .borderCss {
border: 2px solid #2680eb; border: 2px solid #2680eb;
......
<template> <template>
<div <div class="rightM pr" v-if="rightM && rightList">
class="rightM flex" <div class="flex rightMbtns mr10" :class="{'pa':!more}" @mouseleave="more=true" >
:class="{ mr10: num == 1 }" <slot>
v-if="rightM && rightList" <op
@mouseleave="outPut" class="mr5 opBtns tc"
> v-if="btnBoxList && btnBoxList.length > 0"
<slot > v-for="(v, i) in btnBoxList"
<op v-if="rightList && rightList.slice(0, num).length > 0"
v-for="(v, i) in rightList.slice(0, num)"
:key="i" :key="i"
:title="v.name" :title="v.name"
:type="v.type" :type="v.type"
:msg="v.msg" :msg="v.msg"
:disable="v.disable" :disable="v.disable == null || v.disable == undefined ? false : true"
@click="v.click(row,$event)" @click.native="v.click(row,$event)"
> >
<Icon :type="v.icon==null || v.icon==undefined ? 'ios-paper':v.icon" v-if="v.type=='icon'|| v.type=='' || v.type==undefined || v.type==null "/> <Icon
:type="v.icon == null || v.icon == undefined ? 'ios-paper' : v.icon"
v-if="
v.type == 'icon' ||
v.type == '' ||
v.type == undefined ||
v.type == null
"
/>
<span v-if="v.name"> <span v-if="v.name">
{{ v.name }} {{ v.name }}
</span> </span>
</op> </op>
<span <div
class="elliPsis fwBold" class="elliPsis fwBold mr10"
slot="elliPsis" v-if="num<rightList.length&&more"
v-if="rightList && rightList.length > num > 0" @mouseenter="more=false"
>
<span :class="{ hide: inlines, mr10: !inlines }" @mouseenter="inFo"
>•••</span >
<span class="mr10" :class="{ inline: inlines, hide: !inlines }">
<op
v-for="(value, index) in rightList.slice(num)"
:key="index"
:title="value.name"
:type="value.type"
:msg="value.msg"
:disable="value.disable"
@click="value.click(row,$event)"
v-if="rightList && rightList.slice(num).length >= num"
> >
<Icon :type="value.icon==''?'ios-paper':value.icon" v-if="value.type=='icon'|| value.type=='' || value.type==undefined || value.type==null"/> •••
<span v-if="value.name"> </div>
{{ value.name }}
</span>
</op>
</span>
</span>
</slot> </slot>
</div> </div>
</div>
</template> </template>
<script> <script>
export default { export default {
name: "rm",
data() { data() {
return { return {
inlines: false, more: true,
btnBoxList: [],
}; };
}, },
props: { props: {
row: { row: {
type:[Object,Array], type: [Object, Array],
default: [] default: [],
}, },
rightList: { rightList: {
type:[Object,Array], type: Array,
default: [], default: [],
}, },
num: { num: {
...@@ -75,25 +65,44 @@ export default { ...@@ -75,25 +65,44 @@ export default {
}, },
}, },
mounted() { mounted() {
// console.log("$slots",this.$slots,this.$slots.default)
}, },
methods: { methods: {
inFo() { // hello(row,event){
this.inlines = true; // console.log('111',row,event)
}, // }
outPut() {
this.inlines = false;
},
}, },
computed:{
btnBoxList(){
if(this.num>=this.rightList.length){
return this.rightList;
}else {
if(this.more)
return this.rightList.slice(0, this.num);
else
return this.rightList;
}
}
}
}; };
</script> </script>
<style lang="less" >
<style lang="less" scoped>
.rightM { .rightM {
overflow: visible;
cursor: pointer; cursor: pointer;
height: auto; width: 100%;
height: 100%;
.elliPsis { .elliPsis {
color: #2680eb; color: #2680eb;
} }
.rightMbtns{
background: #ffffff;
right: 0;
top:-12px;
z-index: 99;
}
.opBtns{
min-width: 55px;
}
} }
</style> </style>
\ No newline at end of file
...@@ -171,12 +171,10 @@ Vue.component("FilesViewer", FilesViewer) ...@@ -171,12 +171,10 @@ Vue.component("FilesViewer", FilesViewer)
Vue.use(Contextmenu); Vue.use(Contextmenu);
//注入mock //注入mock
// require("../mock") require("../mock")
// Vue.component("Vcard", Vcard) Vue.component("Vcard", Vcard)
// Vue.component("BtnBox", BtnBox) Vue.component("BtnBox", BtnBox)
// Vue.component("RightM", RightM) Vue.component("RightM", RightM)
//注入mock
// require("../mock")
Vue.prototype.$api = request; Vue.prototype.$api = request;
Vue.prototype.$http = Api; Vue.prototype.$http = Api;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment