mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-14 14:52:49 +00:00
优化
This commit is contained in:
parent
4e5ae1ea2f
commit
d8d360b334
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cool-vue/crud",
|
"name": "@cool-vue/crud",
|
||||||
"version": "7.0.1-beta10",
|
"version": "7.0.1-beta11",
|
||||||
"private": false,
|
"private": false,
|
||||||
"main": "./dist/index.umd.min.js",
|
"main": "./dist/index.umd.min.js",
|
||||||
"typings": "types/index.d.ts",
|
"typings": "types/index.d.ts",
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
:height="600"
|
:height="600"
|
||||||
preview
|
preview
|
||||||
v-bind="props.props"
|
v-bind="props.props"
|
||||||
v-model="text"
|
v-model="content"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@ -52,8 +52,8 @@ const { copy } = useClipboard();
|
|||||||
// 是否可见
|
// 是否可见
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
|
|
||||||
// 文本
|
// 内容
|
||||||
const text = ref("");
|
const content = ref("");
|
||||||
|
|
||||||
async function open(data?: string) {
|
async function open(data?: string) {
|
||||||
if (!data) {
|
if (!data) {
|
||||||
@ -61,11 +61,11 @@ async function open(data?: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isString(data)) {
|
if (isString(data)) {
|
||||||
text.value = data;
|
content.value = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isObject(data)) {
|
if (isObject(data)) {
|
||||||
text.value = JSON.stringify(data, null, 4);
|
content.value = JSON.stringify(data, null, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
@ -82,7 +82,7 @@ function close() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function toCopy() {
|
function toCopy() {
|
||||||
copy(text.value);
|
copy(content.value);
|
||||||
ElMessage.success("复制成功");
|
ElMessage.success("复制成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user