@lemon30_npm/csit-vue3 1.0.59 → 1.0.63
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/csit-vue3.js +1051 -838
- package/dist/index.css +1 -1
- package/dist/lib/ci-common-list/ci-common-list-pagination/index.css +0 -0
- package/dist/lib/ci-common-list/ci-common-list-pagination/index.vue.js +1 -1
- package/dist/lib/ci-common-list/ci-common-list-pagination/index.vue2.js +1 -1
- package/dist/lib/ci-common-list/ci-common-list-query/index.css +1 -1
- package/dist/lib/ci-common-list/ci-common-list-query/index.vue.js +1 -1
- package/dist/lib/ci-common-list/ci-common-list-query/index.vue2.js +22 -21
- package/dist/lib/ci-dictionary-select/index.css +1 -0
- package/dist/lib/ci-dictionary-select/index.vue.js +1 -1
- package/dist/lib/ci-dictionary-select/index.vue2.js +95 -45
- package/dist/lib/ci-element-plus/ci-choose-all-select/index.css +1 -0
- package/dist/lib/ci-element-plus/ci-choose-all-select/index.js +9 -0
- package/dist/lib/ci-element-plus/ci-choose-all-select/index.vue.js +7 -0
- package/dist/lib/ci-element-plus/ci-choose-all-select/index.vue2.js +113 -0
- package/dist/lib/ci-upload/computed/index.js +21 -9
- package/dist/lib/ci-upload/hooks/useFileSize.js +10 -0
- package/dist/lib/ci-upload/index.css +1 -1
- package/dist/lib/ci-upload/index.vue.js +3 -3
- package/dist/lib/ci-upload/index.vue2.js +182 -155
- package/dist/lib/ci-upload/props/index.js +8 -3
- package/dist/lib/components/index.js +25 -22
- package/dist/lib/styles/reset-elementPlus/index.css +1 -1
- package/dist/types/src/components/components-project/ci-common-list/ci-common-list-query/index.vue.d.ts +1 -0
- package/dist/types/src/components/components-project/ci-common-list/ci-common-list-query/type.d.ts +1 -0
- package/dist/types/src/components/components-project/ci-dictionary-select/index.vue.d.ts +5 -2
- package/dist/types/src/components/components-project/ci-dictionary-select/type.d.ts +2 -0
- package/dist/types/src/components/components-project/ci-element-plus/ci-choose-all-select/index.d.ts +8 -0
- package/dist/types/src/components/components-project/ci-element-plus/ci-choose-all-select/index.vue.d.ts +36 -0
- package/dist/types/src/components/components-project/ci-element-plus/ci-choose-all-select/model/index.d.ts +1 -0
- package/dist/types/src/components/components-project/ci-element-plus/ci-choose-all-select/type.d.ts +17 -0
- package/dist/types/src/components/components-project/ci-upload/computed/index.d.ts +0 -1
- package/dist/types/src/components/components-project/ci-upload/hooks/useFileSize.d.ts +3 -0
- package/dist/types/src/components/components-project/ci-upload/index.vue.d.ts +2 -0
- package/dist/types/src/components/components-project/ci-upload/props/index.d.ts +2 -0
- package/dist/types/src/components/components-project/ci-upload/type.d.ts +2 -0
- package/dist/types/src/views-demo/usedemo-ci-choose-all-select/index.vue.d.ts +2 -0
- package/dist/types/src/views-demo/usedemo-ci-choose-all-select/routes/index.d.ts +13 -0
- package/package.json +8 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { ElSelect as V, ElOption as h, ElButton as k, ElDivider as _ } from "element-plus/es";
|
|
2
|
+
import { defineComponent as T, ref as B, computed as S, createElementBlock as c, openBlock as n, createVNode as p, mergeProps as A, createSlots as E, withCtx as d, renderSlot as w, Fragment as D, renderList as $, createBlock as L, createElementVNode as N, createTextVNode as m } from "vue";
|
|
3
|
+
const O = { class: "ci-choose-all-btn__wrapper" }, U = {
|
|
4
|
+
name: "CiChooseAllSelect",
|
|
5
|
+
inheritAttrs: !0
|
|
6
|
+
}, F = /* @__PURE__ */ T({
|
|
7
|
+
...U,
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: { default: () => [] },
|
|
10
|
+
options: { default: () => [] },
|
|
11
|
+
placeholder: { default: "请选择" },
|
|
12
|
+
multiple: { type: Boolean, default: !0 },
|
|
13
|
+
clearable: { type: Boolean, default: !1 },
|
|
14
|
+
collapseTags: { type: Boolean, default: !0 },
|
|
15
|
+
collapseTagsTooltip: { type: Boolean, default: !0 },
|
|
16
|
+
maxCollapseTags: { default: 1 },
|
|
17
|
+
filterable: { type: Boolean, default: !0 },
|
|
18
|
+
selectWidth: { default: "190px" },
|
|
19
|
+
selectLabel: { default: "label" },
|
|
20
|
+
selectValue: { default: "value" },
|
|
21
|
+
selectDisabled: { default: "disabled" }
|
|
22
|
+
},
|
|
23
|
+
emits: ["update:model-value", "select-all", "clear-all"],
|
|
24
|
+
setup(f, { emit: b }) {
|
|
25
|
+
const r = B(null), o = f, s = b, u = S({
|
|
26
|
+
get: () => o.modelValue,
|
|
27
|
+
set: (e) => s("update:model-value", e)
|
|
28
|
+
}), v = {
|
|
29
|
+
width: o.selectWidth
|
|
30
|
+
}, i = (e) => {
|
|
31
|
+
if (e) {
|
|
32
|
+
const l = o.options.filter((a) => !a[o.selectDisabled]).map((a) => a[o.selectValue]);
|
|
33
|
+
s("update:model-value", l), s("select-all", l);
|
|
34
|
+
} else
|
|
35
|
+
s("update:model-value", []), s("clear-all", []);
|
|
36
|
+
};
|
|
37
|
+
return (e, l) => {
|
|
38
|
+
const a = k, C = _, g = h, y = V;
|
|
39
|
+
return n(), c("div", {
|
|
40
|
+
class: "CiChooseAllSelect",
|
|
41
|
+
ref_key: "CiChooseAllSelect_box",
|
|
42
|
+
ref: r
|
|
43
|
+
}, [
|
|
44
|
+
p(y, A({
|
|
45
|
+
class: { "csit-UI-el-select-max-collapse-tags-1": e.maxCollapseTags === 1 },
|
|
46
|
+
modelValue: u.value,
|
|
47
|
+
"onUpdate:modelValue": l[2] || (l[2] = (t) => u.value = t)
|
|
48
|
+
}, e.$attrs, {
|
|
49
|
+
clearable: e.clearable,
|
|
50
|
+
filterable: e.filterable,
|
|
51
|
+
"collapse-tags": e.collapseTags,
|
|
52
|
+
"collapse-tags-tooltip": e.collapseTagsTooltip,
|
|
53
|
+
"max-collapse-tags": e.maxCollapseTags,
|
|
54
|
+
placeholder: e.placeholder,
|
|
55
|
+
multiple: e.multiple,
|
|
56
|
+
"popper-class": "CiChooseAllSelect_el-select-popper",
|
|
57
|
+
"append-to": r.value,
|
|
58
|
+
style: v
|
|
59
|
+
}), E({
|
|
60
|
+
default: d(() => [
|
|
61
|
+
w(e.$slots, "default", {}, () => [
|
|
62
|
+
(n(!0), c(D, null, $(e.options, (t) => (n(), L(g, {
|
|
63
|
+
key: t[e.selectValue],
|
|
64
|
+
label: t[e.selectLabel],
|
|
65
|
+
value: t[e.selectValue],
|
|
66
|
+
disabled: t[e.selectDisabled]
|
|
67
|
+
}, null, 8, ["label", "value", "disabled"]))), 128))
|
|
68
|
+
], !0)
|
|
69
|
+
]),
|
|
70
|
+
_: 2
|
|
71
|
+
}, [
|
|
72
|
+
e.multiple ? {
|
|
73
|
+
name: "header",
|
|
74
|
+
fn: d(() => [
|
|
75
|
+
N("div", O, [
|
|
76
|
+
p(a, {
|
|
77
|
+
link: "",
|
|
78
|
+
type: "primary",
|
|
79
|
+
onClick: l[0] || (l[0] = (t) => i(!0))
|
|
80
|
+
}, {
|
|
81
|
+
default: d(() => l[3] || (l[3] = [
|
|
82
|
+
m("全选")
|
|
83
|
+
])),
|
|
84
|
+
_: 1,
|
|
85
|
+
__: [3]
|
|
86
|
+
}),
|
|
87
|
+
p(C, {
|
|
88
|
+
class: "ci-choose-all-btn__divider",
|
|
89
|
+
direction: "vertical"
|
|
90
|
+
}),
|
|
91
|
+
p(a, {
|
|
92
|
+
link: "",
|
|
93
|
+
type: "primary",
|
|
94
|
+
onClick: l[1] || (l[1] = (t) => i(!1))
|
|
95
|
+
}, {
|
|
96
|
+
default: d(() => l[4] || (l[4] = [
|
|
97
|
+
m("清除全部")
|
|
98
|
+
])),
|
|
99
|
+
_: 1,
|
|
100
|
+
__: [4]
|
|
101
|
+
})
|
|
102
|
+
])
|
|
103
|
+
]),
|
|
104
|
+
key: "0"
|
|
105
|
+
} : void 0
|
|
106
|
+
]), 1040, ["class", "modelValue", "clearable", "filterable", "collapse-tags", "collapse-tags-tooltip", "max-collapse-tags", "placeholder", "multiple", "append-to"])
|
|
107
|
+
], 512);
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
export {
|
|
112
|
+
F as default
|
|
113
|
+
};
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import { computed as t } from "vue";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { useFileSize as S } from "../hooks/useFileSize.js";
|
|
3
|
+
function d(e, a, m) {
|
|
4
|
+
const { formatFileSize: i } = S(), c = t(
|
|
5
|
+
() => !!a.default && a.default().some((l) => typeof l.type != "symbol")
|
|
6
|
+
), n = t(() => e.beforeUpload ?? m), f = t(() => {
|
|
7
|
+
if (e.multiple) {
|
|
8
|
+
if (e.minSize === 0)
|
|
9
|
+
return `注:文件大小 <= ${i(e.maxSize)},最大上传数量${e.limit}个,类型为${e.accept.replace(/,/g, ",")}`;
|
|
10
|
+
if (e.minSize !== 0)
|
|
11
|
+
return `注:${i(e.minSize)} <= 文件大小 <= ${i(e.maxSize)},最大上传数量${e.limit}个,类型为${e.accept.replace(/,/g, ",")}`;
|
|
12
|
+
}
|
|
13
|
+
if (e.minSize === 0)
|
|
14
|
+
return `注:文件大小 <= ${i(e.maxSize)},最大上传数量1个,类型为${e.accept.replace(/,/g, ",")}`;
|
|
15
|
+
if (e.minSize !== 0)
|
|
16
|
+
return `注:${i(e.minSize)} <= 文件大小 <= ${i(e.maxSize)},最大上传数量1个,类型为${e.accept.replace(/,/g, ",")}`;
|
|
17
|
+
}), u = t(() => Object.keys(a).filter((l) => l !== "tip"));
|
|
6
18
|
return {
|
|
7
19
|
hasRealDefaultSlot: c,
|
|
8
|
-
finalBeforeUpload:
|
|
9
|
-
maxSizeInMB
|
|
10
|
-
defaultTipSlotTextInfo:
|
|
11
|
-
otherSlots:
|
|
20
|
+
finalBeforeUpload: n,
|
|
21
|
+
// maxSizeInMB,
|
|
22
|
+
defaultTipSlotTextInfo: f,
|
|
23
|
+
otherSlots: u
|
|
12
24
|
};
|
|
13
25
|
}
|
|
14
26
|
export {
|
|
15
|
-
|
|
27
|
+
d as useCiUploadComputed
|
|
16
28
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
function i() {
|
|
2
|
+
return { formatFileSize: (t) => {
|
|
3
|
+
if (!t || t <= 0) return "0.00KB";
|
|
4
|
+
const o = 1024, r = 1024 * 1024, n = 1024 * 1024 * 1024;
|
|
5
|
+
return t < r ? (t / o).toFixed(2) + "KB" : t < n ? (t / r).toFixed(2) + "MB" : (t / n).toFixed(2) + "GB";
|
|
6
|
+
} };
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
i as useFileSize
|
|
10
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.CiUpload[data-v-
|
|
1
|
+
.CiUpload[data-v-ba8bfffc]{width:680px;line-height:normal}.CiUpload .el-link.is-underline[data-v-ba8bfffc]:hover:after{border-bottom:none}.CiUpload .el-link.is-hover-underline[data-v-ba8bfffc]:hover:after{border-bottom:none}.CiUpload .ci-el-upload-component[data-v-ba8bfffc] .el-upload-dragger{height:142px;padding:0;display:flex;flex-direction:column;justify-content:center;align-items:center}.CiUpload .ci-el-upload-component[data-v-ba8bfffc] .el-upload-dragger .upload-btn-icon,.CiUpload .ci-el-upload-component[data-v-ba8bfffc] .el-upload-dragger .upload-btn-icon-hover,.CiUpload .ci-el-upload-component[data-v-ba8bfffc] .el-upload-dragger .upload-btn-icon-disabled{width:20px;height:20px}.CiUpload .ci-el-upload-component[data-v-ba8bfffc] .el-upload-dragger .upload-btn-icon-hover,.CiUpload .ci-el-upload-component[data-v-ba8bfffc] .el-upload-dragger .upload-btn-icon-disabled{display:none}.CiUpload .ci-el-upload-component[data-v-ba8bfffc] .el-upload-dragger:hover{background-color:#fafbfd}.CiUpload .ci-el-upload-component[data-v-ba8bfffc] .el-upload-dragger:hover .upload-btn-icon{display:none}.CiUpload .ci-el-upload-component[data-v-ba8bfffc] .el-upload-dragger:hover .upload-btn-icon-hover{display:block}.CiUpload .ci-el-upload-component[data-v-ba8bfffc] .el-upload-dragger:hover .upload-btn-icon-disabled{display:none}.CiUpload .ci-el-upload-component[data-v-ba8bfffc] .el-upload-dragger .drag-text-info{margin-top:20px}.CiUpload .ci-el-upload-component[data-v-ba8bfffc] .el-upload-dragger .drag-text-info .drag-text-info-click{color:#3573f3}.CiUpload .ci-el-upload-component[data-v-ba8bfffc] .el-upload-dragger .drag-text-info .drag-text-info-black{color:#191919}.CiUpload .ci-el-upload-component .upload-btn[data-v-ba8bfffc]{color:#4a4a4a!important;border-color:#dbdbdb!important}.CiUpload .ci-el-upload-component .upload-btn .upload-btn-icon[data-v-ba8bfffc],.CiUpload .ci-el-upload-component .upload-btn .upload-btn-icon-hover[data-v-ba8bfffc],.CiUpload .ci-el-upload-component .upload-btn .upload-btn-icon-disabled[data-v-ba8bfffc]{width:20px;height:20px;margin-right:10px}.CiUpload .ci-el-upload-component .upload-btn .upload-btn-icon-hover[data-v-ba8bfffc],.CiUpload .ci-el-upload-component .upload-btn .upload-btn-icon-disabled[data-v-ba8bfffc]{display:none}.CiUpload .ci-el-upload-component .upload-btn[data-v-ba8bfffc]:hover{color:#3573f3!important;border-color:#3573f3!important}.CiUpload .ci-el-upload-component .upload-btn:hover .upload-btn-icon[data-v-ba8bfffc]{display:none}.CiUpload .ci-el-upload-component .upload-btn:hover .upload-btn-icon-hover[data-v-ba8bfffc]{display:block}.CiUpload .ci-el-upload-component .upload-btn:hover .upload-btn-icon-disabled[data-v-ba8bfffc]{display:none}.CiUpload .ci-el-upload-component .upload-btn.is-disabled[data-v-ba8bfffc]{color:#a4a4a4!important;background-color:#f5f5f5!important;border-color:#dbdbdb!important;opacity:1!important}.CiUpload .ci-el-upload-component .upload-btn.is-disabled .upload-btn-icon[data-v-ba8bfffc],.CiUpload .ci-el-upload-component .upload-btn.is-disabled .upload-btn-icon-hover[data-v-ba8bfffc]{display:none}.CiUpload .ci-el-upload-component .upload-btn.is-disabled .upload-btn-icon-disabled[data-v-ba8bfffc]{display:block}.CiUpload .ci-el-upload-component .default-tip-slot-textInfo[data-v-ba8bfffc],.CiUpload .ci-el-upload-component .tip-slot-textInfo[data-v-ba8bfffc]{color:#a4a4a4;font-size:12px;margin-top:10px}.CiUpload .ci-el-upload-component.is-disabled[data-v-ba8bfffc] .el-upload-dragger{background-color:#f5f5f5}.CiUpload .ci-el-upload-component.is-disabled[data-v-ba8bfffc] .el-upload-dragger .upload-btn-icon,.CiUpload .ci-el-upload-component.is-disabled[data-v-ba8bfffc] .el-upload-dragger .upload-btn-icon-hover{display:none}.CiUpload .ci-el-upload-component.is-disabled[data-v-ba8bfffc] .el-upload-dragger .upload-btn-icon-disabled{display:block}.CiUpload .ci-el-upload-component.is-disabled[data-v-ba8bfffc] .el-upload-dragger:hover{border:1px dashed #dcdfe6}.CiUpload .ci-el-upload-component.is-disabled[data-v-ba8bfffc] .el-upload-dragger .drag-text-info{margin-top:20px}.CiUpload .ci-el-upload-component.is-disabled[data-v-ba8bfffc] .el-upload-dragger .drag-text-info .drag-text-info-click,.CiUpload .ci-el-upload-component.is-disabled[data-v-ba8bfffc] .el-upload-dragger .drag-text-info .drag-text-info-black{color:#a4a4a4}.CiUpload .custom-file-list-default[data-v-ba8bfffc]{margin-top:20px;border:1px solid #dbdbdb;padding:8px 10px;border-radius:4px}.CiUpload .custom-file-list-default.is-readonly[data-v-ba8bfffc]{margin-top:0;border:none;padding:0}.CiUpload .custom-file-list-default .file-item-wrapper[data-v-ba8bfffc]{padding:5px}.CiUpload .custom-file-list-default .file-item-wrapper[data-v-ba8bfffc]:hover{background-color:#f0f2f5}.CiUpload .custom-file-list-default .file-item-wrapper:hover .file-progress-bar[data-v-ba8bfffc]{background-color:#e8e5e5}.CiUpload .custom-file-list-default .file-item-wrapper[data-v-ba8bfffc]:not(:last-child){margin-bottom:8px}.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top[data-v-ba8bfffc]{display:flex;align-items:center;justify-content:space-between}.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .file-name-file-icon[data-v-ba8bfffc]{display:flex;align-items:center}.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .file-name-file-icon .file-icon[data-v-ba8bfffc]{width:22px;height:22px;margin-right:5px;align-self:flex-start}.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .file-name-file-icon .file-name[data-v-ba8bfffc]{max-width:257px;flex-shrink:0}.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .file-name-file-icon .file-name.is-show-file-name-ellipsis-tooltip[data-v-ba8bfffc] .el-link__inner{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .top-right[data-v-ba8bfffc]{display:flex;align-items:center;justify-content:center;height:25px}.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .top-right .file-size[data-v-ba8bfffc]{color:#a4a4a4;font-size:14px;margin-right:8px;display:inline-flex;height:100%;position:relative;top:.5px;align-items:center}.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .top-right .file-operate-btn[data-v-ba8bfffc]{margin-right:8px;height:100%;display:flex;align-items:center}.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .top-right .file-operate-btn .el-divider--vertical[data-v-ba8bfffc]{font-size:14px;border-left-color:#191919;position:relative;top:.5px}.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .top-right .file-status-icon-wrapper[data-v-ba8bfffc]{height:100%;display:flex;align-items:center}.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .top-right .file-status-icon-wrapper .uploading[data-v-ba8bfffc]{height:100%;display:flex;align-items:center;color:#3573f3;font-size:14px}.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .top-right .file-status-icon-wrapper .uploading .uploading-icon[data-v-ba8bfffc]{width:14px;height:14px;margin-right:4px;animation:rotate 1.5s linear infinite}.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .top-right .file-status-icon-wrapper .success[data-v-ba8bfffc],.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .top-right .file-status-icon-wrapper .downloading[data-v-ba8bfffc]{display:inline-flex;height:100%;justify-content:center;align-items:center}.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .top-right .file-status-icon-wrapper .success .success-icon[data-v-ba8bfffc],.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .top-right .file-status-icon-wrapper .downloading .success-icon[data-v-ba8bfffc]{width:19px;height:19px}.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .top-right .file-status-icon-wrapper .fail.fail-icon-wrapper[data-v-ba8bfffc]{display:flex;align-items:center}.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .top-right .file-status-icon-wrapper .fail.fail-icon-wrapper .fail-icon[data-v-ba8bfffc]{width:19px;height:19px}.CiUpload .custom-file-list-default .file-item-wrapper .file-item-top .top-right .file-status-icon-wrapper .fail.fail-icon-wrapper .retry-icon[data-v-ba8bfffc]{margin:0 8px;cursor:pointer;width:18px;height:18px}.CiUpload .custom-file-list-default .file-item-wrapper .file-progress-bar[data-v-ba8bfffc]{width:100%;height:5px;background-color:#f0f0f0;border-radius:3px;overflow:hidden;margin-top:5px}.CiUpload .custom-file-list-default .file-item-wrapper .file-progress-bar .file-progress-inner[data-v-ba8bfffc]{height:100%;background-color:#3573f3;transition:width .3s ease}.CiUpload .custom-file-list-default .file-item-wrapper .download-progress-bar .file-progress-inner[data-v-ba8bfffc]{background-color:#2aca96}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import f from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const r = /* @__PURE__ */ f(o, [["__scopeId", "data-v-ba8bfffc"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|