fix(个人中心): 修复useClipboard问题
This commit is contained in:
parent
4cdcae4413
commit
f1215eba88
|
@ -216,10 +216,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
const { copy, isSupported } = useClipboard();
|
||||
async function copyVersion() {
|
||||
const { copy, isSupported } = useClipboard({ legacy: true });
|
||||
function copyVersion() {
|
||||
if (isSupported) {
|
||||
await copy(appStore.version);
|
||||
copy(appStore.version);
|
||||
Message.success(t('common.copySuccess'));
|
||||
} else {
|
||||
Message.warning(t('common.copyNotSupport'));
|
||||
|
|
|
@ -581,11 +581,11 @@ if (!result){
|
|||
AssertionResult.setFailureMessage(msg);
|
||||
AssertionResult.setFailure(true);
|
||||
}`);
|
||||
const { copy, isSupported } = useClipboard();
|
||||
const { copy, isSupported } = useClipboard({ legacy: true });
|
||||
|
||||
async function copyScriptEx() {
|
||||
function copyScriptEx() {
|
||||
if (isSupported) {
|
||||
await copy(scriptEx.value);
|
||||
copy(scriptEx.value);
|
||||
Message.success(t('apiTestDebug.scriptExCopySuccess'));
|
||||
} else {
|
||||
Message.warning(t('apiTestDebug.copyNotSupport'));
|
||||
|
|
|
@ -111,11 +111,11 @@
|
|||
default: ResponseComposition.BODY,
|
||||
});
|
||||
|
||||
const { copy, isSupported } = useClipboard();
|
||||
const { copy, isSupported } = useClipboard({ legacy: true });
|
||||
|
||||
async function copyScript() {
|
||||
function copyScript() {
|
||||
if (isSupported) {
|
||||
await copy(props.requestResult?.responseResult.body || '');
|
||||
copy(props.requestResult?.responseResult.body || '');
|
||||
Message.success(t('common.copySuccess'));
|
||||
} else {
|
||||
Message.warning(t('apiTestDebug.copyNotSupport'));
|
||||
|
|
|
@ -91,10 +91,10 @@
|
|||
expandIds.value.push(value);
|
||||
}
|
||||
}
|
||||
const { copy, isSupported } = useClipboard();
|
||||
async function copyScript() {
|
||||
const { copy, isSupported } = useClipboard({ legacy: true });
|
||||
function copyScript() {
|
||||
if (isSupported) {
|
||||
await copy(props.requestResult?.responseResult.body || '');
|
||||
copy(props.requestResult?.responseResult.body || '');
|
||||
Message.success(t('common.copySuccess'));
|
||||
} else {
|
||||
Message.warning(t('apiTestDebug.copyNotSupport'));
|
||||
|
|
|
@ -367,7 +367,7 @@
|
|||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
const { copy, isSupported } = useClipboard();
|
||||
const { copy, isSupported } = useClipboard({ legacy: true });
|
||||
|
||||
const previewDetail = ref<RequestParam>(props.detail);
|
||||
const activeResponse = ref<TabItem & ResponseItem>();
|
||||
|
@ -458,9 +458,9 @@
|
|||
|
||||
const activeDetailKey = ref(['request', 'response']);
|
||||
|
||||
async function copyScript(val: string) {
|
||||
function copyScript(val: string) {
|
||||
if (isSupported) {
|
||||
await copy(val);
|
||||
copy(val);
|
||||
Message.success(t('common.copySuccess'));
|
||||
} else {
|
||||
Message.warning(t('apiTestDebug.copyNotSupport'));
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
}>();
|
||||
const emit = defineEmits(['updateFollow']);
|
||||
|
||||
const { copy, isSupported } = useClipboard();
|
||||
const { copy, isSupported } = useClipboard({ legacy: true });
|
||||
const { t } = useI18n();
|
||||
|
||||
const previewDetail = ref<RequestParam>(cloneDeep(props.detail));
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
(e: 'deleteCase', id: string): void;
|
||||
}>();
|
||||
|
||||
const { copy, isSupported } = useClipboard();
|
||||
const { copy, isSupported } = useClipboard({ legacy: true });
|
||||
const { t } = useI18n();
|
||||
const { openModal } = useModal();
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@
|
|||
const appStore = useAppStore();
|
||||
const { t } = useI18n();
|
||||
const { openModal } = useModal();
|
||||
const { copy, isSupported } = useClipboard();
|
||||
const { copy, isSupported } = useClipboard({ legacy: true });
|
||||
|
||||
const moduleProtocol = ref('HTTP');
|
||||
const moduleProtocolOptions = ref<SelectOptionData[]>([]);
|
||||
|
|
|
@ -156,7 +156,7 @@
|
|||
(e: 'updateFollow'): void;
|
||||
}>();
|
||||
|
||||
const { copy, isSupported } = useClipboard();
|
||||
const { copy, isSupported } = useClipboard({ legacy: true });
|
||||
const { t } = useI18n();
|
||||
|
||||
const scenario = defineModel<Scenario>('scenario', {
|
||||
|
|
Loading…
Reference in New Issue