update 动态消息
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<template v-if="fileList && fileList.length > 0">
|
||||
<div class="file" v-for="file in fileList" :key="file.id">
|
||||
<div class="file" :class="{'operate-right': operateFixedRight}" v-for="file in fileList" :key="file.id">
|
||||
<div class="file-info">
|
||||
<a-icon type="link" />
|
||||
<div class="file-name" @click="handlePreview(file)">{{ file.fileName }}</div>
|
||||
@@ -40,6 +40,12 @@ export default {
|
||||
type: String,
|
||||
required: false,
|
||||
default: null
|
||||
},
|
||||
// 操作按钮固定在右侧
|
||||
operateFixedRight: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -116,10 +122,23 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.operate-right {
|
||||
justify-content: space-between;
|
||||
|
||||
.file-info {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.file-name {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.file {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.file:last-child {
|
||||
@@ -131,8 +150,7 @@ export default {
|
||||
align-items: center;
|
||||
color: @primary-color;
|
||||
cursor: pointer;
|
||||
flex: 1;
|
||||
width: 0;
|
||||
max-width: calc(100% - 97px);
|
||||
}
|
||||
|
||||
.file-info > .anticon {
|
||||
@@ -142,8 +160,6 @@ export default {
|
||||
.file-name {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
width: 0;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user