Skip to content

Commit

Permalink
fix: remove unnecessary v-once directives from dynamic components (vr…
Browse files Browse the repository at this point in the history
  • Loading branch information
Map1en authored and Natsumi-sama committed Jan 13, 2025
1 parent c3057e5 commit d09549d
Show file tree
Hide file tree
Showing 16 changed files with 151 additions and 150 deletions.
26 changes: 13 additions & 13 deletions src/mixins/dialogs/favoritesDialog.pug
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,21 @@ mixin favoritesDialog()
pre(v-text="worldImportDialog.errors" style="white-space:pre-wrap;font-size:12px")
data-tables(v-if="worldImportDialog.visible" v-bind="worldImportTable" v-loading="worldImportDialog.loading" style="margin-top:10px")
el-table-column(:label="$t('table.import.image')" width="70" prop="thumbnailImageUrl")
template(v-once #default="scope")
template(#default="scope")
el-popover(placement="right" height="500px" trigger="hover")
img.friends-list-avatar(slot="reference" v-lazy="scope.row.thumbnailImageUrl")
img.friends-list-avatar(v-lazy="scope.row.imageUrl" style="height:500px;cursor:pointer" @click="showFullscreenImageDialog(scope.row.imageUrl)")
el-table-column(:label="$t('table.import.name')" prop="name")
template(v-once #default="scope")
template(#default="scope")
span.x-link(v-text="scope.row.name" @click="showWorldDialog(scope.row.id)")
el-table-column(:label="$t('table.import.author')" width="120" prop="authorName")
template(v-once #default="scope")
template(#default="scope")
span.x-link(v-text="scope.row.authorName" @click="showUserDialog(scope.row.authorId)")
el-table-column(:label="$t('table.import.status')" width="70" prop="releaseStatus")
template(v-once #default="scope")
template(#default="scope")
span(v-text="scope.row.releaseStatus.charAt(0).toUpperCase() + scope.row.releaseStatus.slice(1)" :style="{ color: scope.row.releaseStatus === 'public' ? '#67c23a' : scope.row.releaseStatus === 'private' ? '#f56c6c' : undefined }")
el-table-column(:label="$t('table.import.action')" width="90" align="right")
template(v-once #default="scope")
template(#default="scope")
el-button(type="text" icon="el-icon-close" size="mini" @click="deleteItemWorldImport(scope.row)")

//- dialog: export avatar list
Expand Down Expand Up @@ -169,21 +169,21 @@ mixin favoritesDialog()
pre(v-text="avatarImportDialog.errors" style="white-space:pre-wrap;font-size:12px")
data-tables(v-if="avatarImportDialog.visible" v-bind="avatarImportTable" v-loading="avatarImportDialog.loading" style="margin-top:10px")
el-table-column(:label="$t('table.import.image')" width="70" prop="thumbnailImageUrl")
template(v-once #default="scope")
template(#default="scope")
el-popover(placement="right" height="500px" trigger="hover")
img.friends-list-avatar(slot="reference" v-lazy="scope.row.thumbnailImageUrl")
img.friends-list-avatar(v-lazy="scope.row.imageUrl" style="height:500px;cursor:pointer" @click="showFullscreenImageDialog(scope.row.imageUrl)")
el-table-column(:label="$t('table.import.name')" prop="name")
template(v-once #default="scope")
template(#default="scope")
span.x-link(v-text="scope.row.name" @click="showAvatarDialog(scope.row.id)")
el-table-column(:label="$t('table.import.author')" width="120" prop="authorName")
template(v-once #default="scope")
template(#default="scope")
span.x-link(v-text="scope.row.authorName" @click="showUserDialog(scope.row.authorId)")
el-table-column(:label="$t('table.import.status')" width="70" prop="releaseStatus")
template(v-once #default="scope")
template(#default="scope")
span(v-text="scope.row.releaseStatus.charAt(0).toUpperCase() + scope.row.releaseStatus.slice(1)" :style="{ color: scope.row.releaseStatus === 'public' ? '#67c23a' : scope.row.releaseStatus === 'private' ? '#f56c6c' : undefined }")
el-table-column(:label="$t('table.import.action')" width="90" align="right")
template(v-once #default="scope")
template(#default="scope")
el-button(type="text" icon="el-icon-close" size="mini" @click="deleteItemAvatarImport(scope.row)")

//- dialog: export friend list
Expand Down Expand Up @@ -229,13 +229,13 @@ mixin favoritesDialog()
pre(v-text="friendImportDialog.errors" style="white-space:pre-wrap;font-size:12px")
data-tables(v-if="friendImportDialog.visible" v-bind="friendImportTable" v-loading="friendImportDialog.loading" style="margin-top:10px")
el-table-column(:label="$t('table.import.image')" width="70" prop="currentAvatarThumbnailImageUrl")
template(v-once #default="scope")
template(#default="scope")
el-popover(placement="right" height="500px" trigger="hover")
img.friends-list-avatar(slot="reference" v-lazy="userImage(scope.row)")
img.friends-list-avatar(v-lazy="userImageFull(scope.row)" style="height:500px;cursor:pointer" @click="showFullscreenImageDialog(userImageFull(scope.row))")
el-table-column(:label="$t('table.import.name')" prop="displayName")
template(v-once #default="scope")
template(#default="scope")
span.x-link(v-text="scope.row.displayName" @click="showUserDialog(scope.row.id)")
el-table-column(:label="$t('table.import.action')" width="90" align="right")
template(v-once #default="scope")
template(#default="scope")
el-button(type="text" icon="el-icon-close" size="mini" @click="deleteItemFriendImport(scope.row)")
Loading

0 comments on commit d09549d

Please sign in to comment.