|
@@ -11,14 +11,15 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="created_btn">
|
|
|
- <div class="created_cancel" @click="closeCreated">取消</div>
|
|
|
+ <div class="created_cancel" @click="closeCreated">{{ t('base.cancel') }}</div>
|
|
|
<div
|
|
|
class="created_confirm"
|
|
|
ref="copylink$"
|
|
|
:data-clipboard-text="shareLink"
|
|
|
@click="createdConfirm"
|
|
|
>
|
|
|
- 复制分享
|
|
|
+ <!-- 复制分享 -->
|
|
|
+ {{ t('base.copyShare') }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -30,13 +31,18 @@
|
|
|
import { onMounted, defineProps, defineEmits, ref, unref, watchEffect } from 'vue';
|
|
|
import ClipboardJS from 'clipboard';
|
|
|
import Dialog from '/@/components/basic/dialog';
|
|
|
+ import { useI18n } from '/@/hooks/useI18n';
|
|
|
+ const { t } = useI18n();
|
|
|
|
|
|
const emit = defineEmits(['close']);
|
|
|
|
|
|
const props = defineProps({
|
|
|
title: {
|
|
|
type: String,
|
|
|
- default: '邀请好友',
|
|
|
+ default: () => {
|
|
|
+ const { t } = useI18n();
|
|
|
+ return t('base.inviteFriends');
|
|
|
+ },
|
|
|
},
|
|
|
shareLink: {
|
|
|
type: String,
|
|
@@ -55,7 +61,7 @@
|
|
|
const ele = unref(copylink$) as any as HTMLElement;
|
|
|
new ClipboardJS(ele).on('success', function (e) {
|
|
|
e.clearSelection();
|
|
|
- Dialog.toast({ content: '链接复制成功', type: 'success' });
|
|
|
+ Dialog.toast({ content: t('base.copyShareSuccess'), type: 'success' });
|
|
|
setTimeout(() => {
|
|
|
show.value = false;
|
|
|
emit('close');
|