lw-cdp-ui 1.2.6 → 1.2.7

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.
@@ -279,7 +279,6 @@ export default {
279
279
  },
280
280
  methods: {
281
281
  flattenObject(obj, key, defaultValue = '') {
282
- console.log(obj, key)
283
282
  if (!key || !obj) { return false }
284
283
  const keys = key.split('.'); // 将路径拆分成数组
285
284
 
@@ -293,7 +292,6 @@ export default {
293
292
  // 否则,继续向下查找
294
293
  current = current[keys[i]];
295
294
  }
296
-
297
295
  return current;
298
296
  },
299
297
  unflattenObject(obj, path, value) {
@@ -304,7 +302,7 @@ export default {
304
302
  keys.forEach((key, index) => {
305
303
  if (index === keys.length - 1) {
306
304
  // 最后一级,直接赋值
307
- current[key] = value;
305
+ current[key] = value || obj[path];
308
306
  } else {
309
307
  // 如果不存在该层级,创建空对象
310
308
  if (!current[key] || typeof current[key] !== 'object') {
@@ -314,7 +312,6 @@ export default {
314
312
  }
315
313
  });
316
314
 
317
-
318
315
  },
319
316
  // 删除tag
320
317
  tagClose(tag, item) {
@@ -6370,7 +6370,7 @@ const sy = /* @__PURE__ */ be(ty, [["render", iy], ["__scopeId", "data-v-8b6b742
6370
6370
  },
6371
6371
  methods: {
6372
6372
  flattenObject(e, t, n = "") {
6373
- if (console.log(e, t), !t || !e)
6373
+ if (!t || !e)
6374
6374
  return !1;
6375
6375
  const a = t.split(".");
6376
6376
  let r = e;
@@ -6384,7 +6384,7 @@ const sy = /* @__PURE__ */ be(ty, [["render", iy], ["__scopeId", "data-v-8b6b742
6384
6384
  const a = t.split(".");
6385
6385
  let r = e;
6386
6386
  a.forEach((o, l) => {
6387
- l === a.length - 1 ? r[o] = n : ((!r[o] || typeof r[o] != "object") && (r[o] = {}), r = r[o]);
6387
+ l === a.length - 1 ? r[o] = n || e[t] : ((!r[o] || typeof r[o] != "object") && (r[o] = {}), r = r[o]);
6388
6388
  });
6389
6389
  },
6390
6390
  // 删除tag
@@ -6721,7 +6721,7 @@ function py(e, t, n, a, r, o) {
6721
6721
  _: 3
6722
6722
  }, 8, ["class", "prop", "rules"]));
6723
6723
  }
6724
- const Yh = /* @__PURE__ */ be(uy, [["render", py], ["__scopeId", "data-v-b5f4fa4d"]]), my = {
6724
+ const Yh = /* @__PURE__ */ be(uy, [["render", py], ["__scopeId", "data-v-7cf86880"]]), my = {
6725
6725
  components: {
6726
6726
  FormItem: Yh
6727
6727
  },