تتيح قائمة السحب (ActionSheet) للمستخدم تحديد الخيارات من خلال المربع الذي يظهر.
سيتم التعرف على خيارات خطيرة للغاية باللون الأحمر المميز. يمكنك جعلها تختفي بالنقر فوق الزر "إلغاء" أو النقر فوق مساحة فارغة.
مثال
رمز HTML
<body ng-app = "starter" ng-controller = "actionsheetctl"> <-ion-pane> <-ion-content> <h2 ng-click = "show ()"> ورقة عمل </h2> </ion-content> </ition-pane> </body>
رمز JavaScript
يتطلب تشغيل قائمة السحب في الكود خدمة $ ionicactionsheet في وحدة التحكم الزاوية الخاصة بك:
Angular.Module ('starter' ، ['ionic']). run (function ($ ionicplatform) {$ ionicplatform.ready (function () {// إخفاء شريط الملحقات بشكل افتراضي (أزل هذا لإظهار شريط الملحقات فوق لوحة المفاتيح // لمدخلات الشكل) إذا (window.cordova {cordova.plugins.keyboard.hidekeyboardAccessorybar (true) ؛} if (window.statusbar) {statusbar.styledefault () ؛}}) ؛}) ، الوظيفة (scope $ ، $ ionicactionSheet ، $ timeout) {$ scope.show = function () {var hideshet = $ ionicactionSheet.show ({buttons: [{text: '<b> share' ، egance '، {text:' move '}] function () {// إضافة رمز الإلغاء ..} ، buttonclicked: function (index) {return true ؛}}) ؛ $ timeout (function () {hideshet () ؛} ، 2000) ؛} ؛تأثير العملية على النحو التالي:
رمز المصدر الكامل:
<html> <head> <meta charset = "utf-8"> <meta name = "viewport" content = "inials-scale = 1 ، maximum-scale = 1 ، ster-scalable = no ، width = device-width"> </ithit HREF = "http://cdn.bootcss.com/ionic/1.3.1/css/ionic.min.css" rel = "STYLESHET"> <script src = "http://cdn.bootcss.com/ionic/1.1.1/js.bundle.min.min type = "text/javaScript"> Angular.module ('starter' ، ['ionic']). run (function ($ ionicplatform) {$ ionicplatform.ready {cordova.plugins.keyboard.hidekeyboardAccessorybar (true) ؛} if (window.statusbar) {statusbar.styledefault () ؛}}) ؛}) ، الوظيفة (scope $ ، $ ionicactionSheet ، $ timeout) {$ scope.show = function () {var hideshet = $ ionicactionSheet.show ({buttons: [{text: '<b> share' ، egance '، {text:' move '}] function () {// إضافة رمز الإلغاء ..} ، buttonclicked: function (index) {return true ؛}}) ؛ $ timeout (function () {hideshet () ؛} ، 2000) ؛} ؛ ng-click = "show ()"> ورقة الإجراء </h2> </on-content> </on-pane> </body> </html>ما سبق هو المعرفة ذات الصلة بقائمة السحب الأيونية (ActionSheet) رمز مثيل المقدمة لك من قبل المحرر. آمل أن يكون ذلك مفيدًا لك!