mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-27 09:13:02 +00:00
メモリリークの一因になってそうだったのでrefを渡すのを削除
This commit is contained in:
parent
a0f794e372
commit
21b6e23e98
2 changed files with 3 additions and 13 deletions
|
@ -32,8 +32,6 @@ export default defineComponent({
|
||||||
raw: {
|
raw: {
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
// specify the parent element
|
|
||||||
parentElement: {}
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -66,7 +64,7 @@ export default defineComponent({
|
||||||
|
|
||||||
if (this.$refs.gridOuter) {
|
if (this.$refs.gridOuter) {
|
||||||
let height = 287;
|
let height = 287;
|
||||||
const parent = this.parentElement || this.$parent.$el;
|
const parent = this.$parent.$el;
|
||||||
|
|
||||||
if (this.$refs.gridOuter.clientHeight) {
|
if (this.$refs.gridOuter.clientHeight) {
|
||||||
height = this.$refs.gridOuter.clientHeight;
|
height = this.$refs.gridOuter.clientHeight;
|
||||||
|
@ -81,11 +79,6 @@ export default defineComponent({
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
parentElement() {
|
|
||||||
this.size();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<XNoteHeader class="header" :note="appearNote" :mini="true"/>
|
<XNoteHeader class="header" :note="appearNote" :mini="true"/>
|
||||||
<MkInstanceTicker v-if="showTicker" class="ticker" :instance="appearNote.user.instance"/>
|
<MkInstanceTicker v-if="showTicker" class="ticker" :instance="appearNote.user.instance"/>
|
||||||
<div class="body" ref="noteBody">
|
<div class="body">
|
||||||
<p v-if="appearNote.cw != null" class="cw">
|
<p v-if="appearNote.cw != null" class="cw">
|
||||||
<Mfm v-if="appearNote.cw != ''" class="text" :text="appearNote.cw" :author="appearNote.user" :i="$store.state.i" :custom-emojis="appearNote.emojis"/>
|
<Mfm v-if="appearNote.cw != ''" class="text" :text="appearNote.cw" :author="appearNote.user" :i="$store.state.i" :custom-emojis="appearNote.emojis"/>
|
||||||
<XCwButton v-model:value="showContent" :note="appearNote"/>
|
<XCwButton v-model:value="showContent" :note="appearNote"/>
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
<a class="rp" v-if="appearNote.renote != null">RN:</a>
|
<a class="rp" v-if="appearNote.renote != null">RN:</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="files" v-if="appearNote.files.length > 0">
|
<div class="files" v-if="appearNote.files.length > 0">
|
||||||
<XMediaList :media-list="appearNote.files" :parent-element="noteBody"/>
|
<XMediaList :media-list="appearNote.files"/>
|
||||||
</div>
|
</div>
|
||||||
<XPoll v-if="appearNote.poll" :note="appearNote" ref="pollViewer" class="poll"/>
|
<XPoll v-if="appearNote.poll" :note="appearNote" ref="pollViewer" class="poll"/>
|
||||||
<MkUrlPreview v-for="url in urls" :url="url" :key="url" :compact="true" :detail="detail" class="url-preview"/>
|
<MkUrlPreview v-for="url in urls" :url="url" :key="url" :compact="true" :detail="detail" class="url-preview"/>
|
||||||
|
@ -176,7 +176,6 @@ export default defineComponent({
|
||||||
showContent: false,
|
showContent: false,
|
||||||
isDeleted: false,
|
isDeleted: false,
|
||||||
muted: false,
|
muted: false,
|
||||||
noteBody: this.$refs.noteBody,
|
|
||||||
faEdit, faBolt, faTimes, faBullhorn, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faBiohazard, faPlug, faSatelliteDish
|
faEdit, faBolt, faTimes, faBullhorn, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faBiohazard, faPlug, faSatelliteDish
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -309,8 +308,6 @@ export default defineComponent({
|
||||||
if (this.$store.getters.isSignedIn) {
|
if (this.$store.getters.isSignedIn) {
|
||||||
this.connection.on('_connected_', this.onStreamConnected);
|
this.connection.on('_connected_', this.onStreamConnected);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.noteBody = this.$refs.noteBody;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
|
|
Loading…
Reference in a new issue