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

31 lines
658 B
Vue
Raw Normal View History

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,
2018-04-20 08:58:40 +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>
)
},
}
</script>