Doc: improve iframe load speed
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="app">
|
||||
<zan-doc :simulator="simulatorSrc" :config="config">
|
||||
<zan-doc :simulator="simulator" :config="config">
|
||||
<router-view></router-view>
|
||||
</zan-doc>
|
||||
</div>
|
||||
@@ -12,12 +12,14 @@ import docConfig from './doc.config';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
simulator: this.getSimulatorPath(),
|
||||
config: docConfig['zh-CN']
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
simulatorSrc() {
|
||||
const dir = this.$route.path.split('/').pop();
|
||||
|
||||
methods: {
|
||||
getSimulatorPath() {
|
||||
const dir = location.pathname.split('/').pop();
|
||||
if (dir === 'quickstart' || dir === 'changelog') {
|
||||
return '/zanui/vue/examples';
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user