vue-ios-alertview

iOS7+ style alertview service for Vue.
2,135 31
Install
npm install vue-ios-alertview
Latest Version:1.1.2
Vue:2
License:MIT
Last Updated:Jun 16, 2017
Links: GitHub  ·  npm
Maintainer: treri

vue-ios-alertview

iOS7+ style alertview service for Vue 2

Vue port of angular-ios-alertview.

Install
npm install vue-ios-alertview
Dependences

Promise

Usage
import Vue from 'vue';
import iosAlertView from 'vue-ios-alertview';

Vue.use(iosAlertView);

new Vue({
  el: '#container',
  methods: {
    alert: function(){
      this.$iosAlert('alert').then(function(){
        console.log('alert);
      });
    }
  }
});
Options

(Note: some options are specific to different alertview type, e.g. remindDuration is only for $iosRemind).

  • title, alertview title, default empty

  • text, alertview content, support html string. default empty

  • input, whether show input form, default false

  • placeholder, input field placeholder, default empty

  • cancelText, cancel button text, default Cancel

  • okText, ok button text, default OK

  • remindDuration, remind show duration, default 650ms

  • buttons, array of button object.

    an example of button object

      {
        text: 'OK',
        bold: true,
        onClick: function(data){
          // data.index
          // data.button
          // data.value
        }
      }
    
  • defaultOption, the option key if you just pass in a string when you invoke $iosAlert, $iosConfirm, $iosPrompt or $iosRemind. default text, you can set it to title or something else.

License

MIT

Related Packages

@nativescript-community/ui-checkbox

Checkbox: Material 3 MaterialCheckBox on Android, SF Symbols toggle button on iO...

7,793 1
@nativescript-community/perms

An unified permissions API for NativeScript on iOS and Android.

171,921 15
@nativescript-community/ui-canvas

Implement Canvas into your NativeScript apps.

45,311 38
@nativescript-community/gesturehandler

Declarative API exposing platform native touch and gesture system to NativeScrip...

40,200 15
@nativescript-community/ui-label

Alternative to the built-in NativeScript Label but with better performance and a...

34,779 20

Version History

Version Released Vue License
1.1.2 ^2.2.6 MIT
1.1.1 ^2.2.6 MIT
1.1.0 ^2.2.6 MIT
1.0.0 ^2.2.6 MIT
0.6.4 ^2.0.5 MIT