2019-09-25 09:55:14 +00:00
|
|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{361:function(e,t,n){e.exports=n.p+"static/wx.f391ad4.jpg"},363:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this.$createElement,t=this._self._c||e;return t("section",{staticClass:"content element-doc"},[this._m(0),this._m(1),t("demo-block",[t("div",[t("p",[this._v("事实证明分页是好使的 ^_^")])]),t("template",{slot:"source"},[t("element-demo0")],1),t("template",{slot:"highlight"},[t("pre",{pre:!0},[t("code",{pre:!0,attrs:{class:"html"}},[this._v('<div id="demo1" class="xm-select-demo"></div>\n<button class="btn" id="demo1-test1">测试1000条</button>\n<button class="btn" id="demo1-test2">测试10000条</button>\n<button class="btn" id="demo1-test3">测试10000条+分页</button>\n<pre id="demo1-result"></pre>\n\n<script>\nfunction run(count, paging){\n //生成数据\n var data = [];\n for(var i = 0; i < count; i++){\n data.push({\n name: \'测试数据\' + i,\n value: i,\n })\n }\n \n //记录开始渲染时间\n var startTime = Date.now();\n \n var demo1 = xmSelect.render({\n el: \'#demo1\', \n paging,\n data\n })\n \n //记录结束时间\n var endTime = Date.now();\n \n document.getElementById(\'demo1-result\').innerText = `渲染耗时: ${endTime - startTime} ms`\n}\n\ndocument.getElementById(\'demo1-test1\').onclick = function(){\n run(1000, false)\n};\n\ndocument.getElementById(\'demo1-test2\').onclick = function(){\n run(10000, false)\n};\n\ndocument.getElementById(\'demo1-test3\').onclick = function(){\n run(10000, true)\n};\n\nrun(1000, false);\n\n<\/script>\n')])])])],2)],1)};a._withStripped=!0;var i={name:"component-doc",components:{"element-demo0":function(){var e=function(){var e=this.$createElement;this._self._c;return this._m(0)};return e._withStripped=!0,{render:e,staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("div",{staticClass:"xm-select-demo",attrs:{id:"demo1"}}),this._v(" "),t("button",{staticClass:"btn",attrs:{id:"demo1-test1"}},[this._v("测试1000条")]),this._v(" "),t("button",{staticClass:"btn",attrs:{id:"demo1-test2"}},[this._v("测试10000条")]),this._v(" "),t("button",{staticClass:"btn",attrs:{id:"demo1-test3"}},[this._v("测试10000条+分页")]),this._v(" "),t("pre",{attrs:{id:"demo1-result"}})])}],mounted:function(){this.$nextTick(function(){function e(e,t){for(var n=[],a=0;a<e;a++)n.push({name:"测试数据"+a,value:a});var i=Date.now(),s=(xmSelect.render({el:"#demo1",paging:t,data:n}),Date.now());document.getElementById("demo1-result").innerText="渲染耗时: ".concat(s-i," ms")}document.getElementById("demo1-test1").onclick=function(){e(1e3,!1)},document.getElementById("demo1-test2").onclick=function(){e(1e4,!1)},document.getElementById("demo1-test3").onclick=function(){e(1e4,!0)},e(1e3,!1)})}}}()}},s=n(4),r=Object(s.a)(i,a,[function(){var e=this.$createElement,t=this._self._c||e;return t("h2",{attrs:{id:"xing-neng-ce-shi"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#xing-neng-ce-shi","aria-hidden":"true"}},[this._v("¶")]),this._v(" 性能测试")])},function(){var e=this.$createElement,t=this._self._c||e;return t("h3",{attrs:{id:"shu-ju-xuan-ran-hao-shi-ce-shi"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#shu-ju-xuan-ran-hao-shi-ce-shi","aria-hidden":"true"}},[this._v("¶")]),this._v(" 数据渲染耗时测试")])}],!1,null,null,null);r.options.__file="docs/mds/XM17.md";t.default=r.exports},364:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{staticClass:"content element-doc"},[e._m(0),e._m(1),n("demo-block",[n("template",{slot:"source"},[n("element-demo0")],1),n("template",{slot:"highlight"},[n("pre",{pre:!0},[n("code",{pre:!0,attrs:{class:"html"}},[e._v("<div id=\"demo1\" class=\"xm-select-demo\"></div>\n\n<script>\nvar demo1 = xmSelect.render({\n el: '#demo1', \n paging: true,\n data: [\n {name: '张三', value: 1},\n {name: '李四', value:
|