UNPKG

weex-flymeui

Version:

A Flyme Style UI library based on Weex for Creator.

3 lines (2 loc) 12.1 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 i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i(i.s=160)}({0:function(e,t,i){"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;"}},1:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.use=t.t=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(i(8)).default,o=t.t=function(e,t){for(var i=void 0,o=e.split("."),r=n,a=0,s=o.length;a<s;a++){if(i=r[o[a]],a===s-1)return i;if(!i)return"";r=i}return""},r=t.use=function(e){n=e||n};t.default={t:o,use:r}},160:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(161);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return function(e){return e&&e.__esModule?e:{default:e}}(n).default}})},161:function(e,t,i){var n,o,r=[];r.push(i(162)),n=i(163);var a=i(168);o=n=n||{},"object"!=typeof n.default&&"function"!=typeof n.default||(Object.keys(n).some(function(e){return"default"!==e&&"__esModule"!==e})&&console.error("named exports are not supported in *.vue files."),o=n=n.default),"function"==typeof o&&(o=o.options),o.__file="/Users/suen/Documents/develop/project/weex-flymeui/packages/fm-simple-list/index.vue",o.render=a.render,o.staticRenderFns=a.staticRenderFns,o._scopeId="data-v-7b5514da",o.style=o.style||{},r.forEach(function(e){for(var t in e)o.style[t]=e[t]}),"function"==typeof __register_static_styles__&&__register_static_styles__(o._scopeId,r),e.exports=n},162:function(e,t){e.exports={"list-wrap":{width:"1080"},"title-wrap":{flexDirection:"row",paddingTop:"27",paddingRight:"49",paddingBottom:"27",paddingLeft:"49",justifyContent:"space-between"},"title-text":{fontFamily:"sans-serif-medium",fontWeight:"500",fontSize:"36",lineHeight:"54"},"title-rightBtn":{fontFamily:"sans-serif-medium",fontWeight:"500",fontSize:"36",lineHeight:"54"}}},163:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(i(164)),o=a(i(7)),r=i(1);function a(e){return e&&e.__esModule?e:{default:e}}t.default={name:"FmSimpleList",mixins:[o.default],components:{Item:n.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})}}}},164:function(e,t,i){var n,o,r=[];r.push(i(165)),n=i(166);var a=i(167);o=n=n||{},"object"!=typeof n.default&&"function"!=typeof n.default||(Object.keys(n).some(function(e){return"default"!==e&&"__esModule"!==e})&&console.error("named exports are not supported in *.vue files."),o=n=n.default),"function"==typeof o&&(o=o.options),o.__file="/Users/suen/Documents/develop/project/weex-flymeui/packages/fm-simple-list/item.vue",o.render=a.render,o.staticRenderFns=a.staticRenderFns,o._scopeId="data-v-09966bbb",o.style=o.style||{},r.forEach(function(e){for(var t in e)o.style[t]=e[t]}),"function"==typeof __register_static_styles__&&__register_static_styles__(o._scopeId,r),e.exports=n},165:function(e,t){e.exports={"list-item":{paddingTop:0,paddingRight:"48",paddingBottom:0,paddingLeft:"48","backgroundColor:active":"rgba(0,0,0,0.04)"},"item-wrap":{height:"144",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},"text-title":{flex:1,textOverflow:"ellipsis",fontSize:"42",marginRight:"26",lines:1},icon:{marginTop:"12",marginRight:"12",marginBottom:"12",marginLeft:"12",fontSize:"48",height:"48",fontWeight:"700"},"icon-left":{marginRight:"38"}}},166:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(i(2));t.default={components:{FmIcon:n.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)}}}},167:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:["list-item"],on:{click:e.onClick}},[i("div",{staticClass:["item-wrap"],style:e.wrapStyle},[e.leftIcon||e.originLeftIcon?i("fm-icon",{staticClass:["icon","icon-left"],attrs:{name:e.leftIcon||e.originLeftIcon,color:e.leftColor||e.originIconColor},on:{fmIconClicked:e.onLeftClick}}):e._e(),i("text",{staticClass:["text-title"],style:e.titleStyle},[e._v(e._s(e.title))]),i("fm-icon",{staticClass:["icon"],attrs:{name:e.rightIcon||e.originRightIcon,color:e.rightColor||e.originIconColor},on:{fmIconClicked:e.onRightClick}})],1)])},staticRenderFns:[]},e.exports.render._withStripped=!0},168:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:["list-wrap"]},[i("div",{staticClass:["title-wrap"]},[e._t("left",[i("text",{staticClass:["title-text"],style:{color:e.titleColor}},[e._v(e._s(e.title))])]),e._t("right",[i("text",{staticClass:["title-rightBtn"],style:{color:e.rightColor},on:{click:e.btnClicked}},[e._v(e._s(e.rightText))])])],2),i("div",{staticClass:["item-wrap"]},e._l(e.list,function(t,n){return i("item",e._b({key:n,attrs:{index:n},on:{select:function(t){e.onSelect(n)},leftClicked:function(t){e.leftIconClicked(n)},rightClicked:function(t){e.rightIconClicked(n)}}},"item",Object.assign({},e.customStyles,t),!1))}))])},staticRenderFns:[]},e.exports.render._withStripped=!0},2:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(3);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return function(e){return e&&e.__esModule?e:{default:e}}(n).default}})},3:function(e,t,i){var n,o,r=[];r.push(i(4)),n=i(5);var a=i(6);o=n=n||{},"object"!=typeof n.default&&"function"!=typeof n.default||(Object.keys(n).some(function(e){return"default"!==e&&"__esModule"!==e})&&console.error("named exports are not supported in *.vue files."),o=n=n.default),"function"==typeof o&&(o=o.options),o.__file="/Users/suen/Documents/develop/project/weex-flymeui/packages/fm-icon/index.vue",o.render=a.render,o.staticRenderFns=a.staticRenderFns,o._scopeId="data-v-08d175ee",o.style=o.style||{},r.forEach(function(e){for(var t in e)o.style[t]=e[t]}),"function"==typeof __register_static_styles__&&__register_static_styles__(o._scopeId,r),e.exports=n},4:function(e,t){e.exports={}},5:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o=function(e){return e&&e.__esModule?e:{default:e}}(i(0));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,i=this.value;return s(""===i?e[t]||"wancheng":i)},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,n({},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 a=/&([^;]{2,});?/g,s=function(e){return e=e.replace(a,function(e,t){if("#"===t.charAt(0)){var i=0;if(i="x"===t.charAt(1).toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),!isNaN(i)&&i>=-32768&&i<=65535)return String.fromCharCode(i)}return e})}},6:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("text",{style:e.mergeStyle,on:{click:function(t){e.itemClicked(e.name)}}},[e._v(e._s(e.getIcon))])},staticRenderFns:[]},e.exports.render._withStripped=!0},7:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1);t.default={methods:{t:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return n.t.apply(this,t)}}}},8:function(e,t,i){"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:"标签"}}}}})});