amis-editor 5.1.8 → 5.1.9-beta.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/util.d.ts CHANGED
@@ -49,7 +49,7 @@ export declare function filterSchemaForConfig(schema: any, valueWithConfig?: any
49
49
  */
50
50
  export declare function filterSchemaForEditor(schema: any): any;
51
51
  export declare function blackList(list: Array<string>): (str: string) => boolean;
52
- export declare function sortByList(list: Array<string>, attr: string | Function): (a: any, b: any) => 0 | 1 | -1;
52
+ export declare function sortByList(list: Array<string>, attr: string | Function): (a: any, b: any) => 1 | 0 | -1;
53
53
  export declare function persistGet(key: string, defaultValue?: any): any;
54
54
  export declare function persistSet(key: string, value: any): void;
55
55
  export declare function normalizeId(id: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amis-editor",
3
- "version": "5.1.8",
3
+ "version": "5.1.9-beta.0",
4
4
  "description": "amis 可视化编辑器",
5
5
  "main": "dist/index.min.js",
6
6
  "types": "dist/index.d.ts",
@@ -817,6 +817,7 @@ const tpls: {
817
817
  return {
818
818
  title: '状态',
819
819
  body: [
820
+ getSchemaTpl('newVisible'),
820
821
  getSchemaTpl('hidden'),
821
822
  config?.readonly ? getSchemaTpl('readonly') : null,
822
823
  config?.disabled || config?.isFormItem
@@ -1789,7 +1790,7 @@ const tpls: {
1789
1790
  label: '禁用',
1790
1791
  mode: 'normal',
1791
1792
  name: 'disabled',
1792
- expressioName: 'disabledOn'
1793
+ expressionName: 'disabledOn'
1793
1794
  },
1794
1795
 
1795
1796
  'readonly': {
@@ -1797,7 +1798,7 @@ const tpls: {
1797
1798
  label: '只读',
1798
1799
  mode: 'normal',
1799
1800
  name: 'readOnly',
1800
- expressioName: 'readOnlyOn'
1801
+ expressionName: 'readOnlyOn'
1801
1802
  },
1802
1803
 
1803
1804
  'visible': {
@@ -1805,7 +1806,17 @@ const tpls: {
1805
1806
  label: '可见',
1806
1807
  mode: 'normal',
1807
1808
  name: 'visible',
1808
- expressioName: 'visibleOn'
1809
+ expressionName: 'visibleOn'
1810
+ },
1811
+
1812
+ // 新版配置面板兼容 [可见] 状态
1813
+ 'newVisible': {
1814
+ type: 'ae-StatusControl',
1815
+ label: '可见',
1816
+ mode: 'normal',
1817
+ name: 'visible',
1818
+ expressionName: 'visibleOn',
1819
+ visibleOn:"data.visible || data.visible === false || data.visibleOn !== undefined"
1809
1820
  },
1810
1821
 
1811
1822
  'hidden': {
@@ -1813,7 +1824,7 @@ const tpls: {
1813
1824
  label: '隐藏',
1814
1825
  mode: 'normal',
1815
1826
  name: 'hidden',
1816
- expressioName: 'hiddenOn'
1827
+ expressionName: 'hiddenOn'
1817
1828
  },
1818
1829
 
1819
1830
  'maximum': {
@@ -383,7 +383,7 @@ export class CRUDPlugin extends BasePlugin {
383
383
 
384
384
  valueSchema.bulkActions = [];
385
385
  /** 统一api格式 */
386
- valueSchema.api = normalizeApi(valueSchema.api);
386
+ valueSchema.api = typeof valueSchema.api === 'string' ? valueSchema.api : normalizeApi(valueSchema.api);
387
387
  hasFeatures &&
388
388
  features.forEach((item: string) => {
389
389
  if (itemBtns.includes(item)) {
Binary file