dev_unstable
hjm 6 years ago
parent a8a6561313
commit fa17886de0

@ -16,6 +16,7 @@ title: "测试标题"
updated_at: "2019-08-12 17:17:09" updated_at: "2019-08-12 17:17:09"
*/ */
let _clipboard = null; let _clipboard = null;
const clipboardMap = {}
function VideoInReviewItem (props) { function VideoInReviewItem (props) {
const theme = useContext(ThemeContext); const theme = useContext(ThemeContext);
const { history, file_url, cover_url, title, created_at, published_at, isReview, id const { history, file_url, cover_url, title, created_at, published_at, isReview, id
@ -26,9 +27,13 @@ function VideoInReviewItem (props) {
_clipboard.on('success', (e) => { _clipboard.on('success', (e) => {
showNotification('复制成功') showNotification('复制成功')
}); });
clipboardMap[id] = _clipboard
} }
return () => { return () => {
_clipboard && _clipboard.destroy(); if (clipboardMap[id]) {
clipboardMap[id].destroy();
clipboardMap[id] = null;
}
} }
}, []) }, [])
const username = props.match.params.username const username = props.match.params.username

Loading…
Cancel
Save