bmp-layout 0.0.25-beta.1 → 0.0.25-beta.2
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/bmp-layout.es.js +68 -10
- package/bmp-layout.umd.js +2 -2
- package/package.json +1 -1
- package/style.css +1 -1
- package/svgs/tag-close.svg +1 -1
package/bmp-layout.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openBlock, createBlock, unref, normalizeClass, ref, computed, watch, withCtx, createElementBlock, createElementVNode, normalizeStyle, nextTick, createVNode, Fragment, resolveComponent, defineComponent, isVNode, renderList, createCommentVNode, createTextVNode, toDisplayString, renderSlot, onBeforeMount,
|
|
1
|
+
import { openBlock, createBlock, unref, normalizeClass, ref, computed, watch, withCtx, createElementBlock, createElementVNode, normalizeStyle, nextTick, createVNode, Fragment, resolveComponent, defineComponent, isVNode, renderList, createCommentVNode, createTextVNode, toDisplayString, renderSlot, onBeforeMount, onMounted, withModifiers, onUnmounted, Teleport, Transition, provide, KeepAlive, resolveDynamicComponent, TransitionGroup, mergeProps, isRef, withDirectives, resolveDirective, watchEffect, vShow, useSlots, useAttrs, createSlots, inject, onBeforeUnmount, reactive, onUpdated, render, useCssVars } from "vue";
|
|
2
2
|
import { createPinia, setActivePinia, defineStore } from "pinia";
|
|
3
3
|
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
|
|
4
4
|
import { cloneDeep, omit } from "lodash-es";
|
|
@@ -8221,14 +8221,51 @@ const _sfc_main$t = /* @__PURE__ */ Object.assign({ name: "TagsView" }, {
|
|
|
8221
8221
|
};
|
|
8222
8222
|
const scrollbarRef = ref();
|
|
8223
8223
|
const scrollLeftNumber = ref(0);
|
|
8224
|
+
const showLeftArrow = ref(false);
|
|
8225
|
+
const showRightArrow = ref(false);
|
|
8224
8226
|
let scrollStopFn = null;
|
|
8225
|
-
const
|
|
8227
|
+
const checkArrows = () => {
|
|
8228
|
+
var _a2;
|
|
8229
|
+
const wrap$ = (_a2 = unref(scrollbarRef)) == null ? void 0 : _a2.wrapRef;
|
|
8230
|
+
if (!wrap$)
|
|
8231
|
+
return;
|
|
8232
|
+
const { scrollLeft, scrollWidth, offsetWidth } = wrap$;
|
|
8233
|
+
showLeftArrow.value = scrollLeft > 0;
|
|
8234
|
+
showRightArrow.value = scrollLeft < scrollWidth - offsetWidth - 1;
|
|
8235
|
+
};
|
|
8236
|
+
const handleScroll = ({ scrollLeft }) => {
|
|
8226
8237
|
scrollLeftNumber.value = scrollLeft;
|
|
8238
|
+
checkArrows();
|
|
8239
|
+
};
|
|
8240
|
+
const handleScrollLeft = () => {
|
|
8241
|
+
var _a2;
|
|
8242
|
+
const wrap$ = (_a2 = unref(scrollbarRef)) == null ? void 0 : _a2.wrapRef;
|
|
8243
|
+
if (wrap$) {
|
|
8244
|
+
wrap$.scrollTo({
|
|
8245
|
+
left: Math.max(0, wrap$.scrollLeft - 300),
|
|
8246
|
+
behavior: "smooth"
|
|
8247
|
+
});
|
|
8248
|
+
}
|
|
8249
|
+
};
|
|
8250
|
+
const handleScrollRight = () => {
|
|
8251
|
+
var _a2;
|
|
8252
|
+
const wrap$ = (_a2 = unref(scrollbarRef)) == null ? void 0 : _a2.wrapRef;
|
|
8253
|
+
if (wrap$) {
|
|
8254
|
+
wrap$.scrollTo({
|
|
8255
|
+
left: wrap$.scrollLeft + 300,
|
|
8256
|
+
behavior: "smooth"
|
|
8257
|
+
});
|
|
8258
|
+
}
|
|
8227
8259
|
};
|
|
8228
8260
|
onBeforeMount(() => {
|
|
8229
8261
|
initTags();
|
|
8230
8262
|
addTags();
|
|
8231
8263
|
});
|
|
8264
|
+
onMounted(() => {
|
|
8265
|
+
nextTick(() => {
|
|
8266
|
+
checkArrows();
|
|
8267
|
+
});
|
|
8268
|
+
});
|
|
8232
8269
|
watch(
|
|
8233
8270
|
() => currentRoute.value,
|
|
8234
8271
|
() => {
|
|
@@ -8241,14 +8278,25 @@ const _sfc_main$t = /* @__PURE__ */ Object.assign({ name: "TagsView" }, {
|
|
|
8241
8278
|
const _component_router_link = resolveComponent("router-link");
|
|
8242
8279
|
return openBlock(), createElementBlock("div", {
|
|
8243
8280
|
id: unref(prefixCls2),
|
|
8244
|
-
class: normalizeClass([unref(prefixCls2), "relative flex"])
|
|
8281
|
+
class: normalizeClass([unref(prefixCls2), "relative flex items-center"])
|
|
8245
8282
|
}, [
|
|
8283
|
+
unref(showLeftArrow) ? (openBlock(), createElementBlock("div", {
|
|
8284
|
+
key: 0,
|
|
8285
|
+
class: normalizeClass(`${unref(prefixCls2)}__arrow ${unref(prefixCls2)}__arrow--left`),
|
|
8286
|
+
onClick: handleScrollLeft
|
|
8287
|
+
}, [
|
|
8288
|
+
createVNode(_component_Icon, {
|
|
8289
|
+
icon: "lucide:chevron-left",
|
|
8290
|
+
size: 16,
|
|
8291
|
+
color: "#a4aec4ff"
|
|
8292
|
+
})
|
|
8293
|
+
], 2)) : createCommentVNode("", true),
|
|
8246
8294
|
createElementVNode("div", _hoisted_2$a, [
|
|
8247
8295
|
createVNode(unref(ElScrollbar), {
|
|
8248
8296
|
ref_key: "scrollbarRef",
|
|
8249
8297
|
ref: scrollbarRef,
|
|
8250
8298
|
class: "h-full",
|
|
8251
|
-
onScroll:
|
|
8299
|
+
onScroll: handleScroll
|
|
8252
8300
|
}, {
|
|
8253
8301
|
default: withCtx(() => [
|
|
8254
8302
|
createElementVNode("div", _hoisted_3$9, [
|
|
@@ -8319,7 +8367,6 @@ const _sfc_main$t = /* @__PURE__ */ Object.assign({ name: "TagsView" }, {
|
|
|
8319
8367
|
createVNode(_component_Icon, {
|
|
8320
8368
|
class: normalizeClass(`${unref(prefixCls2)}__item--close`),
|
|
8321
8369
|
size: 8,
|
|
8322
|
-
color: "#7b7e904ff",
|
|
8323
8370
|
icon: "svg-icon:tag-close",
|
|
8324
8371
|
onClick: withModifiers(($event) => closeSelectedTag(item), ["prevent", "stop"])
|
|
8325
8372
|
}, null, 8, ["class", "onClick"]),
|
|
@@ -8341,12 +8388,23 @@ const _sfc_main$t = /* @__PURE__ */ Object.assign({ name: "TagsView" }, {
|
|
|
8341
8388
|
]),
|
|
8342
8389
|
_: 1
|
|
8343
8390
|
}, 512)
|
|
8344
|
-
])
|
|
8391
|
+
]),
|
|
8392
|
+
unref(showRightArrow) ? (openBlock(), createElementBlock("div", {
|
|
8393
|
+
key: 1,
|
|
8394
|
+
class: normalizeClass(`${unref(prefixCls2)}__arrow ${unref(prefixCls2)}__arrow--right`),
|
|
8395
|
+
onClick: handleScrollRight
|
|
8396
|
+
}, [
|
|
8397
|
+
createVNode(_component_Icon, {
|
|
8398
|
+
icon: "lucide:chevron-right",
|
|
8399
|
+
size: 16,
|
|
8400
|
+
color: "#7d8595ff"
|
|
8401
|
+
})
|
|
8402
|
+
], 2)) : createCommentVNode("", true)
|
|
8345
8403
|
], 10, _hoisted_1$c);
|
|
8346
8404
|
};
|
|
8347
8405
|
}
|
|
8348
8406
|
});
|
|
8349
|
-
const TagsView = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-
|
|
8407
|
+
const TagsView = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-fb8d3778"]]);
|
|
8350
8408
|
const _sfc_main$s = /* @__PURE__ */ Object.assign({ name: "MenuTrigger" }, {
|
|
8351
8409
|
__name: "MenuTrigger",
|
|
8352
8410
|
props: {
|
|
@@ -8528,7 +8586,7 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign({ name: "ProductServicePanel"
|
|
|
8528
8586
|
activeModuleIndex.value = 0;
|
|
8529
8587
|
};
|
|
8530
8588
|
const handleSelect = (item, parentPath = "") => {
|
|
8531
|
-
var _a2, _b, _c;
|
|
8589
|
+
var _a2, _b, _c, _d;
|
|
8532
8590
|
const fullPath = getAccessiblePath(item, parentPath);
|
|
8533
8591
|
if (fullPath) {
|
|
8534
8592
|
const currentModuleId = permissionStore.getModuleId;
|
|
@@ -8537,7 +8595,7 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign({ name: "ProductServicePanel"
|
|
|
8537
8595
|
router.push(fullPath.startsWith("/") ? fullPath : `/${fullPath}`);
|
|
8538
8596
|
} else {
|
|
8539
8597
|
const currentOrigin = window.location.origin;
|
|
8540
|
-
const modulePath = ((_c = productList.value[activeProductIndex.value]) == null ? void 0 : _c.modulePath) || "";
|
|
8598
|
+
const modulePath = ((_d = (_c = productList.value[activeProductIndex.value]) == null ? void 0 : _c.children[activeModuleIndex.value]) == null ? void 0 : _d.modulePath) || "";
|
|
8541
8599
|
const moduleFullPath = joinPath(modulePath, fullPath);
|
|
8542
8600
|
const targetUrl = `${currentOrigin}${moduleFullPath.startsWith("/") ? moduleFullPath : `/${moduleFullPath}`}`;
|
|
8543
8601
|
window.location.href = targetUrl;
|
|
@@ -8775,7 +8833,7 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign({ name: "ProductServicePanel"
|
|
|
8775
8833
|
};
|
|
8776
8834
|
}
|
|
8777
8835
|
});
|
|
8778
|
-
const ProductServicePanel = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-
|
|
8836
|
+
const ProductServicePanel = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-c6b549d4"]]);
|
|
8779
8837
|
const _sfc_main$q = /* @__PURE__ */ Object.assign({ name: "Logo" }, {
|
|
8780
8838
|
__name: "Logo",
|
|
8781
8839
|
emits: ["logo-click"],
|