lw-cdp-ui 1.0.0 → 1.0.2
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/dates-DYr306Il.js +224 -0
- package/dist/{index-BhlpP83a.js → index-D195OJYC.js} +1 -1
- package/dist/lw-cdp-ui.es.js +15 -0
- package/dist/{lw-ui.umd.js → lw-cdp-ui.umd.js} +8 -8
- package/dist/style.css +1 -1
- package/package.json +11 -5
- package/dist/HelloWorld-B8mIBfv6.js +0 -45
- package/dist/dates-duu3mVu7.js +0 -258
- package/dist/lw-ui.es.js +0 -16
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { reactive as E, watch as C, computed as M, toRefs as T, nextTick as v, resolveComponent as d, openBlock as m, createElementBlock as f, createVNode as i, withCtx as r, withDirectives as S, createElementVNode as a, createBlock as V, Teleport as B, Fragment as D, renderList as A, toDisplayString as b, createCommentVNode as F, vShow as w } from "vue";
|
|
2
|
+
import { _ as j } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
const z = {
|
|
4
|
+
emits: ["update:modelValue", "change"],
|
|
5
|
+
name: "Date",
|
|
6
|
+
props: {
|
|
7
|
+
disabled: {
|
|
8
|
+
type: Boolean,
|
|
9
|
+
default: !1
|
|
10
|
+
},
|
|
11
|
+
modelValue: {
|
|
12
|
+
type: [String, Array],
|
|
13
|
+
default: ""
|
|
14
|
+
},
|
|
15
|
+
item: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default: () => ({})
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
setup(l, n) {
|
|
21
|
+
const e = E({
|
|
22
|
+
isSidebarShow: !1,
|
|
23
|
+
activeName: "single",
|
|
24
|
+
isPanelShow: !1,
|
|
25
|
+
value: [],
|
|
26
|
+
shortcuts: [{ text: "", value: "" }]
|
|
27
|
+
});
|
|
28
|
+
C(
|
|
29
|
+
() => l.modelValue,
|
|
30
|
+
(o) => {
|
|
31
|
+
o ? (e.activeName = Array.isArray(o) ? "range" : "single", e.value = Array.isArray(o) ? o : o.split(",")) : e.value = [];
|
|
32
|
+
},
|
|
33
|
+
{ deep: !0 }
|
|
34
|
+
), C(
|
|
35
|
+
() => e.value,
|
|
36
|
+
(o) => {
|
|
37
|
+
const c = e.activeName === "single" ? o.join(",") : o;
|
|
38
|
+
c !== l.modelValue && (n.emit("update:modelValue", c), n.emit("change", c));
|
|
39
|
+
},
|
|
40
|
+
{ deep: !0, immediate: !0 }
|
|
41
|
+
);
|
|
42
|
+
const t = M(() => e.value.join(",")), g = () => {
|
|
43
|
+
e.isPanelShow = !e.isPanelShow;
|
|
44
|
+
}, y = () => {
|
|
45
|
+
v(() => {
|
|
46
|
+
e.isSidebarShow = !0;
|
|
47
|
+
});
|
|
48
|
+
}, h = () => {
|
|
49
|
+
v(() => {
|
|
50
|
+
e.isPanelShow = !1;
|
|
51
|
+
});
|
|
52
|
+
}, u = (o) => {
|
|
53
|
+
e.value.splice(o, 1);
|
|
54
|
+
}, _ = () => {
|
|
55
|
+
e.isSidebarShow = !1, v(() => {
|
|
56
|
+
e.isPanelShow = !1;
|
|
57
|
+
});
|
|
58
|
+
}, p = () => {
|
|
59
|
+
e.value = [];
|
|
60
|
+
};
|
|
61
|
+
return {
|
|
62
|
+
...T(e),
|
|
63
|
+
togglePanel: g,
|
|
64
|
+
handleTabClick: y,
|
|
65
|
+
pickerChange: h,
|
|
66
|
+
deleteSingleDate: u,
|
|
67
|
+
pickerBlur: _,
|
|
68
|
+
handleClear: p,
|
|
69
|
+
displayValue: t
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}, U = { class: "dates-container" }, L = { class: "dates-panel" }, O = { class: "panel-label" }, R = /* @__PURE__ */ a("span", null, "单日", -1), q = { class: "dates-side" }, G = /* @__PURE__ */ a("div", { class: "sidebar-title" }, "所选时间列表", -1), H = { class: "sidebar-list" }, I = { class: "text" }, J = ["onClick"], K = { class: "panel-label" }, Q = /* @__PURE__ */ a("span", null, "日期范围", -1), W = { class: "dates-side-top" }, X = { class: "sidebar-list" }, Y = { class: "item" }, Z = { class: "text" };
|
|
73
|
+
function x(l, n, e, t, g, y) {
|
|
74
|
+
const h = d("el-icon-calendar"), u = d("el-icon"), _ = d("el-input"), p = d("el-date-picker"), o = d("Close"), c = d("el-tab-pane"), P = d("el-icon-close"), N = d("el-tabs");
|
|
75
|
+
return m(), f("div", U, [
|
|
76
|
+
i(_, {
|
|
77
|
+
class: "default-input",
|
|
78
|
+
size: "small",
|
|
79
|
+
type: "text",
|
|
80
|
+
disabled: e.item.disabled,
|
|
81
|
+
placeholder: e.item.placeholder || "请选择",
|
|
82
|
+
clearable: "",
|
|
83
|
+
"model-value": t.displayValue,
|
|
84
|
+
onClear: t.handleClear,
|
|
85
|
+
onClick: t.togglePanel,
|
|
86
|
+
style: { width: "100%" }
|
|
87
|
+
}, {
|
|
88
|
+
suffix: r(() => [
|
|
89
|
+
i(u, null, {
|
|
90
|
+
default: r(() => [
|
|
91
|
+
i(h)
|
|
92
|
+
]),
|
|
93
|
+
_: 1
|
|
94
|
+
})
|
|
95
|
+
]),
|
|
96
|
+
_: 1
|
|
97
|
+
}, 8, ["disabled", "placeholder", "model-value", "onClear", "onClick"]),
|
|
98
|
+
S(a("div", L, [
|
|
99
|
+
i(N, {
|
|
100
|
+
modelValue: l.activeName,
|
|
101
|
+
"onUpdate:modelValue": n[3] || (n[3] = (s) => l.activeName = s),
|
|
102
|
+
class: "dates-panel-tabs",
|
|
103
|
+
onTabClick: t.handleTabClick
|
|
104
|
+
}, {
|
|
105
|
+
default: r(() => [
|
|
106
|
+
i(c, {
|
|
107
|
+
label: "单日",
|
|
108
|
+
name: "single"
|
|
109
|
+
}, {
|
|
110
|
+
default: r(() => [
|
|
111
|
+
a("div", O, [
|
|
112
|
+
R,
|
|
113
|
+
i(p, {
|
|
114
|
+
size: "small",
|
|
115
|
+
type: e.item.singleType || "date",
|
|
116
|
+
disabled: e.item.disabled,
|
|
117
|
+
format: e.item.format || "yyyy-MM-dd",
|
|
118
|
+
"value-format": e.item.valueFormat || "yyyy-MM-dd",
|
|
119
|
+
placeholder: e.item.placeholder || "请选择",
|
|
120
|
+
shortcuts: l.shortcuts,
|
|
121
|
+
modelValue: l.value,
|
|
122
|
+
"onUpdate:modelValue": n[0] || (n[0] = (s) => l.value = s),
|
|
123
|
+
clearable: !1,
|
|
124
|
+
onBlur: t.pickerBlur,
|
|
125
|
+
onChange: t.pickerChange,
|
|
126
|
+
ref: "singlePicker",
|
|
127
|
+
"popper-class": "single-picker single-picker-" + e.item.prop
|
|
128
|
+
}, null, 8, ["type", "disabled", "format", "value-format", "placeholder", "shortcuts", "modelValue", "onBlur", "onChange", "popper-class"]),
|
|
129
|
+
l.isSidebarShow && l.activeName === "single" ? (m(), V(B, {
|
|
130
|
+
key: 0,
|
|
131
|
+
to: ".single-picker-" + e.item.prop + " .el-picker-panel__sidebar"
|
|
132
|
+
}, [
|
|
133
|
+
a("div", q, [
|
|
134
|
+
G,
|
|
135
|
+
a("div", H, [
|
|
136
|
+
(m(!0), f(D, null, A(l.value, (s, k) => (m(), f("div", {
|
|
137
|
+
class: "item",
|
|
138
|
+
key: k
|
|
139
|
+
}, [
|
|
140
|
+
a("div", I, b(s), 1),
|
|
141
|
+
a("div", {
|
|
142
|
+
class: "button",
|
|
143
|
+
onClick: ($) => t.deleteSingleDate(k)
|
|
144
|
+
}, [
|
|
145
|
+
i(u, null, {
|
|
146
|
+
default: r(() => [
|
|
147
|
+
i(o)
|
|
148
|
+
]),
|
|
149
|
+
_: 1
|
|
150
|
+
})
|
|
151
|
+
], 8, J)
|
|
152
|
+
]))), 128))
|
|
153
|
+
])
|
|
154
|
+
])
|
|
155
|
+
], 8, ["to"])) : F("", !0)
|
|
156
|
+
])
|
|
157
|
+
]),
|
|
158
|
+
_: 1
|
|
159
|
+
}),
|
|
160
|
+
i(c, {
|
|
161
|
+
label: "日期范围",
|
|
162
|
+
name: "range"
|
|
163
|
+
}, {
|
|
164
|
+
default: r(() => [
|
|
165
|
+
a("div", K, [
|
|
166
|
+
Q,
|
|
167
|
+
i(p, {
|
|
168
|
+
size: "small",
|
|
169
|
+
type: e.item.rangeType || "daterange",
|
|
170
|
+
disabled: e.item.disabled,
|
|
171
|
+
format: e.item.format || "yyyy-MM-dd",
|
|
172
|
+
"value-format": e.item.valueFormat || "yyyy-MM-dd",
|
|
173
|
+
placeholder: e.item.placeholder || "请选择",
|
|
174
|
+
"unlink-panels": e.item.unlinkPanels ?? !1,
|
|
175
|
+
shortcuts: l.shortcuts,
|
|
176
|
+
modelValue: l.value,
|
|
177
|
+
"onUpdate:modelValue": n[1] || (n[1] = (s) => l.value = s),
|
|
178
|
+
clearable: !1,
|
|
179
|
+
onBlur: t.pickerBlur,
|
|
180
|
+
onChange: t.pickerChange,
|
|
181
|
+
ref: "rangePicker",
|
|
182
|
+
"popper-class": "range-picker range-picker-" + e.item.prop
|
|
183
|
+
}, null, 8, ["type", "disabled", "format", "value-format", "placeholder", "unlink-panels", "shortcuts", "modelValue", "onBlur", "onChange", "popper-class"]),
|
|
184
|
+
l.isSidebarShow && l.activeName === "range" ? (m(), V(B, {
|
|
185
|
+
key: 0,
|
|
186
|
+
to: ".range-picker-" + e.item.prop + " .el-picker-panel__sidebar"
|
|
187
|
+
}, [
|
|
188
|
+
a("div", W, [
|
|
189
|
+
a("div", X, [
|
|
190
|
+
S(a("div", Y, [
|
|
191
|
+
a("div", Z, b(l.value[0]) + "~" + b(l.value[1]), 1),
|
|
192
|
+
a("div", {
|
|
193
|
+
class: "button",
|
|
194
|
+
onClick: n[2] || (n[2] = (...s) => t.handleClear && t.handleClear(...s))
|
|
195
|
+
}, [
|
|
196
|
+
i(u, null, {
|
|
197
|
+
default: r(() => [
|
|
198
|
+
i(P)
|
|
199
|
+
]),
|
|
200
|
+
_: 1
|
|
201
|
+
})
|
|
202
|
+
])
|
|
203
|
+
], 512), [
|
|
204
|
+
[w, l.value.length === 2]
|
|
205
|
+
])
|
|
206
|
+
])
|
|
207
|
+
])
|
|
208
|
+
], 8, ["to"])) : F("", !0)
|
|
209
|
+
])
|
|
210
|
+
]),
|
|
211
|
+
_: 1
|
|
212
|
+
})
|
|
213
|
+
]),
|
|
214
|
+
_: 1
|
|
215
|
+
}, 8, ["modelValue", "onTabClick"])
|
|
216
|
+
], 512), [
|
|
217
|
+
[w, l.isPanelShow]
|
|
218
|
+
])
|
|
219
|
+
]);
|
|
220
|
+
}
|
|
221
|
+
const ae = /* @__PURE__ */ j(z, [["render", x]]);
|
|
222
|
+
export {
|
|
223
|
+
ae as default
|
|
224
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import le from "./input-DjTO0SAt.js";
|
|
2
2
|
import de from "./select-DV7iQWOt.js";
|
|
3
3
|
import fe from "./date-3aIueTWp.js";
|
|
4
|
-
import ce from "./dates-
|
|
4
|
+
import ce from "./dates-DYr306Il.js";
|
|
5
5
|
import he from "./dateRange-CELAeHet.js";
|
|
6
6
|
import { c as me, g as pe } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
7
7
|
import { resolveComponent as H, openBlock as k, createElementBlock as ne, createElementVNode as W, createVNode as C, withModifiers as ye, withCtx as x, normalizeClass as P, Fragment as Se, renderList as be, createBlock as I, resolveDynamicComponent as G, normalizeStyle as ge, createTextVNode as re, toDisplayString as Q } from "vue";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function s(o, t = {}) {
|
|
2
|
+
o.prototype.$i18n = t.i18n, o.prototype.$store = t.store, o.prototype.$router = t.router, o.prototype.$TOOL = t.tool, o.prototype.$CONFIG = t.config;
|
|
3
|
+
const e = /* @__PURE__ */ Object.assign({ "./components/lwLayout/components/NavMenu.vue": () => import("./NavMenu-5q5cwgxa.js"), "./components/lwLayout/components/aside.vue": () => import("./aside-D4gRKrXk.js"), "./components/lwLayout/components/bu.vue": () => import("./bu-CPymL6sw.js"), "./components/lwLayout/components/iframeView.vue": () => import("./iframeView-BgLGyeZi.js"), "./components/lwLayout/components/lang.vue": () => import("./lang-7Nv9P6lz.js"), "./components/lwLayout/components/search.vue": () => import("./search-CxkTZQGs.js"), "./components/lwLayout/components/setting.vue": () => import("./setting-CdKTzN9K.js"), "./components/lwLayout/components/sideM.vue": () => import("./sideM-OQXV4LfA.js"), "./components/lwLayout/components/tags.vue": () => import("./tags-CSqKlWtu.js"), "./components/lwLayout/components/tasks.vue": () => import("./tasks-DrTo25su.js"), "./components/lwLayout/components/topbar.vue": () => import("./topbar-Bm8ZEc4i.js"), "./components/lwLayout/components/userbar.vue": () => import("./userbar--TC_Vip3.js"), "./components/lwLayout/index.vue": () => import("./index-B3YO2bMX.js"), "./components/lwLogin/index.vue": () => import("./index-C9QeXWf-.js"), "./components/lwSearch/date/date.vue": () => import("./date-3aIueTWp.js"), "./components/lwSearch/dateRange/dateRange.vue": () => import("./dateRange-CELAeHet.js"), "./components/lwSearch/dates/dates.vue": () => import("./dates-DYr306Il.js"), "./components/lwSearch/index.vue": () => import("./index-D195OJYC.js"), "./components/lwSearch/input/input.vue": () => import("./input-DjTO0SAt.js"), "./components/lwSearch/select/select.vue": () => import("./select-DV7iQWOt.js"), "./components/lwSvgIcon/index.vue": () => import("./index-Cnc84Sx6.js"), "./components/lwTable/columnSetting.vue": () => import("./columnSetting-s8WE64if.js"), "./components/lwTable/index.vue": () => import("./index-Beo5fXoi.js") });
|
|
4
|
+
for (const n in e)
|
|
5
|
+
e[n]().then((m) => {
|
|
6
|
+
const p = m.default, c = p.name || n.split("/").pop().replace(/\.\w+$/, "");
|
|
7
|
+
o.component(c, p);
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
const r = {
|
|
11
|
+
install: s
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
r as default
|
|
15
|
+
};
|