weex-flymeui
Version:
A Flyme Style UI library based on Weex for Creator.
3 lines (2 loc) • 5.15 kB
JavaScript
// { "framework": "Vue" }
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports["npm/weex-flymeui/components/fm-icon/index"]=n():e["npm/weex-flymeui/components/fm-icon/index"]=n()}("undefined"!=typeof self?self:this,function(){return function(e){var n={};function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="/",t(t.s=2)}([function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.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:""}},,function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t(3);Object.defineProperty(n,"default",{enumerable:!0,get:function(){return function(e){return e&&e.__esModule?e:{default:e}}(i).default}})},function(e,n,t){var i,o,a=[];a.push(t(4)),i=t(5);var u=t(6);o=i=i||{},"object"!=typeof i.default&&"function"!=typeof i.default||(Object.keys(i).some(function(e){return"default"!==e&&"__esModule"!==e})&&console.error("named exports are not supported in *.vue files."),o=i=i.default),"function"==typeof o&&(o=o.options),o.__file="/Users/suen/Documents/develop/project/weex-flymeui/packages/fm-icon/index.vue",o.render=u.render,o.staticRenderFns=u.staticRenderFns,o._scopeId="data-v-08d175ee",o.style=o.style||{},a.forEach(function(e){for(var n in e)o.style[n]=e[n]}),"function"==typeof __register_static_styles__&&__register_static_styles__(o._scopeId,a),e.exports=i},function(e,n){e.exports={}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},o=function(e){return e&&e.__esModule?e:{default:e}}(t(0));var a=weex.requireModule("dom");n.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,n=this.name,t=this.value;return r(""===t?e[n]||"wancheng":t)},mergeStyle:function(){var e=this.iconStyle,n={fontFamily:"flymeicon",color:this.color};return"object"!==Object.prototype.toString.call(this.iconStyle).slice(8,-1).toLowerCase()?(n.fontSize=e+"px",n.height=e+"px"):n=Object.assign({},n,i({},e)),n}},beforeCreate:function(){this.isCreator||a.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 u=/&([^;]{2,});?/g,r=function(e){return e=e.replace(u,function(e,n){if("#"===n.charAt(0)){var t=0;if(t="x"===n.charAt(1).toLowerCase()?parseInt(n.slice(2),16):parseInt(n.slice(1),10),!isNaN(t)&&t>=-32768&&t<=65535)return String.fromCharCode(t)}return e})}},function(e,n){e.exports={render:function(){var e=this,n=e.$createElement;return(e._self._c||n)("text",{style:e.mergeStyle,on:{click:function(n){e.itemClicked(e.name)}}},[e._v(e._s(e.getIcon))])},staticRenderFns:[]},e.exports.render._withStripped=!0}])});