This commit is contained in:
神仙都没用 2023-10-23 16:27:11 +08:00
parent 4e5ae1ea2f
commit d8d360b334
2 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@cool-vue/crud",
"version": "7.0.1-beta10",
"version": "7.0.1-beta11",
"private": false,
"main": "./dist/index.umd.min.js",
"typings": "types/index.d.ts",

View File

@ -11,7 +11,7 @@
:height="600"
preview
v-bind="props.props"
v-model="text"
v-model="content"
/>
<template #footer>
@ -52,8 +52,8 @@ const { copy } = useClipboard();
//
const visible = ref(false);
//
const text = ref("");
//
const content = ref("");
async function open(data?: string) {
if (!data) {
@ -61,11 +61,11 @@ async function open(data?: string) {
}
if (isString(data)) {
text.value = data;
content.value = data;
}
if (isObject(data)) {
text.value = JSON.stringify(data, null, 4);
content.value = JSON.stringify(data, null, 4);
}
visible.value = true;
@ -82,7 +82,7 @@ function close() {
}
function toCopy() {
copy(text.value);
copy(content.value);
ElMessage.success("复制成功");
}