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

26 lines
439 B
Vue
Raw Normal View History

2018-04-04 18:39:21 +08:00
<template>
2019-02-01 17:23:00 +08:00
<div class="markdown api-container">
2019-10-31 19:42:49 +08:00
<GoogleAds />
2019-09-28 20:45:07 +08:00
<slot v-if="isZhCN" name="cn" />
2019-02-01 17:23:00 +08:00
<slot v-else />
2018-04-04 18:39:21 +08:00
</div>
</template>
<script>
2019-01-12 11:33:27 +08:00
import { isZhCN } from '../util';
2019-10-31 19:42:49 +08:00
import GoogleAds from './GoogleAds';
2018-04-04 18:39:21 +08:00
export default {
2019-10-31 19:42:49 +08:00
components: {
GoogleAds,
},
2019-02-01 17:23:00 +08:00
name: 'Api',
2018-07-13 21:55:29 +08:00
inject: {
2019-09-28 20:45:07 +08:00
demoContext: { default: {} },
2018-07-13 21:55:29 +08:00
},
2019-09-28 20:45:07 +08:00
data() {
2018-04-04 18:39:21 +08:00
return {
2018-07-13 21:55:29 +08:00
isZhCN: isZhCN(this.demoContext.name),
2019-01-12 11:33:27 +08:00
};
2018-04-04 18:39:21 +08:00
},
2019-01-12 11:33:27 +08:00
};
2018-04-04 18:39:21 +08:00
</script>