首页 > 解决方案 > 在 Laravel 的弹出窗口中没有出现内嵌按钮

问题描述

我在引导模式中实现内联 sharethis 按钮。

ShareThis 按钮在呈现的页面上工作正常。

但是,它们没有出现在模态上。

当我检查模态代码或更改检查窗口的高度时,ShareThis 按钮出现在模态上。

我认为这是因为检查窗口改变了页面的布局。

标头中包含的 JS 链接

<script type="text/javascript" src="//platform-api.sharethis.com/js/sharethis.js#product=custom-share-buttons"></script>

这是模态的代码:

<div class="modal fade" id="inviteFriendsModal" tabindex="-1" role="dialog" aria-labelledby="inviteFriends" style="display: none;">
  <div class="modal-dialog " id="primary-header-modal" role="document" style="margin: 8% auto; width: 670px;">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close alert-close-icon" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">Invite Friends, get {{INVITE_EARNED_REWARD}} points</h4>
      </div>
      <div class="modal-body bg-grayf2f2f2">
        <div class="row margin0 text-center">
          <img src="{{ asset('images/inviteFriends.png') }}" height="100px" class="margin-bottom20">
          <p class="font18">SHARE YOUR CODE</p>
          <p><span class="font18 font-wt400" style="color: #1fbad6;">{{Session::get('invitationCode')}}</span></p>
          <p class="padd-bottom15">Your friends get {{INVITE_EARNED_REWARD}} points when they join and you get {{INVITE_EARNED_REWARD}} too, after their first interaction.</p>
          <div class="text-center">
            <div class="sharethis-inline-share-buttons" data-description='{{ $stSummary }}' data-url='{{ $stUrl }}' data-message="{{trans('interviewerMessages.inviteFriendsStSummary')}}" data-short-url="{{ $stUrl }}"  data-title="{{ trans('messages.ogTitle') }}"></div>
          </div>
        </div>
      </div>
    </div>
  </div>

此外,我创建了一个测试 url 以进行更多说明: URL

请帮助我解决这个问题,sharethis 按钮应该事先出现在模态中。

标签: phplaravelbootstrap-modalsharethis

解决方案


推荐阅读