mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-22 23:03:00 +08:00
Merge pull request #6350 from lasniscinote/gl_SCI_9419
Fixed a list-item bug where view_mode was active [SCI-9419]
This commit is contained in:
commit
587e07a9f1
1 changed files with 10 additions and 2 deletions
|
@ -37,7 +37,7 @@
|
|||
:class="{ 'text-sn-grey font-normal': isBlank, 'whitespace-pre-line': !singleLine }"
|
||||
@click="enableEdit($event)"
|
||||
>
|
||||
<span class="list-item" :class="{'truncate': singleLine}" v-if="smartAnnotation" v-html="sa_value || placeholder" ></span>
|
||||
<span :class="{'truncate': singleLine, 'list-item': viewMode !== 'active'}" v-if="smartAnnotation" v-html="sa_value || placeholder" ></span>
|
||||
<span :class="{'truncate': singleLine}" v-else>{{newValue || placeholder}}</span>
|
||||
</div>
|
||||
|
||||
|
@ -78,7 +78,8 @@
|
|||
return {
|
||||
editing: false,
|
||||
dirty: false,
|
||||
newValue: ''
|
||||
newValue: '',
|
||||
viewMode: null
|
||||
}
|
||||
},
|
||||
mixins: [UtilsMixin],
|
||||
|
@ -90,6 +91,13 @@
|
|||
if (this.editOnload) {
|
||||
this.enableEdit();
|
||||
}
|
||||
|
||||
// determine whether view mode is in projects(active) or templates(inactive)
|
||||
const urlSearchParam = window.location?.search
|
||||
if (!urlSearchParam) return
|
||||
if (urlSearchParam.includes('view_mode=active')) {
|
||||
this.viewMode = 'active'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
editing() {
|
||||
|
|
Loading…
Reference in a new issue