ninemoon-ui 0.1.20 → 0.2.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/dist/components/carousel/carousel.vue.d.ts +2 -0
- package/dist/components/date/datepicker.vue.d.ts +1 -1
- package/dist/components/date/datepickerRange.vue.d.ts +16 -0
- package/dist/components/form/formlabel.vue.d.ts +1 -3
- package/dist/components/pagination/pagination.vue.d.ts +8 -15
- package/dist/components/popover/popover.vue.d.ts +5 -0
- package/dist/components/switch/switch.vue.d.ts +10 -0
- package/dist/components/upload/upload.vue.d.ts +5 -0
- package/dist/index.d.ts +139 -61
- package/dist/index.es.js +21 -21
- package/dist/js/arrow/arrow.js +2 -2
- package/dist/js/badge/badge.js +1 -1
- package/dist/js/calendar/calendar.js +4 -4
- package/dist/js/carousel/carousel.js +59 -38
- package/dist/js/check/checkbox.js +4 -4
- package/dist/js/date/datepicker.js +20 -8
- package/dist/js/date/datepickerRange.js +104 -69
- package/dist/js/dateArrowplus/dateArrowplus.js +2 -2
- package/dist/js/delete/delete.js +2 -2
- package/dist/js/dialog/dialog.js +41 -29
- package/dist/js/form/formlabel.js +21 -89
- package/dist/js/image/image.js +17 -18
- package/dist/js/index/index.js +273 -253
- package/dist/js/input/input.js +8 -8
- package/dist/js/menu/menu.js +1 -1
- package/dist/js/numberInput/numberinput.js +8 -8
- package/dist/js/pagination/pagination.js +17 -14
- package/dist/js/popover/popover.js +3 -239
- package/dist/js/popover.vue_vue_type_script_setup_true_lang/popover.vue_vue_type_script_setup_true_lang.js +249 -0
- package/dist/js/radio/radiobox.js +4 -4
- package/dist/js/scrollBar/scrollBar.js +4 -4
- package/dist/js/select/select.js +5 -5
- package/dist/js/select/selectoption.js +3 -3
- package/dist/js/switch/switch.js +33 -7
- package/dist/js/table/table.js +107 -77
- package/dist/js/table/tableItem.js +2 -2
- package/dist/js/tabs/tabs.js +202 -21
- package/dist/js/upload/upload.js +57 -12
- package/dist/utils/tool.d.ts +5 -0
- package/package.json +5 -2
|
@@ -28,18 +28,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
28
28
|
const emit = __emit;
|
|
29
29
|
return (_ctx, _cache) => {
|
|
30
30
|
return openBlock(), createElementBlock("label", {
|
|
31
|
-
class: normalizeClass(["select-none text-sm inline-flex items-center cursor-pointer first:rounded-l-md last:rounded-r-md border-t border-b border-l last:border-r overflow-hidden", { "cursor-not-allowed":
|
|
31
|
+
class: normalizeClass(["select-none text-sm inline-flex items-center cursor-pointer first:rounded-l-md last:rounded-r-md border-t border-b border-l last:border-r overflow-hidden", { "cursor-not-allowed": __props.disabled }])
|
|
32
32
|
}, [
|
|
33
33
|
withDirectives(createElementVNode("input", {
|
|
34
34
|
type: "radio",
|
|
35
|
-
value:
|
|
35
|
+
value: __props.value,
|
|
36
36
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => checkedState.value = $event),
|
|
37
|
-
disabled:
|
|
37
|
+
disabled: __props.disabled,
|
|
38
38
|
class: "peer hidden disabled:cursor-not-allowed form-tick appearance-none h-4 w-4 rounded-full border border-gray-300 checked:border-transparent checked:bg-blue-600 focus:outline-none"
|
|
39
39
|
}, null, 8, _hoisted_1), [
|
|
40
40
|
[vModelRadio, checkedState.value]
|
|
41
41
|
]),
|
|
42
|
-
createElementVNode("div", _hoisted_2, toDisplayString(
|
|
42
|
+
createElementVNode("div", _hoisted_2, toDisplayString(__props.label), 1)
|
|
43
43
|
], 2);
|
|
44
44
|
};
|
|
45
45
|
}
|
|
@@ -113,13 +113,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
113
113
|
onMousedown: clickTrackHandler,
|
|
114
114
|
ref_key: "el",
|
|
115
115
|
ref: el,
|
|
116
|
-
class: normalizeClass(["absolute right-0.5 bottom-0.5 rounded transition-transform", [
|
|
116
|
+
class: normalizeClass(["absolute right-0.5 bottom-0.5 rounded transition-transform", [__props.vertical ? "top-0.5 w-1.5" : "left-0.5 h-1.5"]])
|
|
117
117
|
}, [
|
|
118
118
|
createElementVNode("div", {
|
|
119
119
|
onMousedown: clickThumbHandler,
|
|
120
120
|
ref_key: "thumb",
|
|
121
121
|
ref: thumb,
|
|
122
|
-
class: normalizeClass([
|
|
122
|
+
class: normalizeClass([__props.vertical ? "w-full" : "h-full", "bg-[#9092984d] cursor-pointer rounded"]),
|
|
123
123
|
style: normalizeStyle(renderThumbstyle())
|
|
124
124
|
}, null, 38)
|
|
125
125
|
], 34);
|
|
@@ -213,7 +213,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
213
213
|
setScrollLeft
|
|
214
214
|
});
|
|
215
215
|
return (_ctx, _cache) => {
|
|
216
|
-
return !
|
|
216
|
+
return !__props.native ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
217
217
|
createElementVNode("div", {
|
|
218
218
|
ref_key: "wrap",
|
|
219
219
|
ref: wrap,
|
|
@@ -222,7 +222,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
222
222
|
style: normalizeStyle(warpStyle.value),
|
|
223
223
|
onTouchstart: _cache[0] || (_cache[0] = ($event) => isTouching.value = true),
|
|
224
224
|
onTouchend: _cache[1] || (_cache[1] = ($event) => isTouching.value = false),
|
|
225
|
-
id:
|
|
225
|
+
id: __props.id
|
|
226
226
|
}, [
|
|
227
227
|
createElementVNode("div", {
|
|
228
228
|
ref_key: "contentBox",
|
package/dist/js/select/select.js
CHANGED
|
@@ -104,18 +104,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
104
104
|
ref_key: "inputbox",
|
|
105
105
|
ref: inputbox,
|
|
106
106
|
class: normalizeClass([{
|
|
107
|
-
"bg-gray-100 cursor-default":
|
|
108
|
-
"cursor-pointer": !
|
|
107
|
+
"bg-gray-100 cursor-default": __props.disabled,
|
|
108
|
+
"cursor-pointer": !__props.disabled
|
|
109
109
|
}, "relative flex h-full w-full items-center overflow-hidden rounded border border-solid"]),
|
|
110
110
|
onClick: showHandle
|
|
111
111
|
}, [
|
|
112
112
|
createElementVNode("input", {
|
|
113
113
|
value: inputLabel.value,
|
|
114
114
|
type: "text",
|
|
115
|
-
disabled:
|
|
116
|
-
readonly: !
|
|
115
|
+
disabled: __props.disabled,
|
|
116
|
+
readonly: !__props.filter,
|
|
117
117
|
class: normalizeClass(["w-full cursor-pointer appearance-none pl-2 text-sm outline-none disabled:cursor-default text-word3", heightClass.value]),
|
|
118
|
-
placeholder:
|
|
118
|
+
placeholder: __props.placeHolder
|
|
119
119
|
}, null, 10, _hoisted_1),
|
|
120
120
|
createVNode(ArrowIcon, {
|
|
121
121
|
class: normalizeClass(["w-3 h-3 fill-gray-300 inline-block transform transition-all mx-1", { "-rotate-90": showOption.value, "rotate-90": !showOption.value }])
|
|
@@ -42,12 +42,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
onMouseenter: moveIn,
|
|
43
43
|
class: normalizeClass(["px-1 py-2 cursor-pointer", {
|
|
44
44
|
"text-blue-light": isSelected.value,
|
|
45
|
-
"opacity-50 cursor-not-allowed":
|
|
46
|
-
"bg-gray-100": !
|
|
45
|
+
"opacity-50 cursor-not-allowed": __props.disabled,
|
|
46
|
+
"bg-gray-100": !__props.disabled && isHovered.value,
|
|
47
47
|
"bg-inherit": !isHovered.value
|
|
48
48
|
}])
|
|
49
49
|
}, [
|
|
50
|
-
!hasSlot.value ? (openBlock(), createElementBlock("div", _hoisted_1, toDisplayString(
|
|
50
|
+
!hasSlot.value ? (openBlock(), createElementBlock("div", _hoisted_1, toDisplayString(__props.label || __props.value), 1)) : renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
51
51
|
], 34);
|
|
52
52
|
};
|
|
53
53
|
}
|
package/dist/js/switch/switch.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, createElementVNode, normalizeStyle, normalizeClass, toDisplayString } from "vue";
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, normalizeStyle, normalizeClass, toDisplayString } from "vue";
|
|
2
2
|
const _hoisted_1 = { class: "inline-block cursor-pointer select-none text-xs relative" };
|
|
3
3
|
const _hoisted_2 = {
|
|
4
4
|
key: 0,
|
|
@@ -15,7 +15,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
uncheckedLabel: {},
|
|
16
16
|
checkedColor: { default: "#25b9e9" },
|
|
17
17
|
uncheckedColor: { default: "#666666" },
|
|
18
|
-
modelValue: { type: Boolean, default: false }
|
|
18
|
+
modelValue: { type: Boolean, default: false },
|
|
19
|
+
width: { default: "40px" },
|
|
20
|
+
height: { default: "20px" }
|
|
19
21
|
},
|
|
20
22
|
emits: ["update:modelValue", "switchChange"],
|
|
21
23
|
setup(__props, { emit: __emit }) {
|
|
@@ -25,6 +27,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
27
|
emit("update:modelValue", !props.modelValue);
|
|
26
28
|
emit("switchChange", !props.modelValue);
|
|
27
29
|
};
|
|
30
|
+
const containerStyle = computed(() => {
|
|
31
|
+
const width = typeof props.width === "number" ? props.width + "px" : props.width;
|
|
32
|
+
const height = typeof props.height === "number" ? props.height + "px" : props.height;
|
|
33
|
+
return {
|
|
34
|
+
backgroundColor: props.modelValue ? props.checkedColor : props.uncheckedColor,
|
|
35
|
+
width,
|
|
36
|
+
height,
|
|
37
|
+
minWidth: width,
|
|
38
|
+
borderRadius: typeof props.height === "number" ? props.height / 2 + "px" : `calc(${props.height} / 2)`
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
const handleStyle = computed(() => {
|
|
42
|
+
const height = typeof props.height === "number" ? props.height + "px" : props.height;
|
|
43
|
+
return {
|
|
44
|
+
width: height,
|
|
45
|
+
height,
|
|
46
|
+
borderRadius: height
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
const handleClass = computed(() => {
|
|
50
|
+
const height = typeof props.height === "number" ? props.height + "px" : props.height;
|
|
51
|
+
return props.modelValue ? "left-[calc(100%-" + height + ")]" : "left-0";
|
|
52
|
+
});
|
|
28
53
|
return (_ctx, _cache) => {
|
|
29
54
|
return openBlock(), createElementBlock("label", _hoisted_1, [
|
|
30
55
|
createElementVNode("input", {
|
|
@@ -33,13 +58,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
58
|
onChange: togglehandle
|
|
34
59
|
}, null, 32),
|
|
35
60
|
createElementVNode("div", {
|
|
36
|
-
class: "relative box-border block
|
|
37
|
-
style: normalizeStyle(
|
|
61
|
+
class: "relative box-border block select-none overflow-hidden outline-0 ring-2 ring-gray-300",
|
|
62
|
+
style: normalizeStyle(containerStyle.value)
|
|
38
63
|
}, [
|
|
39
64
|
createElementVNode("div", {
|
|
40
|
-
class: normalizeClass(["absolute top-0 z-10 block
|
|
41
|
-
|
|
42
|
-
|
|
65
|
+
class: normalizeClass(["absolute top-0 z-10 block bg-slate-50 transition-all", handleClass.value]),
|
|
66
|
+
style: normalizeStyle(handleStyle.value)
|
|
67
|
+
}, null, 6),
|
|
68
|
+
__props.modelValue ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(__props.checkedLabel), 1)) : (openBlock(), createElementBlock("div", _hoisted_3, toDisplayString(__props.uncheckedLabel), 1))
|
|
43
69
|
], 4)
|
|
44
70
|
]);
|
|
45
71
|
};
|
package/dist/js/table/table.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, useSlots, h, nextTick, ref, openBlock, createElementBlock, Fragment, createElementVNode,
|
|
1
|
+
import { defineComponent, computed, useSlots, h, nextTick, normalizeClass, ref, openBlock, createElementBlock, Fragment, createElementVNode, renderList, withDirectives, vModelCheckbox, createCommentVNode, createTextVNode, toDisplayString, createBlock, resolveDynamicComponent, Comment, Text } from "vue";
|
|
2
2
|
import { S as ShapeFlags } from "../shapeFlag/shapeFlag.js";
|
|
3
3
|
const _hoisted_1 = ["width"];
|
|
4
4
|
const _hoisted_2 = { key: 0 };
|
|
@@ -8,11 +8,8 @@ const _hoisted_5 = {
|
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "text-center"
|
|
10
10
|
};
|
|
11
|
-
const _hoisted_6 =
|
|
12
|
-
|
|
13
|
-
for: "checkbox"
|
|
14
|
-
};
|
|
15
|
-
const _hoisted_7 = ["checked", "onChange"];
|
|
11
|
+
const _hoisted_6 = ["for"];
|
|
12
|
+
const _hoisted_7 = ["id", "checked", "onChange"];
|
|
16
13
|
const _hoisted_8 = {
|
|
17
14
|
key: 1,
|
|
18
15
|
class: "text-center"
|
|
@@ -49,7 +46,40 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
46
|
emit("selectionChange", resultArray.value);
|
|
50
47
|
};
|
|
51
48
|
const slots = useSlots();
|
|
49
|
+
const flattenSlots = (nodes) => {
|
|
50
|
+
const result = [];
|
|
51
|
+
for (const node of nodes) {
|
|
52
|
+
if (!node)
|
|
53
|
+
continue;
|
|
54
|
+
if (node.type === Comment || node.type === Text)
|
|
55
|
+
continue;
|
|
56
|
+
if (node.type === Fragment) {
|
|
57
|
+
if (node.children) {
|
|
58
|
+
result.push(...flattenSlots(
|
|
59
|
+
Array.isArray(node.children) ? node.children : [node.children]
|
|
60
|
+
));
|
|
61
|
+
}
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
if (node.shapeFlag & ShapeFlags.ARRAY_CHILDREN) {
|
|
65
|
+
if (node.children) {
|
|
66
|
+
result.push(...flattenSlots(node.children));
|
|
67
|
+
}
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
if (node.shapeFlag & (ShapeFlags.STATEFUL_COMPONENT | ShapeFlags.FUNCTIONAL_COMPONENT | ShapeFlags.SLOTS_CHILDREN)) {
|
|
71
|
+
result.push(node);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return result;
|
|
75
|
+
};
|
|
76
|
+
const validSlots = computed(() => {
|
|
77
|
+
var _a;
|
|
78
|
+
const defaultSlots = ((_a = slots.default) == null ? void 0 : _a.call(slots)) || [];
|
|
79
|
+
return flattenSlots(defaultSlots);
|
|
80
|
+
});
|
|
52
81
|
const groupedSlots = computed(() => {
|
|
82
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
53
83
|
const groups = {
|
|
54
84
|
append: null,
|
|
55
85
|
prepend: null,
|
|
@@ -59,8 +89,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
59
89
|
hasindex: false,
|
|
60
90
|
hascheck: false
|
|
61
91
|
};
|
|
62
|
-
const
|
|
63
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
92
|
+
for (const slot of validSlots.value) {
|
|
64
93
|
const type = (_a = slot.props) == null ? void 0 : _a.type;
|
|
65
94
|
switch (type) {
|
|
66
95
|
case "append":
|
|
@@ -71,59 +100,52 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
100
|
break;
|
|
72
101
|
case "index":
|
|
73
102
|
groups.rest.push({
|
|
74
|
-
type
|
|
75
|
-
prop: (
|
|
76
|
-
label: ((
|
|
77
|
-
width: (
|
|
103
|
+
type,
|
|
104
|
+
prop: (_b = slot.props) == null ? void 0 : _b.prop,
|
|
105
|
+
label: ((_c = slot.props) == null ? void 0 : _c.label) || "",
|
|
106
|
+
width: (_d = slot.props) == null ? void 0 : _d.width
|
|
78
107
|
});
|
|
79
108
|
groups.restLen += 1;
|
|
80
109
|
groups.hasindex = true;
|
|
81
110
|
break;
|
|
82
111
|
case "selection":
|
|
83
112
|
groups.rest.push({
|
|
84
|
-
type
|
|
85
|
-
prop: (
|
|
86
|
-
label: ((
|
|
87
|
-
width: (
|
|
113
|
+
type,
|
|
114
|
+
prop: (_e = slot.props) == null ? void 0 : _e.prop,
|
|
115
|
+
label: ((_f = slot.props) == null ? void 0 : _f.label) || "",
|
|
116
|
+
width: (_g = slot.props) == null ? void 0 : _g.width
|
|
88
117
|
});
|
|
89
118
|
groups.restLen += 1;
|
|
90
119
|
groups.hascheck = true;
|
|
91
120
|
break;
|
|
92
121
|
default:
|
|
93
122
|
groups.rest.push({
|
|
94
|
-
type
|
|
95
|
-
prop: (
|
|
96
|
-
label: ((
|
|
97
|
-
width: (
|
|
123
|
+
type,
|
|
124
|
+
prop: (_h = slot.props) == null ? void 0 : _h.prop,
|
|
125
|
+
label: ((_i = slot.props) == null ? void 0 : _i.label) || "",
|
|
126
|
+
width: (_j = slot.props) == null ? void 0 : _j.width
|
|
98
127
|
});
|
|
99
128
|
groups.restLen += 1;
|
|
100
129
|
groups.normal.push({
|
|
101
|
-
isSlot: Boolean((
|
|
102
|
-
prop: (
|
|
130
|
+
isSlot: Boolean((_k = slot.children) == null ? void 0 : _k.default),
|
|
131
|
+
prop: (_l = slot.props) == null ? void 0 : _l.prop,
|
|
103
132
|
slot
|
|
104
133
|
});
|
|
105
134
|
break;
|
|
106
135
|
}
|
|
107
|
-
}
|
|
108
|
-
slots.default().forEach((node) => {
|
|
109
|
-
if (node.shapeFlag & ShapeFlags.ARRAY_CHILDREN) {
|
|
110
|
-
node.children.forEach(_categorizeSlot);
|
|
111
|
-
} else if (node.shapeFlag & ShapeFlags.STATEFUL_COMPONENT) {
|
|
112
|
-
_categorizeSlot(node);
|
|
113
|
-
}
|
|
114
|
-
});
|
|
136
|
+
}
|
|
115
137
|
return groups;
|
|
116
138
|
});
|
|
117
139
|
const prependSlot = computed(() => groupedSlots.value.prepend);
|
|
118
140
|
const appendSlot = computed(() => groupedSlots.value.append);
|
|
119
|
-
const dynamicPre = (props2) => {
|
|
141
|
+
const dynamicPre = computed(() => (props2) => {
|
|
120
142
|
var _a, _b, _c;
|
|
121
143
|
return (_c = (_a = prependSlot.value) == null ? void 0 : (_b = _a.children).default) == null ? void 0 : _c.call(_b, props2);
|
|
122
|
-
};
|
|
123
|
-
const dynamicAppend = (props2) => {
|
|
144
|
+
});
|
|
145
|
+
const dynamicAppend = computed(() => (props2) => {
|
|
124
146
|
var _a, _b, _c;
|
|
125
147
|
return (_c = (_a = appendSlot.value) == null ? void 0 : (_b = _a.children).default) == null ? void 0 : _c.call(_b, props2);
|
|
126
|
-
};
|
|
148
|
+
});
|
|
127
149
|
const hasindexSlot = computed(() => groupedSlots.value.hasindex);
|
|
128
150
|
const hascheckSlot = computed(() => groupedSlots.value.hascheck);
|
|
129
151
|
const normalSlots = computed(() => groupedSlots.value.normal);
|
|
@@ -146,17 +168,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
146
168
|
nextTick(() => {
|
|
147
169
|
emit("finishRender");
|
|
148
170
|
});
|
|
149
|
-
const dynormalRenderHandle = (
|
|
150
|
-
return
|
|
151
|
-
return
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
171
|
+
const dynormalRenderHandle = computed(() => {
|
|
172
|
+
return (rowprops) => {
|
|
173
|
+
return dynamicnormal.value.map((rh, _) => {
|
|
174
|
+
return h(
|
|
175
|
+
"td",
|
|
176
|
+
{
|
|
177
|
+
class: normalizeClass(["text-center py-2", props.cellclass])
|
|
178
|
+
},
|
|
179
|
+
rh({ row: rowprops.row, index: rowprops.rowindex })
|
|
180
|
+
);
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
});
|
|
160
184
|
const getRowKey = (rowdata, index) => props.idKey ? `row_${rowdata[props.idKey]}` : `row_${index}`;
|
|
161
185
|
const getPreRowkey = (rowdata, index) => props.idKey ? `prepend_${rowdata[props.idKey]}` : `prepend_${index}`;
|
|
162
186
|
const getAppendRowkey = (rowdata, index) => props.idKey ? `append_${rowdata[props.idKey]}` : `append_${index}`;
|
|
@@ -240,7 +264,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
240
264
|
return (_ctx, _cache) => {
|
|
241
265
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
242
266
|
createElementVNode("table", {
|
|
243
|
-
class: normalizeClass(["w-full text-sm",
|
|
267
|
+
class: normalizeClass(["w-full text-sm", __props.tableclass])
|
|
244
268
|
}, [
|
|
245
269
|
createElementVNode("colgroup", null, [
|
|
246
270
|
(openBlock(true), createElementBlock(Fragment, null, renderList(cachedSlots.value, (i, j) => {
|
|
@@ -250,39 +274,41 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
250
274
|
}, null, 8, _hoisted_1);
|
|
251
275
|
}), 128))
|
|
252
276
|
]),
|
|
253
|
-
|
|
277
|
+
__props.showHead ? (openBlock(), createElementBlock("thead", {
|
|
254
278
|
key: 0,
|
|
255
|
-
class: normalizeClass(["text-word6",
|
|
279
|
+
class: normalizeClass(["text-word6", __props.headclass])
|
|
256
280
|
}, [
|
|
257
|
-
(
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
281
|
+
createElementVNode("tr", null, [
|
|
282
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(cachedSlots.value, (i, j) => {
|
|
283
|
+
return openBlock(), createElementBlock("th", {
|
|
284
|
+
class: "font-normal h-10 border-b",
|
|
285
|
+
key: j
|
|
286
|
+
}, [
|
|
287
|
+
i.type === "selection" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
288
|
+
!__props.outSideCheck ? withDirectives((openBlock(), createElementBlock("input", {
|
|
289
|
+
key: 0,
|
|
290
|
+
type: "checkbox",
|
|
291
|
+
class: "appearance-none form-tick h-4 w-4 border border-gray-300 rounded checked:border-transparent checked:bg-blue-600 focus:outline-none",
|
|
292
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => allSelect.value = $event)
|
|
293
|
+
}, null, 512)), [
|
|
294
|
+
[vModelCheckbox, allSelect.value]
|
|
295
|
+
]) : createCommentVNode("", true)
|
|
296
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
297
|
+
createTextVNode(toDisplayString(i.label), 1)
|
|
298
|
+
], 64))
|
|
299
|
+
]);
|
|
300
|
+
}), 128))
|
|
301
|
+
])
|
|
276
302
|
], 2)) : createCommentVNode("", true),
|
|
277
303
|
createElementVNode("tbody", null, [
|
|
278
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
304
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.data, (rowdata, rowindex) => {
|
|
279
305
|
return openBlock(), createElementBlock(Fragment, {
|
|
280
306
|
key: getRowKey(rowdata, rowindex)
|
|
281
307
|
}, [
|
|
282
308
|
prependSlot.value ? (openBlock(), createElementBlock("tr", _hoisted_2, [
|
|
283
309
|
createElementVNode("td", { colspan: colSpan.value }, [
|
|
284
|
-
(openBlock(), createBlock(dynamicPre, {
|
|
285
|
-
row:
|
|
310
|
+
(openBlock(), createBlock(resolveDynamicComponent(dynamicPre.value), {
|
|
311
|
+
row: rowdata,
|
|
286
312
|
index: rowindex,
|
|
287
313
|
key: getPreRowkey(rowdata, rowindex)
|
|
288
314
|
}, null, 8, ["row", "index"]))
|
|
@@ -290,28 +316,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
290
316
|
])) : createCommentVNode("", true),
|
|
291
317
|
createElementVNode("tr", _hoisted_4, [
|
|
292
318
|
hascheckSlot.value ? (openBlock(), createElementBlock("td", _hoisted_5, [
|
|
293
|
-
createElementVNode("label",
|
|
319
|
+
createElementVNode("label", {
|
|
320
|
+
class: "px-1",
|
|
321
|
+
for: `checkbox_${getRowKey(rowdata, rowindex)}`
|
|
322
|
+
}, [
|
|
294
323
|
createElementVNode("input", {
|
|
295
324
|
type: "checkbox",
|
|
296
|
-
|
|
325
|
+
id: `checkbox_${getRowKey(rowdata, rowindex)}`,
|
|
326
|
+
checked: choosedSet.value.has(__props.idKey ? rowdata[__props.idKey] : rowindex),
|
|
297
327
|
onChange: ($event) => checkChange($event, rowdata, rowindex),
|
|
298
328
|
class: "appearance-none form-tick h-4 w-4 border border-gray-300 rounded checked:border-transparent checked:bg-blue-600 text-red-600 focus:outline-none"
|
|
299
329
|
}, null, 40, _hoisted_7)
|
|
300
|
-
])
|
|
330
|
+
], 8, _hoisted_6)
|
|
301
331
|
])) : createCommentVNode("", true),
|
|
302
332
|
hasindexSlot.value ? (openBlock(), createElementBlock("td", _hoisted_8, [
|
|
303
333
|
createElementVNode("div", null, toDisplayString(rowindex + 1), 1)
|
|
304
334
|
])) : createCommentVNode("", true),
|
|
305
|
-
(openBlock(), createBlock(dynormalRenderHandle, {
|
|
306
|
-
row:
|
|
335
|
+
(openBlock(), createBlock(resolveDynamicComponent(dynormalRenderHandle.value), {
|
|
336
|
+
row: rowdata,
|
|
307
337
|
rowindex,
|
|
308
338
|
key: getRowKey(rowdata, rowindex)
|
|
309
339
|
}, null, 8, ["row", "rowindex"]))
|
|
310
340
|
]),
|
|
311
341
|
appendSlot.value ? (openBlock(), createElementBlock("tr", _hoisted_9, [
|
|
312
342
|
createElementVNode("td", { colspan: colSpan.value }, [
|
|
313
|
-
(openBlock(), createBlock(dynamicAppend, {
|
|
314
|
-
row:
|
|
343
|
+
(openBlock(), createBlock(resolveDynamicComponent(dynamicAppend.value), {
|
|
344
|
+
row: rowdata,
|
|
315
345
|
index: rowindex,
|
|
316
346
|
key: getAppendRowkey(rowdata, rowindex)
|
|
317
347
|
}, null, 8, ["row", "index"]))
|