ant-design-vue/site/components/iframe.vue

31 lines
661 B
Vue
Raw Normal View History

2018-04-20 16:58:40 +08:00
<script>
2018-07-13 21:55:29 +08:00
// import * as AllDemo from '../demo'
2018-04-20 16:58:40 +08:00
export default {
props: {
name: String,
2018-07-13 21:55:29 +08:00
hash: String,
2018-04-20 16:58:40 +08:00
},
2018-07-13 21:55:29 +08:00
provide () {
return {
demoContext: this,
2019-01-12 11:33:27 +08:00
};
2018-07-13 21:55:29 +08: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 16:58:40 +08:00
return (
<div id='iframe-page'>
2018-07-13 21:55:29 +08:00
<router-view></router-view>
2018-04-20 16:58:40 +08:00
</div>
2019-01-12 11:33:27 +08:00
);
2018-04-20 16:58:40 +08:00
},
2019-01-12 11:33:27 +08:00
};
2018-04-20 16:58:40 +08:00
</script>