command-center-v3-common 0.0.1
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/README.md +46 -0
- package/dist/box-border-demo-D6Na5yBP.js +28 -0
- package/dist/button-demo-5otJa-RX.js +176 -0
- package/dist/command-center-v3-common-C7zcE6rW.js +45395 -0
- package/dist/command-center-v3-common.js +4 -0
- package/dist/command-center-v3-common.umd.cjs +115 -0
- package/dist/favicon.ico +0 -0
- package/dist/hy-table-demo-BbEB1Rdd.js +108 -0
- package/dist/hy-test-SCUXMIq-.js +187 -0
- package/dist/image-viewer-demo-C0_fYGnJ.js +72 -0
- package/dist/round-button-demo-QP1t72o5.js +43 -0
- package/dist/style.css +1 -0
- package/dist/svg-icon-demo-DW0XS1-Y.js +36 -0
- package/dist/test-demo-6WlyOn4P.js +46 -0
- package/dist/tips-modal-demo-B269tgx7.js +98 -0
- package/dist/user-head-demo-COeyn4zo.js +66 -0
- package/dist/vue-cropper-demo-D2NrtovK.js +93 -0
- package/package.json +83 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
import { resolveComponent as s, openBlock as n, createElementBlock as c, createVNode as t } from "vue";
|
2
|
+
import { b as o } from "./command-center-v3-common-C7zcE6rW.js";
|
3
|
+
const a = {}, i = { class: "flex items-center justify-center gap-x-3" };
|
4
|
+
function m(r, h) {
|
5
|
+
const e = s("SvgIcon");
|
6
|
+
return n(), c("div", i, [
|
7
|
+
t(e, {
|
8
|
+
name: "sys-button-add",
|
9
|
+
width: "26",
|
10
|
+
height: "26",
|
11
|
+
"class-name": "text-hy-main"
|
12
|
+
}),
|
13
|
+
t(e, {
|
14
|
+
name: "sys-button-delete",
|
15
|
+
width: "26",
|
16
|
+
height: "26",
|
17
|
+
"class-name": "text-hy-danger"
|
18
|
+
}),
|
19
|
+
t(e, {
|
20
|
+
name: "sys-button-success",
|
21
|
+
width: "26",
|
22
|
+
height: "26",
|
23
|
+
"class-name": "text-hy-success"
|
24
|
+
}),
|
25
|
+
t(e, {
|
26
|
+
name: "sys-button-tips",
|
27
|
+
width: "26",
|
28
|
+
height: "26",
|
29
|
+
"class-name": "text-hy-warning"
|
30
|
+
})
|
31
|
+
]);
|
32
|
+
}
|
33
|
+
const _ = /* @__PURE__ */ o(a, [["render", m]]);
|
34
|
+
export {
|
35
|
+
_ as default
|
36
|
+
};
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { resolveComponent as c, openBlock as i, createElementBlock as s, Fragment as a, createVNode as t, withCtx as e, createTextVNode as r } from "vue";
|
2
|
+
import { b as l } from "./command-center-v3-common-C7zcE6rW.js";
|
3
|
+
const _ = {};
|
4
|
+
function m(p, d) {
|
5
|
+
const o = c("el-button"), n = c("el-popover");
|
6
|
+
return i(), s(a, null, [
|
7
|
+
t(n, {
|
8
|
+
placement: "top-start",
|
9
|
+
title: "Title",
|
10
|
+
width: 200,
|
11
|
+
trigger: "hover",
|
12
|
+
content: "this is content, this is content, this is content"
|
13
|
+
}, {
|
14
|
+
reference: e(() => [
|
15
|
+
t(o, { class: "m-2" }, {
|
16
|
+
default: e(() => [
|
17
|
+
r(" Hover to activate ")
|
18
|
+
]),
|
19
|
+
_: 1
|
20
|
+
})
|
21
|
+
]),
|
22
|
+
_: 1
|
23
|
+
}),
|
24
|
+
t(n, {
|
25
|
+
placement: "bottom",
|
26
|
+
title: "Title",
|
27
|
+
width: 200,
|
28
|
+
trigger: "click",
|
29
|
+
content: "this is content, this is content, this is content"
|
30
|
+
}, {
|
31
|
+
reference: e(() => [
|
32
|
+
t(o, { class: "m-2" }, {
|
33
|
+
default: e(() => [
|
34
|
+
r(" Click to activate ")
|
35
|
+
]),
|
36
|
+
_: 1
|
37
|
+
})
|
38
|
+
]),
|
39
|
+
_: 1
|
40
|
+
})
|
41
|
+
], 64);
|
42
|
+
}
|
43
|
+
const u = /* @__PURE__ */ l(_, [["render", m], ["__scopeId", "data-v-89d47af3"]]);
|
44
|
+
export {
|
45
|
+
u as default
|
46
|
+
};
|
@@ -0,0 +1,98 @@
|
|
1
|
+
import { defineComponent as p, ref as r, resolveComponent as a, openBlock as u, createElementBlock as m, Fragment as d, createElementVNode as T, createVNode as t, withCtx as s, createTextVNode as n } from "vue";
|
2
|
+
import { c as y, H as f } from "./command-center-v3-common-C7zcE6rW.js";
|
3
|
+
const _ = { class: "flex items-center justify-center gap-x-3" }, w = /* @__PURE__ */ p({
|
4
|
+
__name: "tips-modal-demo",
|
5
|
+
setup(h) {
|
6
|
+
const e = r();
|
7
|
+
function i() {
|
8
|
+
f({
|
9
|
+
width: 440,
|
10
|
+
tipsTitleIcon: "sys-button-delete",
|
11
|
+
tipsTitleIconClass: "text-hy-danger",
|
12
|
+
tipsTitle: "删除",
|
13
|
+
tipsContent: "是否确认删除?",
|
14
|
+
isShowClose: !0,
|
15
|
+
isShowSubmit: !0,
|
16
|
+
closeBtnText: "取消",
|
17
|
+
submitBtnText: "删除",
|
18
|
+
closeBtnType: "primary",
|
19
|
+
submitBtnType: "danger"
|
20
|
+
}, () => {
|
21
|
+
console.log("2");
|
22
|
+
}, () => {
|
23
|
+
console.log("1");
|
24
|
+
});
|
25
|
+
}
|
26
|
+
function l() {
|
27
|
+
e.value.onShowModal({
|
28
|
+
width: 440,
|
29
|
+
tipsTitleIcon: "sys-button-delete",
|
30
|
+
tipsTitleIconClass: "text-hy-danger",
|
31
|
+
tipsTitle: "删除",
|
32
|
+
tipsContent: "是否确认删除?",
|
33
|
+
isShowClose: !0,
|
34
|
+
isShowSubmit: !0,
|
35
|
+
closeBtnText: "取消",
|
36
|
+
submitBtnText: "删除",
|
37
|
+
closeBtnType: "primary",
|
38
|
+
submitBtnType: "danger"
|
39
|
+
});
|
40
|
+
}
|
41
|
+
function c() {
|
42
|
+
e.value.onShowModal({
|
43
|
+
width: 440,
|
44
|
+
tipsTitleIcon: "sys-button-jump",
|
45
|
+
tipsTitleIconClass: "text-hy-success",
|
46
|
+
tipsTitle: "跳转",
|
47
|
+
tipsContent: "是否确认跳转?",
|
48
|
+
isShowClose: !0,
|
49
|
+
isShowSubmit: !0,
|
50
|
+
closeBtnText: "取消",
|
51
|
+
submitBtnText: "跳转",
|
52
|
+
closeBtnType: "primary",
|
53
|
+
submitBtnType: "success"
|
54
|
+
});
|
55
|
+
}
|
56
|
+
return (x, C) => {
|
57
|
+
const o = a("el-button");
|
58
|
+
return u(), m(d, null, [
|
59
|
+
T("div", _, [
|
60
|
+
t(o, {
|
61
|
+
type: "danger",
|
62
|
+
onClick: i
|
63
|
+
}, {
|
64
|
+
default: s(() => [
|
65
|
+
n(" test ")
|
66
|
+
]),
|
67
|
+
_: 1
|
68
|
+
}),
|
69
|
+
t(o, {
|
70
|
+
type: "danger",
|
71
|
+
onClick: l
|
72
|
+
}, {
|
73
|
+
default: s(() => [
|
74
|
+
n(" 删除 ")
|
75
|
+
]),
|
76
|
+
_: 1
|
77
|
+
}),
|
78
|
+
t(o, {
|
79
|
+
type: "primary",
|
80
|
+
onClick: c
|
81
|
+
}, {
|
82
|
+
default: s(() => [
|
83
|
+
n(" 跳转 ")
|
84
|
+
]),
|
85
|
+
_: 1
|
86
|
+
})
|
87
|
+
]),
|
88
|
+
t(y, {
|
89
|
+
ref_key: "tipsModalRef",
|
90
|
+
ref: e
|
91
|
+
}, null, 512)
|
92
|
+
], 64);
|
93
|
+
};
|
94
|
+
}
|
95
|
+
});
|
96
|
+
export {
|
97
|
+
w as default
|
98
|
+
};
|
@@ -0,0 +1,66 @@
|
|
1
|
+
import { defineComponent as o, ref as l, openBlock as r, createElementBlock as d, createVNode as t, normalizeStyle as n, unref as a, normalizeClass as c, withCtx as x, createElementVNode as p } from "vue";
|
2
|
+
import { e as s } from "./command-center-v3-common-C7zcE6rW.js";
|
3
|
+
const h = { class: "flex items-center justify-center gap-x-3" }, y = /* @__PURE__ */ o({
|
4
|
+
__name: "user-head-demo",
|
5
|
+
setup(i) {
|
6
|
+
const e = l({
|
7
|
+
headImg: "",
|
8
|
+
audioContextType: !1,
|
9
|
+
onlineState: 1,
|
10
|
+
gbDevice: 1
|
11
|
+
});
|
12
|
+
return (m, u) => (r(), d("div", h, [
|
13
|
+
t(s, {
|
14
|
+
url: "",
|
15
|
+
"head-box-class-name": "w-[28px] h-[28px]"
|
16
|
+
}),
|
17
|
+
t(s, {
|
18
|
+
url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
|
19
|
+
"head-box-class-name": "w-[28px] h-[28px]",
|
20
|
+
"class-name": "w-[18px] h-[18px]",
|
21
|
+
name: "user-head-demo-user"
|
22
|
+
}),
|
23
|
+
t(s, {
|
24
|
+
url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
|
25
|
+
"head-box-class-name": "w-[36px] h-[36px]",
|
26
|
+
"class-name": "w-[18px] h-[18px]"
|
27
|
+
}),
|
28
|
+
t(s, {
|
29
|
+
style: n({
|
30
|
+
background: "linear-gradient(180deg, #5A2120 0%, #C81F12 100%)",
|
31
|
+
color: "#FDE777"
|
32
|
+
}),
|
33
|
+
"gb-device": !0,
|
34
|
+
"head-box-class-name": "w-[28px] h-[28px] text-xs",
|
35
|
+
"class-name": "w-[18px] h-[18px]",
|
36
|
+
name: "user-head-demo-user"
|
37
|
+
}, null, 8, ["style"]),
|
38
|
+
t(s, {
|
39
|
+
url: a(e).headImg,
|
40
|
+
class: c({
|
41
|
+
"!border-hy-main": a(e).audioContextType,
|
42
|
+
"text-hy-text-primary": a(e).onlineState === 1 && a(e).gbDevice !== 1,
|
43
|
+
"text-hy-gb-device-text": a(e).onlineState === 1 && a(e).gbDevice === 1
|
44
|
+
}),
|
45
|
+
style: n(a(e).onlineState === 1 && a(e).gbDevice === 1 ? "background:var(--hy-gb-device-background)" : ""),
|
46
|
+
"gb-device": !0,
|
47
|
+
"head-box-class-name": "w-[60px] h-[60px] z-[1] bg-hy-page-bg-2 text-base relative",
|
48
|
+
"class-name": "w-[56%] h-[56%]",
|
49
|
+
name: "sys-icon-user-head"
|
50
|
+
}, {
|
51
|
+
content: x(() => [
|
52
|
+
p("span", {
|
53
|
+
class: c([{
|
54
|
+
"bg-hy-success shadow-hy-success": a(e).onlineState === 1,
|
55
|
+
"bg-hy-text-secondary shadow-hy-text-secondary": a(e).onlineState !== 1
|
56
|
+
}, "absolute bottom-[2px] right-[2px] w-[14px] h-[14px] rounded-full shadow-[0_0_10px_0]"])
|
57
|
+
}, null, 2)
|
58
|
+
]),
|
59
|
+
_: 1
|
60
|
+
}, 8, ["url", "class", "style"])
|
61
|
+
]));
|
62
|
+
}
|
63
|
+
});
|
64
|
+
export {
|
65
|
+
y as default
|
66
|
+
};
|
@@ -0,0 +1,93 @@
|
|
1
|
+
import { defineComponent as _, ref as p, resolveComponent as i, openBlock as g, createElementBlock as v, Fragment as h, createElementVNode as r, unref as x, createVNode as t, withCtx as c, createTextVNode as s } from "vue";
|
2
|
+
import { f as C } from "./command-center-v3-common-C7zcE6rW.js";
|
3
|
+
const w = { class: "flex flex-col items-center justify-center gap-6" }, y = ["src"], b = { class: "flex items-center gap-x-3" }, S = /* @__PURE__ */ _({
|
4
|
+
__name: "vue-cropper-demo",
|
5
|
+
setup(B) {
|
6
|
+
const e = p(), a = p("https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg");
|
7
|
+
async function f() {
|
8
|
+
const n = {
|
9
|
+
img: a.value
|
10
|
+
};
|
11
|
+
await e.value.onShowModal(n), a.value = await e.value.getCropData();
|
12
|
+
}
|
13
|
+
function u() {
|
14
|
+
a.value = "https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg";
|
15
|
+
}
|
16
|
+
async function d(n) {
|
17
|
+
const o = {
|
18
|
+
img: await e.value.getBlobToData(n),
|
19
|
+
outputType: "png",
|
20
|
+
// 裁剪生成图片的格式
|
21
|
+
canScale: !0,
|
22
|
+
// 图片是否允许滚轮缩放
|
23
|
+
fixedBox: !0,
|
24
|
+
// 固定截图框大小 不允许改变
|
25
|
+
infoTrue: !1,
|
26
|
+
// 是否开启截图框宽高固定比例
|
27
|
+
autoCropWidth: 70,
|
28
|
+
autoCropHeight: 70,
|
29
|
+
centerBox: !1,
|
30
|
+
original: !0,
|
31
|
+
fixed: !1
|
32
|
+
};
|
33
|
+
await e.value.onShowModal(o);
|
34
|
+
const l = await e.value.getCropBlob();
|
35
|
+
console.log(l);
|
36
|
+
}
|
37
|
+
return (n, m) => {
|
38
|
+
const o = i("el-button"), l = i("el-upload");
|
39
|
+
return g(), v(h, null, [
|
40
|
+
r("div", w, [
|
41
|
+
r("img", {
|
42
|
+
src: x(a),
|
43
|
+
class: "rounded-xl"
|
44
|
+
}, null, 8, y),
|
45
|
+
t(l, {
|
46
|
+
accept: ".png,.jpg,.gif",
|
47
|
+
"before-upload": d,
|
48
|
+
action: "",
|
49
|
+
class: "relative group overflow-hidden",
|
50
|
+
"show-file-list": !1
|
51
|
+
}, {
|
52
|
+
default: c(() => [
|
53
|
+
t(o, { type: "primary" }, {
|
54
|
+
default: c(() => [
|
55
|
+
s(" 上传图片 ")
|
56
|
+
]),
|
57
|
+
_: 1
|
58
|
+
})
|
59
|
+
]),
|
60
|
+
_: 1
|
61
|
+
}),
|
62
|
+
r("div", b, [
|
63
|
+
t(o, {
|
64
|
+
type: "primary",
|
65
|
+
onClick: f
|
66
|
+
}, {
|
67
|
+
default: c(() => [
|
68
|
+
s(" 图片裁剪 ")
|
69
|
+
]),
|
70
|
+
_: 1
|
71
|
+
}),
|
72
|
+
t(o, {
|
73
|
+
type: "primary",
|
74
|
+
onClick: u
|
75
|
+
}, {
|
76
|
+
default: c(() => [
|
77
|
+
s(" 还原 ")
|
78
|
+
]),
|
79
|
+
_: 1
|
80
|
+
})
|
81
|
+
])
|
82
|
+
]),
|
83
|
+
t(C, {
|
84
|
+
ref_key: "vueCropper",
|
85
|
+
ref: e
|
86
|
+
}, null, 512)
|
87
|
+
], 64);
|
88
|
+
};
|
89
|
+
}
|
90
|
+
});
|
91
|
+
export {
|
92
|
+
S as default
|
93
|
+
};
|
package/package.json
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
{
|
2
|
+
"name": "command-center-v3-common",
|
3
|
+
"type": "module",
|
4
|
+
"version": "0.0.1",
|
5
|
+
"main": "dist/command-center-v3-common.js",
|
6
|
+
"module": "dist/command-center-v3-common.umd.cjs",
|
7
|
+
"files": [
|
8
|
+
"dist"
|
9
|
+
],
|
10
|
+
"scripts": {
|
11
|
+
"dev": "vite",
|
12
|
+
"dev-huayu": "cross-env VERSION_NAME=huayu vite",
|
13
|
+
"dev-tiantong": "cross-env VERSION_NAME=tiantong vite",
|
14
|
+
"build": "vite build",
|
15
|
+
"build-huayu": "cross-env VERSION_NAME=huayu vite build",
|
16
|
+
"build-tiantong": "cross-env VERSION_NAME=tiantong vite build",
|
17
|
+
"preview": "vite preview",
|
18
|
+
"build-only": "vite build",
|
19
|
+
"type-check": "vue-tsc --build --force",
|
20
|
+
"lint": "eslint .",
|
21
|
+
"lint:fix": "eslint . --fix",
|
22
|
+
"prepare": "husky install",
|
23
|
+
"commit": "cz",
|
24
|
+
"build:like-ui": "npx vite build"
|
25
|
+
},
|
26
|
+
"dependencies": {
|
27
|
+
"@element-plus/icons-vue": "^2.3.1",
|
28
|
+
"axios": "^1.6.7",
|
29
|
+
"debug": "^4.3.4",
|
30
|
+
"element-plus": "^2.5.3",
|
31
|
+
"pinia": "^2.1.7",
|
32
|
+
"vue": "^3.3.11",
|
33
|
+
"vue-cropper": "^1.1.1",
|
34
|
+
"vue-router": "^4.2.5",
|
35
|
+
"vue3-virtual-scroll-list": "^0.2.1"
|
36
|
+
},
|
37
|
+
"devDependencies": {
|
38
|
+
"@antfu/eslint-config": "^2.6.3",
|
39
|
+
"@commitlint/config-conventional": "^18.5.0",
|
40
|
+
"@iconify-json/ep": "^1.1.14",
|
41
|
+
"@rushstack/eslint-patch": "^1.3.3",
|
42
|
+
"@tsconfig/node18": "^18.2.2",
|
43
|
+
"@types/node": "^18.19.3",
|
44
|
+
"@vitejs/plugin-basic-ssl": "^1.1.0",
|
45
|
+
"@vitejs/plugin-vue": "^4.5.2",
|
46
|
+
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
47
|
+
"@vue/eslint-config-typescript": "^12.0.0",
|
48
|
+
"@vue/tsconfig": "^0.5.0",
|
49
|
+
"autoprefixer": "^10.4.17",
|
50
|
+
"commitizen": "^4.3.0",
|
51
|
+
"commitlint": "^18.5.0",
|
52
|
+
"cross-env": "^7.0.3",
|
53
|
+
"cz-conventional-changelog": "^3.3.0",
|
54
|
+
"eslint": "^8.49.0",
|
55
|
+
"eslint-plugin-vue": "^9.17.0",
|
56
|
+
"husky": "^8.0.3",
|
57
|
+
"less": "^4.2.0",
|
58
|
+
"lint-staged": "^15.2.0",
|
59
|
+
"npm-run-all2": "^6.1.1",
|
60
|
+
"postcss": "^8.4.33",
|
61
|
+
"tailwindcss": "^3.4.1",
|
62
|
+
"typescript": "~5.3.0",
|
63
|
+
"unplugin-auto-import": "^0.17.3",
|
64
|
+
"unplugin-icons": "^0.18.2",
|
65
|
+
"unplugin-vue-components": "^0.26.0",
|
66
|
+
"vite": "^5.0.10",
|
67
|
+
"vite-plugin-svg-icons": "^2.0.1",
|
68
|
+
"vue-tsc": "^1.8.25"
|
69
|
+
},
|
70
|
+
"config": {
|
71
|
+
"commitizen": {
|
72
|
+
"path": "./node_modules/cz-conventional-changelog"
|
73
|
+
}
|
74
|
+
},
|
75
|
+
"lint-staged": {
|
76
|
+
"*.{js,jsx,vue,ts,tsx,less,css}": "eslint ."
|
77
|
+
},
|
78
|
+
"commitlint": {
|
79
|
+
"extends": [
|
80
|
+
"@commitlint/config-conventional"
|
81
|
+
]
|
82
|
+
}
|
83
|
+
}
|