CN-119 feat: 完成interface页面
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||
import i18n from '@/i18n'
|
||||
import _ from 'lodash'
|
||||
import { storageKey, iso36112 } from '@/utils/constants'
|
||||
@@ -462,3 +462,16 @@ function JSONParse (data) {
|
||||
return firstParse
|
||||
}
|
||||
}
|
||||
|
||||
export function copyValue (item) {
|
||||
const str = item
|
||||
const domUrl = document.createElement('input')
|
||||
domUrl.value = JSON.stringify(str)
|
||||
domUrl.id = 'creatDom'
|
||||
document.body.appendChild(domUrl)
|
||||
domUrl.select() // 选择对象
|
||||
document.execCommand('Copy') // 执行浏览器复制命令
|
||||
const creatDom = document.getElementById('creatDom')
|
||||
creatDom.parentNode.removeChild(creatDom)
|
||||
ElMessage.success(i18n.global.t('tip.copySuccess'))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user