clay : 任意节点退回完成 #34

Merged
clay merged 5 commits from master into pro 2023-03-20 09:29:16 +00:00
2 changed files with 42 additions and 17 deletions
Showing only changes of commit fc288926d5 - Show all commits

View File

@ -4,9 +4,8 @@
:style="{'--row':row}"> :style="{'--row':row}">
<slot name="pre"></slot> <slot name="pre"></slot>
<div style="display: flex;"> <div style="display: flex;">
<div v-for="(user,index) in userInfo" :key="index"> <div v-for="(user,index) in userInfo" :key="index" class="avatar_name">
<div> <el-avatar size="large"
<el-avatar style="margin-right: 5px;" size="large"
:src="user.avatar"></el-avatar> :src="user.avatar"></el-avatar>
<div v-if="user.icon" <div v-if="user.icon"
class="el-timeline-item__node" :style="{ class="el-timeline-item__node" :style="{
@ -17,8 +16,9 @@
:class="user.icon" :class="user.icon"
></i> ></i>
</div> </div>
</div> <el-tooltip class="item" effect="dark" :content="user.name" placement="bottom-start">
<div>{{user.name}}</div> <span class="item_name">{{ user.name }}</span>
</el-tooltip>
</div> </div>
</div> </div>
</div> </div>
@ -90,5 +90,18 @@ export default {
</script> </script>
<style scoped> <style scoped>
.avatar_name {
display: flex;
flex-direction: column;
align-items: center;
margin-right: 5px;
/*width: 45px;*/
}
.item_name{
width: 45px;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden
}
</style> </style>

View File

@ -11,8 +11,10 @@
<div class="node-body-content"> <div class="node-body-content">
<i :class="leftIcon" v-if="leftIcon"></i> <i :class="leftIcon" v-if="leftIcon"></i>
<template v-if="viewer && selectUser.show"> <template v-if="viewer && selectUser.show">
<el-button type="primary" icon="el-icon-plus" circle @click="$refs.userPicker.showUserPicker()"/> <div class="avatar_button">
<avatar-ellipsis :row="3" v-if="userInfo.length > 0" :user-info="userInfo"/> <avatar-ellipsis :row="3" v-if="userInfo.length > 0" :user-info="userInfo"/>
<el-button type="primary" icon="el-icon-plus" circle @click="$refs.userPicker.showUserPicker()"/>
</div>
</template> </template>
<template v-else-if="showAvatar"> <template v-else-if="showAvatar">
<span class="placeholder" v-if="userInfo.length === 0">{{ placeholder }}</span> <span class="placeholder" v-if="userInfo.length === 0">{{ placeholder }}</span>
@ -229,6 +231,16 @@ export default {
color: #656363; color: #656363;
font-size: 14px; font-size: 14px;
.avatar_button {
display: flex;
button {
height: 40px;
flex-shrink: 0;
flex-grow: 0;
}
}
i { i {
position: absolute; position: absolute;
top: 55%; top: 55%;