|
|
@ -62,7 +62,6 @@ |
|
|
|
<el-col :span="5" class="ml3 note-list"> |
|
|
|
<el-col :span="5" class="ml3 note-list"> |
|
|
|
<template v-if="noteList.length>0"> |
|
|
|
<template v-if="noteList.length>0"> |
|
|
|
<el-row v-for="(item,index) in noteList" :key="index" class="mb2"> |
|
|
|
<el-row v-for="(item,index) in noteList" :key="index" class="mb2"> |
|
|
|
<el-tooltip :content="$t('read.tip.click_note_list')" :disabled="item.isEdit"> |
|
|
|
|
|
|
|
<el-card> |
|
|
|
<el-card> |
|
|
|
<div slot="header" class="clearfix"> |
|
|
|
<div slot="header" class="clearfix"> |
|
|
|
<el-row type="flex" justify="space-around"> |
|
|
|
<el-row type="flex" justify="space-around"> |
|
|
@ -78,7 +77,6 @@ |
|
|
|
</el-button-group> |
|
|
|
</el-button-group> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="text item" @click="jump(item)" @mouseover="highlighting(item)" |
|
|
|
<div class="text item" @click="jump(item)" @mouseover="highlighting(item)" |
|
|
|
@mouseout="reset(item)"> |
|
|
|
@mouseout="reset(item)"> |
|
|
|
<transition v-if="item.isEdit" @after-leave="save(item)"> |
|
|
|
<transition v-if="item.isEdit" @after-leave="save(item)"> |
|
|
@ -88,11 +86,12 @@ |
|
|
|
</el-tooltip> |
|
|
|
</el-tooltip> |
|
|
|
</transition> |
|
|
|
</transition> |
|
|
|
<template v-else> |
|
|
|
<template v-else> |
|
|
|
|
|
|
|
<el-tooltip :content="$t('read.tip.click_note_list')" :disabled="item.isEdit"> |
|
|
|
<pre style="background-color: white">{{item.content}}</pre> |
|
|
|
<pre style="background-color: white">{{item.content}}</pre> |
|
|
|
|
|
|
|
</el-tooltip> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
</el-tooltip> |
|
|
|
|
|
|
|
<el-alert v-if="item.message" |
|
|
|
<el-alert v-if="item.message" |
|
|
|
@close="item.message=null;item.type=null" |
|
|
|
@close="item.message=null;item.type=null" |
|
|
|
:title="item.message" |
|
|
|
:title="item.message" |
|
|
@ -369,8 +368,19 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
//保存笔记 |
|
|
|
//保存笔记 |
|
|
|
save(item: any) { |
|
|
|
save(item: any) { |
|
|
|
this.$set(item, 'type', 'success') |
|
|
|
let that=this |
|
|
|
this.$set(item, 'message', '保存成功') |
|
|
|
this.GLOBAL.fetchJSON('/v1/api/notes/update','PUT',{ |
|
|
|
|
|
|
|
noteId:item.id, |
|
|
|
|
|
|
|
noteContent:item.content |
|
|
|
|
|
|
|
},function(res) { |
|
|
|
|
|
|
|
if(res.code==='200'){ |
|
|
|
|
|
|
|
that.$set(item, 'type', 'success') |
|
|
|
|
|
|
|
that.$set(item, 'message', that.$t('read.tip.update_note_ok')) |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
that.$set(item, 'type', 'error') |
|
|
|
|
|
|
|
that.$set(item, 'message', that.$t('read.tip.update_note_fail')) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
//删除笔记 |
|
|
|
//删除笔记 |
|
|
|
del(item: any, index: number) { |
|
|
|
del(item: any, index: number) { |
|
|
|