perf(spa): disable loadingIndicator by default

This commit is contained in:
Pooya Parsa 2018-03-20 12:43:36 +03:30
parent 160e1d35e4
commit 342d9a8bf6
2 changed files with 17 additions and 14 deletions

View File

@ -112,7 +112,7 @@ export default {
duration: 5000, duration: 5000,
rtl: false rtl: false
}, },
loadingIndicator: {}, loadingIndicator: false,
transition: { transition: {
name: 'page', name: 'page',
mode: 'out-in', mode: 'out-in',

View File

@ -103,9 +103,22 @@ Options.from = function (_options) {
options.store = true options.store = true
} }
// Normalize loadingIndicator // SPA loadingIndicator
if (!isPureObject(options.loadingIndicator)) { if (options.loadingIndicator) {
options.loadingIndicator = { name: options.loadingIndicator } // Normalize loadingIndicator
if (!isPureObject(options.loadingIndicator)) {
options.loadingIndicator = { name: options.loadingIndicator }
}
// Apply defaults
options.loadingIndicator = Object.assign(
{
name: 'pulse',
color: '#dbe1ec',
background: 'white'
},
options.loadingIndicator
)
} }
// Apply default hash to CSP option // Apply default hash to CSP option
@ -113,16 +126,6 @@ Options.from = function (_options) {
options.render.csp = { hashAlgorithm: 'sha256' } options.render.csp = { hashAlgorithm: 'sha256' }
} }
// Apply defaults to loadingIndicator
options.loadingIndicator = Object.assign(
{
name: 'pulse',
color: '#dbe1ec',
background: 'white'
},
options.loadingIndicator
)
// cssSourceMap // cssSourceMap
if (options.build.cssSourceMap === undefined) { if (options.build.cssSourceMap === undefined) {
options.build.cssSourceMap = options.dev options.build.cssSourceMap = options.dev