|
@@ -0,0 +1,124 @@
|
|
|
+<template>
|
|
|
+ <div class="article-hotspot-setting">
|
|
|
+ <button class="add-btn" v-if="!hotspot.articleInfo.name" @click="onClickAdd">
|
|
|
+ <i class="iconfont icon-editor_add"></i>
|
|
|
+ {{$i18n.t('hotspot.add_article')}}
|
|
|
+ </button>
|
|
|
+ <template v-else>
|
|
|
+ <div class="article-display">
|
|
|
+ <div class="name" v-title="hotspot.articleInfo.name">{{hotspot.articleInfo.name}}</div>
|
|
|
+ <i class="iconfont icon-editor_list_delete" @click.stop="del"></i>
|
|
|
+ </div>
|
|
|
+ <button class="change-btn" @click="onClickEdit">
|
|
|
+ <!-- <i class="iconfont icon-editor_update"></i> -->
|
|
|
+ <img class="icon-editor_update" src="@/assets/images/icons/edit.png" alt="" draggable="false">
|
|
|
+ {{$i18n.t('hotspot.edit_article')}}
|
|
|
+ </button>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+
|
|
|
+export default {
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({
|
|
|
+ hotspot: 'hotspot',
|
|
|
+ }),
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ onClickAdd() {
|
|
|
+ this.hotspot.articleInfo.name = 'afdsdf'
|
|
|
+ },
|
|
|
+ onClickEdit() {
|
|
|
+ },
|
|
|
+ del() {
|
|
|
+ this.hotspot.articleInfo = {
|
|
|
+ name: '',
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.article-hotspot-setting {
|
|
|
+ > .add-btn {
|
|
|
+ margin-top: 16px;
|
|
|
+ width: 100%;
|
|
|
+ height: 40px;
|
|
|
+ background: #1A1B1D;
|
|
|
+ border-radius: 2px;
|
|
|
+ border: 1px solid #404040;
|
|
|
+ display: block;
|
|
|
+ color: #0076F6;
|
|
|
+ font-size: 14px;
|
|
|
+ cursor: pointer;
|
|
|
+ &:hover {
|
|
|
+ border-color: @color;
|
|
|
+ }
|
|
|
+ i {
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ > .article-display {
|
|
|
+ margin-top: 16px;
|
|
|
+ width: 100%;
|
|
|
+ height: 40px;
|
|
|
+ background: #1A1B1D;
|
|
|
+ border-radius: 2px;
|
|
|
+ border: 1px solid #404040;
|
|
|
+ color: #fff;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 14px;
|
|
|
+ position: relative;
|
|
|
+ > .name {
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ top: 50%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ width: 65%;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
+ > i {
|
|
|
+ display: none;
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ right: 18px;
|
|
|
+ cursor: pointer;
|
|
|
+ &:hover {
|
|
|
+ color: #FA5555;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &:hover {
|
|
|
+ > i {
|
|
|
+ display: initial;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ > .change-btn {
|
|
|
+ margin-top: 16px;
|
|
|
+ width: 100%;
|
|
|
+ height: 40px;
|
|
|
+ background: #1A1B1D;
|
|
|
+ border-radius: 2px;
|
|
|
+ border: 1px solid #404040;
|
|
|
+ display: block;
|
|
|
+ color: #0076F6;
|
|
|
+ font-size: 14px;
|
|
|
+ cursor: pointer;
|
|
|
+ &:hover {
|
|
|
+ border-color: @color;
|
|
|
+ }
|
|
|
+ img {
|
|
|
+ width: 14px;
|
|
|
+ height: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|