hzzt-plus 0.0.1-dev-04 → 0.0.1-dev-05
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 -1
- package/dist/index.full.js +124 -47
- package/dist/index.full.min.js +13 -13
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +12 -12
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +124 -48
- package/es/component.mjs +3 -1
- package/es/component.mjs.map +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +1 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/tab/index.d.ts +44 -0
- package/es/components/tab/index.mjs +8 -0
- package/es/components/tab/index.mjs.map +1 -0
- package/es/components/tab/src/index.mjs +78 -0
- package/es/components/tab/src/index.mjs.map +1 -0
- package/es/components/tab/src/index.vue.d.ts +44 -0
- package/es/components/tab/style/css.d.ts +2 -0
- package/es/components/tab/style/css.mjs +3 -0
- package/es/components/tab/style/css.mjs.map +1 -0
- package/es/components/tab/style/index.d.ts +2 -0
- package/es/components/tab/style/index.mjs +3 -0
- package/es/components/tab/style/index.mjs.map +1 -0
- package/es/index.mjs +1 -0
- package/es/index.mjs.map +1 -1
- package/global.d.ts +1 -0
- package/lib/component.js +3 -1
- package/lib/component.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +2 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/tab/index.d.ts +44 -0
- package/lib/components/tab/index.js +13 -0
- package/lib/components/tab/index.js.map +1 -0
- package/lib/components/tab/src/index.js +82 -0
- package/lib/components/tab/src/index.js.map +1 -0
- package/lib/components/tab/src/index.vue.d.ts +44 -0
- package/lib/components/tab/style/css.d.ts +2 -0
- package/lib/components/tab/style/css.js +6 -0
- package/lib/components/tab/style/css.js.map +1 -0
- package/lib/components/tab/style/index.d.ts +2 -0
- package/lib/components/tab/style/index.js +6 -0
- package/lib/components/tab/style/index.js.map +1 -0
- package/lib/index.js +13 -11
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/theme/base.css +1 -1
- package/theme/hzzt-tab.css +1 -0
- package/theme/index.css +1 -1
- package/theme/src/base.scss +1 -1
- package/theme/src/common/{position.scss → display.scss} +35 -0
- package/theme/src/common/font.scss +13 -0
- package/theme/src/index.scss +1 -0
- package/theme/src/tab.scss +63 -0
package/dist/index.full.mjs
CHANGED
|
@@ -7058,20 +7058,20 @@ var _export_sfc = (sfc, props) => {
|
|
|
7058
7058
|
return target;
|
|
7059
7059
|
};
|
|
7060
7060
|
|
|
7061
|
-
const _hoisted_1$
|
|
7061
|
+
const _hoisted_1$3 = {
|
|
7062
7062
|
key: 0,
|
|
7063
7063
|
class: "hzzt-title flex align-items-center"
|
|
7064
7064
|
};
|
|
7065
|
-
const _hoisted_2$
|
|
7065
|
+
const _hoisted_2$3 = {
|
|
7066
7066
|
key: 0,
|
|
7067
7067
|
class: "decorative-line"
|
|
7068
7068
|
};
|
|
7069
|
-
const _hoisted_3$
|
|
7070
|
-
const __default__$
|
|
7069
|
+
const _hoisted_3$3 = { class: "label-name" };
|
|
7070
|
+
const __default__$3 = defineComponent({
|
|
7071
7071
|
name: "HzztTitle"
|
|
7072
7072
|
});
|
|
7073
|
-
const _sfc_main$
|
|
7074
|
-
...__default__$
|
|
7073
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
7074
|
+
...__default__$3,
|
|
7075
7075
|
props: {
|
|
7076
7076
|
label: String,
|
|
7077
7077
|
sideline: {
|
|
@@ -7087,10 +7087,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
7087
7087
|
return props.label || ((_c = (_b = (_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots)) == null ? void 0 : _b[0]) == null ? void 0 : _c.children);
|
|
7088
7088
|
});
|
|
7089
7089
|
return (_ctx, _cache) => {
|
|
7090
|
-
return unref(showLabel) ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
7091
|
-
__props.sideline ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
7090
|
+
return unref(showLabel) ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
7091
|
+
__props.sideline ? (openBlock(), createElementBlock("span", _hoisted_2$3)) : createCommentVNode("v-if", true),
|
|
7092
7092
|
renderSlot(_ctx.$slots, "before"),
|
|
7093
|
-
createElementVNode("label", _hoisted_3$
|
|
7093
|
+
createElementVNode("label", _hoisted_3$3, [
|
|
7094
7094
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
7095
7095
|
createTextVNode(toDisplayString(__props.label), 1)
|
|
7096
7096
|
])
|
|
@@ -7099,7 +7099,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
7099
7099
|
};
|
|
7100
7100
|
}
|
|
7101
7101
|
});
|
|
7102
|
-
var Title = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7102
|
+
var Title = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "index.vue"]]);
|
|
7103
7103
|
|
|
7104
7104
|
const HzztTitle = withInstall(Title);
|
|
7105
7105
|
|
|
@@ -7175,18 +7175,18 @@ const ClickOutside = {
|
|
|
7175
7175
|
}
|
|
7176
7176
|
};
|
|
7177
7177
|
|
|
7178
|
-
const _hoisted_1$
|
|
7179
|
-
const _hoisted_2$
|
|
7180
|
-
const _hoisted_3$
|
|
7181
|
-
const _hoisted_4$
|
|
7182
|
-
const _hoisted_5$
|
|
7183
|
-
const _hoisted_6$
|
|
7184
|
-
const _hoisted_7$
|
|
7185
|
-
const __default__$
|
|
7178
|
+
const _hoisted_1$2 = ["onClick"];
|
|
7179
|
+
const _hoisted_2$2 = { class: "hzzt-dropdown-name" };
|
|
7180
|
+
const _hoisted_3$2 = /* @__PURE__ */ createElementVNode("span", { class: "caret" }, null, -1);
|
|
7181
|
+
const _hoisted_4$2 = { class: "hzzt-dropdown-menu" };
|
|
7182
|
+
const _hoisted_5$2 = ["onClick"];
|
|
7183
|
+
const _hoisted_6$2 = { class: "submenu" };
|
|
7184
|
+
const _hoisted_7$2 = ["onClick"];
|
|
7185
|
+
const __default__$2 = defineComponent({
|
|
7186
7186
|
name: "HzztDropDown"
|
|
7187
7187
|
});
|
|
7188
|
-
const _sfc_main$
|
|
7189
|
-
...__default__$
|
|
7188
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
7189
|
+
...__default__$2,
|
|
7190
7190
|
props: {
|
|
7191
7191
|
options: {
|
|
7192
7192
|
type: Array,
|
|
@@ -7241,9 +7241,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
7241
7241
|
createElementVNode("li", {
|
|
7242
7242
|
class: normalizeClass({ "hzzt-dropdown-li": true, "hzzt-dropdown-li-show": toggle.value })
|
|
7243
7243
|
}, [
|
|
7244
|
-
createElementVNode("span", _hoisted_2$
|
|
7245
|
-
_hoisted_3$
|
|
7246
|
-
createElementVNode("ul", _hoisted_4$
|
|
7244
|
+
createElementVNode("span", _hoisted_2$2, toDisplayString(__props.label), 1),
|
|
7245
|
+
_hoisted_3$2,
|
|
7246
|
+
createElementVNode("ul", _hoisted_4$2, [
|
|
7247
7247
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option, index) => {
|
|
7248
7248
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
7249
7249
|
unref(isEmpty)(option[__props.props.children]) ? (openBlock(), createElementBlock("li", {
|
|
@@ -7253,12 +7253,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
7253
7253
|
createElementVNode("a", {
|
|
7254
7254
|
onClick: ($event) => selectValue([option[__props.props.value]]),
|
|
7255
7255
|
class: "hzzt-dropdown-menu-item-label"
|
|
7256
|
-
}, toDisplayString(option[__props.props.label]), 9, _hoisted_5$
|
|
7256
|
+
}, toDisplayString(option[__props.props.label]), 9, _hoisted_5$2)
|
|
7257
7257
|
], 2)) : (openBlock(), createElementBlock("li", {
|
|
7258
7258
|
key: index + "submenu",
|
|
7259
7259
|
class: "hzzt-dropdown-menu-item hzzt-dropdown-submenu"
|
|
7260
7260
|
}, [
|
|
7261
|
-
createElementVNode("a", _hoisted_6$
|
|
7261
|
+
createElementVNode("a", _hoisted_6$2, toDisplayString(option[__props.props.label]), 1),
|
|
7262
7262
|
createElementVNode("ul", {
|
|
7263
7263
|
class: normalizeClass([["pull-" + __props.position], "hzzt-dropdown-menu"])
|
|
7264
7264
|
}, [
|
|
@@ -7270,7 +7270,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
7270
7270
|
createElementVNode("a", {
|
|
7271
7271
|
onClick: ($event) => selectValue([option[__props.props.value], child[__props.props.value]]),
|
|
7272
7272
|
class: "hzzt-dropdown-menu-item-label"
|
|
7273
|
-
}, toDisplayString(child[__props.props.label]), 9, _hoisted_7$
|
|
7273
|
+
}, toDisplayString(child[__props.props.label]), 9, _hoisted_7$2)
|
|
7274
7274
|
], 2);
|
|
7275
7275
|
}), 128))
|
|
7276
7276
|
], 2)
|
|
@@ -7283,31 +7283,31 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
7283
7283
|
}), 256))
|
|
7284
7284
|
])
|
|
7285
7285
|
], 2)
|
|
7286
|
-
], 8, _hoisted_1$
|
|
7286
|
+
], 8, _hoisted_1$2)), [
|
|
7287
7287
|
[unref(ClickOutside), close]
|
|
7288
7288
|
]);
|
|
7289
7289
|
};
|
|
7290
7290
|
}
|
|
7291
7291
|
});
|
|
7292
|
-
var Dropdown = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7292
|
+
var Dropdown = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "index.vue"]]);
|
|
7293
7293
|
|
|
7294
7294
|
const HzztDropdown = withInstall(Dropdown);
|
|
7295
7295
|
|
|
7296
|
-
const _hoisted_1 = { class: "hzzt-collapse" };
|
|
7297
|
-
const _hoisted_2 = { class: "flex align-items-center" };
|
|
7298
|
-
const _hoisted_3 = { class: "hzzt-collapse-title-wrapper" };
|
|
7299
|
-
const _hoisted_4 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-title-block" }, null, -1);
|
|
7300
|
-
const _hoisted_5 = { class: "hzzt-collapse-title" };
|
|
7301
|
-
const _hoisted_6 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-line" }, null, -1);
|
|
7302
|
-
const _hoisted_7 = {
|
|
7296
|
+
const _hoisted_1$1 = { class: "hzzt-collapse" };
|
|
7297
|
+
const _hoisted_2$1 = { class: "flex align-items-center" };
|
|
7298
|
+
const _hoisted_3$1 = { class: "hzzt-collapse-title-wrapper" };
|
|
7299
|
+
const _hoisted_4$1 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-title-block" }, null, -1);
|
|
7300
|
+
const _hoisted_5$1 = { class: "hzzt-collapse-title" };
|
|
7301
|
+
const _hoisted_6$1 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-line" }, null, -1);
|
|
7302
|
+
const _hoisted_7$1 = {
|
|
7303
7303
|
key: 0,
|
|
7304
7304
|
class: "hzzt-collapse-text"
|
|
7305
7305
|
};
|
|
7306
|
-
const __default__ = defineComponent({
|
|
7306
|
+
const __default__$1 = defineComponent({
|
|
7307
7307
|
name: "HzztCollapse"
|
|
7308
7308
|
});
|
|
7309
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7310
|
-
...__default__,
|
|
7309
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
7310
|
+
...__default__$1,
|
|
7311
7311
|
props: {
|
|
7312
7312
|
defaultActive: {
|
|
7313
7313
|
type: Boolean,
|
|
@@ -7334,19 +7334,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7334
7334
|
active.value = !active.value;
|
|
7335
7335
|
}
|
|
7336
7336
|
return (_ctx, _cache) => {
|
|
7337
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
7337
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
7338
7338
|
createElementVNode("div", {
|
|
7339
7339
|
class: "hzzt-collapse-header",
|
|
7340
7340
|
onClick: toggle
|
|
7341
7341
|
}, [
|
|
7342
|
-
createElementVNode("div", _hoisted_2, [
|
|
7343
|
-
createElementVNode("div", _hoisted_3, [
|
|
7344
|
-
_hoisted_4,
|
|
7345
|
-
createElementVNode("div", _hoisted_5, toDisplayString(__props.title), 1)
|
|
7342
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
7343
|
+
createElementVNode("div", _hoisted_3$1, [
|
|
7344
|
+
_hoisted_4$1,
|
|
7345
|
+
createElementVNode("div", _hoisted_5$1, toDisplayString(__props.title), 1)
|
|
7346
7346
|
]),
|
|
7347
|
-
_hoisted_6
|
|
7347
|
+
_hoisted_6$1
|
|
7348
7348
|
]),
|
|
7349
|
-
__props.expand ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(active.value ? unref(t)("hzzt.collapse.retract") : unref(t)("hzzt.collapse.expand")), 1)) : createCommentVNode("v-if", true)
|
|
7349
|
+
__props.expand ? (openBlock(), createElementBlock("span", _hoisted_7$1, toDisplayString(active.value ? unref(t)("hzzt.collapse.retract") : unref(t)("hzzt.collapse.expand")), 1)) : createCommentVNode("v-if", true)
|
|
7350
7350
|
]),
|
|
7351
7351
|
renderSlot(_ctx.$slots, "active", { active: active.value }),
|
|
7352
7352
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -7354,15 +7354,91 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7354
7354
|
};
|
|
7355
7355
|
}
|
|
7356
7356
|
});
|
|
7357
|
-
var Collapse = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "index.vue"]]);
|
|
7357
|
+
var Collapse = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "index.vue"]]);
|
|
7358
7358
|
|
|
7359
7359
|
const HzztCollapse = withInstall(Collapse);
|
|
7360
7360
|
|
|
7361
|
+
const _hoisted_1 = { class: "hzzt-tab flex align-items-center justify-content-between wrap" };
|
|
7362
|
+
const _hoisted_2 = { class: "flex align-items-center" };
|
|
7363
|
+
const _hoisted_3 = { class: "flex" };
|
|
7364
|
+
const _hoisted_4 = ["onClick"];
|
|
7365
|
+
const _hoisted_5 = { class: "hzzt-tab-badge" };
|
|
7366
|
+
const _hoisted_6 = {
|
|
7367
|
+
key: 0,
|
|
7368
|
+
class: "hzzt-tab-badge-count"
|
|
7369
|
+
};
|
|
7370
|
+
const _hoisted_7 = { class: "flex wrap" };
|
|
7371
|
+
const __default__ = defineComponent({
|
|
7372
|
+
name: "HzztTab"
|
|
7373
|
+
});
|
|
7374
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7375
|
+
...__default__,
|
|
7376
|
+
props: {
|
|
7377
|
+
tabList: {
|
|
7378
|
+
type: Array,
|
|
7379
|
+
default: () => []
|
|
7380
|
+
},
|
|
7381
|
+
modelValue: {
|
|
7382
|
+
type: [Number, String, Array]
|
|
7383
|
+
}
|
|
7384
|
+
},
|
|
7385
|
+
emits: ["update:modelValue", "tab-click"],
|
|
7386
|
+
setup(__props, { emit }) {
|
|
7387
|
+
const props = __props;
|
|
7388
|
+
const customTabList = computed(() => props.tabList.map((value) => {
|
|
7389
|
+
const tab = value;
|
|
7390
|
+
return {
|
|
7391
|
+
key: tab.name + "-" + tab.number,
|
|
7392
|
+
...tab,
|
|
7393
|
+
number: Number(tab.number || 0),
|
|
7394
|
+
hide: tab.hide
|
|
7395
|
+
};
|
|
7396
|
+
}).filter((tab) => !tab.hide));
|
|
7397
|
+
function tabClick(tab, event) {
|
|
7398
|
+
if (tab.name === props.modelValue)
|
|
7399
|
+
return;
|
|
7400
|
+
emit("update:modelValue", tab.name);
|
|
7401
|
+
emit("tab-click", tab, event);
|
|
7402
|
+
}
|
|
7403
|
+
return (_ctx, _cache) => {
|
|
7404
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
7405
|
+
createElementVNode("div", _hoisted_2, [
|
|
7406
|
+
createElementVNode("div", _hoisted_3, [
|
|
7407
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(customTabList), (tab) => {
|
|
7408
|
+
return openBlock(), createElementBlock("div", {
|
|
7409
|
+
key: tab.key,
|
|
7410
|
+
onClick: ($event) => tabClick(tab, $event),
|
|
7411
|
+
class: "hzzt-tab-pane"
|
|
7412
|
+
}, [
|
|
7413
|
+
createElementVNode("div", _hoisted_5, [
|
|
7414
|
+
createElementVNode("p", {
|
|
7415
|
+
class: normalizeClass([{ active: __props.modelValue === tab.name }, "hzzt-tab-badge-text"])
|
|
7416
|
+
}, toDisplayString(tab.label), 3),
|
|
7417
|
+
tab.number && tab.number !== 0 ? (openBlock(), createElementBlock("p", _hoisted_6, toDisplayString(tab.number > 999 ? "999+" : tab.number), 1)) : createCommentVNode("v-if", true)
|
|
7418
|
+
])
|
|
7419
|
+
], 8, _hoisted_4);
|
|
7420
|
+
}), 128))
|
|
7421
|
+
]),
|
|
7422
|
+
renderSlot(_ctx.$slots, "filter"),
|
|
7423
|
+
renderSlot(_ctx.$slots, "extra")
|
|
7424
|
+
]),
|
|
7425
|
+
createElementVNode("div", _hoisted_7, [
|
|
7426
|
+
renderSlot(_ctx.$slots, "right")
|
|
7427
|
+
])
|
|
7428
|
+
]);
|
|
7429
|
+
};
|
|
7430
|
+
}
|
|
7431
|
+
});
|
|
7432
|
+
var Tab = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "index.vue"]]);
|
|
7433
|
+
|
|
7434
|
+
const HzztTab = withInstall(Tab);
|
|
7435
|
+
|
|
7361
7436
|
var Components = [
|
|
7362
7437
|
HzztConfigProvider,
|
|
7363
7438
|
HzztTitle,
|
|
7364
7439
|
HzztDropdown,
|
|
7365
|
-
HzztCollapse
|
|
7440
|
+
HzztCollapse,
|
|
7441
|
+
HzztTab
|
|
7366
7442
|
];
|
|
7367
7443
|
|
|
7368
7444
|
var Plugins = [];
|
|
@@ -7372,4 +7448,4 @@ var installer = makeInstaller([...Components, ...Plugins]);
|
|
|
7372
7448
|
const install = installer.install;
|
|
7373
7449
|
const version = installer.version;
|
|
7374
7450
|
|
|
7375
|
-
export { HzztCollapse, HzztConfigProvider, HzztDropdown, HzztTitle, INSTALLED_KEY, SIZE_INJECTION_KEY, WEEK_DAYS, buildLocaleContext, buildTranslator, componentSizeMap, componentSizes, configProviderContextKey, configProviderProps, datePickTypes, installer as default, install, localeContextKey, makeInstaller, provideGlobalConfig, translate, useGlobalConfig, useGlobalSize, useLocale, useSizeProp, useSizeProps, version };
|
|
7451
|
+
export { HzztCollapse, HzztConfigProvider, HzztDropdown, HzztTab, HzztTitle, INSTALLED_KEY, SIZE_INJECTION_KEY, WEEK_DAYS, buildLocaleContext, buildTranslator, componentSizeMap, componentSizes, configProviderContextKey, configProviderProps, datePickTypes, installer as default, install, localeContextKey, makeInstaller, provideGlobalConfig, translate, useGlobalConfig, useGlobalSize, useLocale, useSizeProp, useSizeProps, version };
|
package/es/component.mjs
CHANGED
|
@@ -2,12 +2,14 @@ import { HzztTitle } from './components/title/index.mjs';
|
|
|
2
2
|
import { HzztDropdown } from './components/dropdown/index.mjs';
|
|
3
3
|
import { HzztCollapse } from './components/collapse/index.mjs';
|
|
4
4
|
import { HzztConfigProvider } from './components/config-provider/index.mjs';
|
|
5
|
+
import { HzztTab } from './components/tab/index.mjs';
|
|
5
6
|
|
|
6
7
|
var Components = [
|
|
7
8
|
HzztConfigProvider,
|
|
8
9
|
HzztTitle,
|
|
9
10
|
HzztDropdown,
|
|
10
|
-
HzztCollapse
|
|
11
|
+
HzztCollapse,
|
|
12
|
+
HzztTab
|
|
11
13
|
];
|
|
12
14
|
|
|
13
15
|
export { Components as default };
|
package/es/component.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.mjs","sources":["../../../packages/hzzt-plus/component.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"component.mjs","sources":["../../../packages/hzzt-plus/component.ts"],"sourcesContent":["import {HzztTitle} from '@hzzt-plus/components/title'\nimport {HzztDropdown} from '@hzzt-plus/components/dropdown'\nimport {HzztCollapse} from '@hzzt-plus/components/collapse'\nimport {HzztConfigProvider} from '@hzzt-plus/components/config-provider'\nimport {HzztTab} from '@hzzt-plus/components/tab'\n\nimport type {Plugin} from 'vue'\n\nexport default [\n HzztConfigProvider,\n HzztTitle,\n HzztDropdown,\n HzztCollapse,\n HzztTab,\n] as Plugin[]\n"],"names":[],"mappings":";;;;;;AAKA,iBAAe;AACf,EAAE,kBAAkB;AACpB,EAAE,SAAS;AACX,EAAE,YAAY;AACd,EAAE,YAAY;AACd,EAAE,OAAO;AACT,CAAC;;;;"}
|
package/es/components/index.d.ts
CHANGED
package/es/components/index.mjs
CHANGED
|
@@ -2,6 +2,7 @@ export { HzztTitle } from './title/index.mjs';
|
|
|
2
2
|
export { HzztDropdown } from './dropdown/index.mjs';
|
|
3
3
|
export { HzztCollapse } from './collapse/index.mjs';
|
|
4
4
|
export { HzztConfigProvider } from './config-provider/index.mjs';
|
|
5
|
+
export { HzztTab } from './tab/index.mjs';
|
|
5
6
|
export { configProviderProps } from './config-provider/src/config-provider-props.mjs';
|
|
6
7
|
export { configProviderContextKey } from './config-provider/src/constants.mjs';
|
|
7
8
|
export { provideGlobalConfig, useGlobalConfig } from './config-provider/src/hooks/use-global-config.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const HzztTab: import("hzzt-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
tabList: {
|
|
3
|
+
type: ArrayConstructor;
|
|
4
|
+
default: () => never[];
|
|
5
|
+
};
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
8
|
+
};
|
|
9
|
+
}, {
|
|
10
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
tabList: {
|
|
12
|
+
type: ArrayConstructor;
|
|
13
|
+
default: () => never[];
|
|
14
|
+
};
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
17
|
+
};
|
|
18
|
+
}>> & {
|
|
19
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
"onTab-click"?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
}>>;
|
|
22
|
+
emit: (event: "update:modelValue" | "tab-click", ...args: any[]) => void;
|
|
23
|
+
customTabList: import("vue").ComputedRef<{
|
|
24
|
+
number: number;
|
|
25
|
+
hide: boolean;
|
|
26
|
+
name: string;
|
|
27
|
+
key: string;
|
|
28
|
+
}[]>;
|
|
29
|
+
tabClick: (tab: any, event: any) => void;
|
|
30
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "tab-click")[], "update:modelValue" | "tab-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
|
+
tabList: {
|
|
32
|
+
type: ArrayConstructor;
|
|
33
|
+
default: () => never[];
|
|
34
|
+
};
|
|
35
|
+
modelValue: {
|
|
36
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
37
|
+
};
|
|
38
|
+
}>> & {
|
|
39
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
40
|
+
"onTab-click"?: ((...args: any[]) => any) | undefined;
|
|
41
|
+
}, {
|
|
42
|
+
tabList: unknown[];
|
|
43
|
+
}>> & Record<string, any>;
|
|
44
|
+
export default HzztTab;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/tab/index.ts"],"sourcesContent":["import { withInstall } from '@hzzt-plus/utils'\n\nimport Tab from './src/index.vue';\n\nexport const HzztTab = withInstall(Tab);\nexport default HzztTab\n"],"names":[],"mappings":";;;;AAEY,MAAC,OAAO,GAAG,WAAW,CAAC,GAAG;;;;"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, Fragment, renderList, unref, normalizeClass, toDisplayString, createCommentVNode, renderSlot } from 'vue';
|
|
2
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
3
|
+
|
|
4
|
+
const _hoisted_1 = { class: "hzzt-tab flex align-items-center justify-content-between wrap" };
|
|
5
|
+
const _hoisted_2 = { class: "flex align-items-center" };
|
|
6
|
+
const _hoisted_3 = { class: "flex" };
|
|
7
|
+
const _hoisted_4 = ["onClick"];
|
|
8
|
+
const _hoisted_5 = { class: "hzzt-tab-badge" };
|
|
9
|
+
const _hoisted_6 = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "hzzt-tab-badge-count"
|
|
12
|
+
};
|
|
13
|
+
const _hoisted_7 = { class: "flex wrap" };
|
|
14
|
+
const __default__ = defineComponent({
|
|
15
|
+
name: "HzztTab"
|
|
16
|
+
});
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
|
+
...__default__,
|
|
19
|
+
props: {
|
|
20
|
+
tabList: {
|
|
21
|
+
type: Array,
|
|
22
|
+
default: () => []
|
|
23
|
+
},
|
|
24
|
+
modelValue: {
|
|
25
|
+
type: [Number, String, Array]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
emits: ["update:modelValue", "tab-click"],
|
|
29
|
+
setup(__props, { emit }) {
|
|
30
|
+
const props = __props;
|
|
31
|
+
const customTabList = computed(() => props.tabList.map((value) => {
|
|
32
|
+
const tab = value;
|
|
33
|
+
return {
|
|
34
|
+
key: tab.name + "-" + tab.number,
|
|
35
|
+
...tab,
|
|
36
|
+
number: Number(tab.number || 0),
|
|
37
|
+
hide: tab.hide
|
|
38
|
+
};
|
|
39
|
+
}).filter((tab) => !tab.hide));
|
|
40
|
+
function tabClick(tab, event) {
|
|
41
|
+
if (tab.name === props.modelValue)
|
|
42
|
+
return;
|
|
43
|
+
emit("update:modelValue", tab.name);
|
|
44
|
+
emit("tab-click", tab, event);
|
|
45
|
+
}
|
|
46
|
+
return (_ctx, _cache) => {
|
|
47
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
48
|
+
createElementVNode("div", _hoisted_2, [
|
|
49
|
+
createElementVNode("div", _hoisted_3, [
|
|
50
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(customTabList), (tab) => {
|
|
51
|
+
return openBlock(), createElementBlock("div", {
|
|
52
|
+
key: tab.key,
|
|
53
|
+
onClick: ($event) => tabClick(tab, $event),
|
|
54
|
+
class: "hzzt-tab-pane"
|
|
55
|
+
}, [
|
|
56
|
+
createElementVNode("div", _hoisted_5, [
|
|
57
|
+
createElementVNode("p", {
|
|
58
|
+
class: normalizeClass([{ active: __props.modelValue === tab.name }, "hzzt-tab-badge-text"])
|
|
59
|
+
}, toDisplayString(tab.label), 3),
|
|
60
|
+
tab.number && tab.number !== 0 ? (openBlock(), createElementBlock("p", _hoisted_6, toDisplayString(tab.number > 999 ? "999+" : tab.number), 1)) : createCommentVNode("v-if", true)
|
|
61
|
+
])
|
|
62
|
+
], 8, _hoisted_4);
|
|
63
|
+
}), 128))
|
|
64
|
+
]),
|
|
65
|
+
renderSlot(_ctx.$slots, "filter"),
|
|
66
|
+
renderSlot(_ctx.$slots, "extra")
|
|
67
|
+
]),
|
|
68
|
+
createElementVNode("div", _hoisted_7, [
|
|
69
|
+
renderSlot(_ctx.$slots, "right")
|
|
70
|
+
])
|
|
71
|
+
]);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
var Tab = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "index.vue"]]);
|
|
76
|
+
|
|
77
|
+
export { Tab as default };
|
|
78
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/tab/src/index.vue"],"sourcesContent":["<template>\n <div class=\"hzzt-tab flex align-items-center justify-content-between wrap\">\n <div class=\"flex align-items-center\">\n <div class=\"flex\">\n <div :key=\"tab.key\" @click=\"tabClick(tab, $event)\" class=\"hzzt-tab-pane\" v-for=\"tab in customTabList\">\n <div class=\"hzzt-tab-badge\">\n <p :class=\"{ active: modelValue === tab.name }\" class=\"hzzt-tab-badge-text\">{{ tab.label }}</p>\n <p class=\"hzzt-tab-badge-count\" v-if=\"tab.number && tab.number !== 0\">{{\n tab.number > 999 ? '999+' : tab.number\n }}</p>\n </div>\n </div>\n </div>\n <slot name=\"filter\"></slot>\n <slot name=\"extra\" />\n </div>\n <div class=\"flex wrap\">\n <slot name=\"right\" />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n\n import {computed} from 'vue';\n\n defineOptions({\n name: 'HzztTab'\n })\n\n declare type Tab = {\n name: string,\n number: number,\n hide: boolean\n }\n\n const props = defineProps({\n tabList: {\n type: Array,\n default: () => [],\n },\n modelValue: {\n type: [Number, String, Array],\n },\n })\n\n const emit = defineEmits(['update:modelValue', 'tab-click'])\n\n const customTabList = computed(() => props.tabList.map(value => {\n const tab = value as Tab;\n return {\n key: (tab.name + '-' + tab.number) as string,\n ...tab,\n number: Number(tab.number || 0),\n hide: tab.hide,\n }\n }).filter((tab) => !tab.hide))\n\n function tabClick(tab, event) {\n if (tab.name === props.modelValue) return;\n emit('update:modelValue', tab.name);\n emit('tab-click', tab, event);\n }\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;mCA0BgB,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;AAoBA,IAAA,MAAM,gBAAgB,QAAS,CAAA,MAAM,KAAM,CAAA,OAAA,CAAQ,IAAI,CAAS,KAAA,KAAA;AAC9D,MAAA,MAAM,GAAM,GAAA,KAAA,CAAA;AACZ,MAAO,OAAA;AAAA,QACL,GAAM,EAAA,GAAA,CAAI,IAAO,GAAA,GAAA,GAAM,GAAI,CAAA,MAAA;AAAA,QAC3B,GAAG,GAAA;AAAA,QACH,MAAQ,EAAA,MAAA,CAAO,GAAI,CAAA,MAAA,IAAU,CAAC,CAAA;AAAA,QAC9B,MAAM,GAAI,CAAA,IAAA;AAAA,OACZ,CAAA;AAAA,KACD,EAAE,MAAO,CAAA,CAAC,QAAQ,CAAC,GAAA,CAAI,IAAI,CAAC,CAAA,CAAA;AAE7B,IAAA,SAAA,QAAA,CAAkB,KAAK,KAAO,EAAA;AAC5B,MAAI,IAAA,GAAA,CAAI,SAAS,KAAM,CAAA,UAAA;AAAY,QAAA,OAAA;AACnC,MAAK,IAAA,CAAA,mBAAA,EAAqB,IAAI,IAAI,CAAA,CAAA;AAClC,MAAK,IAAA,CAAA,WAAA,EAAa,KAAK,KAAK,CAAA,CAAA;AAAA,KAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
tabList: {
|
|
3
|
+
type: ArrayConstructor;
|
|
4
|
+
default: () => never[];
|
|
5
|
+
};
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
8
|
+
};
|
|
9
|
+
}, {
|
|
10
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
tabList: {
|
|
12
|
+
type: ArrayConstructor;
|
|
13
|
+
default: () => never[];
|
|
14
|
+
};
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
17
|
+
};
|
|
18
|
+
}>> & {
|
|
19
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
"onTab-click"?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
}>>;
|
|
22
|
+
emit: (event: "update:modelValue" | "tab-click", ...args: any[]) => void;
|
|
23
|
+
customTabList: import("vue").ComputedRef<{
|
|
24
|
+
number: number;
|
|
25
|
+
hide: boolean;
|
|
26
|
+
name: string;
|
|
27
|
+
key: string;
|
|
28
|
+
}[]>;
|
|
29
|
+
tabClick: (tab: any, event: any) => void;
|
|
30
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "tab-click")[], "update:modelValue" | "tab-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
|
+
tabList: {
|
|
32
|
+
type: ArrayConstructor;
|
|
33
|
+
default: () => never[];
|
|
34
|
+
};
|
|
35
|
+
modelValue: {
|
|
36
|
+
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
37
|
+
};
|
|
38
|
+
}>> & {
|
|
39
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
40
|
+
"onTab-click"?: ((...args: any[]) => any) | undefined;
|
|
41
|
+
}, {
|
|
42
|
+
tabList: unknown[];
|
|
43
|
+
}>;
|
|
44
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/es/index.mjs
CHANGED
|
@@ -11,6 +11,7 @@ export { configProviderProps } from './components/config-provider/src/config-pro
|
|
|
11
11
|
export { configProviderContextKey } from './components/config-provider/src/constants.mjs';
|
|
12
12
|
export { provideGlobalConfig, useGlobalConfig } from './components/config-provider/src/hooks/use-global-config.mjs';
|
|
13
13
|
export { HzztConfigProvider } from './components/config-provider/index.mjs';
|
|
14
|
+
export { HzztTab } from './components/tab/index.mjs';
|
|
14
15
|
export { INSTALLED_KEY } from './constants/key.mjs';
|
|
15
16
|
export { componentSizeMap, componentSizes } from './constants/size.mjs';
|
|
16
17
|
export { WEEK_DAYS, datePickTypes } from './constants/date.mjs';
|
package/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../packages/hzzt-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@hzzt-plus/components'\nexport * from '@hzzt-plus/constants'\nexport * from '@hzzt-plus/hooks'\nexport * from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../packages/hzzt-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@hzzt-plus/components'\nexport * from '@hzzt-plus/constants'\nexport * from '@hzzt-plus/hooks'\nexport * from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAKY,MAAC,OAAO,GAAG,SAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAG,SAAS,CAAC;;;;"}
|
package/global.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ declare module 'vue' {
|
|
|
5
5
|
HzztDropdown: typeof import('hzzt-plus')['HzztDropdown']
|
|
6
6
|
HzztCollapse: typeof import('hzzt-plus')['HzztCollapse']
|
|
7
7
|
HzztConfigProvider: typeof import('hzzt-plus')['HzztConfigProvider']
|
|
8
|
+
HzztTab: typeof import('hzzt-plus')['HzztTab']
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
11
|
|
package/lib/component.js
CHANGED
|
@@ -6,12 +6,14 @@ var index$1 = require('./components/title/index.js');
|
|
|
6
6
|
var index$2 = require('./components/dropdown/index.js');
|
|
7
7
|
var index$3 = require('./components/collapse/index.js');
|
|
8
8
|
var index = require('./components/config-provider/index.js');
|
|
9
|
+
var index$4 = require('./components/tab/index.js');
|
|
9
10
|
|
|
10
11
|
var Components = [
|
|
11
12
|
index.HzztConfigProvider,
|
|
12
13
|
index$1.HzztTitle,
|
|
13
14
|
index$2.HzztDropdown,
|
|
14
|
-
index$3.HzztCollapse
|
|
15
|
+
index$3.HzztCollapse,
|
|
16
|
+
index$4.HzztTab
|
|
15
17
|
];
|
|
16
18
|
|
|
17
19
|
exports["default"] = Components;
|
package/lib/component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../packages/hzzt-plus/component.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../packages/hzzt-plus/component.ts"],"sourcesContent":["import {HzztTitle} from '@hzzt-plus/components/title'\nimport {HzztDropdown} from '@hzzt-plus/components/dropdown'\nimport {HzztCollapse} from '@hzzt-plus/components/collapse'\nimport {HzztConfigProvider} from '@hzzt-plus/components/config-provider'\nimport {HzztTab} from '@hzzt-plus/components/tab'\n\nimport type {Plugin} from 'vue'\n\nexport default [\n HzztConfigProvider,\n HzztTitle,\n HzztDropdown,\n HzztCollapse,\n HzztTab,\n] as Plugin[]\n"],"names":["HzztConfigProvider","HzztTitle","HzztDropdown","HzztCollapse","HzztTab"],"mappings":";;;;;;;;;;AAKA,iBAAe;AACf,EAAEA,wBAAkB;AACpB,EAAEC,iBAAS;AACX,EAAEC,oBAAY;AACd,EAAEC,oBAAY;AACd,EAAEC,eAAO;AACT,CAAC;;;;"}
|
package/lib/components/index.js
CHANGED
|
@@ -6,6 +6,7 @@ var index = require('./title/index.js');
|
|
|
6
6
|
var index$1 = require('./dropdown/index.js');
|
|
7
7
|
var index$2 = require('./collapse/index.js');
|
|
8
8
|
var index$3 = require('./config-provider/index.js');
|
|
9
|
+
var index$4 = require('./tab/index.js');
|
|
9
10
|
var configProviderProps = require('./config-provider/src/config-provider-props.js');
|
|
10
11
|
var constants = require('./config-provider/src/constants.js');
|
|
11
12
|
var useGlobalConfig = require('./config-provider/src/hooks/use-global-config.js');
|
|
@@ -16,6 +17,7 @@ exports.HzztTitle = index.HzztTitle;
|
|
|
16
17
|
exports.HzztDropdown = index$1.HzztDropdown;
|
|
17
18
|
exports.HzztCollapse = index$2.HzztCollapse;
|
|
18
19
|
exports.HzztConfigProvider = index$3.HzztConfigProvider;
|
|
20
|
+
exports.HzztTab = index$4.HzztTab;
|
|
19
21
|
exports.configProviderProps = configProviderProps.configProviderProps;
|
|
20
22
|
exports.configProviderContextKey = constants.configProviderContextKey;
|
|
21
23
|
exports.provideGlobalConfig = useGlobalConfig.provideGlobalConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|