|
@@ -20,7 +20,11 @@
|
|
<span class="data-item">
|
|
<span class="data-item">
|
|
<message :reply-user-id="props.replyUserId" :paper-path="props.paperPath"></message>
|
|
<message :reply-user-id="props.replyUserId" :paper-path="props.paperPath"></message>
|
|
</span>
|
|
</span>
|
|
- <span class="data-item"><user-info></user-info></span>
|
|
|
|
|
|
+ <span class="data-item is-last"><user-info></user-info></span>
|
|
|
|
+
|
|
|
|
+ <div class="grid fill-light-gray pointer close-icon" @click="willLogout">
|
|
|
|
+ <el-icon><close /></el-icon>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -34,7 +38,10 @@ import SvgIcon from '@/components/common/SvgIcon.vue'
|
|
import ColorPicker from '@/components/common/ColorPicker.vue'
|
|
import ColorPicker from '@/components/common/ColorPicker.vue'
|
|
import Message from '@/components/shared/message/Message.vue'
|
|
import Message from '@/components/shared/message/Message.vue'
|
|
import UserInfo from '@/components/shared/UserInfo.vue'
|
|
import UserInfo from '@/components/shared/UserInfo.vue'
|
|
-
|
|
|
|
|
|
+import { ElIcon } from 'element-plus'
|
|
|
|
+import { Close } from '@element-plus/icons-vue'
|
|
|
|
+import { logout } from '@/utils/shared'
|
|
|
|
+import { sessionStorage } from '@/plugins/storage'
|
|
type ButtonType =
|
|
type ButtonType =
|
|
| 'back'
|
|
| 'back'
|
|
| 'scale-up'
|
|
| 'scale-up'
|
|
@@ -212,9 +219,22 @@ watch(
|
|
},
|
|
},
|
|
{ immediate: true }
|
|
{ immediate: true }
|
|
)
|
|
)
|
|
-
|
|
|
|
|
|
+const willLogout = async () => {
|
|
|
|
+ if (fullPath && !!sessionStorage.get('LOGIN_RESULT')) {
|
|
|
|
+ await mainStore.setUserMarkConfig({
|
|
|
|
+ [fullPath]: {
|
|
|
|
+ center: center.value,
|
|
|
|
+ ratio: ratio.value,
|
|
|
|
+ rotate: rotate.value,
|
|
|
|
+ frontColor: frontColor.value,
|
|
|
|
+ backgroundColor: backgroundColor.value,
|
|
|
|
+ },
|
|
|
|
+ })
|
|
|
|
+ logout()
|
|
|
|
+ }
|
|
|
|
+}
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
- if (fullPath) {
|
|
|
|
|
|
+ if (fullPath && !!sessionStorage.get('LOGIN_RESULT')) {
|
|
mainStore.setUserMarkConfig({
|
|
mainStore.setUserMarkConfig({
|
|
[fullPath]: {
|
|
[fullPath]: {
|
|
center: center.value,
|
|
center: center.value,
|
|
@@ -262,6 +282,23 @@ onUnmounted(() => {
|
|
vertical-align: middle;
|
|
vertical-align: middle;
|
|
background-color: #eeeeee;
|
|
background-color: #eeeeee;
|
|
}
|
|
}
|
|
|
|
+ &.is-last:after {
|
|
|
|
+ width: 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .close-icon {
|
|
|
|
+ width: 32px;
|
|
|
|
+ height: 32px;
|
|
|
|
+ font-size: 1.4em;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+ place-items: center;
|
|
|
|
+ color: #666;
|
|
|
|
+ transition: all 0.3s ease-in-out;
|
|
|
|
+ &:hover {
|
|
|
|
+ background-color: #dfdfdf;
|
|
|
|
+ color: #444;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|