Skip to content

Commit

Permalink
feat: code demo copy success text, update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xinlei3166 committed Aug 19, 2021
1 parent 7d4f52b commit 9359f92
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ themeConfig: {
'/': {
'hide-text': 'Hide',
'show-text': 'Expand',
'copy-button-text': 'Copy'
'copy-button-text': 'Copy',
'copy-success-text': 'Copy success'
},
'/zh': {
'hide-text': '隐藏代码',
'show-text': '显示代码',
'copy-button-text': '复制代码片段'
'copy-button-text': '复制代码片段',
'copy-success-text': '复制成功'
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions components/Demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ export default {
'hide-text': '隐藏代码',
'show-text': '显示代码',
'copy-button-text': '复制代码片段',
'copy-button-text-success': '复制成功'
'copy-success-text': '复制成功'
}
})
const copyText = computed(() => {
return isShowTip.value ? locale.value['copy-button-text-success'] : locale.value['copy-button-text']
return isShowTip.value ? locale.value['copy-success-text'] : locale.value['copy-button-text']
})
const controlText = computed(() => {
Expand Down
4 changes: 2 additions & 2 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ module.exports = {
'hide-text': 'Hide',
'show-text': 'Expand',
'copy-button-text': 'Copy',
'copy-button-text-success': 'Copy success!'
'copy-success-text': 'Copy success'
},
'/zh': {
'hide-text': '隐藏代码',
'show-text': '显示代码',
'copy-button-text': '复制代码片段',
'copy-button-text-success': '复制成功'
'copy-success-text': '复制成功'
}
},

Expand Down

0 comments on commit 9359f92

Please sign in to comment.