@kengic/vue 0.16.6-beta.5 → 0.16.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/dist/kengic-vue.js +30 -19
  2. package/package.json +1 -1
@@ -2919,7 +2919,7 @@ const emptyIcon = {
2919
2919
  ...t.data
2920
2920
  }, r);
2921
2921
  }
2922
- }), version = "0.16.6-beta.5";
2922
+ }), version = "0.16.6";
2923
2923
  var isVue2 = !1;
2924
2924
  function set(e, t, r) {
2925
2925
  return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, r), r) : (e[t] = r, r);
@@ -10579,7 +10579,7 @@ function useKgFormItem(e) {
10579
10579
  break;
10580
10580
  }
10581
10581
  }
10582
- return o = l, KgUtil.tryParseJSON(o);
10582
+ return KgUtil.tryParseJSON(o);
10583
10583
  });
10584
10584
  return {
10585
10585
  controlType: s,
@@ -10866,25 +10866,34 @@ const KgFormItemCheckboxGroup = defineComponent({
10866
10866
  emit: r,
10867
10867
  attrs: a
10868
10868
  }) {
10869
- const n = inject("$dayjs", dayjs), s = computed(() => {
10870
- let o = e.value;
10871
- if (!!o && !(!isArray$1(o) || o.length !== 2) && ((!n.isDayjs(o[0]) || !n.isDayjs(o[1])) && (o = [n(o[0]), n(o[1])]), !(!n.isDayjs(o[0]) || !n.isDayjs(o[1]))))
10872
- return o;
10869
+ const n = inject("$dayjs", dayjs), {
10870
+ controlProperties: s
10871
+ } = useKgFormItem(), i = computed(() => {
10872
+ let l = e.value;
10873
+ if (!l || !isArray$1(l) || l.length !== 2)
10874
+ return;
10875
+ const u = [null, null];
10876
+ let c = l[0], d = l[1];
10877
+ return n.isDayjs(c) || (c = n(c)), n.isDayjs(d) || (d = n(d)), c.isValid() && (u[0] = c), d.isValid() && (u[1] = d), u;
10873
10878
  });
10874
- function i(o) {
10875
- const l = o ? [n(o[0]), n(o[1])] : void 0;
10876
- r("update:value", l), r("kgChange", l);
10879
+ function o(l) {
10880
+ const u = l ? [n(l[0]), n(l[1])] : void 0;
10881
+ r("update:value", u), r("kgChange", u);
10877
10882
  }
10878
- return () => createVNode(DatePicker.RangePicker, {
10879
- value: s.value,
10880
- "onUpdate:value": i,
10881
- id: a.id,
10882
- disabled: e.kgDisabled,
10883
- placeholder: [e.kgPlaceholder, e.kgPlaceholder],
10884
- showTime: e.kgShowTime,
10885
- picker: e.kgPicker,
10886
- style: "width: 100%"
10887
- }, null);
10883
+ return () => {
10884
+ var l;
10885
+ return createVNode(DatePicker.RangePicker, {
10886
+ value: i.value,
10887
+ "onUpdate:value": o,
10888
+ id: a.id,
10889
+ disabled: e.kgDisabled,
10890
+ placeholder: [e.kgPlaceholder, e.kgPlaceholder],
10891
+ showTime: e.kgShowTime,
10892
+ allowEmpty: (l = s.value) == null ? void 0 : l.allowEmpty,
10893
+ picker: e.kgPicker,
10894
+ style: "width: 100%"
10895
+ }, null);
10896
+ };
10888
10897
  }
10889
10898
  }), KgFormItemInput = defineComponent({
10890
10899
  name: "KgFormItemInput",
@@ -17927,6 +17936,8 @@ class KgUtil {
17927
17936
  return t;
17928
17937
  }
17929
17938
  static parseParamFromDayJS(t, r, a, n) {
17939
+ if (!r || !r.isValid())
17940
+ return "";
17930
17941
  if (!a)
17931
17942
  return r.format("YYYY-MM-DD HH:mm:ss");
17932
17943
  const s = useKgVar(a), i = useKgTable(a), o = s.store.getVarVariableConfig(a, t);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.16.6-beta.5",
3
+ "version": "0.16.6",
4
4
  "scripts": {
5
5
  "build": "npm run switch-node-version && rimraf dist && vite build",
6
6
  "build:dev": "npm run switch-node-version && rimraf dist && vite build --mode development",