UNPKG

weex-flymeui

Version:

A Flyme Style UI library based on Weex for Creator.

3 lines (2 loc) 17.9 kB
// { "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-simple-list/index"]=t():e["npm/weex-flymeui/components/fm-simple-list/index"]=t()}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},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=188)}({0:function(e,t){e.exports=function(e,t,n,i,o){var r,s=e=e||{},a=typeof e.default;"object"!==a&&"function"!==a||(r=e,s=e.default);var l,c="function"==typeof s?s.options:s;if(t&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns),i&&(c._scopeId=i),o?(l=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(o)},c._ssrRegister=l):n&&(l=n),l){var u=c.functional,f=u?c.render:c.beforeCreate;u?c.render=function(e,t){return l.call(t),f(e,t)}:c.beforeCreate=f?[].concat(f,l):[l]}return{esModule:r,exports:s,options:c}}},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]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var o=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(i),r=i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"});return[n].concat(r).concat([o]).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 i={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(i[r]=!0)}for(o=0;o<e.length;o++){var s=e[o];"number"==typeof s[0]&&i[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 i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},o=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:o.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,i({},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},12:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(5);t.default={methods:{t:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.t.apply(this,t)}}}},13:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={el:{common:{delete:"删除",cancel:"取消",confirm:"确认",close:"关闭",title:"标题",more:"更多"},titlebar:{title:"标题"},searchbar:{search:"搜索"},foldabletext:{more:"更多"},input:{placeholder:"请输入",inputError:"输入有误"},tag:{tagName:"标签"}}}},188:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(189);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return function(e){return e&&e.__esModule?e:{default:e}}(i).default}})},189:function(e,t,n){var i=!1;var o=n(0)(n(192),n(198),function(e){i||n(190)},"data-v-d7ab306c",null);o.options.__file="/Users/suen/Documents/develop/project/weex-flymeui/packages/fm-simple-list/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},190:function(e,t,n){var i=n(191);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);n(2)("50593568",i,!1,{})},191:function(e,t,n){(e.exports=n(1)(!1)).push([e.i,"\n.list-wrap[data-v-d7ab306c] {\n width: 10rem;\n}\n.title-wrap[data-v-d7ab306c] {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n padding: 0.25rem 0.4537rem;\n -webkit-box-pack: justify;\n -webkit-justify-content: space-between;\n justify-content: space-between;\n}\n.title-text[data-v-d7ab306c] {\n font-family: sans-serif-medium;\n font-weight: 500;\n font-size: 0.33333rem;\n line-height: 0.5rem;\n}\n.title-rightBtn[data-v-d7ab306c] {\n font-family: sans-serif-medium;\n font-weight: 500;\n font-size: 0.33333rem;\n line-height: 0.5rem;\n}\n",""])},192:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s(n(193)),o=s(n(12)),r=n(5);function s(e){return e&&e.__esModule?e:{default:e}}t.default={name:"FmSimpleList",mixins:[o.default],components:{Item:i.default},props:{list:{type:Array,default:function(){return[]}},title:{type:String,default:function(){return(0,r.t)("el.common.title")}},titleColor:{type:String,default:"rgba(0, 0, 0, 0.4)"},rightText:{type:String,default:""},rightColor:{type:String,default:"#198DED"},customStyles:{type:Object,default:function(){return{}}}},methods:{onSelect:function(e){this.$emit("fmSimpleListSelected",{model:this.list[e],index:e})},btnClicked:function(){this.$emit("fmSimpleListRightBtnClicked")},leftIconClicked:function(e){this.$emit("fmSimpleListLeftIconClicked",{model:this.list[e],index:e})},rightIconClicked:function(e){this.$emit("fmSimpleListRightIconClicked",{model:this.list[e],index:e})}}}},193:function(e,t,n){var i=!1;var o=n(0)(n(196),n(197),function(e){i||n(194)},"data-v-6f5a0a6a",null);o.options.__file="/Users/suen/Documents/develop/project/weex-flymeui/packages/fm-simple-list/item.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] item.vue: functional components are not supported with templates, they should use render functions."),e.exports=o.exports},194:function(e,t,n){var i=n(195);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);n(2)("a4012894",i,!1,{})},195:function(e,t,n){(e.exports=n(1)(!1)).push([e.i,"\n.list-item[data-v-6f5a0a6a] {\n padding: 0 0.44444rem;\n}\n.list-item[data-v-6f5a0a6a]:active {\n background-color: rgba(0, 0, 0, 0.04);\n}\n.item-wrap[data-v-6f5a0a6a] {\n height: 1.33333rem;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: justify;\n -webkit-justify-content: space-between;\n justify-content: space-between;\n}\n.text-title[data-v-6f5a0a6a] {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n text-overflow: ellipsis;\n font-size: 0.38889rem;\n margin-right: 0.24074rem;\n lines: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-line-clamp: 1;\n}\n.icon[data-v-6f5a0a6a] {\n margin: 0.11111rem;\n font-size: 0.44444rem;\n height: 0.44444rem;\n font-weight: 700;\n}\n.icon-left[data-v-6f5a0a6a] {\n margin-right: 0.35185rem;\n}\n",""])},196:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){return e&&e.__esModule?e:{default:e}}(n(6));t.default={components:{FmIcon:i.default},props:{index:{type:Number,default:-1},title:{type:String,default:""},color:{type:String,default:""},fontSize:{type:Number,default:42},borderWidth:{type:Number,default:2},borderColor:{type:String,default:"rgba(0, 0, 0, 0.1)"},leftIcon:{type:String,default:""},leftColor:{type:String,default:""},rightIcon:{type:String,default:""},rightColor:{type:String,default:""},originTitleColor:{type:String,default:"#000000"},originLeftIcon:{type:String,default:"shizhong"},originRightIcon:{type:String,default:"guanbi"},originIconColor:{type:String,default:"#999999"}},computed:{wrapStyle:function(){return{borderBottomWidth:this.borderWidth+"px",borderColor:this.borderColor}},titleStyle:function(){var e=this.color,t=this.originTitleColor;return{fontSize:this.fontSize+"px",color:e||t}}},methods:{onClick:function(){this.$emit("select",this.index)},onLeftClick:function(){this.$emit("leftClicked",this.index)},onRightClick:function(){this.$emit("rightClicked",this.index)}}}},197:function(e,t,n){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"list-item",staticStyle:e.$processStyle(void 0),style:e.$processStyle(void 0),on:{click:e.onClick}},[n("div",{staticClass:"item-wrap",staticStyle:e.$processStyle(void 0),style:e.$processStyle(e.wrapStyle)},[e.leftIcon||e.originLeftIcon?n("fm-icon",{staticClass:"icon icon-left",staticStyle:e.$processStyle(void 0),style:e.$processStyle(void 0),attrs:{name:e.leftIcon||e.originLeftIcon,color:e.leftColor||e.originIconColor},on:{fmIconClicked:e.onLeftClick}}):e._e(),e._v(" "),n("text",{staticClass:"text-title",staticStyle:e.$processStyle(void 0),style:e.$processStyle(e.titleStyle)},[e._v(e._s(e.title))]),e._v(" "),n("fm-icon",{staticClass:"icon",staticStyle:e.$processStyle(void 0),style:e.$processStyle(void 0),attrs:{name:e.rightIcon||e.originRightIcon,color:e.rightColor||e.originIconColor},on:{fmIconClicked:e.onRightClick}})],1)])},staticRenderFns:[]},e.exports.render._withStripped=!0},198:function(e,t,n){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"list-wrap",staticStyle:e.$processStyle(void 0),style:e.$processStyle(void 0)},[n("div",{staticClass:"title-wrap",staticStyle:e.$processStyle(void 0),style:e.$processStyle(void 0)},[e._t("left",[n("text",{staticClass:"title-text",staticStyle:e.$processStyle(void 0),style:e.$processStyle({color:e.titleColor})},[e._v(e._s(e.title))])]),e._v(" "),e._t("right",[n("text",{staticClass:"title-rightBtn",staticStyle:e.$processStyle(void 0),style:e.$processStyle({color:e.rightColor}),on:{click:e.btnClicked}},[e._v(e._s(e.rightText))])])],2),e._v(" "),n("div",{staticClass:"item-wrap",staticStyle:e.$processStyle(void 0),style:e.$processStyle(void 0)},e._l(e.list,function(t,i){return n("item",e._b({key:i,staticStyle:e.$processStyle(void 0),style:e.$processStyle(void 0),attrs:{index:i},on:{select:function(t){e.onSelect(i)},leftClicked:function(t){e.leftIconClicked(i)},rightClicked:function(t){e.rightIconClicked(i)}}},"item",Object.assign({},e.customStyles,t),!1))}))])},staticRenderFns:[]},e.exports.render._withStripped=!0},2:function(e,t,n){var i="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!i)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 o=n(3),r={},s=i&&(document.head||document.getElementsByTagName("head")[0]),a=null,l=0,c=!1,u=function(){},f=null,d="data-vue-ssr-id",p="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function x(e){for(var t=0;t<e.length;t++){var n=e[t],i=r[n.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](n.parts[o]);for(;o<n.parts.length;o++)i.parts.push(m(n.parts[o]));i.parts.length>n.parts.length&&(i.parts.length=n.parts.length)}else{var s=[];for(o=0;o<n.parts.length;o++)s.push(m(n.parts[o]));r[n.id]={id:n.id,refs:1,parts:s}}}}function h(){var e=document.createElement("style");return e.type="text/css",s.appendChild(e),e}function m(e){var t,n,i=document.querySelector("style["+d+'~="'+e.id+'"]');if(i){if(c)return u;i.parentNode.removeChild(i)}if(p){var o=l++;i=a||(a=h()),t=y.bind(null,i,o,!1),n=y.bind(null,i,o,!0)}else i=h(),t=function(e,t){var n=t.css,i=t.media,o=t.sourceMap;i&&e.setAttribute("media",i);f.ssrId&&e.setAttribute(d,t.id);o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,i),n=function(){i.parentNode.removeChild(i)};return t(e),function(i){if(i){if(i.css===e.css&&i.media===e.media&&i.sourceMap===e.sourceMap)return;t(e=i)}else n()}}e.exports=function(e,t,n,i){c=n,f=i||{};var s=o(e,t);return x(s),function(t){for(var n=[],i=0;i<s.length;i++){var a=s[i];(l=r[a.id]).refs--,n.push(l)}t?x(s=o(e,t)):s=[];for(i=0;i<n.length;i++){var l;if(0===(l=n[i]).refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete r[l.id]}}}};var g=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function y(e,t,n,i){var o=n?"":i.css;if(e.styleSheet)e.styleSheet.cssText=g(t,o);else{var r=document.createTextNode(o),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=[],i={},o=0;o<t.length;o++){var r=t[o],s=r[0],a={id:e+":"+o,css:r[1],media:r[2],sourceMap:r[3]};i[s]?i[s].parts.push(a):n.push(i[s]={id:s,parts:[a]})}return n}},4:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={biaoqing:"&#xe6a3;",bofang:"&#xe6a4;",bianji:"&#xe6a5;",bofang2:"&#xe6a7;",cebianlan:"&#xe6a7;",caijian:"&#xe6a8;",chakan:"&#xe6a9;",chexiao:"&#xe6aa;",chuangkouhua:"&#xe6ab;",daojishi:"&#xe6ac;",dianzan:"&#xe6ad;",chuangkouhua2:"&#xe6ae;",dianhua:"&#xe6af;",diannao:"&#xe6b0;",dingwei2:"&#xe6b1;",dingwei:"&#xe6b2;",dingyue:"&#xe6b3;",erweima:"&#xe6b4;",fanhui:"&#xe6b5;",fasong:"&#xe6b6;",fujian:"&#xe6b7;",fenlei:"&#xe6b8;",fanhui2:"&#xeb9;",fenxiang:"&#xe6ba;",fuzhi:"&#xe6bb;",gengduo:"&#xe6bc;",gouwuche:"&#xe6bd;",gongjuxiang:"&#xe6be;",gengduo2:"&#xe6bf;",guanbi:"&#xe6c0;",jishi:"&#xe6c1;",hongxin:"&#xe6c2;",jingyin:"&#xe6c3;",jianpan:"&#xe6c3;",jiesuo:"&#xe6c5;",jisuanqi:"&#xe6c36;",liangdu:"&#xe6c7;",lvjing:"&#xe6c8;",paixu:"&#xe6c9;",paihang:"&#xe6ca;",paizhao:"&#xe6cb;",pingmutoushe:"&#xe6cc;",riqi:"&#xe6cd;",shanchu:"&#xe6ce;",shangchaun:"&#xe6cf;",shangyishou:"&#xe6d0;",shezhi:"&#xe6d1;",shizhong:"&#xe6d2;",shezhi1:"&#xe6d3;",sousuo:"&#xe6d4;",shuqian:"&#xe6d5;",shuoming:"&#xe6d6;",shuaxin:"&#xe6d7;",suoding:"&#xe6d8;",shipin:"&#xe6d9;",tuichu:"&#xe6da;",tupian:"&#xe6db;",tianjia:"&#xe6dc;",tixing:"&#xe6dd;",wancheng:"&#xe6de;",wengao:"&#xe6df;",xiayishou:"&#xe6e0;",xinxi:"&#xe6e1;",xiazai:"&#xe6e2;",xingxing:"&#xe6e3;",xinxi1:"&#xe6e4;",xuanxiangliebiao:"&#xe6e5;",yidu:"&#xe6e6;",yinliang:"&#xe6e7;",yinbi:"&#xe6e8;",yuyin:"&#xe6e9;",zanting:"&#xe6ea;",yonghu:"&#xe6eb;",youjian:"&#xe6ec;",zhiding:"&#xe6ed;",chongzuo:"&#xe6ee;",zhuye:"&#xe6ef;",ziti:"&#xe6f0;",VPN:"&#xe6f1;","Wi-Fi":"&#xe6f2;",zhuti:"&#xe6f3;",lanya:"&#xe6f4;",quanping:"&#xe6f5;",pingmufanzhuan:"&#xe6f6;",gouwu:"&#xe6f7;",saomiao:"&#xe6f8;"}},5:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.use=t.t=void 0;var i=function(e){return e&&e.__esModule?e:{default:e}}(n(13)).default,o=t.t=function(e,t){for(var n=void 0,o=e.split("."),r=i,s=0,a=o.length;s<a;s++){if(n=r[o[s]],s===a-1)return n;if(!n)return"";r=n}return""},r=t.use=function(e){i=e||i};t.default={t:o,use:r}},6:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return function(e){return e&&e.__esModule?e:{default:e}}(i).default}})},7:function(e,t,n){var i=!1;var o=n(0)(n(10),n(11),function(e){i||n(8)},"data-v-77aa90fe",null);o.options.__file="/Users/suen/Documents/develop/project/weex-flymeui/packages/fm-icon/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},8:function(e,t,n){var i=n(9);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);n(2)("1a663314",i,!1,{})},9:function(e,t,n){(e.exports=n(1)(!1)).push([e.i,"\n\n\n\n\n\n\n",""])}})});