UNPKG

hanzi-mobile-package

Version:

Hanzi mobile Package

1 lines 1.32 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["Hanzi-vue-package"]=e():t["Hanzi-vue-package"]=e()}(this,function(){return function(t){function e(n){if(o[n])return o[n].exports;var i=o[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={ui:{messageBox:{},toast:{},indicator:{}},info:function(t,e,o){this.ui.messageBox.alert(e,t).then(function(t){"function"==typeof o&&o()})},message:function(t,e){this.ui.toast({message:t,position:"bottom",duration:e||3e3})},success:function(t,e,o){this.ui.toast({message:t,iconClass:o||"ion-android-done",duration:e||3e3})},error:function(t,e,o){this.ui.toast({message:t,iconClass:o||"ion-alert-circled",duration:e||3e3})},confirm:function(t,e,o){this.ui.messageBox.confirm(t).then(function(t){"function"==typeof e&&e()}).catch(function(t){"function"==typeof o&&o()})},prompt:function(t,e){return this.ui.messageBox.prompt(e,t)},loading:function(t){var e=t||"加载中...";this.ui.indicator.open({text:e,spinnerType:"fading-circle"})},closeLoading:function(){this.ui.indicator.close()}}}])});