Skip to content

Commit

Permalink
docs: add ICP license (#12893)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored May 28, 2024
1 parent c56337e commit 1cd6050
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/vant-cli/site/desktop/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
:dark-mode-class="darkModeClass"
>
<router-view />
<div class="van-doc-icp" v-if="icpLicense">
<a :href="icpLicense.link" target="_black">
{{ icpLicense.text }}
</a>
</div>
</van-doc>
</div>
</template>
Expand Down Expand Up @@ -64,6 +69,13 @@ export default {
return config.site;
},
icpLicense() {
if (this.lang === 'zh-CN') {
return config.site.icpLicense;
}
return null;
},
versions() {
return config.site.versions || null;
},
Expand Down Expand Up @@ -144,4 +156,13 @@ export default {
margin-bottom: 20px;
}
}
.van-doc-icp {
font-size: 14px;
text-align: center;
a {
color: #bbb;
}
}
</style>
4 changes: 4 additions & 0 deletions packages/vant/vant.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ export default {
baiduAnalytics: {
seed: 'af5d41bc4e446e76665dbe3ec18d55c3',
},
icpLicense: {
text: '浙ICP备2021036118号',
link: 'https://beian.miit.gov.cn/',
},
headHtml: `<script>
if (location.host === 'youzan.github.io') {
location.href = location.href.replace('youzan.github.io', 'vant-ui.github.io');
Expand Down

0 comments on commit 1cd6050

Please sign in to comment.