国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > JS > 正文

使用ionic(選項卡欄tab) icon(圖標) ionic上拉菜單(ActionSheet) 實現(xiàn)通訊錄界面切換實例代碼

2024-05-06 16:40:27
字體:
來源:轉載
供稿:網友

廢話不多說了,直接給大家貼代碼了,具體代碼如下所示:

<!DOCTYPE html><html lang="en"><head>  <meta charset="UTF-8">  <title>用ionic(選項卡欄tab) icon(圖標) ionic上拉菜單(ActionSheet) 實現(xiàn)通訊錄界面切換操作</title>  <link rel="stylesheet" href="../ionic/css/ionic.css" rel="external nofollow" >  <script src="../ionic/js/ionic.bundle.min.js"></script>  <script type="text/javascript">  angular.module('myApp', ['ionic'])    .controller('RootCtrl', function($scope) {      $scope.onControllerChanged = function(oldController, oldIndex, newController, newIndex) {        console.log('Controller changed', oldController, oldIndex, newController, newIndex);        console.log(arguments);      };    })    .controller('HomeCtrl', function($scope, $timeout, $ionicModal, $ionicActionSheet) {      $scope.items = [];      $ionicModal.fromTemplateUrl('newTask.html', function(modal) {        $scope.settingsModal = modal;      });      //ionic 上拉菜單(ActionSheet)      var removeItem = function(item, button) {        $ionicActionSheet.show({          buttons: [],          destructiveText: 'Delete Task',          cancelText: 'Cancel',          cancel: function() {            return true;          },          destructiveButtonClicked: function() {            $scope.items.splice($scope.items.indexOf(item), 1);            return true;          }        });      };      var completeItem = function(item, button) {        item.isCompleted = true;      };      $scope.onReorder = function(el, start, end) {        ionic.Utils.arrayMove($scope.items, start, end);      };      $scope.onRefresh = function() {        console.log('ON REFRESH');        $timeout(function() {          $scope.$broadcast('scroll.refreshComplete');        }, 1000);      }      $scope.removeItem = function(item) {        removeItem(item);      };      $scope.newTask = function() {        $scope.settingsModal.show();      };      // Create the items      $scope.user = [        {          name:"Ben Sparrow",          words:"You on your way?"        },        {          name:"Max Lynx",          words:"Hey,it's me."        },        {          name:"Adam Bradleyson",          words:"I should buy a boat."        },        {          name:"Perry Governor",          words:"Look at my mukluks!"        },        {          name:"Mike Harrinqton",          words:"This is wicked good ice cream."        },      ];    })</script></head><body ng-app="myApp" ng-controller="RootCtrl"><ion-tabs class="tabs-icon-only tabs-positive">  <ion-tab       icon-on="ion-ios-filing"       icon-off="ion-ios-filing-outline"       ng-controller="HomeCtrl">    <ion-header-bar class="bar-stable">      <h1 class="title">Chats</h1>    </ion-header-bar>    <ion-content has-tabs="true" on-refresh="onRefresh()">      <ion-refresher></ion-refresher>      <ion-list scroll="false" on-refresh="onRefresh()"           s-editing="isEditingItems"           animation="fade-out"           delete-icon="icon ion-minus-circled">        <ion-item ng-repeat="item in user"             item="item"             buttons="item.buttons"             can-delete="true"             can-swipe="true"             on-delete="deleteItem(item)"             ng-class="{completed: item.isCompleted}">          <span>            <img src="../img/y.jpg" height="56" width="56"/>            <p style="margin-left: 66px;margin-top: -50px"><b>{{item.name}}</b></p>            <p style="margin-left: 66px;">{{item.words}}</p>            <i class="ion-chevron-right" style="float: right;margin-top: -32px""></i>          </span>        </ion-item>      </ion-list>    </ion-content>  </ion-tab>  <ion-tab    <header class="bar bar-header bar-stable">      <h1 class="title">Deadlines</h1>    </header>    <ion-content has-header="true">      <center>        <img src="../img/q.jpg" height="462" width="427"/>      </center>    </ion-content>  </ion-tab>  <ion-tab    <header class="bar bar-header bar-stable">      <h1 class="title">Settings</h1>    </header>    <ion-content has-header="true">      <center>        <img src="../img/y.jpg" height="462" width="427"/>      </center>    </ion-content>  </ion-tab></ion-tabs></body></html>

總結

以上所述是小編給大家介紹的使用ionic(選項卡欄tab) icon(圖標) ionic上拉菜單(ActionSheet) 實現(xiàn)通訊錄界面切換實例代碼,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對VeVb武林網網站的支持!


注:相關教程知識閱讀請移步到JavaScript/Ajax教程頻道。
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 杭州市| 凤翔县| 司法| 边坝县| 湛江市| 灵丘县| 惠安县| 健康| 闽侯县| 韶关市| 米脂县| 和平区| 桦川县| 沛县| 河曲县| 新巴尔虎左旗| 弥渡县| 洪江市| 启东市| 华阴市| 明溪县| 北海市| 德安县| 且末县| 建瓯市| 龙川县| 呼图壁县| 闵行区| 新安县| 广水市| 岑巩县| 紫阳县| 大埔县| 连平县| 嘉善县| 宜宾县| 甘泉县| 甘泉县| 尖扎县| 错那县| 错那县|