weex-flymeui
Version:
A Flyme Style UI library based on Weex for Creator.
3 lines (2 loc) • 18 kB
JavaScript
// { "framework": "Vue" }
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["npm/weex-flymeui/components/fm-multi-check-group/index"]=t():e["npm/weex-flymeui/components/fm-multi-check-group/index"]=t()}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=140)}({0:function(e,t){e.exports=function(e,t,n,o,i){var r,s=e=e||{},a=typeof e.default;"object"!==a&&"function"!==a||(r=e,s=e.default);var c,u="function"==typeof s?s.options:s;if(t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns),o&&(u._scopeId=o),i?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},u._ssrRegister=c):n&&(c=n),c){var l=u.functional,d=l?u.render:u.beforeCreate;l?u.render=function(e,t){return c.call(t),d(e,t)}:u.beforeCreate=d?[].concat(d,c):[c]}return{esModule:r,exports:s,options:u}}},1:function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var i=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(o),r=o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"});return[n].concat(r).concat([i]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},i=0;i<this.length;i++){var r=this[i][0];"number"==typeof r&&(o[r]=!0)}for(i=0;i<e.length;i++){var s=e[i];"number"==typeof s[0]&&o[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},10:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i=function(e){return e&&e.__esModule?e:{default:e}}(n(4));var r=weex.requireModule("dom");t.default={name:"FmIcon",props:{name:{default:"wancheng",type:String},value:{type:String,default:""},iconStyle:{type:[Number,Object,String],default:42},color:{type:String,default:"#666666"}},data:function(){return{Icon:i.default}},computed:{getIcon:function(){var e=this.Icon,t=this.name,n=this.value;return a(""===n?e[t]||"wancheng":n)},mergeStyle:function(){var e=this.iconStyle,t={fontFamily:"flymeicon",color:this.color};return"object"!==Object.prototype.toString.call(this.iconStyle).slice(8,-1).toLowerCase()?(t.fontSize=e+"px",t.height=e+"px"):t=Object.assign({},t,o({},e)),t}},beforeCreate:function(){this.isCreator||r.addRule("fontFace",{fontFamily:"flymeicon",src:"url('http://weixin-res.flyme.cn/resources/weex-flymeui/assets/iconfont.ttf')"})},methods:{itemClicked:function(e){this.$emit("fmIconClicked",{name:e})}}};var s=/&([^;]{2,});?/g,a=function(e){return e=e.replace(s,function(e,t){if("#"===t.charAt(0)){var n=0;if(n="x"===t.charAt(1).toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),!isNaN(n)&&n>=-32768&&n<=65535)return String.fromCharCode(n)}return e})}},11:function(e,t,n){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("text",{staticStyle:e.$processStyle(void 0),style:e.$processStyle(e.mergeStyle),on:{click:function(t){e.itemClicked(e.name)}}},[e._v(e._s(e.getIcon))])},staticRenderFns:[]},e.exports.render._withStripped=!0},140:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(141);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return function(e){return e&&e.__esModule?e:{default:e}}(o).default}})},141:function(e,t,n){var o=n(0)(n(142),n(143),null,null,null);o.options.__file="/Users/suen/Documents/develop/project/weex-flymeui/packages/fm-multi-check-group/index.vue",o.esModule&&Object.keys(o.esModule).some(function(e){return"default"!==e&&"__"!==e.substr(0,2)})&&console.error("named exports are not supported in *.vue files."),o.options.functional&&console.error("[vue-loader] index.vue: functional components are not supported with templates, they should use render functions."),e.exports=o.exports},142:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return e&&e.__esModule?e:{default:e}}(n(87));t.default={componentName:"FmM\bultiCheckGroup",components:{FmMultiCheckCell:o.default},props:{checking:{type:Boolean,default:!1},value:{type:Object,default:function(){return[]}}},methods:{finish:function(){this.checking=!1},active:function(){this.checking=!0}},watch:{value:function(e){this.$emit("fmMultiCheckGroupSelected",e)},checking:function(e){this.$emit("fmMultiCheckGroupStateChange",e)}}}},143:function(e,t,n){e.exports={render:function(){var e=this.$createElement;return(this._self._c||e)("list",{ref:"group",staticStyle:this.$processStyle(void 0),style:this.$processStyle(void 0)},[this._t("default")],2)},staticRenderFns:[]},e.exports.render._withStripped=!0},2:function(e,t,n){var o="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i=n(3),r={},s=o&&(document.head||document.getElementsByTagName("head")[0]),a=null,c=0,u=!1,l=function(){},d=null,f="data-vue-ssr-id",p="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(e){for(var t=0;t<e.length;t++){var n=e[t],o=r[n.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](n.parts[i]);for(;i<n.parts.length;i++)o.parts.push(x(n.parts[i]));o.parts.length>n.parts.length&&(o.parts.length=n.parts.length)}else{var s=[];for(i=0;i<n.parts.length;i++)s.push(x(n.parts[i]));r[n.id]={id:n.id,refs:1,parts:s}}}}function m(){var e=document.createElement("style");return e.type="text/css",s.appendChild(e),e}function x(e){var t,n,o=document.querySelector("style["+f+'~="'+e.id+'"]');if(o){if(u)return l;o.parentNode.removeChild(o)}if(p){var i=c++;o=a||(a=m()),t=y.bind(null,o,i,!1),n=y.bind(null,o,i,!0)}else o=m(),t=function(e,t){var n=t.css,o=t.media,i=t.sourceMap;o&&e.setAttribute("media",o);d.ssrId&&e.setAttribute(f,t.id);i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,o),n=function(){o.parentNode.removeChild(o)};return t(e),function(o){if(o){if(o.css===e.css&&o.media===e.media&&o.sourceMap===e.sourceMap)return;t(e=o)}else n()}}e.exports=function(e,t,n,o){u=n,d=o||{};var s=i(e,t);return h(s),function(t){for(var n=[],o=0;o<s.length;o++){var a=s[o];(c=r[a.id]).refs--,n.push(c)}t?h(s=i(e,t)):s=[];for(o=0;o<n.length;o++){var c;if(0===(c=n[o]).refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete r[c.id]}}}};var g=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function y(e,t,n,o){var i=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=g(t,i);else{var r=document.createTextNode(i),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(r,s[t]):e.appendChild(r)}}},3:function(e,t){e.exports=function(e,t){for(var n=[],o={},i=0;i<t.length;i++){var r=t[i],s=r[0],a={id:e+":"+i,css:r[1],media:r[2],sourceMap:r[3]};o[s]?o[s].parts.push(a):n.push(o[s]={id:s,parts:[a]})}return n}},4:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={biaoqing:"",bofang:"",bianji:"",bofang2:"",cebianlan:"",caijian:"",chakan:"",chexiao:"",chuangkouhua:"",daojishi:"",dianzan:"",chuangkouhua2:"",dianhua:"",diannao:"",dingwei2:"",dingwei:"",dingyue:"",erweima:"",fanhui:"",fasong:"",fujian:"",fenlei:"",fanhui2:"ູ",fenxiang:"",fuzhi:"",gengduo:"",gouwuche:"",gongjuxiang:"",gengduo2:"",guanbi:"",jishi:"",hongxin:"",jingyin:"",jianpan:"",jiesuo:"",jisuanqi:"󦰶",liangdu:"",lvjing:"",paixu:"",paihang:"",paizhao:"",pingmutoushe:"",riqi:"",shanchu:"",shangchaun:"",shangyishou:"",shezhi:"",shizhong:"",shezhi1:"",sousuo:"",shuqian:"",shuoming:"",shuaxin:"",suoding:"",shipin:"",tuichu:"",tupian:"",tianjia:"",tixing:"",wancheng:"",wengao:"",xiayishou:"",xinxi:"",xiazai:"",xingxing:"",xinxi1:"",xuanxiangliebiao:"",yidu:"",yinliang:"",yinbi:"",yuyin:"",zanting:"",yonghu:"",youjian:"",zhiding:"",chongzuo:"",zhuye:"",ziti:"",VPN:"","Wi-Fi":"",zhuti:"",lanya:"",quanping:"",pingmufanzhuan:"",gouwu:"",saomiao:""}},6:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(7);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return function(e){return e&&e.__esModule?e:{default:e}}(o).default}})},7:function(e,t,n){var o=!1;var i=n(0)(n(10),n(11),function(e){o||n(8)},"data-v-77aa90fe",null);i.options.__file="/Users/suen/Documents/develop/project/weex-flymeui/packages/fm-icon/index.vue",i.esModule&&Object.keys(i.esModule).some(function(e){return"default"!==e&&"__"!==e.substr(0,2)})&&console.error("named exports are not supported in *.vue files."),i.options.functional&&console.error("[vue-loader] index.vue: functional components are not supported with templates, they should use render functions."),e.exports=i.exports},8:function(e,t,n){var o=n(9);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);n(2)("1a663314",o,!1,{})},87:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(88);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return function(e){return e&&e.__esModule?e:{default:e}}(o).default}})},88:function(e,t,n){var o=!1;var i=n(0)(n(91),n(97),function(e){o||n(89)},"data-v-3e6c11c0",null);i.options.__file="/Users/suen/Documents/develop/project/weex-flymeui/packages/fm-multi-check-cell/index.vue",i.esModule&&Object.keys(i.esModule).some(function(e){return"default"!==e&&"__"!==e.substr(0,2)})&&console.error("named exports are not supported in *.vue files."),i.options.functional&&console.error("[vue-loader] index.vue: functional components are not supported with templates, they should use render functions."),e.exports=i.exports},89:function(e,t,n){var o=n(90);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);n(2)("189e78ec",o,!1,{})},9:function(e,t,n){(e.exports=n(1)(!1)).push([e.i,"\n\n\n\n\n\n\n",""])},90:function(e,t,n){(e.exports=n(1)(!1)).push([e.i,"\n.check-cell-wrap[data-v-3e6c11c0] {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-pack: justify;\n -webkit-justify-content: space-between;\n justify-content: space-between;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n padding: 0 0.18519rem;\n}\n.check-cell-wrap[data-v-3e6c11c0]:active {\n background-color: #eeeeee;\n}\n.right[data-v-3e6c11c0] {\n width: 0.22222rem;\n height: 0.22222rem;\n}\n",""])},91:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return e&&e.__esModule?e:{default:e}}(n(92));weex.requireModule("dom");t.default={name:"FmMultiCheckCell",components:{CheckIcon:o.default},props:{identity:{type:[String,Object,Number,Array],required:!0},disabled:{type:Boolean,default:!1}},computed:{_selected:{get:function(){return-1!==this.store.indexOf(this.identity)},set:function(e){e?this.addToStore():this.deleteFromStore()}},isGroup:function(){for(var e=this.$parent;e;){if("FmM\bultiCheckGroup"===e.$options.componentName)return this._group=e,!0;e=e.$parent}return!1},checking:function(){return this._group.checking},store:function(){return this._group.value}},methods:{onClick:function(e){this._group.checking&&!this.disabled&&this.toggleSelected()},toggleSelected:function(){!this.disabled&&(this._selected=!this._selected)},onLongpress:function(e){!this._group.checking&&(this._group.checking=!0)&&!this.disabled&&(this._selected=!0)},addToStore:function(){var e=this.identity;Array.isArray(this.store)&&-1===this.store.indexOf(e)&&this.store.push(e)},deleteFromStore:function(){var e=this.identity;Array.isArray(this.store)&&-1!==this.store.indexOf(e)&&this.store.splice(this.store.indexOf(e),1)}},created:function(){if(!this.isGroup)throw Error("fm-multi-check-cell must be used in fm-multi-check-group !")}}},92:function(e,t,n){var o=!1;var i=n(0)(n(95),n(96),function(e){o||n(93)},"data-v-00ad7ec0",null);i.options.__file="/Users/suen/Documents/develop/project/weex-flymeui/packages/fm-multi-check-cell/check-icon.vue",i.esModule&&Object.keys(i.esModule).some(function(e){return"default"!==e&&"__"!==e.substr(0,2)})&&console.error("named exports are not supported in *.vue files."),i.options.functional&&console.error("[vue-loader] check-icon.vue: functional components are not supported with templates, they should use render functions."),e.exports=i.exports},93:function(e,t,n){var o=n(94);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);n(2)("62738786",o,!1,{})},94:function(e,t,n){(e.exports=n(1)(!1)).push([e.i,"\n.animate-wrap[data-v-00ad7ec0] {\n width: 0.22222rem;\n height: 0.22222rem;\n}\n.unchecked[data-v-00ad7ec0] {\n width: 0.22222rem;\n height: 0.22222rem;\n}\n.checked[data-v-00ad7ec0] {\n position: absolute;\n left: 0;\n top: 0;\n width: 0.22222rem;\n height: 0.22222rem;\n -webkit-transform: scale(0);\n transform: scale(0);\n background-color: #ffffff;\n border-radius: 0.11111rem;\n}\n",""])},95:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return e&&e.__esModule?e:{default:e}}(n(6));var i=weex.requireModule("animation");t.default={components:{FmIcon:o.default},props:{show:{type:Boolean,default:!1},checked:{type:Boolean,default:!1},bgImg:{type:String,default:"http://design.flyme.cn/weexui/assets/mz_btn_check_button_square_off.png"},checkedImg:{type:String,default:"http://design.flyme.cn/weexui/assets/mz_btn_check_button_square_on.png"},checkedDisableImg:{type:String,default:"http://design.flyme.cn/weexui/assets/mz_btn_check_button_square_on_disable.png"},disabled:{type:Boolean,default:!1}},watch:{checked:function(e){this.appearChecked(e)}},data:function(){return{}},computed:{getCheckedImg:function(){var e=this.disabled,t=this.checkedImg,n=this.checkedDisableImg;return e?n:t},wrapStyle:function(){return this.show?{opacity:1}:{opacity:0,transform:"rotateX(90deg)"}},checkedStyle:function(){return this.checked?{opacity:1}:{opacity:0}},isNeedShow:function(){this.appear(this.show)},isNeedChecked:function(){var e=this;setTimeout(function(){e.appearChecked(e.checked)},50)}},methods:{appear:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=this.$refs["animate-wrap"];if(n&&e){i.transition(n,{styles:{transform:"rotateX(0deg)"},duration:t,delay:0,timingFunction:"ease-out"},function(){})}},appearChecked:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,n=this.$refs["check-icon"];if(n){var o=e?{transform:"scale(1)"}:{transform:"scale(0)"};i.transition(n,{styles:o,duration:t,delay:0,timingFunction:"ease-out"},function(){})}}}}},96:function(e,t,n){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"check-icon",staticStyle:e.$processStyle(void 0),style:e.$processStyle(void 0)},[n("div",{ref:"animate-wrap",staticClass:"animate-wrap",staticStyle:e.$processStyle(void 0),style:e.$processStyle(e.wrapStyle),attrs:{hack:e.isNeedShow}},[n("image",{staticClass:"unchecked",staticStyle:e.$processStyle(void 0),style:e.$processStyle(void 0),attrs:{src:e.bgImg}}),e._v(" "),n("image",{ref:"check-icon",staticClass:"checked",staticStyle:e.$processStyle(void 0),style:e.$processStyle(void 0),attrs:{src:e.getCheckedImg,watch:e.isNeedChecked}})])])},staticRenderFns:[]},e.exports.render._withStripped=!0},97:function(e,t,n){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("cell",{staticClass:"check-cell-wrap",staticStyle:e.$processStyle(void 0),style:e.$processStyle(void 0),attrs:{ripple:"normal"},on:{longpress:e.onLongpress,click:e.onClick}},[n("div",{ref:"wrapper",staticClass:"wrapper",staticStyle:e.$processStyle(void 0),style:e.$processStyle(void 0)},[e._t("default")],2),e._v(" "),n("div",{staticClass:"right",staticStyle:e.$processStyle(void 0),style:e.$processStyle(void 0)},[n("check-icon",{staticStyle:e.$processStyle(void 0),style:e.$processStyle(void 0),attrs:{show:e.checking,checked:e._selected,disabled:e.disabled}})],1)])},staticRenderFns:[]},e.exports.render._withStripped=!0}})});