UNPKG

@tarojs/components

Version:
1 lines 7.79 kB
System.register(["./p-2b70c348.system.js"],(function(e){"use strict";var i,r,l,t,o;return{setters:[function(e){i=e.r;r=e.c;l=e.h;t=e.H;o=e.g}],execute:function(){var a='page,body{--weui-cellMarginLR:16px;--weui-cellPaddingLR:16px}.weui-cells__group{border:0}.weui-cells__group:first-child{margin-top:0}.weui-cells__group_form{margin-top:24px}.weui-cells__group_form .weui-cells{margin-left:var(--weui-cellMarginLR);margin-right:var(--weui-cellMarginLR)}.weui-cells__group_form .weui-cells:before,.weui-cells__group_form .weui-cells:after{left:var(--weui-cellPaddingLR);right:var(--weui-cellPaddingLR)}.weui-cells__group_form .weui-cell{padding:16px var(--weui-cellPaddingLR)}.weui-cells__group_form .weui-cell:before{left:var(--weui-cellPaddingLR);right:var(--weui-cellPaddingLR)}.weui-cells__group_form .weui-cell:not(.weui-cell_vertical) .weui-cell__hd{padding-right:16px}.weui-cells__group_form .weui-cell:not(.weui-cell_vertical) .weui-cell__ft{padding-left:16px}.weui-cells__group_form .weui-cells__title{margin-top:24px;margin-bottom:8px;padding:0 32px}.weui-cells__group_form:first-child .weui-cells__title{margin-top:0}.weui-cells__group_form .weui-cells__tips{padding:0 calc(var(--weui-cellMarginLR) + var(--weui-cellPaddingLR));color:var(--weui-FG-2);margin-top:8px}.weui-cells__group_form .weui-cells__tips a{font-weight:700}.weui-cells__group_form .weui-cells__tips_warn{color:var(--weui-RED)}.weui-cells__group_form .weui-label{max-width:5em;margin-right:8px}.weui-cells__group_form .weui-cell_access:active:after,.weui-cells__group_form .weui-cell_active:active:after{border-radius:8px}.weui-cells__group_form .weui-cell_warn input{color:#e64340}.weui-cells__group_form .weui-icon-warn,.weui-cells__group_form .weui-cell_switch:active:after,.weui-cells__group_form .weui-cell_vcode:active:after,.weui-cells__group_form .weui-cell_readonly:active:after,.weui-cells__group_form .weui-cell_disabled:active:after{display:none}.weui-cells__group_form input,.weui-cells__group_form textarea,.weui-cells__group_form label[for]{-webkit-tap-highlight-color:transparent}.weui-cells__group_form .weui-cell_wrap{-ms-flex-align:initial;align-items:initial;padding-top:8px;padding-bottom:8px}.weui-cells__group_form .weui-cell_wrap .weui-cell__hd{padding-right:0}.weui-cells__group_form .weui-cell_wrap .weui-label{margin-top:8px}.weui-cells__group_form .weui-cell_wrap .weui-cell__bd{-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}.weui-cells__group_form .weui-cell__control{margin:8px 0 8px 16px}.weui-cells__group_form .weui-cell__control_flex{-ms-flex:1;flex:1;min-width:30vw}.weui-cells__group_form .weui-vcode-btn{color:#000;background-color:#f8f8f8;border-radius:6px;width:auto;height:auto;padding:0 12px;font-size:16px;line-height:2}.weui-cells__group_form .weui-vcode-btn:before{display:none}.weui-cells__group_form .weui-cell_vcode.weui-cell_wrap{padding-top:4px;padding-bottom:4px}.weui-cells__group_form .weui-cell_vcode.weui-cell_wrap .weui-label{margin-top:12px}.weui-cells__group_form .weui-cell_vcode.weui-cell_wrap .weui-input{min-height:1.88235em;font-size:17px}.weui-cells__group_form .weui-cells_checkbox .weui-check__label:before{left:calc(40px + var(--weui-cellPaddingLR))}.weui-cells__group_form .weui-cell_select{padding:0}.weui-cells__group_form .weui-cell_select-before .weui-cell__hd{padding-right:0}.weui-cells__group_form .weui-cell_switch{padding:12px 16px}.weui-cells__group_form-primary{margin-top:32px}.weui-cells__group_form-primary .weui-cells{background:var(--weui-BG-1);border-radius:8px;overflow:hidden}.weui-cells__group_form-primary .weui-cells:before,.weui-cells__group_form-primary .weui-cells:after{display:none}.weui-cells__group_form-primary .weui-cell_access:active:after,.weui-cells__group_form-primary .weui-cell_active:active:after{border-radius:0}.taro-checkbox{display:inline-block;position:relative}.taro-checkbox_checked{-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:0;color:#1aad19;background-color:#fff;border:1px solid #d1d1d1;border-radius:3px;outline:0;width:23px;height:23px;min-height:0;font-size:23px;display:inline-block;position:relative;top:5px}.taro-checkbox_checked:checked:before{vertical-align:middle;text-decoration:inherit;text-align:center;text-transform:none;font-variant:normal;font-family:weui;font-style:normal;font-weight:400;font-size:inherit;color:inherit;content:"";speak:none;display:inline-block;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-48%)scale(.73);transform:translate(-50%,-48%)scale(.73)}';var c=e("taro_checkbox_core",function(){function e(e){var l=this;i(this,e);this.onChange=r(this,"checkboxchange",7);this.handleChange=function(e){e.stopPropagation();l.onChange.emit({value:l.value})};this.name=undefined;this.value="";this.color=undefined;this.id=undefined;this.checked=false;this.disabled=false;this.nativeProps={};this.isWillLoadCalled=false}e.prototype.watchId=function(e){if(!this.isWillLoadCalled)return;if(e)this.inputEl.setAttribute("id",e)};e.prototype.componentWillLoad=function(){this.isWillLoadCalled=true};e.prototype.componentDidRender=function(){this.id&&this.el.removeAttribute("id")};e.prototype.render=function(){var e=this;var i=this,r=i.checked,o=i.name,a=i.color,c=i.value,n=i.disabled,u=i.nativeProps;return l(t,{className:"weui-cells_checkbox"},l("input",Object.assign({ref:function(i){if(!i)return;e.inputEl=i;if(e.id)i.setAttribute("id",e.id)},type:"checkbox",value:c,name:o,class:"taro-checkbox_checked",style:{color:a},checked:r,disabled:n,onChange:this.handleChange},u)),l("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{id:["watchId"]}},enumerable:false,configurable:true});return e}());c.style=a;var n=undefined&&undefined.__classPrivateFieldSet||function(e,i,r,l,t){if(l==="m")throw new TypeError("Private method is not writable");if(l==="a"&&!t)throw new TypeError("Private accessor was defined without a setter");if(typeof i==="function"?e!==i||!t:!i.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return l==="a"?t.call(e,r):t?t.value=r:i.set(e,r),r};var u=undefined&&undefined.__classPrivateFieldGet||function(e,i,r,l){if(r==="a"&&!l)throw new TypeError("Private accessor was defined without a getter");if(typeof i==="function"?e!==i||!l:!i.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?l:r==="a"?l.call(e):l?l.value:i.get(e)};var s;var _=e("taro_checkbox_group_core",function(){function e(e){i(this,e);this.onChange=r(this,"change",7);this.uniqueName=Date.now().toString(36);s.set(this,void 0);this.name=undefined}e.prototype.function=function(e){e.stopPropagation();if(e.target.tagName!=="TARO-CHECKBOX-CORE")return;var i=this.el.querySelectorAll("taro-checkbox-core");n(this,s,this.getValues(i),"f");this.onChange.emit({value:u(this,s,"f")})};e.prototype.componentDidLoad=function(){var e=this;var i=this.el.querySelectorAll("taro-checkbox-core");i.forEach((function(i){i.setAttribute("name",e.name||e.uniqueName)}));Object.defineProperty(this.el,"value",{get:function(){if(!u(e,s,"f")){var i=e.el.querySelectorAll("taro-checkbox-core");n(e,s,e.getValues(i),"f")}return u(e,s,"f")},configurable:true})};e.prototype.getValues=function(e){return Array.from(e).filter((function(e){var i=e.querySelector("input");return i===null||i===void 0?void 0:i.checked})).map((function(e){return e.value}))};e.prototype.render=function(){return l(t,null)};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());s=new WeakMap}}}));