@qy_better_lib/pc 0.2.17 → 0.2.19
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/@qy_better_lib/pc.min.js +1 -1
- package/lib/node_modules/@ctrl/tinycolor/dist/module/conversion.js +115 -0
- package/lib/node_modules/@ctrl/tinycolor/dist/module/css-color-names.js +153 -0
- package/lib/node_modules/@ctrl/tinycolor/dist/module/format-input.js +68 -0
- package/lib/node_modules/@ctrl/tinycolor/dist/module/index.js +183 -0
- package/lib/node_modules/@ctrl/tinycolor/dist/module/util.js +32 -0
- package/lib/node_modules/@element-plus/icons-vue/dist/index.js +167 -0
- package/lib/node_modules/@vue/shared/dist/shared.esm-bundler.js +22 -0
- package/lib/node_modules/@vueuse/core/index.js +112 -0
- package/lib/node_modules/@vueuse/shared/index.js +68 -0
- package/lib/node_modules/element-plus/es/_virtual/plugin-vue_export-helper.js +9 -0
- package/lib/node_modules/element-plus/es/components/badge/index.js +7 -0
- package/lib/node_modules/element-plus/es/components/button/index.js +11 -0
- package/lib/node_modules/element-plus/es/components/icon/index.js +7 -0
- package/lib/node_modules/element-plus/es/components/input/index.js +7 -0
- package/lib/node_modules/element-plus/es/components/message/index.js +7 -0
- package/lib/node_modules/element-plus/es/components/message-box/index.js +10 -0
- package/lib/node_modules/element-plus/es/components/notification/index.js +7 -0
- package/lib/node_modules/element-plus/es/components/overlay/index.js +9 -0
- package/lib/node_modules/element-plus/es/constants/aria.js +9 -0
- package/lib/node_modules/element-plus/es/constants/event.js +6 -0
- package/lib/node_modules/element-plus/es/constants/size.js +4 -0
- package/lib/node_modules/element-plus/es/directives/trap-focus/index.js +32 -0
- package/lib/node_modules/element-plus/es/hooks/use-aria/index.js +14 -0
- package/lib/node_modules/element-plus/es/hooks/use-attrs/index.js +12 -0
- package/lib/node_modules/element-plus/es/hooks/use-composition/index.js +29 -0
- package/lib/node_modules/element-plus/es/hooks/use-cursor/index.js +39 -0
- package/lib/node_modules/element-plus/es/hooks/use-deprecated/index.js +10 -0
- package/lib/node_modules/element-plus/es/hooks/use-draggable/index.js +45 -0
- package/lib/node_modules/element-plus/es/hooks/use-empty-values/index.js +20 -0
- package/lib/node_modules/element-plus/es/hooks/use-escape-keydown/index.js +16 -0
- package/lib/node_modules/element-plus/es/hooks/use-focus-controller/index.js +34 -0
- package/lib/node_modules/element-plus/es/hooks/use-id/index.js +15 -0
- package/lib/node_modules/element-plus/es/hooks/use-locale/index.js +24 -0
- package/lib/node_modules/element-plus/es/hooks/use-lockscreen/index.js +30 -0
- package/lib/node_modules/element-plus/es/hooks/use-namespace/index.js +44 -0
- package/lib/node_modules/element-plus/es/hooks/use-prop/index.js +11 -0
- package/lib/node_modules/element-plus/es/hooks/use-same-target/index.js +16 -0
- package/lib/node_modules/element-plus/es/hooks/use-size/index.js +16 -0
- package/lib/node_modules/element-plus/es/hooks/use-z-index/index.js +22 -0
- package/lib/node_modules/element-plus/es/locale/lang/en.js +182 -0
- package/lib/node_modules/element-plus/es/utils/browser.js +6 -0
- package/lib/node_modules/element-plus/es/utils/dom/aria.js +29 -0
- package/lib/node_modules/element-plus/es/utils/dom/scroll.js +20 -0
- package/lib/node_modules/element-plus/es/utils/dom/style.js +45 -0
- package/lib/node_modules/element-plus/es/utils/error.js +14 -0
- package/lib/node_modules/element-plus/es/utils/i18n.js +4 -0
- package/lib/node_modules/element-plus/es/utils/objects.js +4 -0
- package/lib/node_modules/element-plus/es/utils/types.js +13 -0
- package/lib/node_modules/element-plus/es/utils/typescript.js +4 -0
- package/lib/node_modules/element-plus/es/utils/vue/icon.js +29 -0
- package/lib/node_modules/element-plus/es/utils/vue/install.js +17 -0
- package/lib/node_modules/element-plus/es/utils/vue/props/runtime.js +31 -0
- package/lib/node_modules/element-plus/es/utils/vue/validator.js +5 -0
- package/lib/node_modules/element-plus/es/utils/vue/vnode.js +5 -0
- package/lib/node_modules/lodash-es/_Hash.js +20 -0
- package/lib/node_modules/lodash-es/_ListCache.js +20 -0
- package/lib/node_modules/lodash-es/_Map.js +6 -0
- package/lib/node_modules/lodash-es/_MapCache.js +20 -0
- package/lib/node_modules/lodash-es/_Symbol.js +5 -0
- package/lib/node_modules/lodash-es/_apply.js +16 -0
- package/lib/node_modules/lodash-es/_arrayMap.js +8 -0
- package/lib/node_modules/lodash-es/_arrayPush.js +8 -0
- package/lib/node_modules/lodash-es/_assignValue.js +10 -0
- package/lib/node_modules/lodash-es/_assocIndexOf.js +10 -0
- package/lib/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/lib/node_modules/lodash-es/_baseFlatten.js +13 -0
- package/lib/node_modules/lodash-es/_baseGet.js +11 -0
- package/lib/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/lib/node_modules/lodash-es/_baseHasIn.js +6 -0
- package/lib/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/lib/node_modules/lodash-es/_baseIsNative.js +16 -0
- package/lib/node_modules/lodash-es/_basePick.js +10 -0
- package/lib/node_modules/lodash-es/_basePickBy.js +13 -0
- package/lib/node_modules/lodash-es/_baseSet.js +24 -0
- package/lib/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/lib/node_modules/lodash-es/_baseToString.js +18 -0
- package/lib/node_modules/lodash-es/_castPath.js +10 -0
- package/lib/node_modules/lodash-es/_coreJsData.js +5 -0
- package/lib/node_modules/lodash-es/_defineProperty.js +11 -0
- package/lib/node_modules/lodash-es/_flatRest.js +9 -0
- package/lib/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/lib/node_modules/lodash-es/_getMapData.js +8 -0
- package/lib/node_modules/lodash-es/_getNative.js +9 -0
- package/lib/node_modules/lodash-es/_getRawTag.js +15 -0
- package/lib/node_modules/lodash-es/_getValue.js +6 -0
- package/lib/node_modules/lodash-es/_hasPath.js +19 -0
- package/lib/node_modules/lodash-es/_hashClear.js +7 -0
- package/lib/node_modules/lodash-es/_hashDelete.js +7 -0
- package/lib/node_modules/lodash-es/_hashGet.js +13 -0
- package/lib/node_modules/lodash-es/_hashHas.js +9 -0
- package/lib/node_modules/lodash-es/_hashSet.js +9 -0
- package/lib/node_modules/lodash-es/_isFlattenable.js +10 -0
- package/lib/node_modules/lodash-es/_isIndex.js +8 -0
- package/lib/node_modules/lodash-es/_isKey.js +12 -0
- package/lib/node_modules/lodash-es/_isKeyable.js +7 -0
- package/lib/node_modules/lodash-es/_isMasked.js +11 -0
- package/lib/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/lib/node_modules/lodash-es/_listCacheDelete.js +12 -0
- package/lib/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/lib/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/lib/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/lib/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/lib/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/lib/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/lib/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/lib/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/lib/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/lib/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/lib/node_modules/lodash-es/_objectToString.js +7 -0
- package/lib/node_modules/lodash-es/_overRest.js +15 -0
- package/lib/node_modules/lodash-es/_root.js +5 -0
- package/lib/node_modules/lodash-es/_setToString.js +6 -0
- package/lib/node_modules/lodash-es/_shortOut.js +16 -0
- package/lib/node_modules/lodash-es/_stringToPath.js +10 -0
- package/lib/node_modules/lodash-es/_toKey.js +10 -0
- package/lib/node_modules/lodash-es/_toSource.js +17 -0
- package/lib/node_modules/lodash-es/constant.js +8 -0
- package/lib/node_modules/lodash-es/eq.js +6 -0
- package/lib/node_modules/lodash-es/flatten.js +8 -0
- package/lib/node_modules/lodash-es/fromPairs.js +10 -0
- package/lib/node_modules/lodash-es/get.js +8 -0
- package/lib/node_modules/lodash-es/hasIn.js +8 -0
- package/lib/node_modules/lodash-es/identity.js +6 -0
- package/lib/node_modules/lodash-es/isArguments.js +10 -0
- package/lib/node_modules/lodash-es/isArray.js +4 -0
- package/lib/node_modules/lodash-es/isFunction.js +12 -0
- package/lib/node_modules/lodash-es/isLength.js +7 -0
- package/lib/node_modules/lodash-es/isNil.js +6 -0
- package/lib/node_modules/lodash-es/isObject.js +7 -0
- package/lib/node_modules/lodash-es/isObjectLike.js +6 -0
- package/lib/node_modules/lodash-es/isSymbol.js +9 -0
- package/lib/node_modules/lodash-es/memoize.js +18 -0
- package/lib/node_modules/lodash-es/pick.js +8 -0
- package/lib/node_modules/lodash-es/toString.js +7 -0
- package/lib/{utils → src/utils}/index.js +24 -22
- package/lib/styles/contextMenu.scss +3 -3
- package/package.json +1 -1
- package/lib/contextMenu/src/index.vue.js +0 -104
- package/lib/contextMenu/src/index.vue2.js +0 -4
- package/lib/describeView/src/index.vue.js +0 -81
- package/lib/describeView/src/index.vue2.js +0 -4
- package/lib/simpleVirtualList/src/index.vue.js +0 -84
- package/lib/simpleVirtualList/src/index.vue2.js +0 -4
- package/lib/tableExtend/src/colVisible.vue.js +0 -103
- package/lib/tableExtend/src/colVisible.vue2.js +0 -4
- package/lib/tableExtend/src/index.vue.js +0 -220
- package/lib/tableExtend/src/index.vue2.js +0 -4
- package/lib/tableExtend/src/valueCol.vue.js +0 -26
- package/lib/tableExtend/src/valueCol.vue2.js +0 -4
- package/lib/textButton/src/index.vue.js +0 -56
- package/lib/textButton/src/index.vue2.js +0 -4
- /package/lib/{contextMenu → src/contextMenu}/index.js +0 -0
- /package/lib/{describeView → src/describeView}/index.js +0 -0
- /package/lib/{index.js → src/index.js} +0 -0
- /package/lib/{simpleVirtualList → src/simpleVirtualList}/index.js +0 -0
- /package/lib/{tableExtend → src/tableExtend}/index.js +0 -0
- /package/lib/{tableExtend → src/tableExtend}/props.js +0 -0
- /package/lib/{tableExtend → src/tableExtend}/type.js +0 -0
- /package/lib/{tableExtend → src/tableExtend}/useTable.js +0 -0
- /package/lib/{textButton → src/textButton}/index.js +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import u from "./_apply.js";
|
|
2
|
+
var o = Math.max;
|
|
3
|
+
function d(i, e, g) {
|
|
4
|
+
return e = o(e === void 0 ? i.length - 1 : e, 0), function() {
|
|
5
|
+
for (var n = arguments, r = -1, h = o(n.length - e, 0), l = Array(h); ++r < h; )
|
|
6
|
+
l[r] = n[e + r];
|
|
7
|
+
r = -1;
|
|
8
|
+
for (var a = Array(e + 1); ++r < e; )
|
|
9
|
+
a[r] = n[r];
|
|
10
|
+
return a[e] = g(l), u(i, this, a);
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
d as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var u = 800, i = 16, o = Date.now;
|
|
2
|
+
function s(e) {
|
|
3
|
+
var n = 0, t = 0;
|
|
4
|
+
return function() {
|
|
5
|
+
var a = o(), r = i - (a - t);
|
|
6
|
+
if (t = a, r > 0) {
|
|
7
|
+
if (++n >= u)
|
|
8
|
+
return arguments[0];
|
|
9
|
+
} else
|
|
10
|
+
n = 0;
|
|
11
|
+
return e.apply(void 0, arguments);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
s as default
|
|
16
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import u from "./_memoizeCapped.js";
|
|
2
|
+
var c = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, d = /\\(\\)?/g, h = u(function(e) {
|
|
3
|
+
var r = [];
|
|
4
|
+
return e.charCodeAt(0) === 46 && r.push(""), e.replace(c, function(a, p, o, t) {
|
|
5
|
+
r.push(o ? t.replace(d, "$1") : p || a);
|
|
6
|
+
}), r;
|
|
7
|
+
});
|
|
8
|
+
export {
|
|
9
|
+
h as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import e from "./_baseIsArguments.js";
|
|
2
|
+
import o from "./isObjectLike.js";
|
|
3
|
+
var t = Object.prototype, a = t.hasOwnProperty, n = t.propertyIsEnumerable, c = e(/* @__PURE__ */ (function() {
|
|
4
|
+
return arguments;
|
|
5
|
+
})()) ? e : function(r) {
|
|
6
|
+
return o(r) && a.call(r, "callee") && !n.call(r, "callee");
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
c as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import o from "./_baseGetTag.js";
|
|
2
|
+
import r from "./isObject.js";
|
|
3
|
+
var e = "[object AsyncFunction]", a = "[object Function]", c = "[object GeneratorFunction]", i = "[object Proxy]";
|
|
4
|
+
function g(n) {
|
|
5
|
+
if (!r(n))
|
|
6
|
+
return !1;
|
|
7
|
+
var t = o(n);
|
|
8
|
+
return t == a || t == c || t == e || t == i;
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
g as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import h from "./_MapCache.js";
|
|
2
|
+
var p = "Expected a function";
|
|
3
|
+
function o(r, e) {
|
|
4
|
+
if (typeof r != "function" || e != null && typeof e != "function")
|
|
5
|
+
throw new TypeError(p);
|
|
6
|
+
var t = function() {
|
|
7
|
+
var c = arguments, n = e ? e.apply(this, c) : c[0], a = t.cache;
|
|
8
|
+
if (a.has(n))
|
|
9
|
+
return a.get(n);
|
|
10
|
+
var i = r.apply(this, c);
|
|
11
|
+
return t.cache = a.set(n, i) || a, i;
|
|
12
|
+
};
|
|
13
|
+
return t.cache = new (o.Cache || h)(), t;
|
|
14
|
+
}
|
|
15
|
+
o.Cache = h;
|
|
16
|
+
export {
|
|
17
|
+
o as default
|
|
18
|
+
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { ElMessage as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { ElMessage as u } from "../../node_modules/element-plus/es/components/message/index.js";
|
|
2
|
+
import { ElMessageBox as f } from "../../node_modules/element-plus/es/components/message-box/index.js";
|
|
3
|
+
import { ElNotification as a } from "../../node_modules/element-plus/es/components/notification/index.js";
|
|
4
|
+
function T(o, r, e = !0, t = "") {
|
|
5
|
+
switch (r) {
|
|
4
6
|
case "toast":
|
|
5
7
|
g(
|
|
6
8
|
e ? "success" : "error",
|
|
@@ -20,61 +22,61 @@ function x(o, n, e = !0, t = "") {
|
|
|
20
22
|
break;
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
|
-
function
|
|
25
|
+
function b(o, r, e) {
|
|
24
26
|
const t = {
|
|
25
|
-
beforeClose: (
|
|
26
|
-
|
|
27
|
+
beforeClose: (n, s, i) => {
|
|
28
|
+
n === "confirm" ? setTimeout(() => {
|
|
27
29
|
i();
|
|
28
30
|
}, 0) : i();
|
|
29
31
|
},
|
|
30
32
|
...e
|
|
31
33
|
};
|
|
32
34
|
f.confirm(`此操作将${o}, 是否继续?`, "提示", t).then(async () => {
|
|
33
|
-
|
|
35
|
+
r && r();
|
|
34
36
|
}).catch(() => {
|
|
35
37
|
});
|
|
36
38
|
}
|
|
37
|
-
function h(o,
|
|
38
|
-
return new Promise((
|
|
39
|
+
function h(o, r, e, t) {
|
|
40
|
+
return new Promise((n, s) => {
|
|
39
41
|
const i = {
|
|
40
|
-
beforeClose: (
|
|
41
|
-
|
|
42
|
+
beforeClose: (m, p, c) => {
|
|
43
|
+
m === "confirm" ? setTimeout(() => {
|
|
42
44
|
c();
|
|
43
45
|
}, 0) : c();
|
|
44
46
|
},
|
|
45
47
|
...e
|
|
46
48
|
};
|
|
47
49
|
f.confirm(`${o}`, "Tip", i).then(() => {
|
|
48
|
-
r
|
|
50
|
+
n(r && r());
|
|
49
51
|
}).catch(() => {
|
|
50
|
-
|
|
52
|
+
n(t ? t() : !1);
|
|
51
53
|
});
|
|
52
54
|
});
|
|
53
55
|
}
|
|
54
|
-
function g(o,
|
|
55
|
-
|
|
56
|
+
function g(o, r = "", e = !1, t = 3e3) {
|
|
57
|
+
u({
|
|
56
58
|
showClose: !0,
|
|
57
|
-
message:
|
|
59
|
+
message: r,
|
|
58
60
|
type: o,
|
|
59
61
|
duration: t,
|
|
60
62
|
dangerouslyUseHTMLString: e
|
|
61
63
|
});
|
|
62
64
|
}
|
|
63
|
-
function l(o,
|
|
64
|
-
|
|
65
|
-
title:
|
|
65
|
+
function l(o, r = "", e = "", t = !0, n = "bottom-right", s = 3e3) {
|
|
66
|
+
a({
|
|
67
|
+
title: r,
|
|
66
68
|
message: e,
|
|
67
69
|
type: o,
|
|
68
70
|
dangerouslyUseHTMLString: t,
|
|
69
71
|
duration: s,
|
|
70
72
|
showClose: !0,
|
|
71
|
-
position:
|
|
73
|
+
position: n
|
|
72
74
|
});
|
|
73
75
|
}
|
|
74
76
|
export {
|
|
75
|
-
|
|
77
|
+
b as confirmBox,
|
|
76
78
|
h as confirmBoxAsync,
|
|
77
79
|
g as messageAlert,
|
|
78
|
-
|
|
80
|
+
T as messageBox,
|
|
79
81
|
l as notification
|
|
80
82
|
};
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
height: 34px;
|
|
29
29
|
padding: 0 20px;
|
|
30
30
|
margin: 0 5px;
|
|
31
|
-
// border-bottom: 1px solid var(--el-border-color-extra-light);
|
|
32
31
|
display: flex;
|
|
33
32
|
gap: 10px;
|
|
34
33
|
align-items: center;
|
|
35
34
|
border-radius: var(--el-border-radius-base);
|
|
36
35
|
transition: background-color .3s cubic-bezier(.4, 0, .2, 1);
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
&.disabled {
|
|
38
|
+
cursor: not-allowed;
|
|
39
|
+
color: var(--el-text-color-disabled);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
&:hover {
|
package/package.json
CHANGED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, ref as _, reactive as X, watch as $, nextTick as f, onMounted as D, onBeforeUnmount as L, resolveComponent as N, createBlock as h, openBlock as i, Teleport as P, withDirectives as S, createCommentVNode as T, createElementBlock as a, normalizeStyle as V, createElementVNode as C, Fragment as b, renderList as Y, renderSlot as H, createTextVNode as O, toDisplayString as R, unref as W } from "vue";
|
|
2
|
-
import { ClickOutside as j } from "@qy_better_lib/core";
|
|
3
|
-
const q = { class: "contextmenu-wrap" }, z = { class: "contextmenu-items" }, A = ["onClick"], G = /* @__PURE__ */ M({
|
|
4
|
-
__name: "index",
|
|
5
|
-
props: {
|
|
6
|
-
visible: {
|
|
7
|
-
type: Boolean,
|
|
8
|
-
default: () => !1
|
|
9
|
-
},
|
|
10
|
-
position: {
|
|
11
|
-
type: Object,
|
|
12
|
-
default: () => {
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
options: {
|
|
16
|
-
type: Array,
|
|
17
|
-
default: [],
|
|
18
|
-
required: !0
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
emits: ["menuClick", "update:visible"],
|
|
22
|
-
setup(m, { expose: g, emit: B }) {
|
|
23
|
-
const v = m, y = B;
|
|
24
|
-
g({
|
|
25
|
-
hide: d,
|
|
26
|
-
show: u
|
|
27
|
-
});
|
|
28
|
-
const l = _(!1), s = _(null), c = X({
|
|
29
|
-
left: 0,
|
|
30
|
-
top: 0
|
|
31
|
-
});
|
|
32
|
-
$(() => v.visible, (e) => {
|
|
33
|
-
e && (l.value = !0, f(() => {
|
|
34
|
-
k(v.position);
|
|
35
|
-
}));
|
|
36
|
-
}, {
|
|
37
|
-
immediate: !0
|
|
38
|
-
}), D(() => {
|
|
39
|
-
s.value?.addEventListener("contextmenu", u);
|
|
40
|
-
}), L(() => {
|
|
41
|
-
x();
|
|
42
|
-
});
|
|
43
|
-
function x() {
|
|
44
|
-
s.value?.removeEventListener("contextmenu", u);
|
|
45
|
-
}
|
|
46
|
-
function E(e) {
|
|
47
|
-
y("menuClick", e), d();
|
|
48
|
-
}
|
|
49
|
-
async function u(e) {
|
|
50
|
-
e.preventDefault(), l.value = !0, await f();
|
|
51
|
-
const { pageX: n, pageY: t } = e;
|
|
52
|
-
k({ x: n, y: t });
|
|
53
|
-
}
|
|
54
|
-
function k(e) {
|
|
55
|
-
const { clientWidth: n, clientHeight: t } = s.value;
|
|
56
|
-
!n || !t || (c.top = `${w("Y", e.y || 0, t)}px`, c.left = `${w("X", e.x || 0, n)}px`);
|
|
57
|
-
}
|
|
58
|
-
function d() {
|
|
59
|
-
x(), l.value = !1, f(() => {
|
|
60
|
-
y("update:visible", !1);
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
function w(e, n, t) {
|
|
64
|
-
const o = e === "X" ? window.innerWidth : window.innerHeight, p = e === "X" ? window.scrollX : window.scrollY;
|
|
65
|
-
let r = n - p;
|
|
66
|
-
return r + t > o && (r = Math.max(0, r - t)), r + p;
|
|
67
|
-
}
|
|
68
|
-
return (e, n) => {
|
|
69
|
-
const t = N("el-divider");
|
|
70
|
-
return i(), h(P, { to: "body" }, [
|
|
71
|
-
l.value ? S((i(), a("div", {
|
|
72
|
-
key: 0,
|
|
73
|
-
class: "contextmenu",
|
|
74
|
-
style: V({ top: c.top, left: c.left }),
|
|
75
|
-
ref_key: "contextMenuRef",
|
|
76
|
-
ref: s
|
|
77
|
-
}, [
|
|
78
|
-
C("div", q, [
|
|
79
|
-
C("ul", z, [
|
|
80
|
-
(i(!0), a(b, null, Y(m.options, (o) => (i(), a(b, {
|
|
81
|
-
key: o.key
|
|
82
|
-
}, [
|
|
83
|
-
o?.type == "divider" ? (i(), h(t, { key: 0 })) : (i(), a("li", {
|
|
84
|
-
key: 1,
|
|
85
|
-
class: "contextmenu-item",
|
|
86
|
-
onClick: (p) => E(o)
|
|
87
|
-
}, [
|
|
88
|
-
H(e.$slots, "item", { data: o }, () => [
|
|
89
|
-
O(R(o.label), 1)
|
|
90
|
-
])
|
|
91
|
-
], 8, A))
|
|
92
|
-
], 64))), 128))
|
|
93
|
-
])
|
|
94
|
-
])
|
|
95
|
-
], 4)), [
|
|
96
|
-
[W(j), d]
|
|
97
|
-
]) : T("", !0)
|
|
98
|
-
]);
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
export {
|
|
103
|
-
G as default
|
|
104
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { defineComponent as y, computed as h, createElementBlock as s, openBlock as i, renderSlot as r, createElementVNode as d, normalizeStyle as c, Fragment as v, renderList as $, createTextVNode as u, toDisplayString as p } from "vue";
|
|
2
|
-
import { isNumber as g } from "@qy_better_lib/core";
|
|
3
|
-
const w = { class: "describe-view-container" }, _ = { class: "value" }, N = /* @__PURE__ */ y({
|
|
4
|
-
__name: "index",
|
|
5
|
-
props: {
|
|
6
|
-
/**配置 */
|
|
7
|
-
config: {
|
|
8
|
-
type: Object
|
|
9
|
-
},
|
|
10
|
-
/**数据 */
|
|
11
|
-
data: {
|
|
12
|
-
type: Object,
|
|
13
|
-
default: {}
|
|
14
|
-
},
|
|
15
|
-
// 展示列数
|
|
16
|
-
column: {
|
|
17
|
-
type: Number,
|
|
18
|
-
default: 3
|
|
19
|
-
},
|
|
20
|
-
/**label宽度:数字或字符串;如果定义多列宽度,使用字符串格式'20,30,50' */
|
|
21
|
-
labelWidth: {
|
|
22
|
-
type: [Number, String],
|
|
23
|
-
default: 85
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
setup(n) {
|
|
27
|
-
const a = n, f = h(() => ({
|
|
28
|
-
"grid-template-columns": `repeat(${a.column}, minmax(1px, 1fr))`
|
|
29
|
-
}));
|
|
30
|
-
function m(t) {
|
|
31
|
-
const l = {};
|
|
32
|
-
return t.col_span && (l.gridColumnStart = `span ${t.col_span}`), t.row_span && (l.gridRowStart = `span ${t.row_span}`), l;
|
|
33
|
-
}
|
|
34
|
-
function b(t) {
|
|
35
|
-
let l = (t + 1) % a.column;
|
|
36
|
-
l = l === 0 ? a.column : l;
|
|
37
|
-
let e = 0;
|
|
38
|
-
if (g(a.labelWidth))
|
|
39
|
-
e = a.labelWidth;
|
|
40
|
-
else {
|
|
41
|
-
if (a.labelWidth === "auto") return {};
|
|
42
|
-
const o = a.labelWidth.split(",");
|
|
43
|
-
o.length === 1 ? e = a.labelWidth : e = o[l - 1];
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
width: `${e}px`
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
return (t, l) => (i(), s("div", w, [
|
|
50
|
-
r(t.$slots, "header"),
|
|
51
|
-
d("div", {
|
|
52
|
-
class: "view-content",
|
|
53
|
-
style: c(f.value)
|
|
54
|
-
}, [
|
|
55
|
-
(i(!0), s(v, null, $(n.config, (e, o) => (i(), s("div", {
|
|
56
|
-
class: "view-item",
|
|
57
|
-
key: e.prop,
|
|
58
|
-
style: c(m(e))
|
|
59
|
-
}, [
|
|
60
|
-
d("div", {
|
|
61
|
-
class: "label",
|
|
62
|
-
style: c(b(o))
|
|
63
|
-
}, [
|
|
64
|
-
r(t.$slots, `label_${e.prop}`, {}, () => [
|
|
65
|
-
u(p(`${e.label}:`), 1)
|
|
66
|
-
])
|
|
67
|
-
], 4),
|
|
68
|
-
d("div", _, [
|
|
69
|
-
r(t.$slots, `value_${e.prop}`, { data: n.data }, () => [
|
|
70
|
-
u(p(n.data[e.prop] != null ? n.data[e.prop] : "--"), 1)
|
|
71
|
-
])
|
|
72
|
-
])
|
|
73
|
-
], 4))), 128))
|
|
74
|
-
], 4),
|
|
75
|
-
r(t.$slots, "footer")
|
|
76
|
-
]));
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
export {
|
|
80
|
-
N as default
|
|
81
|
-
};
|