Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Treri/vue-ios-alertview
iOS7+ style alertview service for Vue
https://github.com/Treri/vue-ios-alertview
Last synced: 2 months ago
JSON representation
iOS7+ style alertview service for Vue
- Host: GitHub
- URL: https://github.com/Treri/vue-ios-alertview
- Owner: wyntau
- Archived: true
- Created: 2016-11-02T04:25:27.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-16T08:09:13.000Z (over 7 years ago)
- Last Synced: 2024-10-29T10:45:18.677Z (2 months ago)
- Language: Vue
- Homepage: http://wyntau.github.io/vue-ios-alertview/example/
- Size: 51.8 KB
- Stars: 30
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-vue - vue-ios-alertview - iOS7+ 风格的alertview服务 (UI组件)
- awesome - vue-ios-alertview - iOS7+ 风格的alertview服务 (UI组件)
- awesome-github-vue - vue-ios-alertview - iOS7+ 风格的alertview服务 (UI组件)
- awesome-vue - vue-ios-alertview - ios-alertview?style=social) - iOS7+ 风格的alertview服务 (UI组件)
README
## vue-ios-alertview
> iOS7+ style alertview service for Vue 2
Vue port of [angular-ios-alertview](https://github.com/Treri/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