ionic 上拉菜单

	$scope.phone = function (phonenumber) {
    
    
        var hideSheet = $ionicActionSheet.show({
    
    
            buttons: [
              {
    
     text: '<b>通话</b>' },
              {
    
     text: '<b>短信</b>' }
            ],
            cancelText: '取消',
            cancel: function () {
    
    
                // add cancel code..
            },
            buttonClicked: function (index) {
    
    
                switch (index) {
    
    
                    case 0:
                        try {
    
    
                            window.location.href = "tel:" + phonenumber;
                        }
                        catch (E) {
    
     } break;
                    case 1:
                        try {
    
    
                            window.location.href = "sms:" + phonenumber;
                        }
                        catch (E) {
    
     } break;
                }
                this.hideSheet();
            }
        });
    }

在这里插入图片描述

这里是引用
https://www.runoob.com/ionic/ionic-actionsheet.html

猜你喜欢

转载自blog.csdn.net/qq_31182399/article/details/107707383
今日推荐