add 'copy_to_clipboard' method; rename 'openUrl' to 'open_url_in_browser'
This commit is contained in:
parent
f45e3988e8
commit
37d43944fa
12
unitool.js
12
unitool.js
@ -426,7 +426,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
openUrl (url) {
|
open_url_in_browser (url) {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
plus.runtime.openURL(url)
|
plus.runtime.openURL(url)
|
||||||
// #endif
|
// #endif
|
||||||
@ -622,4 +622,14 @@ export default {
|
|||||||
}, 200) // 如果没有 setTimeout 至少 200ms, 焦点短暂跳到下一个后,又会消失
|
}, 200) // 如果没有 setTimeout 至少 200ms, 焦点短暂跳到下一个后,又会消失
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
copy_to_clipboard (text) {
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: text,
|
||||||
|
success: () => {
|
||||||
|
uni.hideToast()
|
||||||
|
wo.tt.showToast({ type: wo.c2t.GREEN, title: wo.ll({ zhCN: `已成功拷贝到剪贴板\n${text}`, enUS: `Successfully copied to clipboard\n${text}` }) })
|
||||||
|
},
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user