pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    • <bdo id='ZvmFJ'></bdo><ul id='ZvmFJ'></ul>
  • <small id='ZvmFJ'></small><noframes id='ZvmFJ'>

        <tfoot id='ZvmFJ'></tfoot>

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

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

        將我的自定義圖標添加到 ionic 2 actionSheet 的按鈕

        add my custom icons to ionic 2 actionSheet#39;s buttons(將我的自定義圖標添加到 ionic 2 actionSheet 的按鈕)
      3. <tfoot id='4rZjR'></tfoot>
        • <bdo id='4rZjR'></bdo><ul id='4rZjR'></ul>

              <i id='4rZjR'><tr id='4rZjR'><dt id='4rZjR'><q id='4rZjR'><span id='4rZjR'><b id='4rZjR'><form id='4rZjR'><ins id='4rZjR'></ins><ul id='4rZjR'></ul><sub id='4rZjR'></sub></form><legend id='4rZjR'></legend><bdo id='4rZjR'><pre id='4rZjR'><center id='4rZjR'></center></pre></bdo></b><th id='4rZjR'></th></span></q></dt></tr></i><div class="my2qu2o" id='4rZjR'><tfoot id='4rZjR'></tfoot><dl id='4rZjR'><fieldset id='4rZjR'></fieldset></dl></div>

                • <legend id='4rZjR'><style id='4rZjR'><dir id='4rZjR'><q id='4rZjR'></q></dir></style></legend>
                    <tbody id='4rZjR'></tbody>

                  <small id='4rZjR'></small><noframes id='4rZjR'>

                • 本文介紹了將我的自定義圖標添加到 ionic 2 actionSheet 的按鈕的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我找不到將自定義圖標添加到 ionic 2/3 actionSheet 的方法.

                  I couldn't find a way to add my custom icon to ionic 2/3 actionSheet.

                  presentActionSheet() {
                     let actionSheet = this.actionSheetCtrl.create({
                       title: 'Mode',     
                       buttons: [
                         {
                           text: 'Add to Y' ,
                           role: 'destructive',
                           icon:"my_icon",
                           cssClass:"yoy",
                           handler: () => {
                             console.log('Destructive clicked');
                           }
                         },   
                         {
                           text: 'Cancel',
                           role: 'cancel',
                           handler: () => {
                             console.log('Cancel clicked');
                           }
                         }
                       ],
                  
                     });
                  
                     actionSheet.present();
                   }
                  

                  如何將我自己的自定義圖標添加到操作表按鈕?

                  How can I add my own custom icons to the actionsheet buttons?

                  推薦答案

                  ionic doc 似乎沒有提出任何本地方法來做到這一點.但是,有一種方法可以使用自定義類來實現(xiàn).

                  The ionic doc doesn't seem to propose any native way to do this. However, there is a way to achieve it using a custom class.

                     let actionSheet = this.actionSheetCtrl.create({
                       title: 'Mode',     
                       buttons: [
                         {
                           text: 'Add to Y',
                           // vvvvv set a custom class that will be used to display the icon
                           cssClass: "class_used_to_set_icon",
                           handler: () => {
                             console.log('Add to Y clicked');
                           }
                         }
                       ],
                  
                     });
                  
                     actionSheet.present();
                  

                  然后在您的 src/app/app.scss 中定義以下類:

                  Then in your src/app/app.scss define the following class:

                  .class_used_to_set_icon {
                    // I'd suggest to have the icon in src/assets (eg ../assets/icon/favicon.ico)
                    background-image: url("path/to/your/icon") !important;
                    // to properly position the icon:
                    background-repeat: no-repeat !important;
                    background-position: 10px 10px !important;
                    // to indent the text to the right of the icon:
                    padding-left: 70px !important;
                  }
                  


                  編輯
                  另一種使用來自 icomoon 等字體的自定義圖標的方法:


                  EDIT
                  Another way using custom icons from a font like icomoon:

                     let actionSheet = this.actionSheetCtrl.create({
                       title: 'Mode',     
                       buttons: [
                         {
                           text: 'Add to Y',
                           // vvvvv set the custom icon class and a custom class to then improve display
                           cssClass: "icon-drink actionSheet_withIcomoon",
                           handler: () => {
                             console.log('Add to Y clicked');
                           }
                         }
                       ],
                  
                     });
                  
                     actionSheet.present();
                  

                  然后在您的 src/app/app.scss 中定義以下類:

                  Then in your src/app/app.scss define the following class:

                  // display the icon at the right size
                  .actionSheet_withIcomoon { font-size: 2.4rem !important; }
                  // correct the font dimensions and positioning of the text
                  .actionSheet_withIcomoon .button-inner {
                    font-family: "Roboto", "Helvetica Neue", sans-serif;
                    font-weight: bold;
                    padding-left: 52px;
                    margin-top: -20px;
                    font-size: 1.6rem !important;
                  }
                  

                  這篇關(guān)于將我的自定義圖標添加到 ionic 2 actionSheet 的按鈕的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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)

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

                    <tbody id='MiEli'></tbody>
                  <legend id='MiEli'><style id='MiEli'><dir id='MiEli'><q id='MiEli'></q></dir></style></legend>

                        <i id='MiEli'><tr id='MiEli'><dt id='MiEli'><q id='MiEli'><span id='MiEli'><b id='MiEli'><form id='MiEli'><ins id='MiEli'></ins><ul id='MiEli'></ul><sub id='MiEli'></sub></form><legend id='MiEli'></legend><bdo id='MiEli'><pre id='MiEli'><center id='MiEli'></center></pre></bdo></b><th id='MiEli'></th></span></q></dt></tr></i><div class="0s2kgg2" id='MiEli'><tfoot id='MiEli'></tfoot><dl id='MiEli'><fieldset id='MiEli'></fieldset></dl></div>
                          • <bdo id='MiEli'></bdo><ul id='MiEli'></ul>
                            <tfoot id='MiEli'></tfoot>
                          • 主站蜘蛛池模板: RV减速机-蜗轮蜗杆减速机-洗车机减速机-减速机厂家-艾思捷 | 华溶溶出仪-Memmert稳定箱-上海协烁仪器科技有限公司 | 岸电电源-60HZ变频电源-大功率变频电源-济南诚雅电子科技有限公司 | 手术室净化厂家_成都实验室装修公司_无尘车间施工单位_洁净室工程建设团队-四川华锐16年行业经验 | 沈阳庭院景观设计_私家花园_别墅庭院设计_阳台楼顶花园设计施工公司-【沈阳现代时园艺景观工程有限公司】 | 空心明胶胶囊|植物胶囊|清真胶囊|浙江绿键胶囊有限公司欢迎您! | 课件导航网_ppt课件_课件模板_课件下载_最新课件资源分享发布平台 | 新疆散热器,新疆暖气片,新疆电锅炉,光耀暖通公司 | Magnescale探规,Magnescale磁栅尺,Magnescale传感器,Magnescale测厚仪,Mitutoyo光栅尺,笔式位移传感器-苏州连达精密量仪有限公司 | 制丸机,小型中药制丸机,全自动制丸机价格-甘肃恒跃制药设备有限公司 | 精密模具加工制造 - 富东懿| RO反渗透设备_厂家_价格_河南郑州江宇环保科技有限公司 | 江苏密集柜_电动_手动_移动_盛隆柜业江苏档案密集柜厂家 | 神超官网_焊接圆锯片_高速钢锯片_硬质合金锯片_浙江神超锯业制造有限公司 | 亮化工程,亮化设计,城市亮化工程,亮化资质合作,长沙亮化照明,杰奥思【官网】 | 汽车整车综合环境舱_军标砂尘_盐雾试验室试验箱-无锡苏南试验设备有限公司 | 自进式锚杆-自钻式中空注浆锚杆-洛阳恒诺锚固锚杆生产厂家 | 钢制拖链生产厂家-全封闭钢制拖链-能源钢铝拖链-工程塑料拖链-河北汉洋机械制造有限公司 | 武汉画册印刷厂家-企业画册印刷-画册设计印刷制作-宣传画册印刷公司 - 武汉泽雅印刷厂 | 船老大板材_浙江船老大全屋定制_船老大官网 | 澳威全屋定制官网|极简衣柜十大品牌|衣柜加盟代理|全屋定制招商 百度爱采购运营研究社社群-店铺托管-爱采购代运营-良言多米网络公司 | 膜结构_ETFE膜结构_膜结构厂家_膜结构设计-深圳市烨兴智能空间技术有限公司 | 翻斗式矿车|固定式矿车|曲轨侧卸式矿车|梭式矿车|矿车配件-山东卓力矿车生产厂家 | 深圳律师咨询_深圳律师事务所_华荣【免费在线法律咨询】网 | 混合反应量热仪-高温高压量热仪-微机差热分析仪DTA|凯璞百科 | 地埋式垃圾站厂家【佳星环保】小区压缩垃圾中转站转运站 | 缠绕机|缠绕膜包装机|缠绕包装机-上海晏陵智能设备有限公司 | 电缆接头_防水接头_电缆防水接头 - 乐清市新豪电气有限公司 | 深圳希玛林顺潮眼科医院(官网)│深圳眼科医院│医保定点│香港希玛林顺潮眼科中心连锁品牌 | 烟气在线监测系统_烟气在线监测仪_扬尘检测仪_空气质量监测站「山东风途物联网」 | 壹作文_中小学生优秀满分作文大全 | 数字展示在线_数字展示行业门户网站 | 压缩空气检测_气体_水质找上海京工-服务专业、价格合理 | 湖南印刷厂|长沙印刷公司|画册印刷|挂历印刷|台历印刷|杂志印刷-乐成印刷 | 在线PH计-氧化锆分析仪-在线浊度仪-在线溶氧仪- 无锡朝达 | 江苏远邦专注皮带秤,高精度皮带秤,电子皮带秤研发生产 | 伸缩节_伸缩器_传力接头_伸缩接头_巩义市联通管道厂 | 【化妆品备案】进口化妆品备案流程-深圳美尚美化妆品有限公司 | 急救箱-应急箱-急救包厂家-北京红立方医疗设备有限公司 | 代办建筑资质升级-建筑资质延期就找上海国信启航 | 丝杆升降机-不锈钢丝杆升降机-非标定制丝杆升降机厂家-山东鑫光减速机有限公司 |