@kengic/vue 0.24.1-beta.0 → 0.24.1-beta.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2437,7 +2437,7 @@ const emptyIcon = {
2437
2437
  ...t.data
2438
2438
  }, a);
2439
2439
  }
2440
- }), version = "0.24.1-beta.0";
2440
+ }), version = "0.24.1-beta.1";
2441
2441
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
2442
2442
  const freeGlobal$1 = freeGlobal;
2443
2443
  var freeSelf = typeof self == "object" && self && self.Object === Object && self, root = freeGlobal$1 || freeSelf || Function("return this")();
@@ -7379,7 +7379,7 @@ const KG_MODAL_BORDER_WIDTH = 1, KG_MODAL_SCROLL_WIDTH = 17;
7379
7379
  function useDragToMove(e) {
7380
7380
  var I, O, L;
7381
7381
  const {
7382
- kgModalProps: t,
7382
+ getProps: t,
7383
7383
  domRef: a
7384
7384
  } = e;
7385
7385
  if (((L = (O = (I = useKg().option.value) == null ? void 0 : I.KgModal) == null ? void 0 : O.drag) == null ? void 0 : L.on) !== !0)
@@ -7447,8 +7447,8 @@ function useDragToMove(e) {
7447
7447
  }
7448
7448
  function useDragToResize(e) {
7449
7449
  const {
7450
- defaultWidth: t,
7451
- kgModalProps: a,
7450
+ props: t,
7451
+ getProps: a,
7452
7452
  domRef: r
7453
7453
  } = e, {
7454
7454
  width: n,
@@ -7464,7 +7464,7 @@ function useDragToResize(e) {
7464
7464
  var N, P;
7465
7465
  return (P = (N = u.value) == null ? void 0 : N.querySelector(".ant-modal-footer")) != null ? P : null;
7466
7466
  });
7467
- const g = ref(t), v = computed(() => {
7467
+ const g = ref(t.width !== void 0 ? t.width : "80%"), v = computed(() => {
7468
7468
  var P;
7469
7469
  const N = (P = a.value.kgMinWidth) != null ? P : s;
7470
7470
  return Math.min(N, n.value);
@@ -7484,6 +7484,9 @@ function useDragToResize(e) {
7484
7484
  remove: () => {
7485
7485
  }
7486
7486
  };
7487
+ watch(() => t.width, (N) => {
7488
+ N !== void 0 && (g.value = N);
7489
+ });
7487
7490
  const A = watch([u], ([N]) => {
7488
7491
  if (N) {
7489
7492
  const P = N.querySelector("div.ant-modal-content");
@@ -7669,15 +7672,15 @@ const getProps$I = () => ({
7669
7672
  });
7670
7673
  useDragToMove({
7671
7674
  domRef: n,
7672
- kgModalProps: i
7675
+ getProps: i
7673
7676
  });
7674
7677
  const {
7675
7678
  width: l,
7676
7679
  onMousedown: s
7677
7680
  } = useDragToResize({
7678
- defaultWidth: e.width !== void 0 ? e.width : "80%",
7679
7681
  domRef: n,
7680
- kgModalProps: i
7682
+ getProps: i,
7683
+ props: e
7681
7684
  });
7682
7685
  return () => createVNode(Modal, mergeProps(i.value, {
7683
7686
  width: l.value
@@ -25791,7 +25794,7 @@ function KgVarContainer(e) {
25791
25794
  const u = {
25792
25795
  ...a
25793
25796
  };
25794
- return u.KgBackgroundGray === void 0 && (u.KgBackgroundGray = !0), u;
25797
+ return u.kgFormID = t, u.KgBackgroundGray === void 0 && (u.KgBackgroundGray = !0), u;
25795
25798
  });
25796
25799
  function o(u) {
25797
25800
  var v;
@@ -25815,9 +25818,7 @@ function KgVarContainer(e) {
25815
25818
  let u;
25816
25819
  return createVNode("div", {
25817
25820
  class: "kg-var-container"
25818
- }, [createVNode(KgVar, mergeProps({
25819
- kgFormID: t
25820
- }, s.value), null), r.varChildDetails.value.length > 0 ? createVNode(KgResizable, {
25821
+ }, [createVNode(KgVar, s.value, null), r.varChildDetails.value.length > 0 ? createVNode(KgResizable, {
25821
25822
  kgHeight: i.value.kgHeight,
25822
25823
  "onUpdate:kgHeight": (c) => i.value.kgHeight = c,
25823
25824
  kgMinHeight: i.value.kgMinHeight,
@@ -8,19 +8,19 @@ import { IKgModalProps } from './KgModal';
8
8
  */
9
9
  export declare function useDragToMove(param: {
10
10
  domRef: Ref<HTMLDivElement | null>;
11
- kgModalProps: Ref<IKgModalProps>;
11
+ getProps: Ref<IKgModalProps>;
12
12
  }): void;
13
13
  /**
14
14
  * 拖拽改变大小.
15
15
  *
16
- * @param param.defaultWidth 弹窗默认宽度.
16
+ * @param param.props 组件参数.
17
17
  * @param param.domRef 页面上的那个特殊元素对象, 专门用于获取其他元素对象.
18
- * @param param.kgModalProps 弹窗组件参数.
18
+ * @param param.getProps 计算后的组件参数.
19
19
  */
20
20
  export declare function useDragToResize(param: {
21
- defaultWidth: number | string;
21
+ props: IKgModalProps;
22
22
  domRef: Ref<HTMLDivElement | null>;
23
- kgModalProps: Ref<IKgModalProps>;
23
+ getProps: Ref<IKgModalProps>;
24
24
  }): {
25
25
  /**
26
26
  * 鼠标按下事件.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.24.1-beta.0",
3
+ "version": "0.24.1-beta.1",
4
4
  "scripts": {
5
5
  "build": "npm run switch-node-version && rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "npm run switch-node-version && rimraf dist && vue-tsc && vite build --mode development",