|
@@ -5,13 +5,11 @@ import { ElMessageBox } from 'element-plus'
|
|
|
|
|
|
import ScWorkflow from '@/components/scWorkflow'
|
|
import ScWorkflow from '@/components/scWorkflow'
|
|
import useFlowStore from '@/store/modules/flow'
|
|
import useFlowStore from '@/store/modules/flow'
|
|
-import useClipboard from 'vue-clipboard3'
|
|
|
|
import { storeToRefs } from 'pinia'
|
|
import { storeToRefs } from 'pinia'
|
|
import { ElMessage } from 'element-plus'
|
|
import { ElMessage } from 'element-plus'
|
|
-
|
|
|
|
|
|
+import { copyText } from '@/utils'
|
|
const flowStore = useFlowStore()
|
|
const flowStore = useFlowStore()
|
|
const { modelContent } = storeToRefs(flowStore)
|
|
const { modelContent } = storeToRefs(flowStore)
|
|
-const { toClipboard } = useClipboard()
|
|
|
|
|
|
|
|
const formRef = ref()
|
|
const formRef = ref()
|
|
const drawer = ref(false)
|
|
const drawer = ref(false)
|
|
@@ -46,12 +44,7 @@ const copyJson = async () => {
|
|
return ElMessage.warning('当前没有数据噢')
|
|
return ElMessage.warning('当前没有数据噢')
|
|
}
|
|
}
|
|
const json = JSON.parse(jsonFormat.value || {})
|
|
const json = JSON.parse(jsonFormat.value || {})
|
|
- try {
|
|
|
|
- await toClipboard(JSON.stringify(json))
|
|
|
|
- ElMessage.success('复制成功')
|
|
|
|
- } catch (e) {
|
|
|
|
- ElMessage.warning('复制失败')
|
|
|
|
- }
|
|
|
|
|
|
+ copyText(JSON.stringify(json))
|
|
}
|
|
}
|
|
|
|
|
|
const validate = () => {
|
|
const validate = () => {
|