diff --git a/README.md b/README.md index 61c0949..432b28b 100644 --- a/README.md +++ b/README.md @@ -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': '复制成功' } } } diff --git a/components/Demo.vue b/components/Demo.vue index 10db135..f7fec95 100644 --- a/components/Demo.vue +++ b/components/Demo.vue @@ -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(() => { diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index c259f91..c527f17 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -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': '复制成功' } },