Bootstrap4:使用工具提示按钮,我看到2条消息

时间:2019-08-02 11:16:24

标签: vuejs2 bootstrap-4 tooltip

Bootstrap 4.3 / vuejs 2.6应用程序我为按钮使用了工具提示,此工具提示的内容取决于某些变量,例如:

<button class="btn btn-primary btn-save save-btn-filters" @click.prevent="showUserListDialog()"  data-toggle="tooltip" 
    data-placement="bottom" :title="saveBtnTooltip">
        Save
</button>

...
    computed: {

        saveBtnTooltip() {
            if ( this.searchResults.length == 0 ) {
                return 'No data retrieved. Nothing to save !';
            }

            if ( this.checked_search_results_count == 0 ) {
                return 'No results rows are selected. All results rows would be saved !';
            }

            if ( this.checked_search_results_count > 0 ) {
                return this.checked_search_results_count + ' results rows are selected and can be saved !';
            }
        },

它可以正常工作,希望在其他消息后再按1条消息。例如:起初根本没有行,并且消息“没有检索到数据。没什么可保存的! 是可见的。数据检索将鼠标悬停在此按钮上之后,我看到2个收费提示:

enter image description here

是否可以清除以前的工具提示文字?

0 个答案:

没有答案
相关问题