ninemoon-ui 0.0.26 → 0.1.0
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/assets/dialog-a1b585e9.css +9 -0
- package/dist/assets/index-6d2c28a9.css +1210 -0
- package/dist/{tabs.css → assets/tabs-d2c8965f.css} +13 -13
- package/dist/components/alert/alert.d.ts +3 -11
- package/dist/components/alert/alertcomponent.vue.d.ts +22 -11
- package/dist/components/badge/badge.vue.d.ts +40 -31
- package/dist/components/carousel/carousel.vue.d.ts +47 -8
- package/dist/components/carousel/carouselitem.vue.d.ts +4 -2
- package/dist/components/carousel/clickbutton.vue.d.ts +29 -0
- package/dist/components/check/checkbox.vue.d.ts +39 -22
- package/dist/components/check/checkgroup.vue.d.ts +45 -21
- package/dist/components/date/datepicker.vue.d.ts +48 -18
- package/dist/components/date/datepickerRange.vue.d.ts +35 -12
- package/dist/components/dialog/dialog.vue.d.ts +56 -67
- package/dist/components/form/form.vue.d.ts +38 -44
- package/dist/components/form/formlabel.vue.d.ts +40 -35
- package/dist/components/form/type.d.ts +11 -0
- package/dist/components/icon/add.vue.d.ts +2 -0
- package/dist/components/icon/alertTip.vue.d.ts +2 -0
- package/dist/components/icon/arrow.vue.d.ts +2 -0
- package/dist/components/icon/calendar.vue.d.ts +2 -0
- package/dist/components/icon/close.vue.d.ts +2 -0
- package/dist/components/icon/dateArrow.vue.d.ts +2 -0
- package/dist/components/icon/dateArrowplus.vue.d.ts +2 -0
- package/dist/components/icon/delete.vue.d.ts +2 -0
- package/dist/components/icon/ellipsis.vue.d.ts +2 -0
- package/dist/components/icon/errTip.vue.d.ts +2 -0
- package/dist/components/icon/eye.vue.d.ts +2 -0
- package/dist/components/icon/infoTip.vue.d.ts +2 -0
- package/dist/components/icon/minus.vue.d.ts +2 -0
- package/dist/components/icon/successTip.vue.d.ts +2 -0
- package/dist/components/icon/turnleft.vue.d.ts +2 -0
- package/dist/components/icon/turnright.vue.d.ts +2 -0
- package/dist/components/icon/warnTip.vue.d.ts +2 -0
- package/dist/components/image/image.vue.d.ts +39 -29
- package/dist/components/input/input.vue.d.ts +59 -50
- package/dist/components/loadding/loadcomponent.vue.d.ts +24 -4
- package/dist/components/loadding/loadding.d.ts +13 -19
- package/dist/components/menu/menu.vue.d.ts +35 -12
- package/dist/components/message/message.d.ts +69 -14
- package/dist/components/message/messagecomponent.vue.d.ts +8 -15
- package/dist/components/numberInput/numberinput.vue.d.ts +51 -59
- package/dist/components/pagination/pagination.vue.d.ts +59 -27
- package/dist/components/popover/poparrow.d.ts +55 -0
- package/dist/components/popover/popover.vue.d.ts +63 -66
- package/dist/components/radio/radiobox.vue.d.ts +39 -22
- package/dist/components/radio/radiogroup.vue.d.ts +45 -21
- package/dist/components/scrollBar/movebar.vue.d.ts +33 -36
- package/dist/components/scrollBar/scrollBar.vue.d.ts +41 -40
- package/dist/components/scrollloading/scrolllead.d.ts +18 -11
- package/dist/components/select/select.vue.d.ts +55 -37
- package/dist/components/select/selectoption.vue.d.ts +39 -18
- package/dist/components/switch/switch.vue.d.ts +45 -45
- package/dist/components/table/table.vue.d.ts +61 -54
- package/dist/components/table/tableItem.vue.d.ts +49 -56
- package/dist/components/tabs/tabs.vue.d.ts +45 -19
- package/dist/components/tabs/tabsPane.vue.d.ts +25 -12
- package/dist/components/upload/upload.vue.d.ts +53 -53
- package/dist/directives/arrowKeys.d.ts +10 -0
- package/dist/directives/drag.d.ts +20 -0
- package/dist/directives/escape.d.ts +7 -0
- package/dist/directives/outsideclick.d.ts +14 -0
- package/dist/directives/watchwindow.d.ts +13 -0
- package/dist/directives/wheel.d.ts +12 -0
- package/dist/directives/whitespaceclick.d.ts +12 -0
- package/dist/index.d.ts +1524 -2210
- package/dist/js/arrow-ebe47bd0.js +17 -0
- package/dist/js/{badge/badge.js → badge-496028b6.js} +9 -16
- package/dist/js/calendar-5c242731.js +87 -0
- package/dist/js/carousel-10621aeb.js +155 -0
- package/dist/js/{carousel/carouselitem.js → carouselitem-89116745.js} +1 -7
- package/dist/js/checkbox-530025c4.js +50 -0
- package/dist/js/checkgroup-e4e6adbc.js +58 -0
- package/dist/js/dateArrowplus-8181993f.js +25 -0
- package/dist/js/datepicker-ef8b7019.js +362 -0
- package/dist/js/datepickerRange-4c400f88.js +500 -0
- package/dist/js/delete-e898f83c.js +19 -0
- package/dist/js/dialog-0127ca01.js +122 -0
- package/dist/js/form-6ae96387.js +79 -0
- package/dist/js/formlabel-9339bd1c.js +136 -0
- package/dist/js/image-76711716.js +300 -0
- package/dist/js/index-283810a0.js +6261 -0
- package/dist/js/index-b4e420ce.js +958 -0
- package/dist/js/index-e12c8d65.js +36 -0
- package/dist/js/input-11fe67a5.js +107 -0
- package/dist/js/menu-fb9b4a4f.js +86 -0
- package/dist/js/numberinput-00fa4429.js +119 -0
- package/dist/js/pagination-3bcaa109.js +203 -0
- package/dist/js/popover-45f75f86.js +345 -0
- package/dist/js/radiobox-8f11e726.js +49 -0
- package/dist/js/radiogroup-727923c7.js +33 -0
- package/dist/js/scrollBar-07906042.js +252 -0
- package/dist/js/select-b5bbb138.js +203 -0
- package/dist/js/selectoption-00c8f06d.js +57 -0
- package/dist/js/shapeFlag-8cf4bcf1.js +17 -0
- package/dist/js/switch-06ae74cc.js +50 -0
- package/dist/js/table-9bb52630.js +270 -0
- package/dist/js/{table/tableItem.js → tableItem-7d8bf2db.js} +1 -1
- package/dist/js/{tabs/tabs.js → tabs-9d7be734.js} +59 -60
- package/dist/js/{upload/upload.js → upload-16dbef22.js} +10 -26
- package/dist/types/shapeFlag.d.ts +13 -0
- package/dist/{components/utils → utils}/tool.d.ts +12 -5
- package/package.json +1 -1
- package/dist/badge.css +0 -27
- package/dist/carousel.css +0 -13
- package/dist/checkgroup.css +0 -41
- package/dist/components/tree/tree.vue.d.ts +0 -47
- package/dist/datepickerRange.css +0 -79
- package/dist/image.css +0 -8
- package/dist/index.css +0 -917
- package/dist/index.es.js +0 -37
- package/dist/index.umd.js +0 -6080
- package/dist/js/carousel/carousel.js +0 -175
- package/dist/js/check/checkbox.js +0 -16
- package/dist/js/check/checkgroup.js +0 -68
- package/dist/js/date/datepicker.js +0 -373
- package/dist/js/date/datepickerRange.js +0 -597
- package/dist/js/dialog/dialog.js +0 -140
- package/dist/js/form/form.js +0 -87
- package/dist/js/form/formlabel.js +0 -167
- package/dist/js/getcalendar/getcalendar.js +0 -48
- package/dist/js/image/image.js +0 -259
- package/dist/js/index/index.js +0 -873
- package/dist/js/input/input.js +0 -91
- package/dist/js/menu/menu.js +0 -58
- package/dist/js/numberInput/numberinput.js +0 -130
- package/dist/js/pagination/pagination.js +0 -245
- package/dist/js/popover/popover.js +0 -241
- package/dist/js/radio/radiobox.js +0 -16
- package/dist/js/radio/radiogroup.js +0 -68
- package/dist/js/scrollBar/scrollBar.js +0 -208
- package/dist/js/select/select.js +0 -117
- package/dist/js/select/selectoption.js +0 -16
- package/dist/js/switch/switch.js +0 -49
- package/dist/js/table/table.js +0 -215
- package/dist/js/tree/tree.js +0 -72
- package/dist/js/tree/treeleaf.js +0 -118
- package/dist/radiogroup.css +0 -44
- package/dist/scrollBar.css +0 -37
- package/dist/select.css +0 -20
- /package/dist/js/{tabs/tabsPane.js → tabsPane-f024a6bf.js} +0 -0
package/dist/js/switch/switch.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, createElementVNode, normalizeStyle, normalizeClass, toDisplayString } from "vue";
|
|
2
|
-
const _hoisted_1 = { class: "tdd-inline-block tdd-cursor-pointer tdd-select-none tdd-text-xs" };
|
|
3
|
-
const _hoisted_2 = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "tdd-z-10 tdd-absolute tdd-top-0 tdd-font-semibold tdd-text-white tdd-left-1 tdd-leading-5 tdd-rounded-tr-sm tdd-rounded-br-sm"
|
|
6
|
-
};
|
|
7
|
-
const _hoisted_3 = {
|
|
8
|
-
key: 1,
|
|
9
|
-
class: "tdd-z-10 tdd-absolute tdd-top-0 tdd-font-semibold tdd-text-white tdd-right-1 tdd-leading-5 tdd-rounded-tl-sm tdd-rounded-bl-sm"
|
|
10
|
-
};
|
|
11
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
-
__name: "switch",
|
|
13
|
-
props: {
|
|
14
|
-
labelChecked: {},
|
|
15
|
-
labelUnchecked: {},
|
|
16
|
-
colorChecked: { default: "#25b9e9" },
|
|
17
|
-
colorUnchecked: { default: "#666666" },
|
|
18
|
-
modelValue: { type: Boolean, default: false }
|
|
19
|
-
},
|
|
20
|
-
emits: ["update:modelValue", "switchChange"],
|
|
21
|
-
setup(__props, { emit }) {
|
|
22
|
-
const props = __props;
|
|
23
|
-
const togglehandle = () => {
|
|
24
|
-
emit("update:modelValue", !props.modelValue);
|
|
25
|
-
emit("switchChange", !props.modelValue);
|
|
26
|
-
};
|
|
27
|
-
return (_ctx, _cache) => {
|
|
28
|
-
return openBlock(), createElementBlock("label", _hoisted_1, [
|
|
29
|
-
createElementVNode("input", {
|
|
30
|
-
type: "checkbox",
|
|
31
|
-
class: "tdd-hidden",
|
|
32
|
-
onChange: togglehandle
|
|
33
|
-
}, null, 32),
|
|
34
|
-
createElementVNode("div", {
|
|
35
|
-
class: "tdd-relative tdd-m-0 tdd-box-border tdd-block tdd-h-5 tdd-w-10 tdd-transform tdd-select-none tdd-overflow-hidden tdd-rounded-xl tdd-outline-0 tdd-ring-2 tdd-ring-gray-300 tdd-transition",
|
|
36
|
-
style: normalizeStyle({ backgroundColor: _ctx.modelValue ? _ctx.colorChecked : _ctx.colorUnchecked })
|
|
37
|
-
}, [
|
|
38
|
-
createElementVNode("div", {
|
|
39
|
-
class: normalizeClass(["tdd-absolute tdd-top-0 tdd-left-0 tdd-z-10 tdd-block tdd-h-full tdd-w-1/2 tdd-translate-x-0 tdd-transform tdd-rounded-full tdd-bg-slate-50 tdd-transition", { "tdd-translate-x-full ": _ctx.modelValue }])
|
|
40
|
-
}, null, 2)
|
|
41
|
-
], 4),
|
|
42
|
-
_ctx.modelValue ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(_ctx.labelChecked), 1)) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(_ctx.labelUnchecked), 1))
|
|
43
|
-
]);
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
export {
|
|
48
|
-
_sfc_main as default
|
|
49
|
-
};
|
package/dist/js/table/table.js
DELETED
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, useSlots, ref, watch, openBlock, createElementBlock, Fragment, createElementVNode, normalizeClass, createVNode, withDirectives, vShow, h, vModelCheckbox, withModifiers } from "vue";
|
|
2
|
-
const _hoisted_1 = { class: "tdd-text-center tdd-text-word6 tdd-text-base" };
|
|
3
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
-
__name: "table",
|
|
5
|
-
props: {
|
|
6
|
-
data: {},
|
|
7
|
-
whiteword: { default: "" },
|
|
8
|
-
showHead: { type: Boolean, default: true },
|
|
9
|
-
headclass: {},
|
|
10
|
-
cellclass: {},
|
|
11
|
-
tableclass: {}
|
|
12
|
-
},
|
|
13
|
-
emits: ["rowClick", "selectionChange"],
|
|
14
|
-
setup(__props, { expose: __expose, emit }) {
|
|
15
|
-
const props = __props;
|
|
16
|
-
const hasData = computed(() => {
|
|
17
|
-
return props.data.length > 0;
|
|
18
|
-
});
|
|
19
|
-
const slots = useSlots();
|
|
20
|
-
const renderColGroup = () => {
|
|
21
|
-
return h(
|
|
22
|
-
"colgroup",
|
|
23
|
-
null,
|
|
24
|
-
slots.default().map((it, _index) => {
|
|
25
|
-
if (typeof it.children == "string")
|
|
26
|
-
return null;
|
|
27
|
-
if (Array.isArray(it.children)) {
|
|
28
|
-
return it.children.map((itt, _i) => colitemHandle(itt));
|
|
29
|
-
} else {
|
|
30
|
-
return colitemHandle(it);
|
|
31
|
-
}
|
|
32
|
-
})
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
const colitemHandle = (it) => {
|
|
36
|
-
var _a;
|
|
37
|
-
return h("col", {
|
|
38
|
-
width: ((_a = it.props) == null ? void 0 : _a.width) || null
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
const renderHead = () => {
|
|
42
|
-
return h(
|
|
43
|
-
"thead",
|
|
44
|
-
{
|
|
45
|
-
class: normalizeClass(["tdd-text-word6", [props.headclass]])
|
|
46
|
-
},
|
|
47
|
-
slots.default().map((it) => {
|
|
48
|
-
if (typeof it.children == "string")
|
|
49
|
-
return null;
|
|
50
|
-
if (Array.isArray(it.children)) {
|
|
51
|
-
return it.children.map((itt) => {
|
|
52
|
-
return headitemHandle(itt);
|
|
53
|
-
});
|
|
54
|
-
} else {
|
|
55
|
-
return headitemHandle(it);
|
|
56
|
-
}
|
|
57
|
-
})
|
|
58
|
-
);
|
|
59
|
-
};
|
|
60
|
-
const headitemHandle = (it) => {
|
|
61
|
-
var _a;
|
|
62
|
-
return h(
|
|
63
|
-
"th",
|
|
64
|
-
{
|
|
65
|
-
class: "tdd-font-normal tdd-h-10 tdd-border-b "
|
|
66
|
-
},
|
|
67
|
-
it.children && it.children.head ? it.children.head() : ((_a = it.props) == null ? void 0 : _a.type) && it.props.type === "selection" ? h(
|
|
68
|
-
"label",
|
|
69
|
-
{
|
|
70
|
-
class: "tdd-px-1 tdd-flex"
|
|
71
|
-
},
|
|
72
|
-
withDirectives(
|
|
73
|
-
h("input", {
|
|
74
|
-
type: "checkbox",
|
|
75
|
-
"onUpdate:modelValue": (value) => allSelect.value = value,
|
|
76
|
-
class: "tdd-appearance-none form-tick tdd-h-4 tdd-w-4 tdd-border tdd-border-gray-300 tdd-rounded checked:tdd-border-transparent checked:tdd-bg-red-600 tdd-text-red-600 focus:tdd-outline-none"
|
|
77
|
-
}),
|
|
78
|
-
[[vModelCheckbox, allSelect.value]]
|
|
79
|
-
)
|
|
80
|
-
) : it.props.label
|
|
81
|
-
);
|
|
82
|
-
};
|
|
83
|
-
const allSelect = computed({
|
|
84
|
-
set(flag) {
|
|
85
|
-
if (flag) {
|
|
86
|
-
choosed.value = props.data.map((_i, d) => d);
|
|
87
|
-
} else {
|
|
88
|
-
choosed.value = [];
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
get() {
|
|
92
|
-
return hasData.value && choosed.value.length == props.data.length;
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
const choosed = ref([]);
|
|
96
|
-
const clearSelection = () => {
|
|
97
|
-
choosed.value = [];
|
|
98
|
-
};
|
|
99
|
-
const allSelection = () => {
|
|
100
|
-
let temp = [];
|
|
101
|
-
for (let i = 0; i < props.data.length; i++) {
|
|
102
|
-
temp.push(i);
|
|
103
|
-
}
|
|
104
|
-
choosed.value = temp;
|
|
105
|
-
};
|
|
106
|
-
watch(
|
|
107
|
-
choosed,
|
|
108
|
-
(newd) => {
|
|
109
|
-
const res = props.data.filter((_i, d) => newd.includes(d));
|
|
110
|
-
emit("selectionChange", res);
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
deep: true
|
|
114
|
-
}
|
|
115
|
-
);
|
|
116
|
-
const toggleAllSelection = () => {
|
|
117
|
-
let temp = [];
|
|
118
|
-
for (let i = 0; i < props.data.length; i++) {
|
|
119
|
-
temp.push(i);
|
|
120
|
-
}
|
|
121
|
-
choosed.value = temp.filter((i) => !choosed.value.includes(i));
|
|
122
|
-
};
|
|
123
|
-
const toggleSelection = (arr) => {
|
|
124
|
-
choosed.value = arr;
|
|
125
|
-
};
|
|
126
|
-
const renderBody = () => {
|
|
127
|
-
return h(
|
|
128
|
-
"tbody",
|
|
129
|
-
{},
|
|
130
|
-
props.data.map((row, i) => {
|
|
131
|
-
return h(
|
|
132
|
-
"tr",
|
|
133
|
-
{
|
|
134
|
-
class: "tdd-border-b hover:tdd-bg-gray-100",
|
|
135
|
-
key: i,
|
|
136
|
-
onClick: withModifiers(() => {
|
|
137
|
-
emit("rowClick", { row, i });
|
|
138
|
-
}, ["stop"])
|
|
139
|
-
},
|
|
140
|
-
slots.default().map((it, _j) => {
|
|
141
|
-
if (typeof it.children == "string")
|
|
142
|
-
return null;
|
|
143
|
-
if (Array.isArray(it.children)) {
|
|
144
|
-
return it.children.map((itt) => {
|
|
145
|
-
return bodyHandle(row, itt, i);
|
|
146
|
-
});
|
|
147
|
-
} else {
|
|
148
|
-
return bodyHandle(row, it, i);
|
|
149
|
-
}
|
|
150
|
-
})
|
|
151
|
-
);
|
|
152
|
-
})
|
|
153
|
-
);
|
|
154
|
-
};
|
|
155
|
-
const bodyHandle = (row, it, i) => {
|
|
156
|
-
var _a;
|
|
157
|
-
return h(
|
|
158
|
-
"td",
|
|
159
|
-
{
|
|
160
|
-
class: normalizeClass(["tdd-text-center tdd-py-2", [props.cellclass]])
|
|
161
|
-
},
|
|
162
|
-
((_a = it.props) == null ? void 0 : _a.type) && it.props.type === "selection" ? h(
|
|
163
|
-
"label",
|
|
164
|
-
{
|
|
165
|
-
class: "tdd-px-1 tdd-flex",
|
|
166
|
-
for: "checkbox"
|
|
167
|
-
},
|
|
168
|
-
withDirectives(
|
|
169
|
-
h("input", {
|
|
170
|
-
type: "checkbox",
|
|
171
|
-
value: i,
|
|
172
|
-
"onUpdate:modelValue": (value) => {
|
|
173
|
-
choosed.value = value;
|
|
174
|
-
},
|
|
175
|
-
class: "tdd-appearance-none form-tick tdd-h-4 tdd-w-4 tdd-border tdd-border-gray-300 tdd-rounded checked:tdd-border-transparent checked:tdd-bg-red-600 tdd-text-red-600 focus:tdd-outline-none "
|
|
176
|
-
}),
|
|
177
|
-
[[vModelCheckbox, choosed.value]]
|
|
178
|
-
)
|
|
179
|
-
) : h(
|
|
180
|
-
"div",
|
|
181
|
-
null,
|
|
182
|
-
it.children && it.children.default ? it.children.default({
|
|
183
|
-
row,
|
|
184
|
-
index: i
|
|
185
|
-
}) : row[it.props.prop] != null ? row[it.props.prop] : props.whiteword
|
|
186
|
-
)
|
|
187
|
-
);
|
|
188
|
-
};
|
|
189
|
-
__expose({
|
|
190
|
-
clearSelection,
|
|
191
|
-
allSelection,
|
|
192
|
-
toggleAllSelection,
|
|
193
|
-
toggleSelection
|
|
194
|
-
});
|
|
195
|
-
return (_ctx, _cache) => {
|
|
196
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
197
|
-
createElementVNode("table", {
|
|
198
|
-
class: normalizeClass(["tdd-w-full tdd-text-sm", _ctx.tableclass])
|
|
199
|
-
}, [
|
|
200
|
-
createVNode(renderColGroup),
|
|
201
|
-
withDirectives(createVNode(renderHead, null, null, 512), [
|
|
202
|
-
[vShow, _ctx.showHead]
|
|
203
|
-
]),
|
|
204
|
-
createVNode(renderBody)
|
|
205
|
-
], 2),
|
|
206
|
-
withDirectives(createElementVNode("div", _hoisted_1, "暂无数据", 512), [
|
|
207
|
-
[vShow, !hasData.value]
|
|
208
|
-
])
|
|
209
|
-
], 64);
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
export {
|
|
214
|
-
_sfc_main as default
|
|
215
|
-
};
|
package/dist/js/tree/tree.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { defineComponent, defineAsyncComponent, provide, computed, watch, openBlock, createElementBlock, Fragment, renderList, createBlock, unref } from "vue";
|
|
2
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3
|
-
__name: "tree",
|
|
4
|
-
props: {
|
|
5
|
-
data: {},
|
|
6
|
-
defaultExpandAll: { type: Boolean, default: false },
|
|
7
|
-
lazy: { type: Boolean, default: false },
|
|
8
|
-
defaultCheckedKeys: {},
|
|
9
|
-
nodeKey: {}
|
|
10
|
-
},
|
|
11
|
-
setup(__props, { expose: __expose }) {
|
|
12
|
-
const props = __props;
|
|
13
|
-
const Leaf = defineAsyncComponent(() => import("./treeleaf.js"));
|
|
14
|
-
provide("parentlazy", props.lazy);
|
|
15
|
-
const flattenArr = computed(() => {
|
|
16
|
-
let data = flatten(props.data);
|
|
17
|
-
return data;
|
|
18
|
-
});
|
|
19
|
-
const flatten = (list, pid) => {
|
|
20
|
-
let result = [];
|
|
21
|
-
for (let i = 0; i < list.length; i++) {
|
|
22
|
-
let temp = list[i];
|
|
23
|
-
temp.pid = pid;
|
|
24
|
-
temp.checked = false;
|
|
25
|
-
temp.somechecked = false;
|
|
26
|
-
result.push(temp);
|
|
27
|
-
if (Array.isArray(temp.children)) {
|
|
28
|
-
result = result.concat(flatten(temp.children, temp[props.nodeKey]));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return result;
|
|
32
|
-
};
|
|
33
|
-
watch(() => props.defaultCheckedKeys, (newd) => {
|
|
34
|
-
if (newd && newd.length > 0) {
|
|
35
|
-
flattenArr.value.map((i) => {
|
|
36
|
-
if (newd == null ? void 0 : newd.includes(i[props.nodeKey])) {
|
|
37
|
-
i.checked = true;
|
|
38
|
-
} else {
|
|
39
|
-
i.checked = false;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
} else {
|
|
43
|
-
flattenArr.value.map((i) => {
|
|
44
|
-
i.checked = false;
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}, { deep: true });
|
|
48
|
-
const getCheckedKeys = (leafOnly = false) => {
|
|
49
|
-
if (leafOnly) {
|
|
50
|
-
return flattenArr.value.filter((i) => i.somechecked === false || i.checked === true).map((i) => i[props.nodeKey]);
|
|
51
|
-
} else {
|
|
52
|
-
return flattenArr.value.filter((i) => i.checked === true).map((i) => i[props.nodeKey]);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
__expose({
|
|
56
|
-
getCheckedKeys
|
|
57
|
-
});
|
|
58
|
-
return (_ctx, _cache) => {
|
|
59
|
-
return openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (i) => {
|
|
60
|
-
return openBlock(), createBlock(unref(Leaf), {
|
|
61
|
-
item: i,
|
|
62
|
-
deepnum: 1,
|
|
63
|
-
key: i[_ctx.nodeKey],
|
|
64
|
-
nodeKey: _ctx.nodeKey
|
|
65
|
-
}, null, 8, ["item", "nodeKey"]);
|
|
66
|
-
}), 128);
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
export {
|
|
71
|
-
_sfc_main as default
|
|
72
|
-
};
|
package/dist/js/tree/treeleaf.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, inject, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeStyle, normalizeClass, withDirectives, vModelCheckbox, toDisplayString, Fragment, renderList, createBlock, vShow } from "vue";
|
|
2
|
-
const _hoisted_1 = { class: "tdd-flow-root" };
|
|
3
|
-
const _hoisted_2 = /* @__PURE__ */ createElementVNode("polygon", { points: "1,2.5 5,7.5 9,2.5" }, null, -1);
|
|
4
|
-
const _hoisted_3 = [
|
|
5
|
-
_hoisted_2
|
|
6
|
-
];
|
|
7
|
-
const _hoisted_4 = { class: "tdd-flex tdd-items-center" };
|
|
8
|
-
const __default__ = {
|
|
9
|
-
name: "Leaf"
|
|
10
|
-
};
|
|
11
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
-
...__default__,
|
|
13
|
-
props: {
|
|
14
|
-
item: {},
|
|
15
|
-
deepnum: {},
|
|
16
|
-
nodeKey: {}
|
|
17
|
-
},
|
|
18
|
-
setup(__props) {
|
|
19
|
-
const props = __props;
|
|
20
|
-
const marginLeft = computed(() => {
|
|
21
|
-
return `${(props.deepnum - 1) * 16}px`;
|
|
22
|
-
});
|
|
23
|
-
const noshow = ref(inject("parentlazy", false));
|
|
24
|
-
const childList = computed(() => {
|
|
25
|
-
return props.item.children || [];
|
|
26
|
-
});
|
|
27
|
-
const checkedchildLen = computed(() => childList.value.filter((i) => i.checked === true).length);
|
|
28
|
-
const somecheckchildLen = computed(() => childList.value.filter((i) => i.somechecked === true).length);
|
|
29
|
-
const childlenChange = computed(() => childList.value.length);
|
|
30
|
-
watch([checkedchildLen, somecheckchildLen], ([checklen, somechecklen]) => {
|
|
31
|
-
if (checklen > 0) {
|
|
32
|
-
if (checklen === childList.value.length) {
|
|
33
|
-
props.item.checked = true;
|
|
34
|
-
props.item.somechecked = false;
|
|
35
|
-
} else {
|
|
36
|
-
props.item.checked = false;
|
|
37
|
-
props.item.somechecked = true;
|
|
38
|
-
}
|
|
39
|
-
} else if (somechecklen > 0) {
|
|
40
|
-
props.item.checked = false;
|
|
41
|
-
props.item.somechecked = true;
|
|
42
|
-
} else {
|
|
43
|
-
props.item.somechecked = false;
|
|
44
|
-
props.item.checked = false;
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
const ableExpend = computed(() => {
|
|
48
|
-
return childList.value.length > 0 || noshow.value === true;
|
|
49
|
-
});
|
|
50
|
-
const expendflag = ref(false);
|
|
51
|
-
const expendHandle = () => {
|
|
52
|
-
noshow.value = false;
|
|
53
|
-
if (ableExpend.value === false)
|
|
54
|
-
return;
|
|
55
|
-
expendflag.value = !expendflag.value;
|
|
56
|
-
};
|
|
57
|
-
watch(() => [props.item.checked, props.item.somechecked, childlenChange], ([checkflag, somecheckflag]) => {
|
|
58
|
-
if (checkflag === false && somecheckflag === false || checkflag === true) {
|
|
59
|
-
childList.value.map((i) => {
|
|
60
|
-
i.checked = checkflag;
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
}, {
|
|
64
|
-
// immediate: true,
|
|
65
|
-
deep: true
|
|
66
|
-
});
|
|
67
|
-
return (_ctx, _cache) => {
|
|
68
|
-
const _component_Leaf = resolveComponent("Leaf");
|
|
69
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
70
|
-
createElementVNode("div", {
|
|
71
|
-
class: "tdd-flex tdd-items-center",
|
|
72
|
-
style: normalizeStyle({ marginLeft: marginLeft.value })
|
|
73
|
-
}, [
|
|
74
|
-
createElementVNode("div", {
|
|
75
|
-
class: "tdd-ml-1 tdd-flex",
|
|
76
|
-
onClick: expendHandle
|
|
77
|
-
}, [
|
|
78
|
-
(openBlock(), createElementBlock("svg", {
|
|
79
|
-
class: normalizeClass([[expendflag.value ? "tdd-rotate-0" : "-tdd-rotate-90", ableExpend.value ? "tdd-visible" : " tdd-invisible"], "tdd-fill-gray-400 tdd-w-3 tdd-h-3 tdd-transition tdd-inline-block"]),
|
|
80
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
81
|
-
viewBox: "0 0 10 10"
|
|
82
|
-
}, _hoisted_3, 2))
|
|
83
|
-
]),
|
|
84
|
-
createElementVNode("label", _hoisted_4, [
|
|
85
|
-
withDirectives(createElementVNode("input", {
|
|
86
|
-
type: "checkbox",
|
|
87
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.item.checked = $event),
|
|
88
|
-
class: "tdd-appearance-none"
|
|
89
|
-
}, null, 512), [
|
|
90
|
-
[vModelCheckbox, _ctx.item.checked]
|
|
91
|
-
]),
|
|
92
|
-
createElementVNode("div", {
|
|
93
|
-
class: normalizeClass(["tdd-w-3 tdd-h-3 tdd-rounded-sm tdd-border tdd-border-solid tdd-mr-1", {
|
|
94
|
-
"tdd-bg-blue-500 tdd-border-blue-600": _ctx.item.checked == true,
|
|
95
|
-
"tdd-bg-blue-300 tdd-border-blue-400": _ctx.item.somechecked == true,
|
|
96
|
-
"tdd-bg-white": _ctx.item.checked == false && _ctx.item.somechecked == false
|
|
97
|
-
}])
|
|
98
|
-
}, null, 2),
|
|
99
|
-
createElementVNode("div", null, toDisplayString(_ctx.item.label), 1)
|
|
100
|
-
])
|
|
101
|
-
], 4),
|
|
102
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(childList.value, (i) => {
|
|
103
|
-
return withDirectives((openBlock(), createBlock(_component_Leaf, {
|
|
104
|
-
item: i,
|
|
105
|
-
deepnum: _ctx.deepnum + 1,
|
|
106
|
-
nodeKey: _ctx.nodeKey,
|
|
107
|
-
key: i[props.nodeKey]
|
|
108
|
-
}, null, 8, ["item", "deepnum", "nodeKey"])), [
|
|
109
|
-
[vShow, expendflag.value]
|
|
110
|
-
]);
|
|
111
|
-
}), 128))
|
|
112
|
-
]);
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
export {
|
|
117
|
-
_sfc_main as default
|
|
118
|
-
};
|
package/dist/radiogroup.css
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
.radioGroup {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
cursor: pointer;
|
|
5
|
-
align-items: center;
|
|
6
|
-
border-top-width: 1px;
|
|
7
|
-
border-bottom-width: 1px;
|
|
8
|
-
border-right-width: 1px;
|
|
9
|
-
padding-left: 0.5rem;
|
|
10
|
-
padding-right: 0.5rem;
|
|
11
|
-
padding-top: 0.25rem;
|
|
12
|
-
padding-bottom: 0.25rem
|
|
13
|
-
}
|
|
14
|
-
.radioGroup:first-child {
|
|
15
|
-
border-top-left-radius: 0.25rem;
|
|
16
|
-
border-bottom-left-radius: 0.25rem;
|
|
17
|
-
border-left-width: 1px
|
|
18
|
-
}
|
|
19
|
-
.radioGroup:last-child {
|
|
20
|
-
border-top-right-radius: 0.25rem;
|
|
21
|
-
border-bottom-right-radius: 0.25rem
|
|
22
|
-
}
|
|
23
|
-
.radioGroup .hiddeninput {
|
|
24
|
-
height: 1rem;
|
|
25
|
-
width: 1rem;
|
|
26
|
-
-webkit-appearance: none;
|
|
27
|
-
-moz-appearance: none;
|
|
28
|
-
appearance: none;
|
|
29
|
-
border-radius: 9999px;
|
|
30
|
-
border-width: 1px;
|
|
31
|
-
--tw-border-opacity: 1;
|
|
32
|
-
border-color: rgb(209 213 219 / var(--tw-border-opacity));
|
|
33
|
-
--tw-text-opacity: 1;
|
|
34
|
-
color: rgb(220 38 38 / var(--tw-text-opacity))
|
|
35
|
-
}
|
|
36
|
-
.radioGroup .hiddeninput:checked {
|
|
37
|
-
border-color: transparent;
|
|
38
|
-
--tw-bg-opacity: 1;
|
|
39
|
-
background-color: rgb(37 99 235 / var(--tw-bg-opacity))
|
|
40
|
-
}
|
|
41
|
-
.radioGroup .hiddeninput:focus {
|
|
42
|
-
outline: 2px solid transparent;
|
|
43
|
-
outline-offset: 2px
|
|
44
|
-
}
|
package/dist/scrollBar.css
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
.pageScroll .tddScroll {
|
|
3
|
-
height: calc(100% + 15px);
|
|
4
|
-
}
|
|
5
|
-
.pageScroll .thumb {
|
|
6
|
-
height: 0;
|
|
7
|
-
width: 0;
|
|
8
|
-
}
|
|
9
|
-
.pageScroll .ishor {
|
|
10
|
-
height: 6px;
|
|
11
|
-
left: 2px;
|
|
12
|
-
}
|
|
13
|
-
.pageScroll .ishor .thumb {
|
|
14
|
-
border-radius: inherit;
|
|
15
|
-
height: 100%;
|
|
16
|
-
background-color: rgba(144, 146, 152, 0.3);
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
}
|
|
19
|
-
.pageScroll .isver {
|
|
20
|
-
width: 6px;
|
|
21
|
-
top: 2px;
|
|
22
|
-
}
|
|
23
|
-
.pageScroll .isver .thumb {
|
|
24
|
-
border-radius: inherit;
|
|
25
|
-
width: 100%;
|
|
26
|
-
background-color: rgba(144, 146, 152, 0.3);
|
|
27
|
-
cursor: pointer;
|
|
28
|
-
}
|
|
29
|
-
@media screen and (max-width: 767px) {
|
|
30
|
-
.pageScroll .tddScroll {
|
|
31
|
-
overflow-x: auto;
|
|
32
|
-
}
|
|
33
|
-
.pageScroll .thumb {
|
|
34
|
-
height: 0;
|
|
35
|
-
width: 0;
|
|
36
|
-
}
|
|
37
|
-
}
|
package/dist/select.css
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
.selectOption {
|
|
3
|
-
height: 100%;
|
|
4
|
-
padding-top: 0.25rem;
|
|
5
|
-
padding-bottom: 0.25rem
|
|
6
|
-
}
|
|
7
|
-
.selectOption .label {
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
padding: 0.25rem
|
|
10
|
-
}
|
|
11
|
-
.selectOption .label:hover {
|
|
12
|
-
--tw-bg-opacity: 1;
|
|
13
|
-
background-color: rgb(243 244 246 / var(--tw-bg-opacity))
|
|
14
|
-
}
|
|
15
|
-
.selectOption .labelselect {
|
|
16
|
-
--tw-bg-opacity: 1;
|
|
17
|
-
background-color: rgb(219 234 254 / var(--tw-bg-opacity));
|
|
18
|
-
--tw-text-opacity: 1;
|
|
19
|
-
color: rgb(22 119 255 / var(--tw-text-opacity))
|
|
20
|
-
}
|
|
File without changes
|