xbd-vui 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.en.md +26 -0
- package/README.md +27 -0
- package/dist/vite.svg +1 -0
- package/dist/xbd-vui.css +1 -0
- package/dist/xbd-vui.es.js +256 -0
- package/dist/xbd-vui.umd.js +6 -0
- package/package.json +40 -0
package/README.en.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# sw-ui
|
|
2
|
+
|
|
3
|
+
#### Description
|
|
4
|
+
ui仓库
|
|
5
|
+
|
|
6
|
+
#### Software Architecture
|
|
7
|
+
Software architecture description
|
|
8
|
+
|
|
9
|
+
#### Installation
|
|
10
|
+
|
|
11
|
+
1. xxxx
|
|
12
|
+
2. xxxx
|
|
13
|
+
3. xxxx
|
|
14
|
+
|
|
15
|
+
#### Instructions
|
|
16
|
+
|
|
17
|
+
1. xxxx
|
|
18
|
+
2. xxxx
|
|
19
|
+
3. xxxx
|
|
20
|
+
|
|
21
|
+
#### Contribution
|
|
22
|
+
|
|
23
|
+
1. Fork the repository
|
|
24
|
+
2. Create Feat_xxx branch
|
|
25
|
+
3. Commit your code
|
|
26
|
+
4. Create Pull Request
|
package/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# sw-ui
|
|
2
|
+
|
|
3
|
+
#### 介绍
|
|
4
|
+
ui仓库
|
|
5
|
+
|
|
6
|
+
#### 软件架构
|
|
7
|
+
软件架构说明
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
#### 安装教程
|
|
11
|
+
|
|
12
|
+
1. xxxx
|
|
13
|
+
2. xxxx
|
|
14
|
+
3. xxxx
|
|
15
|
+
|
|
16
|
+
#### 使用说明
|
|
17
|
+
|
|
18
|
+
1. xxxx
|
|
19
|
+
2. xxxx
|
|
20
|
+
3. xxxx
|
|
21
|
+
|
|
22
|
+
#### 参与贡献
|
|
23
|
+
|
|
24
|
+
1. Fork 本仓库
|
|
25
|
+
2. 新建 Feat_xxx 分支
|
|
26
|
+
3. 提交代码
|
|
27
|
+
4. 新建 Pull Request
|
package/dist/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/dist/xbd-vui.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.v-popover-handle{display:flex;align-items:center;gap:8px;margin-top:8px}.v-popover-handle-right{margin-left:auto}.v-popover-handle .el-button+.el-button{margin:0}.v-batch-input-wrapper{width:380px}.v-batch-input .v-batch-input-clear{color:#888;display:none}.v-batch-input .v-batch-input-clear:hover{color:var(--base-icon-color);cursor:pointer}.v-batch-input:hover.is--value .v-batch-input-icon{display:none}.v-batch-input:hover.is--value .v-batch-input-clear{display:block;z-index:1}.v-batch-input.is--focus{box-shadow:0 0 0 1px var(--el-input-border-color, var(--el-color-primary)) inset;z-index:1}.v-group{display:flex}.v-group>*{margin-right:-1px}.v-group .el-input__wrapper,.v-group .el-select__wrapper,.v-group .el-button,.v-group .el-select-v2__wrapper,.v-group .v-group-item{position:relative;border-radius:0}.v-group .el-input__wrapper:hover.el-input__wrapper,.v-group .el-input__wrapper:hover .el-input__wrapper,.v-group .el-input__wrapper:hover .el-select__wrapper,.v-group .el-input__wrapper:hover .el-input__suffix,.v-group .el-input__wrapper.is-focus.el-input__wrapper,.v-group .el-input__wrapper.is-focus .el-input__wrapper,.v-group .el-input__wrapper.is-focus .el-select__wrapper,.v-group .el-input__wrapper.is-focus .el-input__suffix,.v-group .el-input__wrapper.is-active.el-input__wrapper,.v-group .el-input__wrapper.is-active .el-input__wrapper,.v-group .el-input__wrapper.is-active .el-select__wrapper,.v-group .el-input__wrapper.is-active .el-input__suffix,.v-group .el-select__wrapper:hover.el-input__wrapper,.v-group .el-select__wrapper:hover .el-input__wrapper,.v-group .el-select__wrapper:hover .el-select__wrapper,.v-group .el-select__wrapper:hover .el-input__suffix,.v-group .el-select__wrapper.is-focus.el-input__wrapper,.v-group .el-select__wrapper.is-focus .el-input__wrapper,.v-group .el-select__wrapper.is-focus .el-select__wrapper,.v-group .el-select__wrapper.is-focus .el-input__suffix,.v-group .el-select__wrapper.is-active.el-input__wrapper,.v-group .el-select__wrapper.is-active .el-input__wrapper,.v-group .el-select__wrapper.is-active .el-select__wrapper,.v-group .el-select__wrapper.is-active .el-input__suffix,.v-group .el-button:hover.el-input__wrapper,.v-group .el-button:hover .el-input__wrapper,.v-group .el-button:hover .el-select__wrapper,.v-group .el-button:hover .el-input__suffix,.v-group .el-button.is-focus.el-input__wrapper,.v-group .el-button.is-focus .el-input__wrapper,.v-group .el-button.is-focus .el-select__wrapper,.v-group .el-button.is-focus .el-input__suffix,.v-group .el-button.is-active.el-input__wrapper,.v-group .el-button.is-active .el-input__wrapper,.v-group .el-button.is-active .el-select__wrapper,.v-group .el-button.is-active .el-input__suffix,.v-group .el-select-v2__wrapper:hover.el-input__wrapper,.v-group .el-select-v2__wrapper:hover .el-input__wrapper,.v-group .el-select-v2__wrapper:hover .el-select__wrapper,.v-group .el-select-v2__wrapper:hover .el-input__suffix,.v-group .el-select-v2__wrapper.is-focus.el-input__wrapper,.v-group .el-select-v2__wrapper.is-focus .el-input__wrapper,.v-group .el-select-v2__wrapper.is-focus .el-select__wrapper,.v-group .el-select-v2__wrapper.is-focus .el-input__suffix,.v-group .el-select-v2__wrapper.is-active.el-input__wrapper,.v-group .el-select-v2__wrapper.is-active .el-input__wrapper,.v-group .el-select-v2__wrapper.is-active .el-select__wrapper,.v-group .el-select-v2__wrapper.is-active .el-input__suffix,.v-group .v-group-item:hover.el-input__wrapper,.v-group .v-group-item:hover .el-input__wrapper,.v-group .v-group-item:hover .el-select__wrapper,.v-group .v-group-item:hover .el-input__suffix,.v-group .v-group-item.is-focus.el-input__wrapper,.v-group .v-group-item.is-focus .el-input__wrapper,.v-group .v-group-item.is-focus .el-select__wrapper,.v-group .v-group-item.is-focus .el-input__suffix,.v-group .v-group-item.is-active.el-input__wrapper,.v-group .v-group-item.is-active .el-input__wrapper,.v-group .v-group-item.is-active .el-select__wrapper,.v-group .v-group-item.is-active .el-input__suffix{z-index:1}.v-group .el-input__wrapper:hover .el-input-number__decrease,.v-group .el-input__wrapper:hover .el-input-number__increase,.v-group .el-select__wrapper:hover .el-input-number__decrease,.v-group .el-select__wrapper:hover .el-input-number__increase,.v-group .el-button:hover .el-input-number__decrease,.v-group .el-button:hover .el-input-number__increase,.v-group .el-select-v2__wrapper:hover .el-input-number__decrease,.v-group .el-select-v2__wrapper:hover .el-input-number__increase,.v-group .v-group-item:hover .el-input-number__decrease,.v-group .v-group-item:hover .el-input-number__increase{z-index:2}.v-group>:first-child.el-input__wrapper,.v-group>:first-child .el-input__wrapper,.v-group>:first-child .el-select__wrapper,.v-group>:first-child.el-button,.v-group>:first-child .el-select-v2__wrapper,.v-group>:first-child.v-group-item{border-top-left-radius:4px;border-bottom-left-radius:4px}.v-group>:first-child.el-button{padding:0 10px}.v-group>:last-child{margin-right:0}.v-group>:last-child.el-input__wrapper,.v-group>:last-child .el-input__wrapper,.v-group>:last-child .el-select__wrapper,.v-group>:last-child.el-button,.v-group>:last-child .el-select-v2__wrapper,.v-group>:last-child.v-group-item{border-top-right-radius:4px;border-bottom-right-radius:4px}.v-group>:last-child.el-button{padding:0 10px}.v-group .v-group-item{display:flex;align-items:center;padding:0 10px;font-size:var(--el-font-size-base);color:var(--base-sub-text-color);white-space:nowrap;box-shadow:0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset}.v-group .el-button-group{display:flex}.v-group .el-select__tags,.v-group .el-input-number__decrease,.v-group .el-input-number__increase{z-index:2}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { resolveComponent as V, createElementBlock as S, openBlock as v, createVNode as m, createElementVNode as a, withCtx as p, createTextVNode as h, toDisplayString as w, ref as x, computed as B, createBlock as M, mergeProps as A, defineComponent as H, unref as N, normalizeProps as U, guardReactiveProps as Z, renderSlot as j } from "vue";
|
|
2
|
+
import { ElButton as E } from "element-plus";
|
|
3
|
+
const G = { class: "v-popover-handle" }, I = {
|
|
4
|
+
__name: "Handle",
|
|
5
|
+
props: {
|
|
6
|
+
value: { type: String, default: "" },
|
|
7
|
+
submitText: { type: String, default: "搜索" },
|
|
8
|
+
closeText: { type: String, default: "关闭" }
|
|
9
|
+
},
|
|
10
|
+
emits: ["close", "submit", "clear"],
|
|
11
|
+
setup(e, { emit: n }) {
|
|
12
|
+
const s = n;
|
|
13
|
+
return (i, t) => {
|
|
14
|
+
const r = V("el-button");
|
|
15
|
+
return v(), S("div", G, [
|
|
16
|
+
m(r, {
|
|
17
|
+
size: "small",
|
|
18
|
+
onClick: t[0] || (t[0] = (d) => s("clear"))
|
|
19
|
+
}, {
|
|
20
|
+
default: p(() => t[3] || (t[3] = [
|
|
21
|
+
h("清空")
|
|
22
|
+
])),
|
|
23
|
+
_: 1,
|
|
24
|
+
__: [3]
|
|
25
|
+
}),
|
|
26
|
+
a("div", null, "共 " + w(e.value ? e.value.split(`
|
|
27
|
+
`).length : 0) + " 个", 1),
|
|
28
|
+
m(r, {
|
|
29
|
+
size: "small",
|
|
30
|
+
class: "v-popover-handle-right",
|
|
31
|
+
onClick: t[1] || (t[1] = (d) => s("close"))
|
|
32
|
+
}, {
|
|
33
|
+
default: p(() => [
|
|
34
|
+
h(w(e.closeText), 1)
|
|
35
|
+
]),
|
|
36
|
+
_: 1
|
|
37
|
+
}),
|
|
38
|
+
m(r, {
|
|
39
|
+
size: "small",
|
|
40
|
+
type: "primary",
|
|
41
|
+
onClick: t[2] || (t[2] = (d) => s("submit"))
|
|
42
|
+
}, {
|
|
43
|
+
default: p(() => [
|
|
44
|
+
h(w(e.submitText), 1)
|
|
45
|
+
]),
|
|
46
|
+
_: 1
|
|
47
|
+
})
|
|
48
|
+
]);
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}, D = { class: "v-batch-input-wrapper" }, y = {
|
|
52
|
+
__name: "index",
|
|
53
|
+
props: {
|
|
54
|
+
modelValue: { type: String, default: () => "" },
|
|
55
|
+
rows: { type: [Number, String], default: () => 200 }
|
|
56
|
+
},
|
|
57
|
+
emits: ["update:modelValue", "search"],
|
|
58
|
+
setup(e, { expose: n, emit: s }) {
|
|
59
|
+
const i = e, t = s, r = x(!1), d = x(!1), f = x(), c = B({
|
|
60
|
+
get() {
|
|
61
|
+
var l;
|
|
62
|
+
return ((l = i.modelValue) == null ? void 0 : l.replaceAll(",", `
|
|
63
|
+
`)) || "";
|
|
64
|
+
},
|
|
65
|
+
set(l) {
|
|
66
|
+
t("update:modelValue", (l == null ? void 0 : l.split(`
|
|
67
|
+
`).join(",")) || "");
|
|
68
|
+
}
|
|
69
|
+
}), _ = B(
|
|
70
|
+
() => {
|
|
71
|
+
var l;
|
|
72
|
+
return ((l = c.value) == null ? void 0 : l.split(`
|
|
73
|
+
`).filter(Boolean).join(",")) || "";
|
|
74
|
+
}
|
|
75
|
+
), k = async () => {
|
|
76
|
+
r.value = !0, await 1, f == null || f.value.focus();
|
|
77
|
+
}, b = () => {
|
|
78
|
+
r.value = !1;
|
|
79
|
+
}, O = () => {
|
|
80
|
+
var l;
|
|
81
|
+
t(
|
|
82
|
+
"update:modelValue",
|
|
83
|
+
((l = c.value) == null ? void 0 : l.split(`
|
|
84
|
+
`).filter(Boolean).slice(0, i.rows).join(",")) || ""
|
|
85
|
+
);
|
|
86
|
+
}, g = () => {
|
|
87
|
+
c.value = "";
|
|
88
|
+
}, T = () => {
|
|
89
|
+
b(), t("search");
|
|
90
|
+
};
|
|
91
|
+
return n({ clear: g }), (l, o) => {
|
|
92
|
+
const z = V("el-input"), P = V("el-popover");
|
|
93
|
+
return v(), M(P, {
|
|
94
|
+
visible: r.value,
|
|
95
|
+
"onUpdate:visible": o[4] || (o[4] = (u) => r.value = u),
|
|
96
|
+
disabled: d.value,
|
|
97
|
+
trigger: "click",
|
|
98
|
+
placement: "bottom-end",
|
|
99
|
+
width: "405px",
|
|
100
|
+
offset: 2,
|
|
101
|
+
"show-arrow": !1,
|
|
102
|
+
onShow: k,
|
|
103
|
+
onHide: b
|
|
104
|
+
}, {
|
|
105
|
+
reference: p(() => [
|
|
106
|
+
m(z, A({
|
|
107
|
+
modelValue: _.value,
|
|
108
|
+
"onUpdate:modelValue": o[2] || (o[2] = (u) => _.value = u),
|
|
109
|
+
placeholder: l.$attrs.placeholder || "请输入",
|
|
110
|
+
class: ["v-batch-input", _.value && !r.value && "is--value"]
|
|
111
|
+
}, l.$attrs), {
|
|
112
|
+
suffix: p(() => [
|
|
113
|
+
o[6] || (o[6] = a("svg", {
|
|
114
|
+
class: "v-batch-input-icon",
|
|
115
|
+
width: "14px",
|
|
116
|
+
height: "14.00px",
|
|
117
|
+
viewBox: "0 0 1024 1024",
|
|
118
|
+
version: "1.1",
|
|
119
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
120
|
+
}, [
|
|
121
|
+
a("path", {
|
|
122
|
+
fill: "#909399",
|
|
123
|
+
d: "M765.932181 720.345605m22.756717 22.756717l226.015571 226.015571q22.756717 22.756717 0 45.513433l0 0q-22.756717 22.756717-45.513433 0l-226.015571-226.015571q-22.756717-22.756717 0-45.513433l0 0q22.756717-22.756717 45.513433 0Z"
|
|
124
|
+
}),
|
|
125
|
+
a("path", {
|
|
126
|
+
fill: "#909399",
|
|
127
|
+
d: "M192.365714 236.982857m32.182857 0l575.634286 0q32.182857 0 32.182857 32.182857l0 0q0 32.182857-32.182857 32.182857l-575.634286 0q-32.182857 0-32.182857-32.182857l0 0q0-32.182857 32.182857-32.182857Z"
|
|
128
|
+
}),
|
|
129
|
+
a("path", {
|
|
130
|
+
fill: "#909399",
|
|
131
|
+
d: "M192.365714 479.817143m32.182857 0l191.634286 0q32.182857 0 32.182857 32.182857l0-0.731429q0 32.182857-32.182857 32.182858l-191.634286 0q-32.182857 0-32.182857-32.182858l0 0.731429q0-32.182857 32.182857-32.182857Z"
|
|
132
|
+
}),
|
|
133
|
+
a("path", {
|
|
134
|
+
fill: "#909399",
|
|
135
|
+
d: "M192.365714 722.651429m32.182857 0l63.634286 0q32.182857 0 32.182857 32.182857l0-0.731429q0 32.182857-32.182857 32.182857l-63.634286 0q-32.182857 0-32.182857-32.182857l0 0.731429q0-32.182857 32.182857-32.182857Z"
|
|
136
|
+
}),
|
|
137
|
+
a("path", {
|
|
138
|
+
fill: "#909399",
|
|
139
|
+
d: "M896 0H128A128 128 0 0 0 0 128v768A128 128 0 0 0 128 1024h576.365714v-63.634286H128a64.365714 64.365714 0 0 1-63.634286-64.365714V128a63.634286 63.634286 0 0 1 63.634286-63.634286h768a64.365714 64.365714 0 0 1 64.365714 63.634286v448.365714H1024V128A128 128 0 0 0 896 0z"
|
|
140
|
+
}),
|
|
141
|
+
a("path", {
|
|
142
|
+
fill: "#909399",
|
|
143
|
+
d: "M670.72 449.097143a192.365714 192.365714 0 1 0 191.634286 192.365714 192.365714 192.365714 0 0 0-191.634286-192.365714z m0 320.365714a128 128 0 1 1 128-128 128 128 0 0 1-128 128z"
|
|
144
|
+
})
|
|
145
|
+
], -1)),
|
|
146
|
+
(v(), S("svg", {
|
|
147
|
+
class: "v-batch-input-clear",
|
|
148
|
+
onMouseenter: o[0] || (o[0] = (u) => d.value = !0),
|
|
149
|
+
onMouseleave: o[1] || (o[1] = (u) => d.value = !1),
|
|
150
|
+
onClick: g,
|
|
151
|
+
t: "1731313372920",
|
|
152
|
+
viewBox: "0 0 1024 1024",
|
|
153
|
+
version: "1.1",
|
|
154
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
155
|
+
"p-id": "3649",
|
|
156
|
+
width: "19",
|
|
157
|
+
height: "19"
|
|
158
|
+
}, o[5] || (o[5] = [
|
|
159
|
+
a("path", {
|
|
160
|
+
d: "M512 96a416 416 0 1 1 0 832 416 416 0 0 1 0-832z m0 64a352 352 0 1 0 0 704 352 352 0 0 0 0-704z",
|
|
161
|
+
"p-id": "3650",
|
|
162
|
+
fill: "currentColor"
|
|
163
|
+
}, null, -1),
|
|
164
|
+
a("path", {
|
|
165
|
+
d: "M365.12 387.328a32 32 0 0 1 44.864-45.248l4.096 4.032 244.8 290.56a32 32 0 0 1-44.864 45.248l-4.096-4.032-244.8-290.56z",
|
|
166
|
+
"p-id": "3651",
|
|
167
|
+
fill: "currentColor"
|
|
168
|
+
}, null, -1),
|
|
169
|
+
a("path", {
|
|
170
|
+
d: "M365.12 636.672a32 32 0 0 0 44.864 45.248l4.096-4.032 244.8-290.56a32 32 0 0 0-44.864-45.248l-4.096 4.032-244.8 290.56z",
|
|
171
|
+
"p-id": "3652",
|
|
172
|
+
fill: "currentColor"
|
|
173
|
+
}, null, -1)
|
|
174
|
+
]), 32))
|
|
175
|
+
]),
|
|
176
|
+
_: 1
|
|
177
|
+
}, 16, ["modelValue", "placeholder", "class"])
|
|
178
|
+
]),
|
|
179
|
+
default: p(() => [
|
|
180
|
+
a("div", D, [
|
|
181
|
+
m(z, {
|
|
182
|
+
ref_key: "inputRef",
|
|
183
|
+
ref: f,
|
|
184
|
+
modelValue: c.value,
|
|
185
|
+
"onUpdate:modelValue": o[3] || (o[3] = (u) => c.value = u),
|
|
186
|
+
rows: 12,
|
|
187
|
+
placeholder: `一行一个(最多支持${e.rows}行)`,
|
|
188
|
+
type: "textarea",
|
|
189
|
+
style: { width: "100%" },
|
|
190
|
+
onBlur: O
|
|
191
|
+
}, null, 8, ["modelValue", "placeholder"]),
|
|
192
|
+
m(I, {
|
|
193
|
+
value: c.value,
|
|
194
|
+
onClear: g,
|
|
195
|
+
onClose: b,
|
|
196
|
+
onSubmit: T
|
|
197
|
+
}, null, 8, ["value"])
|
|
198
|
+
])
|
|
199
|
+
]),
|
|
200
|
+
_: 1
|
|
201
|
+
}, 8, ["visible", "disabled"]);
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
y.install = (e) => {
|
|
206
|
+
e.component("VBatchInput", y);
|
|
207
|
+
};
|
|
208
|
+
const R = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
209
|
+
__proto__: null,
|
|
210
|
+
default: y
|
|
211
|
+
}, Symbol.toStringTag, { value: "Module" })), $ = /* @__PURE__ */ H({
|
|
212
|
+
__name: "index",
|
|
213
|
+
setup(e) {
|
|
214
|
+
return (n, s) => (v(), M(N(E), U(Z(n.$attrs)), {
|
|
215
|
+
default: p(() => [
|
|
216
|
+
j(n.$slots, "default")
|
|
217
|
+
]),
|
|
218
|
+
_: 3
|
|
219
|
+
}, 16));
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
$.install = (e) => {
|
|
223
|
+
e.component("VButton", $);
|
|
224
|
+
};
|
|
225
|
+
const F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
226
|
+
__proto__: null,
|
|
227
|
+
default: $
|
|
228
|
+
}, Symbol.toStringTag, { value: "Module" })), J = (e, n) => {
|
|
229
|
+
const s = e.__vccOpts || e;
|
|
230
|
+
for (const [i, t] of n)
|
|
231
|
+
s[i] = t;
|
|
232
|
+
return s;
|
|
233
|
+
}, K = {}, L = { class: "v-group" };
|
|
234
|
+
function Q(e, n) {
|
|
235
|
+
return v(), S("div", L, [
|
|
236
|
+
j(e.$slots, "default")
|
|
237
|
+
]);
|
|
238
|
+
}
|
|
239
|
+
const q = /* @__PURE__ */ J(K, [["render", Q]]);
|
|
240
|
+
q.install = (e) => {
|
|
241
|
+
e.component("VGroup", q);
|
|
242
|
+
};
|
|
243
|
+
const W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
244
|
+
__proto__: null,
|
|
245
|
+
default: q
|
|
246
|
+
}, Symbol.toStringTag, { value: "Module" })), C = /* @__PURE__ */ Object.assign({ "./BatchInput/index.ts": R, "./Button/index.ts": F, "./Group/index.ts": W }), ee = {
|
|
247
|
+
install(e) {
|
|
248
|
+
for (const n in C) {
|
|
249
|
+
const s = C[n].default, i = n.split("/")[1], t = i.charAt(0).toUpperCase() + i.slice(1);
|
|
250
|
+
e.component(`V${t}`, s);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
export {
|
|
255
|
+
ee as default
|
|
256
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
(function(e,m){typeof exports=="object"&&typeof module<"u"?module.exports=m(require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["vue","element-plus"],m):(e=typeof globalThis<"u"?globalThis:e||self,e.XBDVUI=m(e.Vue,e.ElementPlus))})(this,function(e,m){"use strict";const y={class:"v-popover-handle"},N={__name:"Handle",props:{value:{type:String,default:""},submitText:{type:String,default:"搜索"},closeText:{type:String,default:"关闭"}},emits:["close","submit","clear"],setup(t,{emit:a}){const r=a;return(i,l)=>{const s=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",y,[e.createVNode(s,{size:"small",onClick:l[0]||(l[0]=p=>r("clear"))},{default:e.withCtx(()=>l[3]||(l[3]=[e.createTextVNode("清空")])),_:1,__:[3]}),e.createElementVNode("div",null,"共 "+e.toDisplayString(t.value?t.value.split(`
|
|
2
|
+
`).length:0)+" 个",1),e.createVNode(s,{size:"small",class:"v-popover-handle-right",onClick:l[1]||(l[1]=p=>r("close"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.closeText),1)]),_:1}),e.createVNode(s,{size:"small",type:"primary",onClick:l[2]||(l[2]=p=>r("submit"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.submitText),1)]),_:1})])}}},B={class:"v-batch-input-wrapper"},f={__name:"index",props:{modelValue:{type:String,default:()=>""},rows:{type:[Number,String],default:()=>200}},emits:["update:modelValue","search"],setup(t,{expose:a,emit:r}){const i=t,l=r,s=e.ref(!1),p=e.ref(!1),u=e.ref(),c=e.computed({get(){var o;return((o=i.modelValue)==null?void 0:o.replaceAll(",",`
|
|
3
|
+
`))||""},set(o){l("update:modelValue",(o==null?void 0:o.split(`
|
|
4
|
+
`).join(","))||"")}}),h=e.computed(()=>{var o;return((o=c.value)==null?void 0:o.split(`
|
|
5
|
+
`).filter(Boolean).join(","))||""}),v=async()=>{s.value=!0,await 1,u==null||u.value.focus()},g=()=>{s.value=!1},z=()=>{var o;l("update:modelValue",((o=c.value)==null?void 0:o.split(`
|
|
6
|
+
`).filter(Boolean).slice(0,i.rows).join(","))||"")},b=()=>{c.value=""},M=()=>{g(),l("search")};return a({clear:b}),(o,n)=>{const w=e.resolveComponent("el-input"),T=e.resolveComponent("el-popover");return e.openBlock(),e.createBlock(T,{visible:s.value,"onUpdate:visible":n[4]||(n[4]=d=>s.value=d),disabled:p.value,trigger:"click",placement:"bottom-end",width:"405px",offset:2,"show-arrow":!1,onShow:v,onHide:g},{reference:e.withCtx(()=>[e.createVNode(w,e.mergeProps({modelValue:h.value,"onUpdate:modelValue":n[2]||(n[2]=d=>h.value=d),placeholder:o.$attrs.placeholder||"请输入",class:["v-batch-input",h.value&&!s.value&&"is--value"]},o.$attrs),{suffix:e.withCtx(()=>[n[6]||(n[6]=e.createElementVNode("svg",{class:"v-batch-input-icon",width:"14px",height:"14.00px",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{fill:"#909399",d:"M765.932181 720.345605m22.756717 22.756717l226.015571 226.015571q22.756717 22.756717 0 45.513433l0 0q-22.756717 22.756717-45.513433 0l-226.015571-226.015571q-22.756717-22.756717 0-45.513433l0 0q22.756717-22.756717 45.513433 0Z"}),e.createElementVNode("path",{fill:"#909399",d:"M192.365714 236.982857m32.182857 0l575.634286 0q32.182857 0 32.182857 32.182857l0 0q0 32.182857-32.182857 32.182857l-575.634286 0q-32.182857 0-32.182857-32.182857l0 0q0-32.182857 32.182857-32.182857Z"}),e.createElementVNode("path",{fill:"#909399",d:"M192.365714 479.817143m32.182857 0l191.634286 0q32.182857 0 32.182857 32.182857l0-0.731429q0 32.182857-32.182857 32.182858l-191.634286 0q-32.182857 0-32.182857-32.182858l0 0.731429q0-32.182857 32.182857-32.182857Z"}),e.createElementVNode("path",{fill:"#909399",d:"M192.365714 722.651429m32.182857 0l63.634286 0q32.182857 0 32.182857 32.182857l0-0.731429q0 32.182857-32.182857 32.182857l-63.634286 0q-32.182857 0-32.182857-32.182857l0 0.731429q0-32.182857 32.182857-32.182857Z"}),e.createElementVNode("path",{fill:"#909399",d:"M896 0H128A128 128 0 0 0 0 128v768A128 128 0 0 0 128 1024h576.365714v-63.634286H128a64.365714 64.365714 0 0 1-63.634286-64.365714V128a63.634286 63.634286 0 0 1 63.634286-63.634286h768a64.365714 64.365714 0 0 1 64.365714 63.634286v448.365714H1024V128A128 128 0 0 0 896 0z"}),e.createElementVNode("path",{fill:"#909399",d:"M670.72 449.097143a192.365714 192.365714 0 1 0 191.634286 192.365714 192.365714 192.365714 0 0 0-191.634286-192.365714z m0 320.365714a128 128 0 1 1 128-128 128 128 0 0 1-128 128z"})],-1)),(e.openBlock(),e.createElementBlock("svg",{class:"v-batch-input-clear",onMouseenter:n[0]||(n[0]=d=>p.value=!0),onMouseleave:n[1]||(n[1]=d=>p.value=!1),onClick:b,t:"1731313372920",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3649",width:"19",height:"19"},n[5]||(n[5]=[e.createElementVNode("path",{d:"M512 96a416 416 0 1 1 0 832 416 416 0 0 1 0-832z m0 64a352 352 0 1 0 0 704 352 352 0 0 0 0-704z","p-id":"3650",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M365.12 387.328a32 32 0 0 1 44.864-45.248l4.096 4.032 244.8 290.56a32 32 0 0 1-44.864 45.248l-4.096-4.032-244.8-290.56z","p-id":"3651",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M365.12 636.672a32 32 0 0 0 44.864 45.248l4.096-4.032 244.8-290.56a32 32 0 0 0-44.864-45.248l-4.096 4.032-244.8 290.56z","p-id":"3652",fill:"currentColor"},null,-1)]),32))]),_:1},16,["modelValue","placeholder","class"])]),default:e.withCtx(()=>[e.createElementVNode("div",B,[e.createVNode(w,{ref_key:"inputRef",ref:u,modelValue:c.value,"onUpdate:modelValue":n[3]||(n[3]=d=>c.value=d),rows:12,placeholder:`一行一个(最多支持${t.rows}行)`,type:"textarea",style:{width:"100%"},onBlur:z},null,8,["modelValue","placeholder"]),e.createVNode(N,{value:c.value,onClear:b,onClose:g,onSubmit:M},null,8,["value"])])]),_:1},8,["visible","disabled"])}}};f.install=t=>{t.component("VBatchInput",f)};const C=Object.freeze(Object.defineProperty({__proto__:null,default:f},Symbol.toStringTag,{value:"Module"})),_=e.defineComponent({__name:"index",setup(t){return(a,r)=>(e.openBlock(),e.createBlock(e.unref(m.ElButton),e.normalizeProps(e.guardReactiveProps(a.$attrs)),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16))}});_.install=t=>{t.component("VButton",_)};const q=Object.freeze(Object.defineProperty({__proto__:null,default:_},Symbol.toStringTag,{value:"Module"})),S=(t,a)=>{const r=t.__vccOpts||t;for(const[i,l]of a)r[i]=l;return r},k={},E={class:"v-group"};function $(t,a){return e.openBlock(),e.createElementBlock("div",E,[e.renderSlot(t.$slots,"default")])}const V=S(k,[["render",$]]);V.install=t=>{t.component("VGroup",V)};const x=Object.assign({"./BatchInput/index.ts":C,"./Button/index.ts":q,"./Group/index.ts":Object.freeze(Object.defineProperty({__proto__:null,default:V},Symbol.toStringTag,{value:"Module"}))});return{install(t){for(const a in x){const r=x[a].default,i=a.split("/")[1],l=i.charAt(0).toUpperCase()+i.slice(1);t.component(`V${l}`,r)}}}});
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "xbd-vui",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/xbd-vui.umd.js",
|
|
6
|
+
"module": "dist/xbd-vui.es.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "vite build",
|
|
14
|
+
"dev": "vite",
|
|
15
|
+
"docs:dev": "vitepress dev docs",
|
|
16
|
+
"docs:build": "vitepress build docs",
|
|
17
|
+
"register:components": "vitepress-rc"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"archiver": "^7.0.1",
|
|
21
|
+
"element-plus": "^2.9.7",
|
|
22
|
+
"ssh2": "^1.16.0",
|
|
23
|
+
"vue": "^3.5.13",
|
|
24
|
+
"vxe-table": "^4.6.21"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/node": "^22.14.0",
|
|
28
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
29
|
+
"@vue/tsconfig": "^0.7.0",
|
|
30
|
+
"autoprefixer": "^10.4.21",
|
|
31
|
+
"postcss": "^8.5.3",
|
|
32
|
+
"sass": "^1.86.3",
|
|
33
|
+
"typescript": "~5.7.2",
|
|
34
|
+
"vite": "^6.2.0",
|
|
35
|
+
"vite-plugin-mkcert": "^1.15.0",
|
|
36
|
+
"vitepress": "^1.0.0-alpha.74",
|
|
37
|
+
"vitepress-theme-demoblock": "^2.0.2",
|
|
38
|
+
"vue-tsc": "^2.2.4"
|
|
39
|
+
}
|
|
40
|
+
}
|