2018-04-04 10:39:21 +00:00
|
|
|
<template>
|
2019-02-01 09:23:00 +00:00
|
|
|
<div class="markdown api-container">
|
|
|
|
<slot
|
|
|
|
v-if="isZhCN"
|
|
|
|
name="cn"
|
|
|
|
/>
|
|
|
|
<slot v-else />
|
2018-04-04 10:39:21 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
2019-01-12 03:33:27 +00:00
|
|
|
import { isZhCN } from '../util';
|
2018-04-04 10:39:21 +00:00
|
|
|
export default {
|
2019-02-01 09:23:00 +00:00
|
|
|
name: 'Api',
|
2018-07-13 13:55:29 +00:00
|
|
|
inject: {
|
|
|
|
demoContext: { default: {}},
|
|
|
|
},
|
2018-04-04 10:39:21 +00:00
|
|
|
data () {
|
|
|
|
return {
|
2018-07-13 13:55:29 +00:00
|
|
|
isZhCN: isZhCN(this.demoContext.name),
|
2019-01-12 03:33:27 +00:00
|
|
|
};
|
2018-04-04 10:39:21 +00:00
|
|
|
},
|
2019-01-12 03:33:27 +00:00
|
|
|
};
|
2018-04-04 10:39:21 +00:00
|
|
|
</script>
|