mirror of https://github.com/halo-dev/halo
refactor: add legacy option for useClipboard hook to solve compatibility issues (#4114)
#### What type of PR is this? /kind improvement /area console /milestone 2.7.x #### What this PR does / why we need it: Console 端部分使用了复制功能的页面,所使用的 useClipboard hook 添加 legacy 参数以解决部分浏览器的兼容问题。 #### Which issue(s) this PR fixes: Fixes #4113 #### Special notes for your reviewer: 1. 使用路由地址(192.168.x.x)访问 Halo。 2. 测试附件详情弹框的链接复制和概览页面中的复制功能是否正常。 #### Does this PR introduce a user-facing change? ```release-note 优化 Console 端部分页面复制功能的兼容性问题。 ```pull/4061/head
parent
27ef8d3bab
commit
34d0f9369b
|
@ -333,7 +333,7 @@ export function useAttachmentSelect(
|
|||
export function useAttachmentPermalinkCopy(
|
||||
attachment: Ref<Attachment | undefined>
|
||||
) {
|
||||
const { copy } = useClipboard();
|
||||
const { copy } = useClipboard({ legacy: true });
|
||||
const { t } = useI18n();
|
||||
|
||||
const mediaType = computed(() => {
|
||||
|
|
|
@ -74,7 +74,7 @@ onMounted(() => {
|
|||
});
|
||||
|
||||
// copy system information to clipboard
|
||||
const { copy, isSupported } = useClipboard();
|
||||
const { copy, isSupported } = useClipboard({ legacy: true });
|
||||
|
||||
const handleCopy = () => {
|
||||
if (!isSupported.value) {
|
||||
|
|
Loading…
Reference in New Issue