vue-2024-ui 0.0.19 → 0.0.21
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/index.css +1 -0
- package/dist/{vue-2024-ui.js → vue-2024-ui.min.js} +106 -64
- package/package.json +17 -11
- package/dist/style.css +0 -86
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.g-query-container[data-v-86d5e1cc]{display:flex;flex:1;flex-direction:column;padding:10px;box-sizing:border-box}.outer[data-v-86d5e1cc]{min-height:100px;border-radius:10px;background-color:#fffc;box-shadow:0 0 10px #0000001a;top:60px;padding:10px;width:100%;box-sizing:border-box}.inner[data-v-86d5e1cc]{border-radius:6px;min-height:100px;border:1px solid #f2f2f2;padding:20px;box-sizing:border-box;width:100%;background-color:#fffc}.nested-enter-active[data-v-86d5e1cc],.nested-leave-active[data-v-86d5e1cc]{transition:all .3s ease-in-out}.nested-leave-active[data-v-86d5e1cc]{transition-delay:.25s}.nested-enter-from[data-v-86d5e1cc],.nested-leave-to[data-v-86d5e1cc]{transform:translateY(-100px);opacity:0}.nested-enter-active .inner[data-v-86d5e1cc],.nested-leave-active .inner[data-v-86d5e1cc]{transition:all .3s ease-in-out}.nested-enter-active .inner[data-v-86d5e1cc]{transition-delay:.25s}.nested-enter-from .inner[data-v-86d5e1cc],.nested-leave-to .inner[data-v-86d5e1cc]{transform:translateY(-100px);opacity:.001}.check-box-hover[data-v-72c4cabb]:hover,.check-box-hover[data-v-dd3ae3d0]:hover{background:#f5f1f1}.allcheck a[data-v-dd3ae3d0]{cursor:pointer}.filtered[data-v-dd3ae3d0]{pointer-events:none}.max[data-v-93827da7]{cursor:pointer;color:#333}.max[data-v-93827da7]:hover{color:var(--el-color-primary)}
|
|
@@ -1,3 +1,42 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __async = (__this, __arguments, generator) => {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
var fulfilled = (value) => {
|
|
23
|
+
try {
|
|
24
|
+
step(generator.next(value));
|
|
25
|
+
} catch (e) {
|
|
26
|
+
reject(e);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var rejected = (value) => {
|
|
30
|
+
try {
|
|
31
|
+
step(generator.throw(value));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
reject(e);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
37
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
|
+
});
|
|
39
|
+
};
|
|
1
40
|
import ElementPlus, { ElMessage, ElMessageBox, ElDialog, ElDrawer } from "element-plus";
|
|
2
41
|
import { mergeModels, useModel, ref, onMounted, resolveComponent, openBlock, createElementBlock, unref, createBlock, mergeProps, withCtx, renderSlot, Fragment, renderList, createTextVNode, toDisplayString, createSlots, useSlots, inject, useAttrs, watch, computed, createVNode, createElementVNode, normalizeStyle, withModifiers, createCommentVNode, normalizeProps, guardReactiveProps, Transition, withDirectives, vShow, defineComponent, onBeforeUnmount, normalizeClass, watchEffect, h, readonly, createApp } from "vue";
|
|
3
42
|
import Sortable from "sortablejs";
|
|
@@ -482,27 +521,26 @@ const _sfc_main$6 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
482
521
|
const model = props.model;
|
|
483
522
|
const treeSelectData = ref([]);
|
|
484
523
|
const slots = () => Object.keys(useSlots()).filter((a) => a.startsWith(`${props.t}-${ctrlKey}-`)).map((a) => a.replace(`${props.t}-${ctrlKey}-`, ""));
|
|
485
|
-
const selectModel = {
|
|
524
|
+
const selectModel = __spreadValues({
|
|
486
525
|
filterable: true,
|
|
487
|
-
remote: itemInfo && itemInfo["remote-method"] ? true : false
|
|
488
|
-
|
|
489
|
-
};
|
|
526
|
+
remote: itemInfo && itemInfo["remote-method"] ? true : false
|
|
527
|
+
}, itemInfo);
|
|
490
528
|
const selectRemoteMethod = (query) => {
|
|
491
529
|
itemInfo["remote-method"](query, (a) => {
|
|
492
530
|
model[ctrlKey].options = a;
|
|
493
531
|
});
|
|
494
532
|
};
|
|
495
533
|
const isOptionsLoaded = ref(false);
|
|
496
|
-
const options =
|
|
534
|
+
const options = (keyValue = "options") => __async(this, null, function* () {
|
|
497
535
|
try {
|
|
498
|
-
const response =
|
|
536
|
+
const response = yield itemInfo == null ? void 0 : itemInfo.options(model);
|
|
499
537
|
model[ctrlKey][keyValue] = response;
|
|
500
538
|
isOptionsLoaded.value = true;
|
|
501
539
|
} catch (error) {
|
|
502
540
|
console.error("Failed to fetch options:", error);
|
|
503
541
|
}
|
|
504
|
-
};
|
|
505
|
-
onMounted(
|
|
542
|
+
});
|
|
543
|
+
onMounted(() => __async(this, null, function* () {
|
|
506
544
|
if (itemInfo && itemInfo["remote-method"]) {
|
|
507
545
|
selectModel["remote-method"] = selectRemoteMethod;
|
|
508
546
|
}
|
|
@@ -521,10 +559,10 @@ const _sfc_main$6 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
521
559
|
loadOptions(ctrlType);
|
|
522
560
|
}
|
|
523
561
|
if (ctrlType === "tree-select") {
|
|
524
|
-
const loadTreeSelectOptions =
|
|
562
|
+
const loadTreeSelectOptions = () => __async(this, null, function* () {
|
|
525
563
|
try {
|
|
526
564
|
if (typeof itemInfo.options === "function") {
|
|
527
|
-
treeSelectData.value =
|
|
565
|
+
treeSelectData.value = yield itemInfo.options(model);
|
|
528
566
|
} else if (Array.isArray(itemInfo == null ? void 0 : itemInfo.data)) {
|
|
529
567
|
treeSelectData.value = itemInfo.data;
|
|
530
568
|
} else if ((itemInfo == null ? void 0 : itemInfo.options) && Array.isArray(itemInfo == null ? void 0 : itemInfo.options)) {
|
|
@@ -534,10 +572,10 @@ const _sfc_main$6 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
534
572
|
} catch (error) {
|
|
535
573
|
console.error(`Failed to load data for tree-select:`, error);
|
|
536
574
|
}
|
|
537
|
-
};
|
|
538
|
-
|
|
575
|
+
});
|
|
576
|
+
yield loadTreeSelectOptions();
|
|
539
577
|
}
|
|
540
|
-
});
|
|
578
|
+
}));
|
|
541
579
|
return (_ctx, _cache) => {
|
|
542
580
|
var _a;
|
|
543
581
|
const _component_el_radio = resolveComponent("el-radio");
|
|
@@ -868,7 +906,7 @@ const _sfc_main$6 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
868
906
|
placeholder: unref(model)[unref(ctrlKey)].label,
|
|
869
907
|
maxlength: ((_a = unref(itemInfo)) == null ? void 0 : _a.max) || 25,
|
|
870
908
|
clearable: true
|
|
871
|
-
}, {
|
|
909
|
+
}, __spreadProps(__spreadValues({}, unref(itemInfo)), { type: unref(ctrlType) })), createSlots({ _: 2 }, [
|
|
872
910
|
renderList(slots(), (slot, index2) => {
|
|
873
911
|
return {
|
|
874
912
|
name: slot,
|
|
@@ -905,11 +943,10 @@ const _sfc_main$5 = /* @__PURE__ */ Object.assign({
|
|
|
905
943
|
"label-width": "100px",
|
|
906
944
|
"status-icon": true,
|
|
907
945
|
"scroll-into-view-options": true,
|
|
908
|
-
style: {
|
|
946
|
+
style: __spreadValues({
|
|
909
947
|
display: "flex",
|
|
910
|
-
flexWrap: "wrap"
|
|
911
|
-
|
|
912
|
-
},
|
|
948
|
+
flexWrap: "wrap"
|
|
949
|
+
}, (_a = useAttrs()) == null ? void 0 : _a.style),
|
|
913
950
|
// 表单底部属性
|
|
914
951
|
footer: {
|
|
915
952
|
hidden: false,
|
|
@@ -928,16 +965,16 @@ const _sfc_main$5 = /* @__PURE__ */ Object.assign({
|
|
|
928
965
|
label: "提交",
|
|
929
966
|
plain: true,
|
|
930
967
|
hidden: false,
|
|
931
|
-
click:
|
|
968
|
+
click: (formInfo2, model2) => __async(this, null, function* () {
|
|
932
969
|
if (!gform.value) return;
|
|
933
|
-
|
|
970
|
+
yield gform.value.validate((valid, fields) => {
|
|
934
971
|
if (valid) {
|
|
935
972
|
emits("submit", formInfo2, model2);
|
|
936
973
|
} else {
|
|
937
974
|
console.log("表单验证不通过!", fields);
|
|
938
975
|
}
|
|
939
976
|
});
|
|
940
|
-
}
|
|
977
|
+
})
|
|
941
978
|
},
|
|
942
979
|
//表单重置按钮属性
|
|
943
980
|
reset: {
|
|
@@ -998,7 +1035,7 @@ const _sfc_main$5 = /* @__PURE__ */ Object.assign({
|
|
|
998
1035
|
pattern: void 0,
|
|
999
1036
|
validate: void 0
|
|
1000
1037
|
};
|
|
1001
|
-
const itemInfo = {
|
|
1038
|
+
const itemInfo = __spreadValues(__spreadValues({}, itemDefaultRule), item);
|
|
1002
1039
|
if (itemInfo.required) {
|
|
1003
1040
|
itemRules.push({ required: true, message: `${itemInfo.label}不能为空!`, trigger: "blur" });
|
|
1004
1041
|
}
|
|
@@ -1059,8 +1096,8 @@ const _sfc_main$5 = /* @__PURE__ */ Object.assign({
|
|
|
1059
1096
|
});
|
|
1060
1097
|
const load = () => {
|
|
1061
1098
|
for (const [key, value] of Object.entries(items.value)) {
|
|
1062
|
-
model.value[key].formItem = {
|
|
1063
|
-
model.value[key].formItem.style = {
|
|
1099
|
+
model.value[key].formItem = __spreadValues(__spreadValues({}, model.value[key].formItem), value.formItem);
|
|
1100
|
+
model.value[key].formItem.style = __spreadValues(__spreadValues({}, model.value[key].formItem.style), value.formItem.style);
|
|
1064
1101
|
}
|
|
1065
1102
|
};
|
|
1066
1103
|
watch(() => model.value.form.inline, () => load());
|
|
@@ -1080,7 +1117,7 @@ const _sfc_main$5 = /* @__PURE__ */ Object.assign({
|
|
|
1080
1117
|
default: withCtx(() => [
|
|
1081
1118
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1082
1119
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, key) => {
|
|
1083
|
-
return openBlock(), createBlock(_component_el_col, mergeProps({ ref_for: true }, {
|
|
1120
|
+
return openBlock(), createBlock(_component_el_col, mergeProps({ ref_for: true }, __spreadValues(__spreadValues({}, model.value.form.cols), item.col), {
|
|
1084
1121
|
key,
|
|
1085
1122
|
style: { "width": "100%" }
|
|
1086
1123
|
}), {
|
|
@@ -1092,7 +1129,7 @@ const _sfc_main$5 = /* @__PURE__ */ Object.assign({
|
|
|
1092
1129
|
prop: `${key}.value`,
|
|
1093
1130
|
rules: getItemRulesByItem(item),
|
|
1094
1131
|
ref_for: true
|
|
1095
|
-
}, {
|
|
1132
|
+
}, __spreadValues(__spreadValues({}, (_a2 = model.value) == null ? void 0 : _a2.formItems), item == null ? void 0 : item.formItem), { style: { "width": "100%" } }), {
|
|
1096
1133
|
label: withCtx((data) => [
|
|
1097
1134
|
renderSlot(_ctx.$slots, `f-${key}-label`, {
|
|
1098
1135
|
data,
|
|
@@ -1206,7 +1243,7 @@ const _sfc_main$4 = {
|
|
|
1206
1243
|
createVNode(_component_el_form_item, mergeProps({
|
|
1207
1244
|
label: item.label,
|
|
1208
1245
|
ref_for: true
|
|
1209
|
-
}, {
|
|
1246
|
+
}, __spreadValues(__spreadValues({}, model.value.queryItems), item == null ? void 0 : item.search)), {
|
|
1210
1247
|
label: withCtx(() => [
|
|
1211
1248
|
renderSlot(_ctx.$slots, `q-${key}-label`, {
|
|
1212
1249
|
item,
|
|
@@ -1217,7 +1254,7 @@ const _sfc_main$4 = {
|
|
|
1217
1254
|
createVNode(_sfc_main$6, {
|
|
1218
1255
|
modelValue: queryModel.value[key],
|
|
1219
1256
|
"onUpdate:modelValue": ($event) => queryModel.value[key] = $event,
|
|
1220
|
-
item: {
|
|
1257
|
+
item: __spreadValues(__spreadValues({}, item == null ? void 0 : item.editor), item.search),
|
|
1221
1258
|
ctrlKey: key,
|
|
1222
1259
|
ctrlType: item.type,
|
|
1223
1260
|
model: model.value,
|
|
@@ -1718,24 +1755,30 @@ db.version(1).stores({
|
|
|
1718
1755
|
tableInfo: "++id,user,page,key,showCol,width,sort",
|
|
1719
1756
|
tableList: "++id,name"
|
|
1720
1757
|
});
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1758
|
+
function saveTableInfo(_0, _1, _2) {
|
|
1759
|
+
return __async(this, arguments, function* (user, page, key, options = {}) {
|
|
1760
|
+
let count = yield db.tableInfo.where({ user, page, key }).count();
|
|
1761
|
+
if (count > 0) {
|
|
1762
|
+
let m = yield db.tableInfo.where({ user, page, key }).first();
|
|
1763
|
+
yield db.tableInfo.put(__spreadValues(__spreadValues({}, m), options));
|
|
1764
|
+
return "update success";
|
|
1765
|
+
} else {
|
|
1766
|
+
let d = __spreadValues({ showCol: true, width: "auto", sort: 0 }, options);
|
|
1767
|
+
yield db.tableInfo.add(__spreadValues({ user, page, key }, d));
|
|
1768
|
+
return "add success";
|
|
1769
|
+
}
|
|
1770
|
+
});
|
|
1732
1771
|
}
|
|
1733
|
-
|
|
1734
|
-
return
|
|
1772
|
+
function getTableInfo(user, page) {
|
|
1773
|
+
return __async(this, null, function* () {
|
|
1774
|
+
return yield db.tableInfo.where({ user, page }).toArray();
|
|
1775
|
+
});
|
|
1735
1776
|
}
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1777
|
+
function deleteTableInfo(user, page) {
|
|
1778
|
+
return __async(this, null, function* () {
|
|
1779
|
+
db.tableInfo.where({ user, page }).delete((deleteCount) => {
|
|
1780
|
+
console.log("删除了" + deleteCount + "条数据");
|
|
1781
|
+
});
|
|
1739
1782
|
});
|
|
1740
1783
|
}
|
|
1741
1784
|
const _hoisted_1$1 = {
|
|
@@ -1763,7 +1806,7 @@ const _sfc_main$1 = {
|
|
|
1763
1806
|
const props = __props;
|
|
1764
1807
|
const cols = ref([]);
|
|
1765
1808
|
const arrKeys = useModel(__props, "modelValue");
|
|
1766
|
-
const change =
|
|
1809
|
+
const change = (val, key) => __async(this, null, function* () {
|
|
1767
1810
|
if (val) {
|
|
1768
1811
|
arrKeys.value[key].showCol = true;
|
|
1769
1812
|
} else {
|
|
@@ -1772,7 +1815,7 @@ const _sfc_main$1 = {
|
|
|
1772
1815
|
saveTableInfo(arrKeys.value.table.user, props.name, key, { showCol: val }).then((res) => {
|
|
1773
1816
|
console.log(res);
|
|
1774
1817
|
});
|
|
1775
|
-
};
|
|
1818
|
+
});
|
|
1776
1819
|
const rowDrop = () => {
|
|
1777
1820
|
const c = document.getElementById("cols");
|
|
1778
1821
|
if (c) {
|
|
@@ -1794,12 +1837,12 @@ const _sfc_main$1 = {
|
|
|
1794
1837
|
});
|
|
1795
1838
|
}
|
|
1796
1839
|
};
|
|
1797
|
-
const selectAll =
|
|
1840
|
+
const selectAll = () => __async(this, null, function* () {
|
|
1798
1841
|
try {
|
|
1799
1842
|
for (const element of cols.value) {
|
|
1800
1843
|
element.showCol = true;
|
|
1801
1844
|
arrKeys.value[element.value].showCol = true;
|
|
1802
|
-
const res =
|
|
1845
|
+
const res = yield saveTableInfo(arrKeys.value.table.user, props.name, element.value, {
|
|
1803
1846
|
showCol: true,
|
|
1804
1847
|
width: element.width,
|
|
1805
1848
|
sort: element.sort
|
|
@@ -1813,14 +1856,14 @@ const _sfc_main$1 = {
|
|
|
1813
1856
|
message: "全选列保存信息失败!"
|
|
1814
1857
|
});
|
|
1815
1858
|
}
|
|
1816
|
-
};
|
|
1817
|
-
const clearAll =
|
|
1859
|
+
});
|
|
1860
|
+
const clearAll = () => __async(this, null, function* () {
|
|
1818
1861
|
try {
|
|
1819
1862
|
const filteredCols = cols.value.filter((a) => !a.alwaysShow);
|
|
1820
1863
|
for (const element of filteredCols) {
|
|
1821
1864
|
element.showCol = false;
|
|
1822
1865
|
arrKeys.value[element.value].showCol = false;
|
|
1823
|
-
const res =
|
|
1866
|
+
const res = yield saveTableInfo(arrKeys.value.table.user, props.name, element.value, {
|
|
1824
1867
|
showCol: false,
|
|
1825
1868
|
width: element.width,
|
|
1826
1869
|
sort: element.sort
|
|
@@ -1834,7 +1877,7 @@ const _sfc_main$1 = {
|
|
|
1834
1877
|
message: "清除列保存信息失败!"
|
|
1835
1878
|
});
|
|
1836
1879
|
}
|
|
1837
|
-
};
|
|
1880
|
+
});
|
|
1838
1881
|
const rowReset = () => {
|
|
1839
1882
|
ElMessageBox.confirm("确定要复位吗?", "提示", {
|
|
1840
1883
|
confirmButtonText: "确定",
|
|
@@ -1852,7 +1895,7 @@ const _sfc_main$1 = {
|
|
|
1852
1895
|
});
|
|
1853
1896
|
});
|
|
1854
1897
|
};
|
|
1855
|
-
onMounted(
|
|
1898
|
+
onMounted(() => __async(this, null, function* () {
|
|
1856
1899
|
cols.value = Object.entries(arrKeys.value).filter(([key, value]) => value.visible !== false).filter(([key, value]) => value.type != "hidden").map(([key, value]) => {
|
|
1857
1900
|
return {
|
|
1858
1901
|
label: value.label,
|
|
@@ -1864,7 +1907,7 @@ const _sfc_main$1 = {
|
|
|
1864
1907
|
};
|
|
1865
1908
|
}).sort((a, b) => a.sort - b.sort);
|
|
1866
1909
|
rowDrop();
|
|
1867
|
-
});
|
|
1910
|
+
}));
|
|
1868
1911
|
return (_ctx, _cache) => {
|
|
1869
1912
|
const _component_el_divider = resolveComponent("el-divider");
|
|
1870
1913
|
const _component_el_alert = resolveComponent("el-alert");
|
|
@@ -1962,7 +2005,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
1962
2005
|
type: "hidden",
|
|
1963
2006
|
load: () => {
|
|
1964
2007
|
let { currentPage, pageSize } = model.value.table.page;
|
|
1965
|
-
emits("load", { currentPage, pageSize,
|
|
2008
|
+
emits("load", __spreadValues({ currentPage, pageSize }, queryInfo.value), (data, total) => {
|
|
1966
2009
|
model.value.table.data = data;
|
|
1967
2010
|
model.value.table.page.total = total;
|
|
1968
2011
|
});
|
|
@@ -2006,7 +2049,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
2006
2049
|
edit: false,
|
|
2007
2050
|
width: 250,
|
|
2008
2051
|
fixed: "right",
|
|
2009
|
-
style: {
|
|
2052
|
+
style: __spreadValues({}, (_b = (_a = model.value) == null ? void 0 : _a.control) == null ? void 0 : _b.style),
|
|
2010
2053
|
add: {
|
|
2011
2054
|
label: "新增",
|
|
2012
2055
|
text: false,
|
|
@@ -2295,7 +2338,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
2295
2338
|
watchEffect(() => {
|
|
2296
2339
|
model.value.table.load();
|
|
2297
2340
|
});
|
|
2298
|
-
onMounted(
|
|
2341
|
+
onMounted(() => __async(this, null, function* () {
|
|
2299
2342
|
var _a2;
|
|
2300
2343
|
if (!props.name) {
|
|
2301
2344
|
alert("必须给表格一个唯一的name属性");
|
|
@@ -2316,7 +2359,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
2316
2359
|
});
|
|
2317
2360
|
}
|
|
2318
2361
|
});
|
|
2319
|
-
});
|
|
2362
|
+
}));
|
|
2320
2363
|
return (_ctx, _cache) => {
|
|
2321
2364
|
const _component_el_button = resolveComponent("el-button");
|
|
2322
2365
|
const _component_el_table_column = resolveComponent("el-table-column");
|
|
@@ -2387,7 +2430,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
2387
2430
|
]), 1032, ["modelValue"])
|
|
2388
2431
|
], true)
|
|
2389
2432
|
]),
|
|
2390
|
-
createVNode(_component_el_table, mergeProps({ class: "g-table-container" }, {
|
|
2433
|
+
createVNode(_component_el_table, mergeProps({ class: "g-table-container" }, __spreadValues(__spreadValues({}, _ctx.$attrs), unref(filterObject)(model.value.table, (k) => !["dblclickType", "page"].includes(k)))), {
|
|
2391
2434
|
append: withCtx(() => [
|
|
2392
2435
|
renderSlot(_ctx.$slots, "append", {}, void 0, true)
|
|
2393
2436
|
]),
|
|
@@ -2401,7 +2444,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
2401
2444
|
prop: key,
|
|
2402
2445
|
key,
|
|
2403
2446
|
ref_for: true
|
|
2404
|
-
}, {
|
|
2447
|
+
}, __spreadValues(__spreadValues({}, model.value.tableColumns), unref(filterObject)(value, (k) => tableColumnsAttrs.includes(k))), { "header-align": "center" }), createSlots({
|
|
2405
2448
|
header: withCtx(({ column, $index }) => [
|
|
2406
2449
|
renderSlot(_ctx.$slots, `${key}-header`, {
|
|
2407
2450
|
column,
|
|
@@ -2673,14 +2716,13 @@ const openModal = (modalProps = {}, mode = "dialog") => {
|
|
|
2673
2716
|
var _a, _b, _c;
|
|
2674
2717
|
return h(
|
|
2675
2718
|
mode == "dialog" ? ElDialog : mode == "drawer" ? ElDrawer : null,
|
|
2676
|
-
{
|
|
2719
|
+
__spreadValues({
|
|
2677
2720
|
modelValue: visible.value,
|
|
2678
2721
|
"onUpdate:modelValue": closeModal,
|
|
2679
2722
|
draggable: true,
|
|
2680
2723
|
"append-to-body": true,
|
|
2681
|
-
"destroy-on-close": true
|
|
2682
|
-
|
|
2683
|
-
},
|
|
2724
|
+
"destroy-on-close": true
|
|
2725
|
+
}, modalProps),
|
|
2684
2726
|
{
|
|
2685
2727
|
default: ((_a = modalProps.slots) == null ? void 0 : _a.default) ? () => modalProps.slots.default() : null,
|
|
2686
2728
|
header: ((_b = modalProps.slots) == null ? void 0 : _b.header) ? () => h("div", {}, modalProps.slots.header()) : null,
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-2024-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/vue-2024-ui.cjs",
|
|
7
|
-
"module": "./dist/vue-2024-ui.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
7
|
+
"module": "./dist/vue-2024-ui.min.js",
|
|
8
|
+
"types": "./dist/types/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"import": "./dist/vue-2024-ui.js",
|
|
12
|
-
"require": "./dist/vue-2024-ui.cjs"
|
|
11
|
+
"import": "./dist/vue-2024-ui.min.js",
|
|
12
|
+
"require": "./dist/vue-2024-ui.cjs",
|
|
13
|
+
"types": "./dist/types/index.d.ts"
|
|
13
14
|
}
|
|
14
15
|
},
|
|
15
16
|
"author": {
|
|
@@ -17,22 +18,24 @@
|
|
|
17
18
|
"email": "xg816620@163.com"
|
|
18
19
|
},
|
|
19
20
|
"files": [
|
|
20
|
-
"dist"
|
|
21
|
+
"dist",
|
|
22
|
+
"README.md"
|
|
21
23
|
],
|
|
22
24
|
"scripts": {
|
|
23
25
|
"i": "pnpm i",
|
|
24
26
|
"dev": "vite",
|
|
25
|
-
"build": "vite build && vite build --mode cjs",
|
|
26
|
-
"preview": "vite preview"
|
|
27
|
+
"build": "vite build --mode es && vite build --mode cjs",
|
|
28
|
+
"preview": "vite preview",
|
|
29
|
+
"analyze": "vite build --mode es --profile"
|
|
27
30
|
},
|
|
28
31
|
"dependencies": {
|
|
29
32
|
"@element-plus/icons-vue": "^2.3.1",
|
|
30
33
|
"dexie": "^4.0.11",
|
|
31
|
-
"element-plus": "^2.8.4",
|
|
32
34
|
"sortablejs": "^1.15.6"
|
|
33
35
|
},
|
|
34
36
|
"peerDependencies": {
|
|
35
|
-
"vue": "^3.4.29"
|
|
37
|
+
"vue": "^3.4.29",
|
|
38
|
+
"element-plus": "^2.8.4"
|
|
36
39
|
},
|
|
37
40
|
"license": "MIT",
|
|
38
41
|
"devDependencies": {
|
|
@@ -40,6 +43,9 @@
|
|
|
40
43
|
"@vitejs/plugin-vue-jsx": "^4.0.0",
|
|
41
44
|
"vite": "^5.3.1",
|
|
42
45
|
"vite-plugin-vue-devtools": "^7.3.1",
|
|
43
|
-
"@rollup/plugin-commonjs": "^25.0.7"
|
|
46
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
47
|
+
"rollup-plugin-visualizer": "^5.10.0",
|
|
48
|
+
"@vue/compiler-sfc": "^3.4.29",
|
|
49
|
+
"terser": "^5.27.0"
|
|
44
50
|
}
|
|
45
51
|
}
|
package/dist/style.css
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
.g-query-container[data-v-86d5e1cc] {
|
|
3
|
-
display: flex;
|
|
4
|
-
flex: 1;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
padding: 10px;
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
}
|
|
9
|
-
.outer[data-v-86d5e1cc] {
|
|
10
|
-
/* position: absolute; */
|
|
11
|
-
min-height: 100px;
|
|
12
|
-
border-radius: 10px;
|
|
13
|
-
background-color: rgba(255, 255, 255, 0.8);
|
|
14
|
-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
15
|
-
top: 60px;
|
|
16
|
-
padding: 10px;
|
|
17
|
-
width: 100%;
|
|
18
|
-
box-sizing: border-box;
|
|
19
|
-
}
|
|
20
|
-
.inner[data-v-86d5e1cc] {
|
|
21
|
-
border-radius: 6px;
|
|
22
|
-
min-height: 100px;
|
|
23
|
-
border: 1px solid #f2f2f2;
|
|
24
|
-
padding: 20px;
|
|
25
|
-
box-sizing: border-box;
|
|
26
|
-
width: 100%;
|
|
27
|
-
background-color: rgba(255, 255, 255, 0.8);
|
|
28
|
-
/*box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); */
|
|
29
|
-
}
|
|
30
|
-
.nested-enter-active[data-v-86d5e1cc],
|
|
31
|
-
.nested-leave-active[data-v-86d5e1cc] {
|
|
32
|
-
transition: all 0.3s ease-in-out;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* delay leave of parent element */
|
|
36
|
-
.nested-leave-active[data-v-86d5e1cc] {
|
|
37
|
-
transition-delay: 0.25s;
|
|
38
|
-
}
|
|
39
|
-
.nested-enter-from[data-v-86d5e1cc],
|
|
40
|
-
.nested-leave-to[data-v-86d5e1cc] {
|
|
41
|
-
transform: translateY(-100px);
|
|
42
|
-
opacity: 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* we can also transition nested elements using nested selectors */
|
|
46
|
-
.nested-enter-active .inner[data-v-86d5e1cc],
|
|
47
|
-
.nested-leave-active .inner[data-v-86d5e1cc] {
|
|
48
|
-
transition: all 0.3s ease-in-out;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/* delay enter of nested element */
|
|
52
|
-
.nested-enter-active .inner[data-v-86d5e1cc] {
|
|
53
|
-
transition-delay: 0.25s;
|
|
54
|
-
}
|
|
55
|
-
.nested-enter-from .inner[data-v-86d5e1cc],
|
|
56
|
-
.nested-leave-to .inner[data-v-86d5e1cc] {
|
|
57
|
-
transform: translateY(-100px);
|
|
58
|
-
/*
|
|
59
|
-
Hack around a Chrome 96 bug in handling nested opacity transitions.
|
|
60
|
-
This is not needed in other browsers or Chrome 99+ where the bug
|
|
61
|
-
has been fixed.
|
|
62
|
-
*/
|
|
63
|
-
opacity: 0.001;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.check-box-hover[data-v-72c4cabb]:hover {
|
|
67
|
-
background: #f5f1f1;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.check-box-hover[data-v-dd3ae3d0]:hover {
|
|
71
|
-
background: #f5f1f1;
|
|
72
|
-
}
|
|
73
|
-
.allcheck a[data-v-dd3ae3d0] {
|
|
74
|
-
cursor: pointer;
|
|
75
|
-
}
|
|
76
|
-
.filtered[data-v-dd3ae3d0] {
|
|
77
|
-
pointer-events: none;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.max[data-v-93827da7] {
|
|
81
|
-
cursor: pointer;
|
|
82
|
-
color: #333;
|
|
83
|
-
}
|
|
84
|
-
.max[data-v-93827da7]:hover {
|
|
85
|
-
color: var(--el-color-primary);
|
|
86
|
-
}
|