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

31 lines
659 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
},
2019-09-28 12:45:07 +00:00
provide() {
2018-07-13 13:55:29 +00:00
return {
demoContext: this,
2019-01-12 03:33:27 +00:00
};
2018-07-13 13:55:29 +00:00
},
2019-09-28 12:45:07 +00:00
render() {
2018-07-13 13:55:29 +00:00
// 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 (
2019-09-28 12:45:07 +00:00
<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>