vue-dialog-view 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dialog-view.es.js +32 -37
- package/dist/dialog-view.umd.js +2 -2
- package/dist/index.d.ts +1 -1
- package/obfuscate-classes.mjs +103 -0
- package/package.json +8 -3
- package/src/DialogView.obf.vue +153 -0
- package/src/DialogView.vue +10 -6
- package/src/index.ts +1 -1
- package/vite.config.ts +6 -1
- /package/dist/{DialogView.vue.d.ts → DialogView.obf.vue.d.ts} +0 -0
package/dist/dialog-view.es.js
CHANGED
|
@@ -1,61 +1,56 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
const
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._0e414b08e017324be9d8055e33e9e57a5d618fd64445845aa3d1c9c71a1cf19f{padding:20px;border-radius:5px;border:1px solid gray;outline:0!important;max-width:calc(100% - 2em);max-height:calc(100% - 2em);box-sizing:border-box;overflow:hidden}._0e414b08e017324be9d8055e33e9e57a5d618fd64445845aa3d1c9c71a1cf19f[open]{display:flex;flex-direction:column}._0e414b08e017324be9d8055e33e9e57a5d618fd64445845aa3d1c9c71a1cf19f::backdrop{background:#00000080}._f1bcbda2e971453cc116bd5c6d4a303f38ac3e0618c26210b206271398b2f619{display:flex;flex-direction:row;align-items:center;margin-bottom:.5em;min-height:24px;white-space:pre;overflow:hidden}._f365dae0582379d563ee03ab860c73c916d68f096a41a8bd34e05e566987b1f6{flex:1;text-align:center;font-weight:700;font-size:large;overflow:hidden;text-overflow:ellipsis}._2b0f1321796c8091f668958929ed738b53afcb63d79387dc52ddc75b55ffb46c{margin-left:.5em;text-decoration:none;color:#666;font-size:1.5em;line-height:1;width:24px;height:24px;display:flex;align-items:center;justify-content:center;cursor:pointer;border:none;background:none}._2b0f1321796c8091f668958929ed738b53afcb63d79387dc52ddc75b55ffb46c:hover{color:#333;background-color:#f0f0f0;border-radius:3px}._3b2bdd19ddec80c5f0f162bc4b423dafa4f687f6f831e58742be40fb0e80838e{flex:1;overflow:auto;display:flex;flex-direction:column}")),document.head.appendChild(e)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}})();
|
|
2
|
+
import { defineComponent as v, ref as h, watch as w, nextTick as _, createElementBlock as l, openBlock as t, mergeProps as g, createCommentVNode as d, createElementVNode as n, renderSlot as f, withModifiers as B } from "vue";
|
|
3
|
+
const V = {
|
|
4
4
|
key: 0,
|
|
5
|
-
class: "
|
|
6
|
-
},
|
|
7
|
-
__name: "DialogView",
|
|
5
|
+
class: "_f1bcbda2e971453cc116bd5c6d4a303f38ac3e0618c26210b206271398b2f619"
|
|
6
|
+
}, C = { class: "_f365dae0582379d563ee03ab860c73c916d68f096a41a8bd34e05e566987b1f6" }, k = { class: "_3b2bdd19ddec80c5f0f162bc4b423dafa4f687f6f831e58742be40fb0e80838e" }, i = /* @__PURE__ */ v({
|
|
7
|
+
__name: "DialogView.obf",
|
|
8
8
|
props: {
|
|
9
9
|
modelValue: { type: Boolean },
|
|
10
10
|
showTitleBar: { type: Boolean, default: !0 },
|
|
11
11
|
showCloseButton: { type: Boolean, default: !0 }
|
|
12
12
|
},
|
|
13
13
|
emits: ["update:modelValue"],
|
|
14
|
-
setup(o, { expose:
|
|
15
|
-
const
|
|
14
|
+
setup(o, { expose: u, emit: r }) {
|
|
15
|
+
const s = o, b = r, e = h(null), p = () => {
|
|
16
16
|
e.value && !e.value.open && e.value.showModal();
|
|
17
|
-
},
|
|
17
|
+
}, c = () => {
|
|
18
18
|
e.value && e.value.open && e.value.close();
|
|
19
19
|
}, m = () => {
|
|
20
|
-
|
|
20
|
+
s.modelValue && b("update:modelValue", !1);
|
|
21
21
|
};
|
|
22
|
-
return w(() =>
|
|
23
|
-
await _(),
|
|
24
|
-
}),
|
|
25
|
-
open:
|
|
26
|
-
close:
|
|
27
|
-
}), (
|
|
22
|
+
return w(() => s.modelValue, async (a) => {
|
|
23
|
+
await _(), a ? e.value && !e.value.open && e.value.showModal() : e.value && e.value.open && e.value.close();
|
|
24
|
+
}), u({
|
|
25
|
+
open: p,
|
|
26
|
+
close: c
|
|
27
|
+
}), (a, y) => (t(), l("dialog", g({
|
|
28
28
|
ref_key: "dialogRef",
|
|
29
29
|
ref: e,
|
|
30
|
-
class: "
|
|
31
|
-
},
|
|
32
|
-
o.showTitleBar ? (
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
class: "_0e414b08e017324be9d8055e33e9e57a5d618fd64445845aa3d1c9c71a1cf19f"
|
|
31
|
+
}, a.$attrs, { onClose: m }), [
|
|
32
|
+
o.showTitleBar ? (t(), l("div", V, [
|
|
33
|
+
n("span", C, [
|
|
34
|
+
f(a.$slots, "title")
|
|
35
35
|
]),
|
|
36
|
-
o.showCloseButton ? (
|
|
36
|
+
o.showCloseButton ? (t(), l("a", {
|
|
37
37
|
key: 0,
|
|
38
38
|
href: "javascript:void(0)",
|
|
39
39
|
role: "button",
|
|
40
40
|
"aria-label": "Close the dialog",
|
|
41
|
-
class: "
|
|
42
|
-
onClick: B(
|
|
43
|
-
}, "×")) :
|
|
44
|
-
])) :
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
class: "_2b0f1321796c8091f668958929ed738b53afcb63d79387dc52ddc75b55ffb46c",
|
|
42
|
+
onClick: B(c, ["prevent"])
|
|
43
|
+
}, "×")) : d("", !0)
|
|
44
|
+
])) : d("", !0),
|
|
45
|
+
n("div", k, [
|
|
46
|
+
f(a.$slots, "default")
|
|
47
47
|
])
|
|
48
48
|
], 16));
|
|
49
49
|
}
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
t[a] = i;
|
|
54
|
-
return t;
|
|
55
|
-
}, f = /* @__PURE__ */ b(D, [["__scopeId", "data-v-1ca83b6e"]]);
|
|
56
|
-
f.install = (o) => {
|
|
57
|
-
o.component("DialogView", f);
|
|
50
|
+
});
|
|
51
|
+
i.install = (o) => {
|
|
52
|
+
o.component("DialogView", i);
|
|
58
53
|
};
|
|
59
54
|
export {
|
|
60
|
-
|
|
55
|
+
i as default
|
|
61
56
|
};
|
package/dist/dialog-view.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".
|
|
2
|
-
(function(e,l){typeof exports=="object"&&typeof module<"u"?module.exports=l(require("vue")):typeof define=="function"&&define.amd?define(["vue"],l):(e=typeof globalThis<"u"?globalThis:e||self,e.DialogView=l(e.Vue))})(this,(function(e){"use strict";const l={key:0,class:"
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._0e414b08e017324be9d8055e33e9e57a5d618fd64445845aa3d1c9c71a1cf19f{padding:20px;border-radius:5px;border:1px solid gray;outline:0!important;max-width:calc(100% - 2em);max-height:calc(100% - 2em);box-sizing:border-box;overflow:hidden}._0e414b08e017324be9d8055e33e9e57a5d618fd64445845aa3d1c9c71a1cf19f[open]{display:flex;flex-direction:column}._0e414b08e017324be9d8055e33e9e57a5d618fd64445845aa3d1c9c71a1cf19f::backdrop{background:#00000080}._f1bcbda2e971453cc116bd5c6d4a303f38ac3e0618c26210b206271398b2f619{display:flex;flex-direction:row;align-items:center;margin-bottom:.5em;min-height:24px;white-space:pre;overflow:hidden}._f365dae0582379d563ee03ab860c73c916d68f096a41a8bd34e05e566987b1f6{flex:1;text-align:center;font-weight:700;font-size:large;overflow:hidden;text-overflow:ellipsis}._2b0f1321796c8091f668958929ed738b53afcb63d79387dc52ddc75b55ffb46c{margin-left:.5em;text-decoration:none;color:#666;font-size:1.5em;line-height:1;width:24px;height:24px;display:flex;align-items:center;justify-content:center;cursor:pointer;border:none;background:none}._2b0f1321796c8091f668958929ed738b53afcb63d79387dc52ddc75b55ffb46c:hover{color:#333;background-color:#f0f0f0;border-radius:3px}._3b2bdd19ddec80c5f0f162bc4b423dafa4f687f6f831e58742be40fb0e80838e{flex:1;overflow:auto;display:flex;flex-direction:column}")),document.head.appendChild(e)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}})();
|
|
2
|
+
(function(e,l){typeof exports=="object"&&typeof module<"u"?module.exports=l(require("vue")):typeof define=="function"&&define.amd?define(["vue"],l):(e=typeof globalThis<"u"?globalThis:e||self,e.DialogView=l(e.Vue))})(this,(function(e){"use strict";const l={key:0,class:"_f1bcbda2e971453cc116bd5c6d4a303f38ac3e0618c26210b206271398b2f619"},c={class:"_f365dae0582379d563ee03ab860c73c916d68f096a41a8bd34e05e566987b1f6"},i={class:"_3b2bdd19ddec80c5f0f162bc4b423dafa4f687f6f831e58742be40fb0e80838e"},n=e.defineComponent({__name:"DialogView.obf",props:{modelValue:{type:Boolean},showTitleBar:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(a,{expose:f,emit:r}){const s=a,u=r,o=e.ref(null),p=()=>{o.value&&!o.value.open&&o.value.showModal()},d=()=>{o.value&&o.value.open&&o.value.close()},m=()=>{s.modelValue&&u("update:modelValue",!1)};return e.watch(()=>s.modelValue,async t=>{await e.nextTick(),t?o.value&&!o.value.open&&o.value.showModal():o.value&&o.value.open&&o.value.close()}),f({open:p,close:d}),(t,b)=>(e.openBlock(),e.createElementBlock("dialog",e.mergeProps({ref_key:"dialogRef",ref:o,class:"_0e414b08e017324be9d8055e33e9e57a5d618fd64445845aa3d1c9c71a1cf19f"},t.$attrs,{onClose:m}),[a.showTitleBar?(e.openBlock(),e.createElementBlock("div",l,[e.createElementVNode("span",c,[e.renderSlot(t.$slots,"title")]),a.showCloseButton?(e.openBlock(),e.createElementBlock("a",{key:0,href:"javascript:void(0)",role:"button","aria-label":"Close the dialog",class:"_2b0f1321796c8091f668958929ed738b53afcb63d79387dc52ddc75b55ffb46c",onClick:e.withModifiers(d,["prevent"])},"×")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",i,[e.renderSlot(t.$slots,"default")])],16))}});return n.install=a=>{a.component("DialogView",n)},n}));
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { default as DialogView } from './DialogView.vue';
|
|
1
|
+
import { default as DialogView } from './DialogView.obf.vue';
|
|
2
2
|
export default DialogView;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import crypto from 'crypto';
|
|
5
|
+
|
|
6
|
+
const SRC_DIR = path.resolve('./src');
|
|
7
|
+
const OBF_SUFFIX = '.obf.vue';
|
|
8
|
+
|
|
9
|
+
// ----------------------------
|
|
10
|
+
// 遍历 Vue 文件(跳过 .obf.vue)
|
|
11
|
+
// ----------------------------
|
|
12
|
+
function getVueFiles(dir) {
|
|
13
|
+
let files = [];
|
|
14
|
+
for (const item of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
15
|
+
const fullPath = path.join(dir, item.name);
|
|
16
|
+
if (item.isDirectory()) {
|
|
17
|
+
files = files.concat(getVueFiles(fullPath));
|
|
18
|
+
} else if (item.isFile() && item.name.endsWith('.vue') && !item.name.endsWith(OBF_SUFFIX)) {
|
|
19
|
+
files.push(fullPath);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return files;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// ----------------------------
|
|
26
|
+
// SHA256 混淆类名
|
|
27
|
+
// ----------------------------
|
|
28
|
+
function obfClass(name) {
|
|
29
|
+
return '_' + crypto.createHash('sha256').update(name).digest('hex')
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ----------------------------
|
|
33
|
+
// 提取 template 内的 class
|
|
34
|
+
// ----------------------------
|
|
35
|
+
function extractClasses(template) {
|
|
36
|
+
const classes = new Set();
|
|
37
|
+
|
|
38
|
+
// class="..."
|
|
39
|
+
const classAttrRegex = /class\s*=\s*"([^"]+)"/g;
|
|
40
|
+
let match;
|
|
41
|
+
while ((match = classAttrRegex.exec(template)) !== null) {
|
|
42
|
+
match[1].split(/\s+/).forEach(cls => cls && classes.add(cls));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return classes;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// ----------------------------
|
|
49
|
+
// 替换模板和 style 中的 class
|
|
50
|
+
// ----------------------------
|
|
51
|
+
function replaceClasses(content, classMap) {
|
|
52
|
+
// 替换 class="..."
|
|
53
|
+
content = content.replace(/class\s*=\s*"([^"]+)"/g, (match, group1) => {
|
|
54
|
+
const replaced = group1.split(/\s+/).map(cls => classMap[cls] || cls).join(' ');
|
|
55
|
+
return `class="${replaced}"`;
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// 替换 <style> 中的类名
|
|
59
|
+
content = content.replace(/(\.)([\w-]+)/g, (match, dot, cls) => {
|
|
60
|
+
return classMap[cls] ? `.${classMap[cls]}` : match;
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
return content;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// ----------------------------
|
|
67
|
+
// 主程序
|
|
68
|
+
// ----------------------------
|
|
69
|
+
function main() {
|
|
70
|
+
const vueFiles = getVueFiles(SRC_DIR);
|
|
71
|
+
const allClasses = new Set();
|
|
72
|
+
|
|
73
|
+
// 提取所有 template class
|
|
74
|
+
vueFiles.forEach(file => {
|
|
75
|
+
const content = fs.readFileSync(file, 'utf-8');
|
|
76
|
+
const templateMatch = content.match(/<template[^>]*>([\s\S]*?)<\/template>/);
|
|
77
|
+
if (!templateMatch) return;
|
|
78
|
+
const templateContent = templateMatch[1];
|
|
79
|
+
extractClasses(templateContent).forEach(cls => allClasses.add(cls));
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
// 按长度降序避免短类名覆盖长类名
|
|
83
|
+
const classList = Array.from(allClasses).sort((a, b) => b.length - a.length);
|
|
84
|
+
const classMap = {};
|
|
85
|
+
classList.forEach(cls => { classMap[cls] = obfClass(cls); });
|
|
86
|
+
|
|
87
|
+
console.log('🔹 类名混淆映射:');
|
|
88
|
+
console.table(classMap);
|
|
89
|
+
|
|
90
|
+
// 替换并生成 .obf.vue 文件
|
|
91
|
+
vueFiles.forEach(file => {
|
|
92
|
+
const content = fs.readFileSync(file, 'utf-8');
|
|
93
|
+
const replacedContent = replaceClasses(content, classMap);
|
|
94
|
+
|
|
95
|
+
const obfFile = path.join(path.dirname(file), path.basename(file, '.vue') + OBF_SUFFIX);
|
|
96
|
+
fs.writeFileSync(obfFile, replacedContent, 'utf-8');
|
|
97
|
+
console.log(`✅ ${file} -> ${obfFile}`);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
console.log('🎉 所有文件混淆完成!');
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
main();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-dialog-view",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "A modern Vue 3 dialog component using native dialog element",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/dialog-view.umd.js",
|
|
@@ -19,11 +19,15 @@
|
|
|
19
19
|
"README.md",
|
|
20
20
|
"tsconfig.json",
|
|
21
21
|
"vite.config.ts",
|
|
22
|
+
"obfuscate-classes.mjs",
|
|
22
23
|
"LICENSE"
|
|
23
24
|
],
|
|
24
25
|
"scripts": {
|
|
25
26
|
"dev": "vite",
|
|
26
|
-
"
|
|
27
|
+
"clean": "rimraf dist",
|
|
28
|
+
"obfuscate": "node ./obfuscate-classes.mjs",
|
|
29
|
+
"build": "npm run clean && npm run obfuscate && npm run build-only",
|
|
30
|
+
"build-only": "vue-tsc --noEmit && vite build",
|
|
27
31
|
"preview": "vite preview"
|
|
28
32
|
},
|
|
29
33
|
"peerDependencies": {
|
|
@@ -31,6 +35,7 @@
|
|
|
31
35
|
},
|
|
32
36
|
"devDependencies": {
|
|
33
37
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
38
|
+
"rimraf": "^6.0.1",
|
|
34
39
|
"typescript": "^5.9.3",
|
|
35
40
|
"vite": "^7.1.10",
|
|
36
41
|
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
@@ -51,4 +56,4 @@
|
|
|
51
56
|
"url": "https://github.com/shc0743/MyUtility/issues"
|
|
52
57
|
},
|
|
53
58
|
"homepage": "https://github.com/shc0743/MyUtility/tree/main/js/lib/vue-dialog-view#readme"
|
|
54
|
-
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<dialog
|
|
3
|
+
ref="dialogRef"
|
|
4
|
+
class="_0e414b08e017324be9d8055e33e9e57a5d618fd64445845aa3d1c9c71a1cf19f"
|
|
5
|
+
v-bind="$attrs"
|
|
6
|
+
@close="handleDialogClose"
|
|
7
|
+
>
|
|
8
|
+
<div v-if="showTitleBar" class="_f1bcbda2e971453cc116bd5c6d4a303f38ac3e0618c26210b206271398b2f619">
|
|
9
|
+
<span class="_f365dae0582379d563ee03ab860c73c916d68f096a41a8bd34e05e566987b1f6">
|
|
10
|
+
<slot name="title"></slot>
|
|
11
|
+
</span>
|
|
12
|
+
<a
|
|
13
|
+
v-if="showCloseButton"
|
|
14
|
+
href="javascript:void(0)"
|
|
15
|
+
role="button"
|
|
16
|
+
aria-label="Close the dialog"
|
|
17
|
+
class="_2b0f1321796c8091f668958929ed738b53afcb63d79387dc52ddc75b55ffb46c"
|
|
18
|
+
@click.prevent="closeDialog"
|
|
19
|
+
>×</a>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="_3b2bdd19ddec80c5f0f162bc4b423dafa4f687f6f831e58742be40fb0e80838e">
|
|
22
|
+
<slot></slot>
|
|
23
|
+
</div>
|
|
24
|
+
</dialog>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
import { ref, watch, nextTick } from 'vue'
|
|
29
|
+
|
|
30
|
+
interface Props {
|
|
31
|
+
modelValue: boolean
|
|
32
|
+
showTitleBar?: boolean
|
|
33
|
+
showCloseButton?: boolean
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
37
|
+
showTitleBar: true,
|
|
38
|
+
showCloseButton: true
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
const emit = defineEmits<{
|
|
42
|
+
(e: 'update:modelValue', value: boolean): void
|
|
43
|
+
}>()
|
|
44
|
+
|
|
45
|
+
const dialogRef = ref<HTMLDialogElement | null>(null)
|
|
46
|
+
|
|
47
|
+
const openDialog = (): void => {
|
|
48
|
+
if (dialogRef.value && !dialogRef.value.open) {
|
|
49
|
+
dialogRef.value.showModal()
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const closeDialog = (): void => {
|
|
54
|
+
if (dialogRef.value && dialogRef.value.open) {
|
|
55
|
+
dialogRef.value.close()
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const handleDialogClose = (): void => {
|
|
60
|
+
if (props.modelValue) {
|
|
61
|
+
emit('update:modelValue', false)
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
watch(() => props.modelValue, async (newValue) => {
|
|
66
|
+
await nextTick()
|
|
67
|
+
|
|
68
|
+
if (newValue) {
|
|
69
|
+
if (dialogRef.value && !dialogRef.value.open) {
|
|
70
|
+
dialogRef.value.showModal()
|
|
71
|
+
}
|
|
72
|
+
} else {
|
|
73
|
+
if (dialogRef.value && dialogRef.value.open) {
|
|
74
|
+
dialogRef.value.close()
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
defineExpose({
|
|
80
|
+
open: openDialog,
|
|
81
|
+
close: closeDialog,
|
|
82
|
+
})
|
|
83
|
+
</script>
|
|
84
|
+
|
|
85
|
+
<style>
|
|
86
|
+
._0e414b08e017324be9d8055e33e9e57a5d618fd64445845aa3d1c9c71a1cf19f {
|
|
87
|
+
padding: 20px;
|
|
88
|
+
border-radius: 5px;
|
|
89
|
+
border: 1px solid gray;
|
|
90
|
+
outline: 0 !important;
|
|
91
|
+
max-width: calc(100% - 2em);
|
|
92
|
+
max-height: calc(100% - 2em);
|
|
93
|
+
box-sizing: border-box;
|
|
94
|
+
overflow: hidden;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
._0e414b08e017324be9d8055e33e9e57a5d618fd64445845aa3d1c9c71a1cf19f[open] {
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-direction: column;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
._0e414b08e017324be9d8055e33e9e57a5d618fd64445845aa3d1c9c71a1cf19f::backdrop {
|
|
103
|
+
background: rgba(0, 0, 0, 0.5);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
._f1bcbda2e971453cc116bd5c6d4a303f38ac3e0618c26210b206271398b2f619 {
|
|
107
|
+
display: flex;
|
|
108
|
+
flex-direction: row;
|
|
109
|
+
align-items: center;
|
|
110
|
+
margin-bottom: 0.5em;
|
|
111
|
+
min-height: 24px;
|
|
112
|
+
white-space: pre;
|
|
113
|
+
overflow: hidden;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
._f365dae0582379d563ee03ab860c73c916d68f096a41a8bd34e05e566987b1f6 {
|
|
117
|
+
flex: 1;
|
|
118
|
+
text-align: center;
|
|
119
|
+
font-weight: bold;
|
|
120
|
+
font-size: large;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
text-overflow: ellipsis;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
._2b0f1321796c8091f668958929ed738b53afcb63d79387dc52ddc75b55ffb46c {
|
|
126
|
+
margin-left: 0.5em;
|
|
127
|
+
text-decoration: none;
|
|
128
|
+
color: #666;
|
|
129
|
+
font-size: 1.5em;
|
|
130
|
+
line-height: 1;
|
|
131
|
+
width: 24px;
|
|
132
|
+
height: 24px;
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
justify-content: center;
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
border: none;
|
|
138
|
+
background: none;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
._2b0f1321796c8091f668958929ed738b53afcb63d79387dc52ddc75b55ffb46c:hover {
|
|
142
|
+
color: #333;
|
|
143
|
+
background-color: #f0f0f0;
|
|
144
|
+
border-radius: 3px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
._3b2bdd19ddec80c5f0f162bc4b423dafa4f687f6f831e58742be40fb0e80838e {
|
|
148
|
+
flex: 1;
|
|
149
|
+
overflow: auto;
|
|
150
|
+
display: flex;
|
|
151
|
+
flex-direction: column;
|
|
152
|
+
}
|
|
153
|
+
</style>
|
package/src/DialogView.vue
CHANGED
|
@@ -82,21 +82,21 @@ defineExpose({
|
|
|
82
82
|
})
|
|
83
83
|
</script>
|
|
84
84
|
|
|
85
|
-
<style
|
|
85
|
+
<style>
|
|
86
86
|
.dialog-view {
|
|
87
87
|
padding: 20px;
|
|
88
88
|
border-radius: 5px;
|
|
89
89
|
border: 1px solid gray;
|
|
90
90
|
outline: 0 !important;
|
|
91
|
+
max-width: calc(100% - 2em);
|
|
92
|
+
max-height: calc(100% - 2em);
|
|
93
|
+
box-sizing: border-box;
|
|
94
|
+
overflow: hidden;
|
|
91
95
|
}
|
|
92
96
|
|
|
93
97
|
.dialog-view[open] {
|
|
94
98
|
display: flex;
|
|
95
99
|
flex-direction: column;
|
|
96
|
-
position: fixed;
|
|
97
|
-
margin: auto;
|
|
98
|
-
max-width: 90vw;
|
|
99
|
-
max-height: 90vh;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
.dialog-view::backdrop {
|
|
@@ -109,13 +109,17 @@ defineExpose({
|
|
|
109
109
|
align-items: center;
|
|
110
110
|
margin-bottom: 0.5em;
|
|
111
111
|
min-height: 24px;
|
|
112
|
+
white-space: pre;
|
|
113
|
+
overflow: hidden;
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
.dialog-title {
|
|
115
117
|
flex: 1;
|
|
116
118
|
text-align: center;
|
|
117
119
|
font-weight: bold;
|
|
118
|
-
font-size:
|
|
120
|
+
font-size: large;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
text-overflow: ellipsis;
|
|
119
123
|
}
|
|
120
124
|
|
|
121
125
|
.dialog-close-button {
|
package/src/index.ts
CHANGED
package/vite.config.ts
CHANGED
|
File without changes
|