@cloudbase/framework-plugin-low-code 0.7.37 → 0.7.38

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.
@@ -6,7 +6,7 @@ export declare function originJsonToFileList(appData: IWeAppData): (import("../t
6
6
  code: string;
7
7
  pageId: string;
8
8
  })[];
9
- export declare function getExtByType(type: CodeType): ".js" | ".json" | ".less";
9
+ export declare function getExtByType(type: CodeType): ".less" | ".js" | ".json";
10
10
  export declare function HACK_FIX_LOWCODE_IN(code?: string): string;
11
11
  export declare function HACK_FIX_LOWCODE_OUT(code?: string): string;
12
12
  //# sourceMappingURL=file.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/framework-plugin-low-code",
3
- "version": "0.7.37",
3
+ "version": "0.7.38",
4
4
  "description": "云开发 Tencent CloudBase Framework Low Code Plugin,将低码配置生成完整项目并一键部署云开发资源。",
5
5
  "author": "yhsunshining@gmail.com",
6
6
  "homepage": "https://github.com/TencentCloudBase/cloudbase-framework#readme",
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { observable, autorun, untracked } from 'mobx';
3
- import { remove, set as lodashSet } from 'lodash';
3
+ import { remove, set as lodashSet, get as lodashGet } from 'lodash';
4
4
  import { checkVisible } from '../../utils/index';
5
5
 
6
6
  export const WidgetsContext = React.createContext({ parent: null });
@@ -272,7 +272,18 @@ export function createWidgets(widgetProps, dataBinds, scopeContext = {}, context
272
272
  const paths = prop.split('.').filter((key) => !!key);
273
273
  if (paths.length > 1) {
274
274
  // 一定要 untracked 不然爆栈了
275
- untracked(() => lodashSet(w, prop, value));
275
+ untracked(() => {
276
+ const pre = lodashGet(w, prop);
277
+ lodashSet(w, prop, value);
278
+ /**
279
+ * 深层的对象内部值变化不会触发 obverver,因此浅拷贝对象
280
+ */
281
+ if (Array.isArray(w[paths[0]])) {
282
+ if (!isEqual(pre, value)) {
283
+ w[paths[0]] = [...w[paths[0]]];
284
+ }
285
+ }
286
+ });
276
287
  } else {
277
288
  // 普通 key 直接赋值
278
289
  w[prop] = value;