h5-Dooring/doc-dist/assets/js/10.2d5d3aaa.js
2021-05-18 21:49:30 +08:00

73 lines
2.7 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp = window.webpackJsonp || []).push([
[10],
{
359: function(t, r, a) {
t.exports = a.p + 'assets/img/dynamic.15a5303a.png';
},
388: function(t, r, a) {
'use strict';
a.r(r);
var n = a(42),
i = Object(n.a)(
{},
function() {
var t = this,
r = t.$createElement,
n = t._self._c || r;
return n('ContentSlotsDistributor', { attrs: { 'slot-key': t.$parent.slotKey } }, [
n('h1', { attrs: { id: '组件动态加载' } }, [
n('a', { staticClass: 'header-anchor', attrs: { href: '#组件动态加载' } }, [
t._v('#'),
]),
t._v(' 组件动态加载'),
]),
t._v(' '),
n('p', [
t._v(
'目前H5-Dooring的组件都是通过动态加载的方式引入好处是我们在页面中只会加载我们需要的组件不需要的组件不会被加载这样可以提高页面加载的速度这样做也会出现一些问题比如一个长页面配置了很多组件那么一个页面加载过程可以会触发多次请求目前还没有遇到性能问题但后续会逐渐优化这个问题。',
),
]),
t._v(' '),
n('h2', { attrs: { id: 'umi3提供的dynamic' } }, [
n('a', { staticClass: 'header-anchor', attrs: { href: '#umi3提供的dynamic' } }, [
t._v('#'),
]),
t._v(' umi3提供的dynamic'),
]),
t._v(' '),
n('p', [
t._v(
'目前组件的动态加载我们采用的umi的dynamic方案基于它我们上层封装了一个组件动态加载器原理如下',
),
]),
t._v(' '),
n('img', { attrs: { src: a(359), alt: 'foo' } }),
t._v(' '),
n('p', [
t._v('具体代码可以参考Dooring的Github地址'),
n(
'a',
{
attrs: {
href: 'https://github.com/MrXujiang/h5-Dooring',
target: '_blank',
rel: 'noopener noreferrer',
},
},
[t._v('https://github.com/MrXujiang/h5-Dooring'), n('OutboundLink')],
1,
),
]),
]);
},
[],
!1,
null,
null,
null,
);
r.default = i.exports;
},
},
]);