|
@@ -2,32 +2,50 @@
|
|
|
<!-- 编辑器-基础-中间部分 -->
|
|
|
<div class="app-view-toolbar app-view-full-toolbar">
|
|
|
<div class="main">
|
|
|
- <div class="ui-title-big">{{$i18n.t(`edit_settings.base_setting`)}}</div>
|
|
|
+ <div class="ui-title-big">
|
|
|
+ {{ $i18n.t(`edit_settings.base_setting`) }}
|
|
|
+ </div>
|
|
|
<div class="upload-con">
|
|
|
<div class="uc-l">
|
|
|
<div class="preview">
|
|
|
- <img :src="info.icon || require('@/assets/images/default/img_cover_default_2.png')" alt="" />
|
|
|
- <button class="ui-button submit setting-cover-btn" @click="onClickSettingCover">{{$i18n.t(`edit_settings.setting_cover`)}}</button>
|
|
|
+ <img
|
|
|
+ :src="
|
|
|
+ info.icon ||
|
|
|
+ require('@/assets/images/default/img_cover_default_2.png')
|
|
|
+ "
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ <button
|
|
|
+ class="ui-button submit setting-cover-btn"
|
|
|
+ @click="onClickSettingCover"
|
|
|
+ >
|
|
|
+ {{ $i18n.t(`edit_settings.setting_cover`) }}
|
|
|
+ </button>
|
|
|
</div>
|
|
|
- <div class="ui-remark" v-html="$i18n.t(`edit_settings.cover_size`)"></div>
|
|
|
+ <div
|
|
|
+ class="ui-remark"
|
|
|
+ v-html="$i18n.t(`edit_settings.cover_size`)"
|
|
|
+ ></div>
|
|
|
</div>
|
|
|
<div class="uc-r">
|
|
|
<div class="ui-title">
|
|
|
- <span class="">{{$i18n.t(`edit_settings.title`)}}</span>
|
|
|
+ <span class="">{{ $i18n.t(`edit_settings.title`) }}</span>
|
|
|
</div>
|
|
|
<div class="title-input-wrapper">
|
|
|
<input
|
|
|
v-model.trim="info.name"
|
|
|
- @input="emojistr"
|
|
|
+ @input="emojistr"
|
|
|
@keydown.enter="onTitleInputEnter"
|
|
|
type="text"
|
|
|
autocomplete="new-password"
|
|
|
maxlength="50"
|
|
|
:placeholder="$i18n.t(`edit_settings.work_placeholder`)"
|
|
|
/>
|
|
|
- <span class="count">{{titleLength}}/50</span>
|
|
|
+ <span class="count">{{ titleLength }}/50</span>
|
|
|
+ </div>
|
|
|
+ <div class="ui-title jianjie">
|
|
|
+ <span>{{ $i18n.t(`edit_settings.description`) }}</span>
|
|
|
</div>
|
|
|
- <div class="ui-title jianjie"><span>{{$i18n.t(`edit_settings.description`)}}</span></div>
|
|
|
<div class="jianjie-textarea-wrapper">
|
|
|
<!-- <textarea
|
|
|
v-model.trim="info.description"
|
|
@@ -36,31 +54,51 @@
|
|
|
type="text"
|
|
|
/> -->
|
|
|
|
|
|
- <editor ref="editor" :html="info.description" :placeholder="$i18n.t(`edit_settings.intro_placeholder`)" :maxlength="500" @change="onEditorChange"></editor>
|
|
|
+ <editor
|
|
|
+ ref="editor"
|
|
|
+ :html="info.description"
|
|
|
+ :placeholder="$i18n.t(`edit_settings.intro_placeholder`)"
|
|
|
+ :maxlength="500"
|
|
|
+ @change="onEditorChange"
|
|
|
+ ></editor>
|
|
|
|
|
|
- <span class="count">{{jianjieLength}}/500</span>
|
|
|
+ <span class="count">{{ jianjieLength }}/500</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<menu>
|
|
|
<li
|
|
|
- v-for="(item) in tabs"
|
|
|
+ v-for="item in tabs"
|
|
|
:key="item"
|
|
|
- :class="{active: activeTab === item}"
|
|
|
+ :class="{ active: activeTab === item }"
|
|
|
@click="activeTab = item"
|
|
|
>
|
|
|
- {{$i18n.t(`zh_key.${item}`)}}
|
|
|
+ {{ $i18n.t(`zh_key.${item}`) }}
|
|
|
</li>
|
|
|
</menu>
|
|
|
<div class="settings-view-wrapper">
|
|
|
- <OpeningTipSettings v-show="activeTab === '开场提示'"></OpeningTipSettings>
|
|
|
- <OpeningAnimationSettings v-show="activeTab === '开场动画'"></OpeningAnimationSettings>
|
|
|
+ <OpeningTipSettings
|
|
|
+ v-show="activeTab === '开场提示'"
|
|
|
+ ></OpeningTipSettings>
|
|
|
+ <OpeningAnimationSettings
|
|
|
+ v-show="activeTab === '开场动画'"
|
|
|
+ ></OpeningAnimationSettings>
|
|
|
<PasswordSettings v-show="activeTab === '访问密码'"></PasswordSettings>
|
|
|
- <AutoCruiseSettings v-show="activeTab === '自动巡游'"></AutoCruiseSettings>
|
|
|
- <BackgroundMusicSettings v-show="activeTab === '背景音乐'"></BackgroundMusicSettings>
|
|
|
- <CustomLogoSettings v-show="activeTab === '自定义LOGO'"></CustomLogoSettings>
|
|
|
- <CustomMaskSettings v-show="activeTab === '自定义遮罩'"></CustomMaskSettings>
|
|
|
- <CustomButtonSettings v-show="activeTab === '自定义按钮'"></CustomButtonSettings>
|
|
|
+ <AutoCruiseSettings
|
|
|
+ v-show="activeTab === '自动巡游'"
|
|
|
+ ></AutoCruiseSettings>
|
|
|
+ <BackgroundMusicSettings
|
|
|
+ v-show="activeTab === '背景音乐'"
|
|
|
+ ></BackgroundMusicSettings>
|
|
|
+ <CustomLogoSettings
|
|
|
+ v-show="activeTab === '自定义LOGO'"
|
|
|
+ ></CustomLogoSettings>
|
|
|
+ <CustomMaskSettings
|
|
|
+ v-show="activeTab === '自定义遮罩'"
|
|
|
+ ></CustomMaskSettings>
|
|
|
+ <CustomButtonSettings
|
|
|
+ v-show="activeTab === '自定义按钮'"
|
|
|
+ ></CustomButtonSettings>
|
|
|
<CoverBase v-show="activeTab === '开场封面'"></CoverBase>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -79,15 +117,15 @@
|
|
|
<script>
|
|
|
import { mapGetters } from "vuex";
|
|
|
import MaterialSelector from "@/components/materialSelector.vue";
|
|
|
-import OpeningTipSettings from '@/views/base/openingTipSettings.vue'
|
|
|
-import OpeningAnimationSettings from '@/views/base/openingAnimationSettings.vue'
|
|
|
+import OpeningTipSettings from "@/views/base/openingTipSettings.vue";
|
|
|
+import OpeningAnimationSettings from "@/views/base/openingAnimationSettings.vue";
|
|
|
import PasswordSettings from "@/views/base/passwordSettings.vue";
|
|
|
-import AutoCruiseSettings from '@/views/base/autoCruiseSettings.vue'
|
|
|
+import AutoCruiseSettings from "@/views/base/autoCruiseSettings.vue";
|
|
|
import BackgroundMusicSettings from "@/views/base/backgroundMusicSettings.vue";
|
|
|
import CustomLogoSettings from "@/views/base/customLogoSettings.vue";
|
|
|
import CustomMaskSettings from "@/views/base/customMaskSettings.vue";
|
|
|
import CustomButtonSettings from "@/views/base/customButtonSettings.vue";
|
|
|
-import Editor from "@/components/shared/Editor"
|
|
|
+import Editor from "@/components/shared/Editor";
|
|
|
import CoverBase from "@/views/base/coverBase.vue";
|
|
|
|
|
|
export default {
|
|
@@ -102,70 +140,71 @@ export default {
|
|
|
CustomLogoSettings,
|
|
|
CustomMaskSettings,
|
|
|
CustomButtonSettings,
|
|
|
- CoverBase
|
|
|
+ CoverBase,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
isShowSettingCoverWindow: false,
|
|
|
tabs: [
|
|
|
- '开场提示',
|
|
|
- '开场动画',
|
|
|
- '访问密码',
|
|
|
- '自动巡游',
|
|
|
- '背景音乐',
|
|
|
- '自定义LOGO',
|
|
|
- '自定义遮罩',
|
|
|
- '自定义按钮',
|
|
|
- '开场封面'
|
|
|
+ "开场提示",
|
|
|
+ "开场动画",
|
|
|
+ "访问密码",
|
|
|
+ "自动巡游",
|
|
|
+ "背景音乐",
|
|
|
+ "自定义LOGO",
|
|
|
+ "自定义遮罩",
|
|
|
+ "自定义按钮",
|
|
|
+ "开场封面",
|
|
|
],
|
|
|
- activeTab: '开场提示',
|
|
|
- jianjieLength:0
|
|
|
- }
|
|
|
+ activeTab: "开场提示",
|
|
|
+ jianjieLength: 0,
|
|
|
+ };
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters({
|
|
|
- info: 'info'
|
|
|
+ info: "info",
|
|
|
}),
|
|
|
titleLength() {
|
|
|
- return this.info.name.length || '0'
|
|
|
- }
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- },
|
|
|
- watch: {
|
|
|
+ return this.info.name.length || "0";
|
|
|
+ },
|
|
|
},
|
|
|
+ mounted() {},
|
|
|
+ watch: {},
|
|
|
methods: {
|
|
|
emojistr() {
|
|
|
- this.info.name = this.info.name.replace(/(\ud83c[\udf00-\udfff])|(\ud83d[\udc00-\ude4f])|(\ud83d[\ude80-\udeff])/g, function (char) {
|
|
|
- if (char.length === 2) {
|
|
|
- return ""
|
|
|
- } else {
|
|
|
- return char;
|
|
|
+ this.info.name = this.info.name.replace(
|
|
|
+ /(\ud83c[\udf00-\udfff])|(\ud83d[\udc00-\ude4f])|(\ud83d[\ude80-\udeff])/g,
|
|
|
+ function (char) {
|
|
|
+ if (char.length === 2) {
|
|
|
+ return "";
|
|
|
+ } else {
|
|
|
+ return char;
|
|
|
+ }
|
|
|
}
|
|
|
- });
|
|
|
+ );
|
|
|
},
|
|
|
- onEditorChange(content){
|
|
|
- this.info.description = content.html
|
|
|
- this.jianjieLength = content.size
|
|
|
+ onEditorChange(content) {
|
|
|
+ this.info.description = content.html;
|
|
|
+ this.jianjieLength = content.size;
|
|
|
},
|
|
|
onClickSettingCover() {
|
|
|
- this.isShowSettingCoverWindow = true
|
|
|
+ this.isShowSettingCoverWindow = true;
|
|
|
},
|
|
|
onCoverSelected(selected) {
|
|
|
- if (selected[0].materialType === 'image') {
|
|
|
- this.info.icon = selected[0].icon
|
|
|
- } else if (selected[0].materialType === 'pano') {
|
|
|
- this.info.icon = selected[0].icon
|
|
|
- } else if (selected[0].materialType === '3D') {
|
|
|
- this.info.icon = selected[0].thumb
|
|
|
+ if (selected[0].materialType === "image") {
|
|
|
+ this.info.icon = selected[0].icon;
|
|
|
+ } else if (selected[0].materialType === "pano") {
|
|
|
+ this.info.icon = selected[0].icon;
|
|
|
+ } else if (selected[0].materialType === "3D") {
|
|
|
+ this.info.icon = selected[0].thumb;
|
|
|
}
|
|
|
- this.isShowSettingCoverWindow = false
|
|
|
+ this.isShowSettingCoverWindow = false;
|
|
|
},
|
|
|
onTitleInputEnter(e) {
|
|
|
- e.target.blur()
|
|
|
+ e.target.blur();
|
|
|
},
|
|
|
},
|
|
|
-}
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
@@ -194,8 +233,9 @@ export default {
|
|
|
bottom: 16px;
|
|
|
}
|
|
|
}
|
|
|
- .ui-remark{
|
|
|
+ .ui-remark {
|
|
|
margin-top: 16px;
|
|
|
+ line-height:16px;
|
|
|
}
|
|
|
}
|
|
|
.uc-r {
|
|
@@ -210,7 +250,7 @@ export default {
|
|
|
height: 36px;
|
|
|
width: 100%;
|
|
|
&:focus-within {
|
|
|
- border-color: #0076F6;
|
|
|
+ border-color: #0076f6;
|
|
|
}
|
|
|
> input {
|
|
|
border: none;
|
|
@@ -243,7 +283,7 @@ export default {
|
|
|
height: 123px;
|
|
|
width: 100%;
|
|
|
&:focus-within {
|
|
|
- border-color: #0076F6;
|
|
|
+ border-color: #0076f6;
|
|
|
}
|
|
|
> textarea {
|
|
|
padding: 9px 16px 30px 16px;
|
|
@@ -279,6 +319,7 @@ menu {
|
|
|
li {
|
|
|
display: block;
|
|
|
height: 47px;
|
|
|
+ line-height: 47px;
|
|
|
padding-left: 16px;
|
|
|
cursor: pointer;
|
|
|
&::after {
|
|
@@ -290,17 +331,25 @@ menu {
|
|
|
&.active {
|
|
|
font-size: 16px;
|
|
|
font-weight: bold;
|
|
|
- color: #FFFFFF;
|
|
|
+ color: #ffffff;
|
|
|
background: #252526;
|
|
|
+ position: relative;
|
|
|
+ padding-left: 22px;
|
|
|
+
|
|
|
&::before {
|
|
|
content: "";
|
|
|
display: inline-block;
|
|
|
+ position: absolute;
|
|
|
width: 2px;
|
|
|
height: 10px;
|
|
|
border-radius: 1px;
|
|
|
- background: #0076F6;
|
|
|
- margin-right: 4px;
|
|
|
- vertical-align: middle;
|
|
|
+ background: #0076f6;
|
|
|
+ // margin-right: 4px;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ top: 50%;
|
|
|
+ left: 16px;
|
|
|
+ bottom: initial;
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -310,6 +359,5 @@ menu {
|
|
|
vertical-align: top;
|
|
|
display: inline-block;
|
|
|
width: 762px;
|
|
|
-
|
|
|
}
|
|
|
</style>
|