diff --git a/README.md b/README.md index 17b07a9..d44b359 100644 --- a/README.md +++ b/README.md @@ -39,18 +39,24 @@ QQ群: 769620939 //搜索延迟 ms delay: 500, //搜索默认提示 - searchTips: '请选择', //please search + searchTips: setting.searchTips, //是否开始本地搜索 filterable: false, - //本地搜索过滤方法, 返回true表示显示, false不显示, val:当前输入框搜索值, item:选项数据, index: 数组坐标, porp: 自定义属性 + //本地搜索过滤方法 filterMethod: function(val, item, index, prop){ if(!val) return true; return item[prop.name].indexOf(val) != -1; }, //下拉方向 - direction: 'auto', //auto, down, up + direction: 'auto', //自定义样式 style: {}, + //是否开启单选模式 + radio: false, + //是否开启重复选模式 + repeat: false, + //是否点击选项后自动关闭下拉框 + clickClose: false, //自定义属性名称 prop: { name: 'name', @@ -77,22 +83,27 @@ QQ群: 769620939 }, count: { template(data, sels){ - return "已选中 " + sels.length + " 项, 共 " + data.length + " 项" + return '已选中 '+sels.length+' 项, 共 '+data.length+' 项' } }, }, }, - // 展开下拉框, return false; 代表组件受控 + + // 展开下拉框 show(){ }, - // 隐藏下拉框, return false; 代表组件受控 + // 隐藏下拉框 hidn(){ }, // 模板组成, 当前option数据, 已经选中的数据, name, value - template(item, sels, name, value){ + template({ item, sels, name, value }){ return name; + }, + //监听选中事件 + on({ arr, item, selected }){ + } } ``` diff --git a/dist/xm-select.js b/dist/xm-select.js index 1c10093..7c9acdb 100644 --- a/dist/xm-select.js +++ b/dist/xm-select.js @@ -1 +1 @@ -!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return 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=4)}([function(e){e.exports={a:"xm-select",b:"1.0.0"}},function(e,t,n){"use strict";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 r=(l=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(l))))+" */"),i=o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"});return[n].concat(i).concat([r]).join("\n")}var l;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={},r=0;r=0&&u.splice(t,1)}function b(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var o=function(){0;return n.nc}();o&&(e.attrs.nonce=o)}return y(t,e.attrs),h(e,t),t}function y(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function v(e,t){var n,o,r,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var l=s++;n=c||(c=b(t)),o=g.bind(null,n,l,!1),r=g.bind(null,n,l,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",y(t,e.attrs),h(e,t),t}(t),o=function(e,t,n){var o=n.css,r=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(o=p(o));r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var l=new Blob([o],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(l),a&&URL.revokeObjectURL(a)}.bind(null,n,t),r=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=b(t),o=function(e,t){var n=t.css,o=t.media;o&&e.setAttribute("media",o);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){m(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=l()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=d(e,t);return f(n,t),function(e){for(var o=[],r=0;r2;)l.push(s[c]);for(t&&null!=t.children&&(l.length||l.push(t.children),delete t.children);l.length;)if((o=l.pop())&&void 0!==o.pop)for(c=o.length;c--;)l.push(o[c]);else"boolean"==typeof o&&(o=null),(i="function"!=typeof e)&&(null==o?o="":"number"==typeof o?o=String(o):"string"!=typeof o&&(i=!1)),i&&n?u[u.length-1]+=o:u===a?u=[o]:u.push(o),n=i;var p=new r;return p.nodeName=e,p.children=u,p.attributes=null==t?void 0:t,p.key=null==t?void 0:t.key,p}function s(e,t){for(var n in t)e[n]=t[n];return e}function u(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}var p="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,f=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,d=[];function h(e){!e._dirty&&(e._dirty=!0)&&1==d.push(e)&&p(m)}function m(){for(var e;e=d.pop();)e._dirty&&R(e)}function b(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function y(e){var t=s({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var o in n)void 0===t[o]&&(t[o]=n[o]);return t}function v(e){var t=e.parentNode;t&&t.removeChild(e)}function x(e,t,n,r,i){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)u(n,null),u(r,e);else if("class"!==t||i)if("style"===t){if(r&&"string"!=typeof r&&"string"!=typeof n||(e.style.cssText=r||""),r&&"object"==o(r)){if("string"!=typeof n)for(var l in n)l in r||(e.style[l]="");for(var l in r)e.style[l]="number"==typeof r[l]&&!1===f.test(l)?r[l]+"px":r[l]}}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var a=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),r?n||e.addEventListener(t,A,a):e.removeEventListener(t,A,a),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!i&&t in e){try{e[t]=null==r?"":r}catch(e){}null!=r&&!1!==r||"spellcheck"==t||e.removeAttribute(t)}else{var c=i&&t!==(t=t.replace(/^xlink:?/,""));null==r||!1===r?c?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof r&&(c?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function A(e){return this._listeners[e.type](e)}var g=[],w=0,C=!1,k=!1;function O(){for(var e;e=g.shift();)e.componentDidMount&&e.componentDidMount()}function S(e,t,n,o,r,i){w++||(C=null!=r&&void 0!==r.ownerSVGElement,k=null!=e&&!("__preactattr_"in e));var l=function e(t,n,o,r,i){var l=t,a=C;if(null!=n&&"boolean"!=typeof n||(n=""),"string"==typeof n||"number"==typeof n)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||i)?t.nodeValue!=n&&(t.nodeValue=n):(l=document.createTextNode(n),t&&(t.parentNode&&t.parentNode.replaceChild(l,t),j(t,!0))),l.__preactattr_=!0,l;var c,s,u=n.nodeName;if("function"==typeof u)return function(e,t,n,o){for(var r=e&&e._component,i=r,l=e,a=r&&e._componentConstructor===t.nodeName,c=a,s=y(t);r&&!c&&(r=r._parentComponent);)c=r.constructor===t.nodeName;return r&&c&&(!o||r._component)?(T(r,s,3,n,o),e=r.base):(i&&!a&&(U(i),e=l=null),r=E(t.nodeName,s,n),e&&!r.nextBase&&(r.nextBase=e,l=null),T(r,s,1,n,o),e=r.base,l&&e!==l&&(l._component=null,j(l,!1))),e}(t,n,o,r);if(C="svg"===u||"foreignObject"!==u&&C,u=String(u),(!t||!b(t,u))&&(c=u,(s=C?document.createElementNS("http://www.w3.org/2000/svg",c):document.createElement(c)).normalizedNodeName=c,l=s,t)){for(;t.firstChild;)l.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(l,t),j(t,!0)}var p=l.firstChild,f=l.__preactattr_,d=n.children;if(null==f){f=l.__preactattr_={};for(var h=l.attributes,m=h.length;m--;)f[h[m].name]=h[m].value}return!k&&d&&1===d.length&&"string"==typeof d[0]&&null!=p&&void 0!==p.splitText&&null==p.nextSibling?p.nodeValue!=d[0]&&(p.nodeValue=d[0]):(d&&d.length||null!=p)&&function(t,n,o,r,i){var l,a,c,s,u,p,f,d,h=t.childNodes,m=[],y={},x=0,A=0,g=h.length,w=0,C=n?n.length:0;if(0!==g)for(var k=0;k"===t?(a(),o=1):o&&("="===t?(o=4,n=r,r=""):"/"===t?(a(),3===o&&(l=l[0]),o=l,(l=l[0]).push(o,4),o=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(a(),o=2):r+=t)}return a(),l},V="function"==typeof Map,N=V?new Map:{},I=V?function(e){var t=N.get(e);return t||N.set(e,t=F(e)),t}:function(e){for(var t="",n=0;n1?t:t[0]}).bind(c);function L(e){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function D(e,t){for(var n=0;n300?"down":"up"}this.setState({directionVal:n})}else{if(this.props.hidn&&0==this.props.hidn())return;this.bodyView.scroll(0,0)}this.setState({show:t}),e&&e.stopPropagation()}},{key:"componentWillReceiveProps",value:function(e){}},{key:"render",value:function(e,t){var n=this,o=t.sels,r=t.show,i=e.tips,l=e.theme,a=(e.data,e.prop),s=(e.template,e.model,e.empty,e.style),u=e.radio,p=e.repeat,f=e.clickClose,d=e.on,h={borderColor:l.color},m={style:le({},s,r?h:{}),onClick:this.onClick.bind(this)},b=r?"xm-icon xm-icon-expand":"xm-icon",y={tips:i,show:!o.length},v=a.value,x=function(e,t,r,i){if(!r){if(!t||p&&!i)u?n.setState({sels:[e]}):n.setState({sels:[].concat(ie(o),[e])});else{var l=o.findIndex(function(t){return t[v]==e[v]});-1!=l&&(o.splice(l,1),n.setState(o))}d&&d({arr:o,item:e,selected:!t}),f&&!i&&n.onClick()}},A=le({},e,{sels:o,ck:x,title:o.map(function(e){return e[a.name]}).join(",")}),g=le({},e,{sels:o,ck:x,show:r}),w=["xm-body",this.state.directionVal,r?"":"dis"].join(" ");return c("xm-select",m,c("i",{class:b}),c(Y,y),c(Z,A),c("div",{class:w,ref:function(e){return n.bodyView=e}},c(re,g)))}}])&&se(n.prototype,o),r&&se(n,r),t}();function he(){for(var e=[],t=0;t0&&void 0!==arguments[0]?arguments[0]:"zn",t=be[e]||me;return{data:[],initValue:null,tips:t.tips,empty:t.empty,delay:500,searchTips:t.searchTips,filterable:!1,filterMethod:function(e,t,n,o){return!e||-1!=t[o.name].indexOf(e)},direction:"auto",style:{},radio:!1,repeat:!1,clickClose:!1,prop:{name:"name",value:"value",selected:"selected",disabled:"disabled"},theme:{color:"#009688"},model:{label:{type:"block",text:{left:"",right:"",separator:", "},block:{showCount:0,showIcon:!0},count:{template:function(e,t){return"已选中 ".concat(t.length," 项, 共 ").concat(e.length," 项")}}}},show:function(){},hidn:function(){},template:function(e){e.item,e.sels;var t=e.name;e.value;return t},on:function(e){e.arr,e.item,e.selected}}};function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xe(){return(xe=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.options=Object.assign(this.options,t);var o,r=(o=this.options.el,document.querySelector(o));if(r){n&&Oe[this.options.el]&&Oe[this.options.el].reset();var i,l,a;return i=c(de,xe({},this.options,{onClose:ke,onRef:function(t){return Oe[e.options.el]=t}})),a=l=r,S(l.firstElementChild,i,{},!1,a,!1),Ce[this.options.el]=this,this}he("没有找到渲染对象: ".concat(t.el,", 请检查"))}},{key:"reset",value:function(){var e=this.options;return this.options=ye(e.language),this.update(function(e){for(var t=1;t>>0;for(t&&(n=t),o=new Array(l),r=0;r>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(arguments.length>1&&(n=t),o=0;o>>0;if("function"!=typeof e)throw new TypeError;for(var o=[],r=arguments[1],i=0;i>>0,r=arguments[1],i=0;i .xm-tips {\n color: #999999;\n padding: 0 10px;\n height: 100%;\n}\nxm-select > .xm-icon {\n display: inline-block;\n overflow: hidden;\n position: absolute;\n width: 0;\n height: 0;\n right: 10px;\n top: 50%;\n margin-top: -3px;\n cursor: pointer;\n border: 6px dashed transparent;\n border-top-color: #C2C2C2;\n border-top-style: solid;\n transition: all 0.3s;\n -webkit-transition: all 0.3s;\n}\nxm-select > .xm-icon-expand {\n margin-top: -9px;\n transform: rotate(180deg);\n}\nxm-select > .xm-label {\n padding: 0 10px;\n height: 100%;\n overflow-y: hidden;\n}\nxm-select > .xm-label .xm-label-block {\n display: inline-block;\n position: relative;\n padding: 0px 5px;\n margin: 2px 5px 2px 0;\n height: 22px;\n line-height: 22px;\n border-radius: 3px;\n vertical-align: middle;\n color: #FFF;\n max-width: calc(100% - 20px);\n}\nxm-select > .xm-label .xm-label-block > span {\n display: inline-block;\n color: #FFF;\n text-overflow: ellipsis;\n overflow: hidden;\n}\nxm-select > .xm-label .xm-label-block > i {\n color: #FFF;\n margin-left: 8px;\n font-size: 12px;\n cursor: pointer;\n line-height: 20px;\n float: right;\n margin-top: 2px;\n}\nxm-select > .xm-label .xm-label-block.disabled {\n background-color: #C2C2C2 !important;\n cursor: no-drop !important;\n}\nxm-select > .xm-label .xm-label-block.disabled > i {\n cursor: no-drop !important;\n}\nxm-select > .xm-body {\n position: absolute;\n left: 0;\n top: 42px;\n padding: 5px 0;\n z-index: 999;\n width: 100%;\n border: 1px solid #E6E6E6;\n max-height: 300px;\n overflow-y: auto;\n background-color: #fff;\n border-radius: 2px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);\n animation-name: xm-upbit;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n}\nxm-select > .xm-body.up {\n top: auto;\n bottom: 42px;\n}\nxm-select > .xm-body .xm-option {\n position: relative;\n padding: 0 10px;\n cursor: pointer;\n}\nxm-select > .xm-body .xm-option:hover {\n background-color: #f2f2f2;\n}\nxm-select > .xm-body .xm-option:hover > .xm-option-icon > i {\n color: #f2f2f2;\n}\nxm-select > .xm-body .xm-option-icon {\n color: #FFF;\n width: 18px;\n height: 18px;\n border: 1px solid #E6E6E6;\n border-radius: 5px;\n z-index: 2;\n display: inline-block;\n vertical-align: middle;\n}\nxm-select > .xm-body .xm-option-icon > i {\n float: left;\n height: 18px;\n line-height: 17px;\n color: #FFF;\n}\nxm-select > .xm-body .xm-option-content {\n display: inline-block;\n position: relative;\n padding: 0 15px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n color: #666;\n line-height: 36px;\n vertical-align: middle;\n width: calc(100% - 18px);\n}\nxm-select > .xm-body .xm-select-empty {\n text-align: center;\n color: #999;\n}\nxm-select > .xm-body .disabled {\n cursor: no-drop;\n}\nxm-select > .xm-body .disabled:hover {\n background-color: #FFF;\n}\nxm-select > .xm-body .disabled:hover > .xm-option-icon > i {\n color: #FFF !important;\n}\nxm-select > .xm-body .disabled .xm-option-icon {\n border-color: #C2C2C2 !important;\n}\nxm-select > .xm-body .disabled .xm-option-content {\n color: #C2C2C2 !important;\n}\nxm-select > .xm-body .disabled.selected > .xm-option-icon > i {\n color: #C2C2C2 !important;\n}\nxm-select > .xm-body .xm-search {\n background-color: #FFF !important;\n position: relative;\n padding: 0 10px;\n cursor: pointer;\n}\nxm-select > .xm-body .xm-search > i {\n position: absolute;\n}\nxm-select > .xm-body .xm-search-input {\n border: none;\n border-bottom: 1px solid #E6E6E6;\n padding-left: 27px;\n cursor: text;\n}\nxm-select .xm-input {\n cursor: pointer;\n border-radius: 2px;\n border-width: 1px;\n border-style: solid;\n border-color: #E6E6E6;\n display: block;\n width: 100%;\n box-sizing: border-box;\n background-color: #FFF;\n height: 36px;\n line-height: 1.3;\n padding-left: 10px;\n outline: 0;\n}\nxm-select .dis {\n display: none;\n}\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,o=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}},function(e,t,n){var o=n(11);"string"==typeof o&&(o=[[e.i,o,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(2)(o,r);o.locals&&(e.exports=o.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,'/* 阿里巴巴矢量图标库 */\n@font-face {\n font-family: "xm-iconfont";\n src: url(\'//at.alicdn.com/t/font_792691_qxv28s6g1l9.eot?t=1534240067831\');\n /* IE9*/\n src: url(\'//at.alicdn.com/t/font_792691_qxv28s6g1l9.eot?t=1534240067831#iefix\') format(\'embedded-opentype\'), /* IE6-IE8 */ url(\'data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAsYAAsAAAAAEQwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8ukovY21hcAAAAYAAAACrAAACPBtV6wxnbHlmAAACLAAABnEAAAmMovtEvWhlYWQAAAigAAAAMQAAADYSctBCaGhlYQAACNQAAAAgAAAAJAgBA69obXR4AAAI9AAAABsAAAAwMCX//WxvY2EAAAkQAAAAGgAAABoN8gwubWF4cAAACSwAAAAeAAAAIAEiAM9uYW1lAAAJTAAAAUUAAAJtPlT+fXBvc3QAAAqUAAAAhAAAALJ1LunfeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWacwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeMbwwZ27438AQw9zMcAQozAiSAwDk4AxmeJzlks0JwzAMhZ8bN/1xD4GU0h2Se26BbJMJOkkn6KmTPbJF8mT5UGg3qMRn0EPIRs8A9gAq0YsIhDcCLF5SQ9YrnLMe8VB9RSMlMjCxYcueIyfOy7CuAFHU7lP9iqApt5L3ksBJbzlgZ9PVkXDUvbWa6x8T/i0u+XyWKtmmHW0NDI55yeRok2DjaKdg65jX7Bzzm71jXnN08vzJkQvg7Ng/WAYH9Qb3wzM/AHicjVVvbFzFEd/Zfbv7/vn9uXf33vl8Pt/dO99BHOzEZ9/DKTImR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CBL6jV0K5D8H/8xVAAAAeJxjYGRgYADi16c/vIvnt/nKwM3CAALXZxxzhtH///23YVFhbgZyORiYQKIAm34OJQAAAHicY2BkYGBu+N/AEMOi/P/f//8sKgxAERTAAwCmuAa3eJxjYWBgYAFhRiiNFf//z6L8/x+IDQAkCQRQAAAAAAAAjAEAATgBfgGaAiACbgMMA2AEhATGAAB4nGNgZGBg4GE4DMQgwATEXEDIwPAfzGcAAB2tAfIAAHicZY9NTsMwEIVf+gekEqqoYIfkBWIBKP0Rq25YVGr3XXTfpk6bKokjx63UA3AejsAJOALcgDvwSCebNpbH37x5Y08A3OAHHo7fLfeRPVwyO3INF7gXrlN/EG6QX4SbaONVuEX9TdjHM6bCbXRheYPXuGL2hHdhDx18CNdwjU/hOvUv4Qb5W7iJO/wKt9Dx6sI+5l5XuI1HL/bHVi+cXqnlQcWhySKTOb+CmV7vkoWt0uqca1vEJlODoF9JU51pW91T7NdD5yIVWZOqCas6SYzKrdnq0AUb5/JRrxeJHoQm5Vhj/rbGAo5xBYUlDowxQhhkiMro6DtVZvSvsUPCXntWPc3ndFsU1P9zhQEC9M9cU7qy0nk6T4E9XxtSdXQrbsuelDSRXs1JErJCXta2VELqATZlV44RelzRiT8oZ0j/AAlabsgAAAB4nG2L3QqCQBCFZ9RWU7sOfAeh8IFi3N10EHYUG1p8+gSjqz44F+cPEjgo4T81Jphihic0mGOBZyyxwhovUCxKIe4ylthRuDqV+I22UcLQ6+QH4ubWdZZkU3m4o/0tUqtSvT33TPLits12fzc+zhRcvoquo0o281OLhcMw7Q+AD8sULE0=\') format(\'woff\'), url(\'//at.alicdn.com/t/font_792691_qxv28s6g1l9.ttf?t=1534240067831\') format(\'truetype\'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ url(\'//at.alicdn.com/t/font_792691_qxv28s6g1l9.svg?t=1534240067831#iconfont\') format(\'svg\');\n /* iOS 4.1- */\n}\n.xm-iconfont {\n font-family: "xm-iconfont" !important;\n font-size: 16px;\n font-style: normal;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.xm-icon-quanxuan:before {\n content: "\\e62c";\n}\n.xm-icon-caidan:before {\n content: "\\e610";\n}\n.xm-icon-fanxuan:before {\n content: "\\e837";\n}\n.xm-icon-pifu:before {\n content: "\\e668";\n}\n.xm-icon-qingkong:before {\n content: "\\e63e";\n}\n.xm-icon-sousuo:before {\n content: "\\e600";\n}\n.xm-icon-danx:before {\n content: "\\e62b";\n}\n.xm-icon-duox:before {\n content: "\\e613";\n}\n.xm-icon-close:before {\n content: "\\e601";\n}\n.xm-icon-expand:before {\n content: "\\e641";\n}\n',""])},function(e,t){(function(t){e.exports=t}).call(this,{})}]); \ No newline at end of file +!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return 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=4)}([function(e){e.exports={a:"xm-select",b:"1.0.0"}},function(e,t,n){"use strict";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 r=(l=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(l))))+" */"),i=o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"});return[n].concat(i).concat([r]).join("\n")}var l;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={},r=0;r=0&&u.splice(t,1)}function b(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var o=function(){0;return n.nc}();o&&(e.attrs.nonce=o)}return y(t,e.attrs),h(e,t),t}function y(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function v(e,t){var n,o,r,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var l=s++;n=c||(c=b(t)),o=g.bind(null,n,l,!1),r=g.bind(null,n,l,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",y(t,e.attrs),h(e,t),t}(t),o=function(e,t,n){var o=n.css,r=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(o=p(o));r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var l=new Blob([o],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(l),a&&URL.revokeObjectURL(a)}.bind(null,n,t),r=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=b(t),o=function(e,t){var n=t.css,o=t.media;o&&e.setAttribute("media",o);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){m(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=l()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=d(e,t);return f(n,t),function(e){for(var o=[],r=0;r2;)l.push(s[c]);for(t&&null!=t.children&&(l.length||l.push(t.children),delete t.children);l.length;)if((o=l.pop())&&void 0!==o.pop)for(c=o.length;c--;)l.push(o[c]);else"boolean"==typeof o&&(o=null),(i="function"!=typeof e)&&(null==o?o="":"number"==typeof o?o=String(o):"string"!=typeof o&&(i=!1)),i&&n?u[u.length-1]+=o:u===a?u=[o]:u.push(o),n=i;var p=new r;return p.nodeName=e,p.children=u,p.attributes=null==t?void 0:t,p.key=null==t?void 0:t.key,p}function s(e,t){for(var n in t)e[n]=t[n];return e}function u(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}var p="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,f=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,d=[];function h(e){!e._dirty&&(e._dirty=!0)&&1==d.push(e)&&p(m)}function m(){for(var e;e=d.pop();)e._dirty&&R(e)}function b(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function y(e){var t=s({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var o in n)void 0===t[o]&&(t[o]=n[o]);return t}function v(e){var t=e.parentNode;t&&t.removeChild(e)}function x(e,t,n,r,i){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)u(n,null),u(r,e);else if("class"!==t||i)if("style"===t){if(r&&"string"!=typeof r&&"string"!=typeof n||(e.style.cssText=r||""),r&&"object"==o(r)){if("string"!=typeof n)for(var l in n)l in r||(e.style[l]="");for(var l in r)e.style[l]="number"==typeof r[l]&&!1===f.test(l)?r[l]+"px":r[l]}}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var a=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),r?n||e.addEventListener(t,A,a):e.removeEventListener(t,A,a),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!i&&t in e){try{e[t]=null==r?"":r}catch(e){}null!=r&&!1!==r||"spellcheck"==t||e.removeAttribute(t)}else{var c=i&&t!==(t=t.replace(/^xlink:?/,""));null==r||!1===r?c?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof r&&(c?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function A(e){return this._listeners[e.type](e)}var g=[],w=0,C=!1,k=!1;function O(){for(var e;e=g.shift();)e.componentDidMount&&e.componentDidMount()}function S(e,t,n,o,r,i){w++||(C=null!=r&&void 0!==r.ownerSVGElement,k=null!=e&&!("__preactattr_"in e));var l=function e(t,n,o,r,i){var l=t,a=C;if(null!=n&&"boolean"!=typeof n||(n=""),"string"==typeof n||"number"==typeof n)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||i)?t.nodeValue!=n&&(t.nodeValue=n):(l=document.createTextNode(n),t&&(t.parentNode&&t.parentNode.replaceChild(l,t),j(t,!0))),l.__preactattr_=!0,l;var c,s,u=n.nodeName;if("function"==typeof u)return function(e,t,n,o){for(var r=e&&e._component,i=r,l=e,a=r&&e._componentConstructor===t.nodeName,c=a,s=y(t);r&&!c&&(r=r._parentComponent);)c=r.constructor===t.nodeName;return r&&c&&(!o||r._component)?(T(r,s,3,n,o),e=r.base):(i&&!a&&(U(i),e=l=null),r=E(t.nodeName,s,n),e&&!r.nextBase&&(r.nextBase=e,l=null),T(r,s,1,n,o),e=r.base,l&&e!==l&&(l._component=null,j(l,!1))),e}(t,n,o,r);if(C="svg"===u||"foreignObject"!==u&&C,u=String(u),(!t||!b(t,u))&&(c=u,(s=C?document.createElementNS("http://www.w3.org/2000/svg",c):document.createElement(c)).normalizedNodeName=c,l=s,t)){for(;t.firstChild;)l.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(l,t),j(t,!0)}var p=l.firstChild,f=l.__preactattr_,d=n.children;if(null==f){f=l.__preactattr_={};for(var h=l.attributes,m=h.length;m--;)f[h[m].name]=h[m].value}return!k&&d&&1===d.length&&"string"==typeof d[0]&&null!=p&&void 0!==p.splitText&&null==p.nextSibling?p.nodeValue!=d[0]&&(p.nodeValue=d[0]):(d&&d.length||null!=p)&&function(t,n,o,r,i){var l,a,c,s,u,p,f,d,h=t.childNodes,m=[],y={},x=0,A=0,g=h.length,w=0,C=n?n.length:0;if(0!==g)for(var k=0;k"===t?(a(),o=1):o&&("="===t?(o=4,n=r,r=""):"/"===t?(a(),3===o&&(l=l[0]),o=l,(l=l[0]).push(o,4),o=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(a(),o=2):r+=t)}return a(),l},V="function"==typeof Map,N=V?new Map:{},I=V?function(e){var t=N.get(e);return t||N.set(e,t=M(e)),t}:function(e){for(var t="",n=0;n1?t:t[0]}).bind(c);function L(e){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function D(e,t){for(var n=0;n300?"down":"up"}this.setState({directionVal:n})}else{if(this.props.hidn&&0==this.props.hidn())return;this.bodyView.scroll(0,0)}this.setState({show:t}),e&&e.stopPropagation()}},{key:"componentWillReceiveProps",value:function(e){}},{key:"render",value:function(e,t){var n=this,o=t.sels,r=t.show,i=e.tips,l=e.theme,a=(e.data,e.prop),s=(e.template,e.model,e.empty,e.style),u=e.radio,p=e.repeat,f=e.clickClose,d=e.on,h={borderColor:l.color},m={style:le({},s,r?h:{}),onClick:this.onClick.bind(this)},b=r?"xm-icon xm-icon-expand":"xm-icon",y={tips:i,show:!o.length},v=a.value,x=function(e,t,r,i){if(!r){if(!t||p&&!i)u?n.setState({sels:[e]}):n.setState({sels:[].concat(ie(o),[e])});else{var l=o.findIndex(function(t){return t[v]==e[v]});-1!=l&&(o.splice(l,1),n.setState(o))}d&&d({arr:o,item:e,selected:!t}),f&&!i&&n.onClick()}},A=le({},e,{sels:o,ck:x,title:o.map(function(e){return e[a.name]}).join(",")}),g=le({},e,{sels:o,ck:x,show:r}),w=["xm-body",this.state.directionVal,r?"":"dis"].join(" ");return c("xm-select",m,c("i",{class:b}),c(Y,y),c(Z,A),c("div",{class:w,ref:function(e){return n.bodyView=e}},c(re,g)))}}])&&se(n.prototype,o),r&&se(n,r),t}();function he(){for(var e=[],t=0;t0&&void 0!==arguments[0]?arguments[0]:"zn",t=be[e]||me;return{data:[],initValue:null,tips:t.tips,empty:t.empty,delay:500,searchTips:t.searchTips,filterable:!1,filterMethod:function(e,t,n,o){return!e||-1!=t[o.name].indexOf(e)},direction:"auto",style:{},radio:!1,repeat:!1,clickClose:!1,prop:{name:"name",value:"value",selected:"selected",disabled:"disabled"},theme:{color:"#009688"},model:{label:{type:"block",text:{left:"",right:"",separator:", "},block:{showCount:0,showIcon:!0},count:{template:function(e,t){return"已选中 ".concat(t.length," 项, 共 ").concat(e.length," 项")}}}},show:function(){},hidn:function(){},template:function(e){e.item,e.sels;var t=e.name;e.value;return t},on:function(e){e.arr,e.item,e.selected}}};function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xe(){return(xe=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.options=Object.assign(this.options,t);var o,r=(o=this.options.el,document.querySelector(o));if(r){n&&Oe[this.options.el]&&Oe[this.options.el].reset();var i,l,a;return i=c(de,xe({},this.options,{onClose:ke,onRef:function(t){return Oe[e.options.el]=t}})),a=l=r,S(l.firstElementChild,i,{},!1,a,!1),Ce[this.options.el]=this,this}he("没有找到渲染对象: ".concat(t.el,", 请检查"))}},{key:"reset",value:function(){var e=this.options;return this.options=ye(e.language),this.update(function(e){for(var t=1;t>>0;for(t&&(n=t),o=new Array(l),r=0;r>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(arguments.length>1&&(n=t),o=0;o>>0;if("function"!=typeof e)throw new TypeError;for(var o=[],r=arguments[1],i=0;i>>0,r=arguments[1],i=0;i .xm-tips {\n color: #999999;\n padding: 0 10px;\n height: 100%;\n}\nxm-select > .xm-icon {\n display: inline-block;\n overflow: hidden;\n position: absolute;\n width: 0;\n height: 0;\n right: 10px;\n top: 50%;\n margin-top: -3px;\n cursor: pointer;\n border: 6px dashed transparent;\n border-top-color: #C2C2C2;\n border-top-style: solid;\n transition: all 0.3s;\n -webkit-transition: all 0.3s;\n}\nxm-select > .xm-icon-expand {\n margin-top: -9px;\n transform: rotate(180deg);\n}\nxm-select > .xm-label {\n padding: 0 10px;\n height: 100%;\n overflow-y: hidden;\n}\nxm-select > .xm-label .xm-label-block {\n display: inline-block;\n position: relative;\n padding: 0px 5px;\n margin: 2px 5px 2px 0;\n height: 22px;\n line-height: 22px;\n border-radius: 3px;\n vertical-align: middle;\n color: #FFF;\n max-width: calc(100% - 20px);\n}\nxm-select > .xm-label .xm-label-block > span {\n display: inline-block;\n color: #FFF;\n text-overflow: ellipsis;\n overflow: hidden;\n}\nxm-select > .xm-label .xm-label-block > i {\n color: #FFF;\n margin-left: 8px;\n font-size: 12px;\n cursor: pointer;\n line-height: 20px;\n float: right;\n margin-top: 2px;\n}\nxm-select > .xm-label .xm-label-block.disabled {\n background-color: #C2C2C2 !important;\n cursor: no-drop !important;\n}\nxm-select > .xm-label .xm-label-block.disabled > i {\n cursor: no-drop !important;\n}\nxm-select > .xm-body {\n position: absolute;\n left: 0;\n top: 42px;\n padding: 5px 0;\n z-index: 999;\n width: 100%;\n border: 1px solid #E6E6E6;\n max-height: 300px;\n overflow-y: auto;\n background-color: #fff;\n border-radius: 2px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);\n animation-name: xm-upbit;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n}\nxm-select > .xm-body.up {\n top: auto;\n bottom: 42px;\n}\nxm-select > .xm-body .xm-option {\n position: relative;\n padding: 0 10px;\n cursor: pointer;\n}\nxm-select > .xm-body .xm-option:hover {\n background-color: #f2f2f2;\n}\nxm-select > .xm-body .xm-option:hover > .xm-option-icon > i {\n color: #f2f2f2;\n}\nxm-select > .xm-body .xm-option-icon {\n color: #FFF;\n width: 18px;\n height: 18px;\n border: 1px solid #E6E6E6;\n border-radius: 5px;\n z-index: 2;\n display: inline-block;\n vertical-align: middle;\n}\nxm-select > .xm-body .xm-option-icon > i {\n float: left;\n height: 18px;\n line-height: 17px;\n color: #FFF;\n}\nxm-select > .xm-body .xm-option-content {\n display: inline-block;\n position: relative;\n padding: 0 15px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n color: #666;\n line-height: 36px;\n vertical-align: middle;\n width: calc(100% - 18px);\n}\nxm-select > .xm-body .xm-select-empty {\n text-align: center;\n color: #999;\n}\nxm-select > .xm-body .disabled {\n cursor: no-drop;\n}\nxm-select > .xm-body .disabled:hover {\n background-color: #FFF;\n}\nxm-select > .xm-body .disabled:hover > .xm-option-icon > i {\n color: #FFF !important;\n}\nxm-select > .xm-body .disabled .xm-option-icon {\n border-color: #C2C2C2 !important;\n}\nxm-select > .xm-body .disabled .xm-option-content {\n color: #C2C2C2 !important;\n}\nxm-select > .xm-body .disabled.selected > .xm-option-icon > i {\n color: #C2C2C2 !important;\n}\nxm-select > .xm-body .xm-search {\n background-color: #FFF !important;\n position: relative;\n padding: 0 10px;\n cursor: pointer;\n}\nxm-select > .xm-body .xm-search > i {\n position: absolute;\n}\nxm-select > .xm-body .xm-search-input {\n border: none;\n border-bottom: 1px solid #E6E6E6;\n padding-left: 27px;\n cursor: text;\n}\nxm-select .xm-input {\n cursor: pointer;\n border-radius: 2px;\n border-width: 1px;\n border-style: solid;\n border-color: #E6E6E6;\n display: block;\n width: 100%;\n box-sizing: border-box;\n background-color: #FFF;\n height: 36px;\n line-height: 1.3;\n padding-left: 10px;\n outline: 0;\n}\nxm-select .dis {\n display: none;\n}\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,o=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}},function(e,t,n){var o=n(11);"string"==typeof o&&(o=[[e.i,o,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(2)(o,r);o.locals&&(e.exports=o.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,'/* 阿里巴巴矢量图标库 */\n@font-face {\n font-family: "xm-iconfont";\n src: url(\'//at.alicdn.com/t/font_792691_qxv28s6g1l9.eot?t=1534240067831\');\n /* IE9*/\n src: url(\'//at.alicdn.com/t/font_792691_qxv28s6g1l9.eot?t=1534240067831#iefix\') format(\'embedded-opentype\'), /* IE6-IE8 */ url(\'data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAsYAAsAAAAAEQwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8ukovY21hcA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HdhDx18CNdwjU/hOvUv4Qb5W7iJO/wKt9Dx6sI+5l5XuI1HL/bHVi+cXqnlQcWhySKTOb+CmV7vkoWt0uqca1vEJlODoF9JU51pW91T7NdD5yIVWZOqCas6SYzKrdnq0AUb5/JRrxeJHoQm5Vhj/rbGAo5xBYUlDowxQhhkiMro6DtVZvSvsUPCXntWPc3ndFsU1P9zhQEC9M9cU7qy0nk6T4E9XxtSdXQrbsuelDSRXs1JErJCXta2VELqATZlV44RelzRiT8oZ0j/AAlabsgAAAB4nG2L3QqCQBCFZ9RWU7sOfAeh8IFi3N10EHYUG1p8+gSjqz44F+cPEjgo4T81Jphihic0mGOBZyyxwhovUCxKIe4ylthRuDqV+I22UcLQ6+QH4ubWdZZkU3m4o/0tUqtSvT33TPLits12fzc+zhRcvoquo0o281OLhcMw7Q+AD8sULE0=\') format(\'woff\'), url(\'//at.alicdn.com/t/font_792691_qxv28s6g1l9.ttf?t=1534240067831\') format(\'truetype\'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ url(\'//at.alicdn.com/t/font_792691_qxv28s6g1l9.svg?t=1534240067831#iconfont\') format(\'svg\');\n /* iOS 4.1- */\n}\n.xm-iconfont {\n font-family: "xm-iconfont" !important;\n font-size: 16px;\n font-style: normal;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.xm-icon-quanxuan:before {\n content: "\\e62c";\n}\n.xm-icon-caidan:before {\n content: "\\e610";\n}\n.xm-icon-fanxuan:before {\n content: "\\e837";\n}\n.xm-icon-pifu:before {\n content: "\\e668";\n}\n.xm-icon-qingkong:before {\n content: "\\e63e";\n}\n.xm-icon-sousuo:before {\n content: "\\e600";\n}\n.xm-icon-danx:before {\n content: "\\e62b";\n}\n.xm-icon-duox:before {\n content: "\\e613";\n}\n.xm-icon-close:before {\n content: "\\e601";\n}\n.xm-icon-expand:before {\n content: "\\e641";\n}\n',""])},function(e,t){(function(t){e.exports=t}).call(this,{})}]); \ No newline at end of file diff --git a/docs/data.js b/docs/data.js index 4978766..70c73b2 100644 --- a/docs/data.js +++ b/docs/data.js @@ -34,6 +34,10 @@ xmSelect.render({

更新日志

`, js: ``, comment: ` +[2019-07-29] v1.0.0.0729 +1. 更新文档显示问题 + + [2019-07-27] v1.0.0.0727 1. 新增单选模式, {radio: true|false} 2. 新增重复选模式, {repeat: true|false} diff --git a/docs/index.css b/docs/index.css index 24816a2..dba116d 100644 --- a/docs/index.css +++ b/docs/index.css @@ -4,10 +4,15 @@ .syntaxhighlighter .toolbar a{display: none!important;} .syntaxhighlighter .line.alt1,.syntaxhighlighter .line.alt2{background-color: #FAFAFA !important;} .syntaxhighlighter{background-color: #FAFAFA !important; padding: 10px; width: calc(100% - 20px) !important; border-radius: 5px;} -div.slide{width: 90vw; overflow: auto;} +/* div.slide{width: 90vw; overflow: auto;} */ h3{font-size: 20px; font-weight: bold; margin-bottom: 20px;} .dcode{margin-top: 100px;} .mt10{margin-top: 10px;} -#header{left: 5vw; right: 5vw; top: 20px; position: fixed;} + p{font-size: 14px; color: #5e6d82; line-height: 1.5em;margin: 15px 0 10px;} a{color: #409eff; text-decoration: none;} +#content{height: calc(100vh - 99px); overflow: auto; padding: 10px;} +/* #header{left: 5vw; right: 5vw; top: 20px; position: fixed;} */ +#header{padding: 20px 50px; background-color: #0B0D10; top: 0; left: 0; right: 0; z-index: 99999; border-bottom: 1px solid #DCDFE5;} +#header xm-select{background-color: #17191C; color: #FFF;} +body{margin: 0;} diff --git a/docs/index.js b/docs/index.js index 2ddd3a9..3c8490f 100644 --- a/docs/index.js +++ b/docs/index.js @@ -1,8 +1,8 @@ var htmls = [], js = []; -data.forEach(function(item){ +data.forEach(function(item, index){ htmls.push([ - '
', + '
', item.html, '
- + diff --git a/src/style/index.less b/src/style/index.less index d811016..523d358 100644 --- a/src/style/index.less +++ b/src/style/index.less @@ -25,6 +25,7 @@ xm-select{ user-select: none; } + background-color: #FFF; position: relative; border: @border; border-radius: 2px;