tijian_tieying/web/dccdc/Scripts/dist/example/weui.min.js

6 lines
29 KiB
JavaScript
Raw Normal View History

2025-02-20 12:14:39 +08:00
/*!
* @tencent/weui.js v0.1.5 (https://weui.io)
* Copyright 2016, wechatui <wechatui@gmail.com>
* TIT license
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.weui=t():e.weui=t()}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=i(o),r=n(7),u=i(r),l=n(8),d=i(l),f=n(9),c=i(f),s=n(11),p=i(s),v=n(13),h=i(v),m=n(15),y=i(m),_=n(17),w=i(_),g=n(18),b=i(g),k=n(19),x=i(k),E=n(20),j=i(E),C=n(24),M=n(29),S=i(M);t["default"]={dialog:a["default"],alert:u["default"],confirm:d["default"],toast:c["default"],loading:p["default"],actionSheet:h["default"],topTips:y["default"],searchBar:w["default"],tab:b["default"],form:x["default"],uploader:j["default"],picker:C.picker,datePicker:C.datePicker,gallery:S["default"]},e.exports=t["default"]},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function o(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r["default"].noop;a.addClass("weui-animate-fade-out"),o.addClass("weui-animate-fade-out").on("animationend webkitAnimationEnd",function(){i.remove(),f=!1,e()})}var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!f){f=!0;var n=r["default"].os.android;t=r["default"].extend({title:null,content:"",className:"",buttons:[{label:"确定",type:"primary",onClick:r["default"].noop}],isAndroid:n},t);var i=(0,r["default"])(r["default"].render(l["default"],t)),o=i.find(".weui-dialog"),a=i.find(".weui-mask");return d.append(i),a.addClass("weui-animate-fade-in"),o.addClass("weui-animate-fade-in"),i.on("click",".weui-dialog__btn",function(n){var i=this,o=(0,r["default"])(this).index();e(function(){t.buttons[o].onClick&&t.buttons[o].onClick.call(i,n)})}),i.hide=e,i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),r=i(a),u=n(6),l=i(u),d=(0,r["default"])("body"),f=void 0;t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=this.os={},n=e.match(/(Android);?[\s\/]+([\d.]+)?/);n&&(t.android=!0,t.version=n[2])}Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n(3);var r=n(4),u=i(r),l=n(5),d=i(l);o.call(d["default"],navigator.userAgent),(0,u["default"])(d["default"].fn,{append:function(e){return e instanceof HTMLElement||(e=e[0]),this.forEach(function(t){t.appendChild(e)}),this},remove:function(){return this.forEach(function(e){e.parentNode.removeChild(e)}),this},find:function(e){return(0,d["default"])(e,this)},addClass:function(e){return this.forEach(function(t){t.classList.add(e)}),this},removeClass:function(e){return this.forEach(function(t){t.classList.remove(e)}),this},eq:function(e){return(0,d["default"])(this[e])},show:function(){return this.forEach(function(e){e.style.display="block"}),this},hide:function(){return this.forEach(function(e){e.style.display="none"}),this},html:function(e){return this.forEach(function(t){t.innerHTML=e}),this},css:function(e){var t=this;return Object.keys(e).forEach(function(n){t.forEach(function(t){t.style[n]=e[n]})}),this},on:function(e,t,n){var i="string"==typeof t&&"function"==typeof n;return i||(n=t),this.forEach(function(o){e.split(" ").forEach(function(e){o.addEventListener(e,function(e){i?this.contains(e.target.closest(t))&&n.call(e.target,e):n.call(this,e)})})}),this},off:function(e,t,n){return"function"==typeof t&&(n=t,t=null),this.forEach(function(i){e.split(" ").forEach(function(e){"string"==typeof t?i.querySelectorAll(t).forEach(function(t){t.removeEventListener(e,n)}):i.removeEventListener(e,n)})}),this},index:function(){var e=this[0],t=e.parentNode;return Array.prototype.ind