vue-devui 1.5.0 → 1.5.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/vue-devui.es.js CHANGED
@@ -22310,6 +22310,8 @@ class Transform {
22310
22310
  reset() {
22311
22311
  this.transformX = this.TRANSFORMX;
22312
22312
  this.transformY = this.TRANSFORMY;
22313
+ this.oTransformX = this.transformX;
22314
+ this.oTransformY = this.transformY;
22313
22315
  this.zoom = this.ZOOM;
22314
22316
  }
22315
22317
  setPosition() {
@@ -23708,8 +23710,7 @@ function getRoot(path) {
23708
23710
  function clearSelect_isHorizontal(ele, event) {
23709
23711
  let element = event.target;
23710
23712
  let stack = [];
23711
- const { path } = event;
23712
- const root2 = getRoot(path);
23713
+ const root2 = getRoot(event.composedPath());
23713
23714
  stack = [...Array.from(root2.children)];
23714
23715
  if (element.tagName === "SPAN") {
23715
23716
  element = element.parentElement;
@@ -23819,7 +23820,7 @@ function changeRoute(props, router, useRouter, key) {
23819
23820
  }
23820
23821
  const ns$9 = useNamespace("menu");
23821
23822
  function useClick(e) {
23822
- const paths = e.path;
23823
+ const paths = e.composedPath();
23823
23824
  for (let i = 0; i < paths.length; i++) {
23824
23825
  const path = paths[i];
23825
23826
  if (path.classList.contains(`${ns$9.b()}-horizontal`)) {
@@ -23852,7 +23853,7 @@ var MenuItem = defineComponent({
23852
23853
  const {
23853
23854
  disabled
23854
23855
  } = toRefs(props);
23855
- const isSelect = ref(initSelect(defaultSelectKey, key, multiple, disabled));
23856
+ const isSelect = ref(initSelect(defaultSelectKey.value, key, multiple, disabled));
23856
23857
  const isLayer1 = ref(true);
23857
23858
  const rootMenuEmit = inject("rootMenuEmit");
23858
23859
  const useRouter = inject("useRouter");
@@ -23931,7 +23932,7 @@ var MenuItem = defineComponent({
23931
23932
  classObject.value[menuItemSelect] = false;
23932
23933
  }
23933
23934
  });
23934
- watch(() => defaultSelectKey, (n) => {
23935
+ watch(() => [...defaultSelectKey.value], (n) => {
23935
23936
  isSelect.value = initSelect(n, key, multiple, disabled);
23936
23937
  classObject.value[menuItemSelect] = isSelect.value;
23937
23938
  });
@@ -24375,7 +24376,8 @@ var Menu = defineComponent({
24375
24376
  const {
24376
24377
  openKeys,
24377
24378
  mode,
24378
- collapsed
24379
+ collapsed,
24380
+ defaultSelectKeys
24379
24381
  } = toRefs(props);
24380
24382
  const menuId = randomId(16);
24381
24383
  const store = useStore(menuId);
@@ -24384,7 +24386,7 @@ var Menu = defineComponent({
24384
24386
  provide("defaultIndent", props["indentSize"]);
24385
24387
  provide("multiple", props["multiple"]);
24386
24388
  provide("openKeys", openKeys);
24387
- provide("defaultSelectKey", props.defaultSelectKeys);
24389
+ provide("defaultSelectKey", defaultSelectKeys);
24388
24390
  provide("mode", mode);
24389
24391
  provide("collapsedIndent", props["collapsedIndent"]);
24390
24392
  provide("rootMenuEmit", ctx2.emit);
@@ -26261,18 +26263,18 @@ var Tag = defineComponent({
26261
26263
  e.stopPropagation();
26262
26264
  emit("tagDelete", e);
26263
26265
  };
26266
+ const contentColor = computed(() => {
26267
+ return isDefaultTag() ? "" : checked.value ? "#fff" : themeColor.value;
26268
+ });
26264
26269
  const closeIconEl = () => {
26270
+ const iconName = isDefaultTag() ? "error-o" : "close";
26265
26271
  return deletable.value ? createVNode("a", {
26266
26272
  "class": "remove-button",
26267
26273
  "onClick": handleDelete
26268
- }, [isDefaultTag() ? createVNode(resolveComponent("d-icon"), {
26269
- "size": "12px",
26270
- "name": "error-o",
26271
- "color": "#adb0b8"
26272
- }, null) : createVNode(resolveComponent("d-icon"), {
26274
+ }, [createVNode(resolveComponent("d-icon"), {
26273
26275
  "size": "12px",
26274
- "name": "close",
26275
- "color": themeColor.value
26276
+ "name": iconName,
26277
+ "color": contentColor.value
26276
26278
  }, null)]) : null;
26277
26279
  };
26278
26280
  const unWatch = watch(checked, (newVal) => {
@@ -26288,7 +26290,7 @@ var Tag = defineComponent({
26288
26290
  "class": tagClass.value,
26289
26291
  "style": {
26290
26292
  display: "block",
26291
- color: checked.value ? "#fff" : themeColor.value,
26293
+ color: contentColor.value,
26292
26294
  backgroundColor: checked.value ? themeColor.value : !color2.value ? "" : "var(--devui-base-bg, #ffffff)"
26293
26295
  },
26294
26296
  "title": tagTitle
@@ -39034,7 +39036,7 @@ const installs = [
39034
39036
  VirtualListInstall
39035
39037
  ];
39036
39038
  var vueDevui = {
39037
- version: "1.5.0",
39039
+ version: "1.5.2",
39038
39040
  install(app) {
39039
39041
  installs.forEach((p) => app.use(p));
39040
39042
  }