久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  1. <legend id='CARC4'><style id='CARC4'><dir id='CARC4'><q id='CARC4'></q></dir></style></legend>

        <bdo id='CARC4'></bdo><ul id='CARC4'></ul>
      <tfoot id='CARC4'></tfoot>
      <i id='CARC4'><tr id='CARC4'><dt id='CARC4'><q id='CARC4'><span id='CARC4'><b id='CARC4'><form id='CARC4'><ins id='CARC4'></ins><ul id='CARC4'></ul><sub id='CARC4'></sub></form><legend id='CARC4'></legend><bdo id='CARC4'><pre id='CARC4'><center id='CARC4'></center></pre></bdo></b><th id='CARC4'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='CARC4'><tfoot id='CARC4'></tfoot><dl id='CARC4'><fieldset id='CARC4'></fieldset></dl></div>
    1. <small id='CARC4'></small><noframes id='CARC4'>

      如何在 Ionic 2 中定位彈出框

      How to position a popover in Ionic 2(如何在 Ionic 2 中定位彈出框)

        1. <tfoot id='uEQub'></tfoot>
            <tbody id='uEQub'></tbody>

          <small id='uEQub'></small><noframes id='uEQub'>

          • <legend id='uEQub'><style id='uEQub'><dir id='uEQub'><q id='uEQub'></q></dir></style></legend>
              <bdo id='uEQub'></bdo><ul id='uEQub'></ul>
                <i id='uEQub'><tr id='uEQub'><dt id='uEQub'><q id='uEQub'><span id='uEQub'><b id='uEQub'><form id='uEQub'><ins id='uEQub'></ins><ul id='uEQub'></ul><sub id='uEQub'></sub></form><legend id='uEQub'></legend><bdo id='uEQub'><pre id='uEQub'><center id='uEQub'></center></pre></bdo></b><th id='uEQub'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='uEQub'><tfoot id='uEQub'></tfoot><dl id='uEQub'><fieldset id='uEQub'></fieldset></dl></div>
                本文介紹了如何在 Ionic 2 中定位彈出框的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                如何在 Ionic 2 中手動定位彈出框?

                How do I manually position a popover in Ionic 2?

                我無法在 css 類中設(shè)置位置,因為彈出框控制器使用內(nèi)聯(lián)樣式設(shè)置位置.

                I can't set the position in a css class, since the popover controller sets the position with an inline style.

                推薦答案

                查看代碼,彈出框的位置似乎沒有選項.但是,當(dāng)由于用戶點擊某物而打開彈出框時,它可以通過點擊事件定位.我們也可以將這些知識用于手動定位:

                Looking through the code, there doesn't seem to be an option for the popover's position. However, when opening the popover as a result of the user tapping something, it can be positioned by the click event. We can use that knowledge for manual positioning as well:

                let pop = this.popoverCtrl.create(MyPopover);
                
                let ev = {
                  target : {
                    getBoundingClientRect : () => {
                      return {
                        top: 100
                      };
                    }
                  }
                };
                
                pop.present({ev});
                

                需要注意的幾點:

                • 您可以設(shè)置 topleft 或兩者的值.
                • 值必須以像素為單位,如數(shù)字.
                • 如果 topleft 沒有給出,那么通常的定位算法將用于該值.
                • You can set the value for top, left, or both.
                • The values must be given in pixels, as numbers.
                • If top or left is not given, then the usual positioning algorithm is used for that value.

                我很高興知道是否有更好的方法,但到目前為止這是我能想到的最好方法.

                I'd be happy to know if there's a better way, but so far this is the best I could come up with.

                這當(dāng)然適用于 Ionic2 和 3,很高興有人確認(rèn)它是否也適用于 Ionic4!

                This certainly works in Ionic2 and 3, happy to have someone confirm if it works in Ionic4 as well!

                這篇關(guān)于如何在 Ionic 2 中定位彈出框的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                Use IScroll in Angular 2 / Typescript(在 Angular 2/Typescript 中使用 IScroll)
                anime.js not working in Ionic 3 project(Anime.js 在 Ionic 3 項目中不起作用)
                Ionic 3 - Update Observable with Asynchronous Data(Ionic 3 - 使用異步數(shù)據(jù)更新 Observable)
                Angular 2: file not found on local .json file(Angular 2:在本地 .json 文件中找不到文件)
                In Ionic 2, how do I create a custom directive that uses Ionic components?(在 Ionic 2 中,如何創(chuàng)建使用 Ionic 組件的自定義指令?)
                Use ViewChild for dynamic elements - Angular 2 amp; ionic 2(將 ViewChild 用于動態(tài)元素 - Angular 2 amp;離子2)
                  <tbody id='h2kdY'></tbody>

                  <small id='h2kdY'></small><noframes id='h2kdY'>

                    <legend id='h2kdY'><style id='h2kdY'><dir id='h2kdY'><q id='h2kdY'></q></dir></style></legend>

                        <bdo id='h2kdY'></bdo><ul id='h2kdY'></ul>
                        1. <tfoot id='h2kdY'></tfoot>
                          <i id='h2kdY'><tr id='h2kdY'><dt id='h2kdY'><q id='h2kdY'><span id='h2kdY'><b id='h2kdY'><form id='h2kdY'><ins id='h2kdY'></ins><ul id='h2kdY'></ul><sub id='h2kdY'></sub></form><legend id='h2kdY'></legend><bdo id='h2kdY'><pre id='h2kdY'><center id='h2kdY'></center></pre></bdo></b><th id='h2kdY'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='h2kdY'><tfoot id='h2kdY'></tfoot><dl id='h2kdY'><fieldset id='h2kdY'></fieldset></dl></div>

                        2. 主站蜘蛛池模板: 亚洲精品99久久久久久 | 色婷婷av一区二区三区软件 | 中文字幕一区在线观看视频 | 成人亚洲一区 | 国产一区二区在线免费视频 | 欧美黄色网 | 国产一级片在线观看视频 | 久久久久国产一区二区三区 | 中日韩毛片 | 欧美日本韩国一区二区 | 一级毛片免费完整视频 | 亚洲国产精品久久久久 | 99精品网| 国产精品久久久久久久久久久久久久 | 希岛爱理在线 | 成人在线观看网址 | 91久久国产 | 91成人午夜性a一级毛片 | 日韩精品免费在线观看 | 国产美女在线观看 | 日韩视频在线播放 | www.色.com | 免费大黄视频 | 日日操夜夜摸 | 亚洲福利精品 | 欧美一级视频在线观看 | 丁香婷婷成人 | 在线亚洲精品 | 久久99精品国产 | 网色| 日韩综合在线 | 亚洲香蕉在线视频 | 成人在线播放网址 | 亚洲精品福利视频 | 亚洲一区中文字幕 | 日韩资源 | 一区二区三区四区在线播放 | 黄色网址在线免费播放 | 日韩欧美二区 | 一级电影免费看 | 国产精品成人一区二区三区夜夜夜 |