Данные не отражаются в подсказке - PullRequest
0 голосов
/ 06 мая 2020

не отражается на protip

Я использую vue и vue i18n, проблема в том, что когда я меняю установленный язык, данные при проверке меняются, но не отразить на протипе

<template>
    <div class="app-content__slide">
        <div class="app-content__slide-inner-wrapper app-content__slide-inner-wrapper-checked"
             @click="redirectToView"></div>
        <em class="protip"
            v-bind:data-pt-title="sTooltip"
            data-pt-position="bottom" data-pt-gravity="1">
            <span class="app-content__slide-name secondary-font-color"
                  @click="redirectToView">{{ oSlide.slide_title }}</span>
        </em>
        <div class="app-content__slide-toggle-wrapper">
            <label>
                <input type="checkbox" name="" value="" class="hidden" checked/>
                <div class="app-content__slide-toggle-btn-wrapper"></div>
                <div class="app-content__slide-toggle-btn"></div>
            </label>
        </div>
    </div>
</template>

computed: {
            /**
             * Returns tooltip data of slide item
             */
            sTooltip: function () {
                let sDetailText   = this.$i18n.t('["HOME.MAIN.PAGE.TOOLTIP"]["DETAILS"][0]');
                let sNameText     = this.$i18n.t('["HOME.MAIN.PAGE.TOOLTIP"]["NAME"][0]');
                let sCreatedText  = this.$i18n.t('["HOME.MAIN.PAGE.TOOLTIP"]["CREATED"][0]');
                let sFeaturedText = this.$i18n.t('["HOME.MAIN.PAGE.TOOLTIP"]["FEATURED"][0]');
                return "<span style='font-weight:bold;font-size:12px;color:#979797'>" + sDetailText + "</span><br><br>\n" +
                    "            <span style='font-weight:normal;font-size:12px;color:#979797;display:inline-block;word-wrap:break-all;word-break:break-all'>" + sNameText + ":&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + this.oSlide.slide_title + "</span><br>\n" +
                    "            <span style='font-weight:normal;font-size:12px;color:#979797'>" + sCreatedText + ":&nbsp;&nbsp;&nbsp;" + this.formatDate(this.oSlide.created_at) + "</span><br>\n" +
                    "            <span style='font-weight:normal;font-size:12px;color:#979797'>" + sFeaturedText + ":&nbsp;(" + this.oSlide.get_all_products.length + ") Products</span>"
            }
        },
...