Compare commits
No commits in common. "e806848228315939737ab7e75a004233d522a406" and "d20d1f3bed2ccbfbf9327ba9522a72675f05481b" have entirely different histories.
e806848228
...
d20d1f3bed
@ -993,7 +993,6 @@ html[theme-mode='dark'] {
|
|||||||
outline: none;
|
outline: none;
|
||||||
.tiptap.ProseMirror{
|
.tiptap.ProseMirror{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
white-space: pre-wrap;
|
|
||||||
}
|
}
|
||||||
.image-upload-loading {
|
.image-upload-loading {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -52,14 +52,14 @@ export function throttle(fn, delay, call = function () {}) {
|
|||||||
* @param {String} text 复制内容
|
* @param {String} text 复制内容
|
||||||
* @param {Function} callback 复制成功回调方法
|
* @param {Function} callback 复制成功回调方法
|
||||||
*/
|
*/
|
||||||
export async function clipboard(text, callback) {
|
export function clipboard(text, callback) {
|
||||||
// 在wujie环境下使用主应用的clipboard
|
// 在wujie环境下使用主应用的clipboard
|
||||||
const clipboardObj = window.__POWERED_BY_WUJIE__
|
const clipboardObj = window.__POWERED_BY_WUJIE__
|
||||||
? window.parent.navigator.clipboard
|
? window.parent.navigator.clipboard
|
||||||
: navigator.clipboard
|
: navigator.clipboard
|
||||||
try {
|
try {
|
||||||
clipboardObj
|
clipboardObj
|
||||||
.writeText(text)
|
?.writeText(text)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
callback && callback()
|
callback && callback()
|
||||||
})
|
})
|
||||||
@ -68,7 +68,7 @@ export async function clipboard(text, callback) {
|
|||||||
})
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
await toClipboard(text)
|
toClipboard(text)
|
||||||
callback && callback()
|
callback && callback()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user