2018-04-20 08:58:40 +00:00
|
|
|
<script>
|
2018-07-13 13:55:29 +00:00
|
|
|
// import * as AllDemo from '../demo'
|
2018-04-20 08:58:40 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
name: String,
|
2018-07-13 13:55:29 +00:00
|
|
|
hash: String,
|
2018-04-20 08:58:40 +00:00
|
|
|
},
|
2018-07-13 13:55:29 +00:00
|
|
|
provide () {
|
|
|
|
return {
|
|
|
|
demoContext: this,
|
2019-01-12 03:33:27 +00:00
|
|
|
};
|
2018-07-13 13:55:29 +00:00
|
|
|
},
|
|
|
|
render () {
|
|
|
|
// const name = this.name
|
|
|
|
// const titleMap = {}
|
|
|
|
// for (const [title] of Object.entries(AllDemo)) {
|
|
|
|
// const key = `${title.replace(/(\B[A-Z])/g, '-$1').toLowerCase()}`
|
|
|
|
// titleMap[key] = title
|
|
|
|
// }
|
|
|
|
// const Demo = AllDemo[titleMap[name.replace(/-cn\/?$/, '')]]
|
|
|
|
// const hash = this.$route.hash.replace('#', '')
|
2018-04-20 08:58:40 +00:00
|
|
|
return (
|
|
|
|
<div id='iframe-page'>
|
2018-07-13 13:55:29 +00:00
|
|
|
<router-view></router-view>
|
2018-04-20 08:58:40 +00:00
|
|
|
</div>
|
2019-01-12 03:33:27 +00:00
|
|
|
);
|
2018-04-20 08:58:40 +00:00
|
|
|
},
|
2019-01-12 03:33:27 +00:00
|
|
|
};
|
2018-04-20 08:58:40 +00:00
|
|
|
</script>
|