|
@@ -1,30 +1,42 @@
|
|
|
<template>
|
|
|
<div class="initial-scene-settings" app-border dir-left>
|
|
|
<div class="initial-scene-settings__title">
|
|
|
- {{$i18n.t('navigation.init_scene')}}
|
|
|
- <i class="iconfont icon-help_i tool-tip-for-editor" v-tooltip="$i18n.t('navigation.init_scene_tips')"/>
|
|
|
+ {{ $i18n.t("navigation.init_scene") }}
|
|
|
+ <i
|
|
|
+ class="iconfont icon-help_i tool-tip-for-editor"
|
|
|
+ v-tooltip="$i18n.t('navigation.init_scene_tips')"
|
|
|
+ />
|
|
|
</div>
|
|
|
-
|
|
|
- <img class="preview" v-if="info.firstScene" :src="info.firstScene.icon" alt="">
|
|
|
- <img class="placeholder" v-else src="@/assets/images/pano-image-placeholder.png" alt="">
|
|
|
+
|
|
|
+ <img
|
|
|
+ class="preview"
|
|
|
+ v-if="info.firstScene"
|
|
|
+ :src="info.firstScene.icon"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ <img
|
|
|
+ class="placeholder"
|
|
|
+ v-else
|
|
|
+ src="@/assets/images/pano-image-placeholder.png"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
|
|
|
<div class="change-init" v-if="info.firstScene">
|
|
|
- <button class="ui-button deepcancel" @click="deleteIndexInfo">{{$i18n.t('navigation.delete_init_scene')}}</button>
|
|
|
- <button @click="showInitScene=true" class="ui-button submit">
|
|
|
- {{$i18n.t('navigation.edit_init_scene')}}
|
|
|
+ <button class="ui-button deepcancel" @click="deleteIndexInfo">
|
|
|
+ {{ $i18n.t("navigation.delete_init_scene") }}
|
|
|
+ </button>
|
|
|
+ <button @click="showInitScene = true" class="ui-button submit">
|
|
|
+ {{ $i18n.t("navigation.edit_init_scene") }}
|
|
|
</button>
|
|
|
</div>
|
|
|
<div class="set-init" v-else>
|
|
|
- <button @click="showInitScene=true" class="ui-button submit">
|
|
|
- {{$i18n.t('navigation.setting_init_scene')}}
|
|
|
+ <button @click="showInitScene = true" class="ui-button submit">
|
|
|
+ {{ $i18n.t("navigation.setting_init_scene") }}
|
|
|
</button>
|
|
|
</div>
|
|
|
|
|
|
<div class="dialog" style="z-index: 2000" v-if="showInitScene">
|
|
|
- <Selector
|
|
|
- @cancel="showInitScene = false"
|
|
|
- @submit="handleSelect"
|
|
|
- />
|
|
|
+ <Selector @cancel="showInitScene = false" @submit="handleSelect" />
|
|
|
</div>
|
|
|
|
|
|
<!-- <div class="dialog" style="z-index: 2000" v-if="showInitScene">
|
|
@@ -44,39 +56,37 @@ import { mapGetters } from "vuex";
|
|
|
import Selector from "@/components/materialSelectorFromWork.vue";
|
|
|
|
|
|
export default {
|
|
|
- components:{
|
|
|
+ components: {
|
|
|
Selector,
|
|
|
},
|
|
|
- data(){
|
|
|
+ data() {
|
|
|
return {
|
|
|
- showInitScene:false
|
|
|
- }
|
|
|
+ showInitScene: false,
|
|
|
+ };
|
|
|
},
|
|
|
- methods:{
|
|
|
- deleteIndexInfo(){
|
|
|
+ methods: {
|
|
|
+ deleteIndexInfo() {
|
|
|
this.$confirm({
|
|
|
- content: this.$i18n.t('tips.delete'),
|
|
|
- ok: () => {
|
|
|
- this.info.firstScene = ''
|
|
|
- this.$store.commit("SetInfo", this.info);
|
|
|
- this.$msg.success(this.$i18n.t('tips.delete_done'))
|
|
|
- }
|
|
|
+ content: this.$i18n.t("tips.delete"),
|
|
|
+ ok: () => {
|
|
|
+ this.info.firstScene = "";
|
|
|
+ this.$store.commit("SetInfo", this.info);
|
|
|
+ this.$msg.success(this.$i18n.t("tips.delete_done"));
|
|
|
+ },
|
|
|
});
|
|
|
-
|
|
|
},
|
|
|
handleSelect(data) {
|
|
|
- this.info.firstScene = data[0] // 注意此处是浅拷贝
|
|
|
- this.showInitScene = false
|
|
|
- }
|
|
|
+ this.info.firstScene = data[0]; // 注意此处是浅拷贝
|
|
|
+ this.showInitScene = false;
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters({
|
|
|
info: "info",
|
|
|
- })
|
|
|
+ }),
|
|
|
},
|
|
|
- mounted(){
|
|
|
- }
|
|
|
-}
|
|
|
+ mounted() {},
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
@@ -130,4 +140,4 @@ export default {
|
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|