export default [
  {
    title: "表格",
    screenshot:
      "https://alifd.alicdn.com/fusion-cool/icons/icon-antd/table-1.png",
    schema: {
      componentName: "Table",
      props: {
        dataSource: [
          {
            id: "1",
            name: "胡彦斌",
            age: 32,
            address: "西湖区湖底公园1号",
          },
          {
            id: "2",
            name: "王一博",
            age: 28,
            address: "滨江区网商路699号",
          },
        ],
        columns: [
          {
            title: "姓名",
            dataIndex: "name",
            key: "name",
          },
          {
            title: "年龄",
            dataIndex: "age",
            key: "age",
          },
        ],
        rowKey: "id",
        pagination: {
          pageSize: 10,
          total: 15,
          current: 1,
        },
        view: {
          defaultViewMode: "grid",
          multiple: false,
        },
        columnSetting: {
          show: false,
          storageMode: "",
        },
        sort: {
          show: false,
          storageMode: "",
        },
        dataSourceGroup: {
          show: false,
          storageMode: "",
        },
        filter: {
          show: false,
          sortButtonShow: false,
          storageMode: "",
          quickFilterMaxLength: 3,
          list: [],
        },
        gallery: {
          cardMinWidth: 260,
          cardMaxWidth: 340,
          horizontalGutter: 32,
          verticalGutter: 32,
          cover: {
            show: true,
            height: 230,
            objectFit: "fill",
          },
          title: {
            line: 2,
          },
          header: {
            fields: {
              show: false,
            },
          },
          content: {},
          footer: {},
        },
        exportImport: {
          show: false,
          selectLists: [],
          templateFileUrl: "",
          title: "",
          hiddenKeys: [],
          otherParams: {}
        },
        showTitle: true,
        showSubTitle: true,
      },
    },
  },
  {
    title: "gallery视图",
    schema: {
      componentName: "Table",
      props: {
        dataSource: [
          {
            id: "1",
            name: "胡彦斌",
            age: 32,
            address: "西湖区湖底公园1号",
            image:
              "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png",
          },
          {
            id: "2",
            name: "王一博",
            age: 28,
            address: "滨江区网商路699号",
            image:
              "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png",
          },
        ],
        columns: [
          {
            title: "姓名",
            dataIndex: "name",
            key: "name",
          },
          {
            title: "年龄",
            dataIndex: "age",
            key: "age",
          },
          {
            title: "图片",
            dataIndex: "image",
            key: "image",
            render: {
              type: "JSSlot",
              params: ["text", "record", "index"],
              value: [
                {
                  componentName: "Image",
                  id: "node_oclrybjvel2",
                  props: {
                    src: {
                      type: "JSExpression",
                      value: "this.text",
                      mock: "",
                    },
                    height: 120,
                    width: 120,
                    preview: false,
                    fallback: "",
                  },
                  hidden: false,
                  title: "",
                  isLocked: false,
                  condition: true,
                  conditionGroup: "",
                },
              ],
              id: "node_oclrybjvel1",
            },
          },
        ],
        rowKey: "id",
        pagination: {
          pageSize: 10,
          total: 15,
          current: 1,
          showSizeChanger: false,
          showQuickJumper: false,
          simple: false,
          size: "default",
        },
        view: {
          defaultViewMode: "gallery",
          multiple: false,
        },
        columnSetting: {
          show: true,
          storageMode: "localStorage",
        },
        sort: {
          show: false,
          storageMode: "",
        },
        dataSourceGroup: {
          show: false,
          storageMode: "",
        },
        filter: {
          show: false,
          sortButtonShow: false,
          storageMode: "",
          quickFilterMaxLength: 3,
          list: [],
        },
        gallery: {
          cardMinWidth: 260,
          cardMaxWidth: 340,
          horizontalGutter: 32,
          verticalGutter: 32,
          cover: {
            show: true,
            height: 230,
            objectFit: "cover",
            fields: ["image"],
          },
          title: {
            line: 2,
            field: "name",
          },
          header: {
            fields: {
              show: false,
            },
          },
          content: {
            fields: [
              {
                columnKey: "name",
                show: true,
              },
              {
                columnKey: "age",
                show: true,
              },
              {
                columnKey: "image",
                show: true,
              },
            ],
          },
          footer: {},
        },
        showTitle: true,
        showSubTitle: true,
      },
    },
  },
  {
    title: "grid多视图",
    schema: {
      componentName: "Table",
      props: {
        dataSource: [
          {
            id: "1",
            name: "胡彦斌",
            age: 32,
            address: "西湖区湖底公园1号",
            image:
              "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png",
          },
          {
            id: "2",
            name: "王一博",
            age: 28,
            address: "滨江区网商路699号",
            image:
              "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png",
          },
        ],
        columns: [
          {
            title: "姓名",
            dataIndex: "name",
            key: "name",
          },
          {
            title: "年龄",
            dataIndex: "age",
            key: "age",
          },
          {
            title: "图片",
            dataIndex: "image",
            key: "image",
            render: {
              type: "JSSlot",
              params: ["text", "record", "index"],
              value: [
                {
                  componentName: "Image",
                  id: "node_oclrybjvel2",
                  props: {
                    src: {
                      type: "JSExpression",
                      value: "this.text",
                      mock: "",
                    },
                    height: 120,
                    width: 120,
                    preview: false,
                    fallback: "",
                  },
                  hidden: false,
                  title: "",
                  isLocked: false,
                  condition: true,
                  conditionGroup: "",
                },
              ],
              id: "node_oclrybjvel1",
            },
          },
        ],
        rowKey: "id",
        pagination: {
          pageSize: 10,
          total: 15,
          current: 1,
          showSizeChanger: false,
          showQuickJumper: false,
          simple: false,
          size: "default",
          localPagination: true,
        },
        view: {
          defaultViewMode: "grid",
          multiple: true,
          modeList: ["grid", "gallery"],
        },
        columnSetting: {
          show: true,
          storageMode: "localStorage",
        },
        sort: {
          show: true,
          storageMode: "localStorage",
          list: [
            {
              label: "标题",
              type: "string",
              columnKey: "name",
              isCustom: false,
              isHidden: false
            },
            {
              label: "标题",
              type: "number",
              columnKey: "age",
              isCustom: false,
              isHidden: false
            },
          ],
        },
        dataSourceGroup: {
          show: true,
          storageMode: "localStorage",
          list: [
            {
              label: "标题",
              name: "",
              columnKey: "name",
              isCustom: false,
              isHidden: false
            },
            {
              label: "标题",
              name: "",
              columnKey: "age",
              isCustom: false,
              isHidden: false
            },
          ],
        },
        filter: {
          show: true,
          sortButtonShow: true,
          storageMode: "",
          quickFilterMaxLength: 3,
          list: [
            {
              label: "标题",
              type: "text",
              key: "name",
              columnKey: "name",
              isCustom: false,
              sort: true,
              localFilter: true,
              isHidden: false
            },
            {
              label: "标题",
              type: "text",
              key: "age",
              columnKey: "age",
              isCustom: false,
              sort: true,
              localFilter: true,
              isHidden: false
            },
          ],
        },
        gallery: {
          cardMinWidth: 260,
          cardMaxWidth: 340,
          horizontalGutter: 32,
          verticalGutter: 32,
          cover: {
            show: true,
            height: 230,
            objectFit: "cover",
            fields: ["image"],
          },
          title: {
            line: 2,
            field: "name",
          },
          header: {
            fields: {
              show: false,
            },
          },
          content: {
            fields: [
              {
                columnKey: "name",
                show: true,
              },
              {
                columnKey: "age",
                show: true,
              },
              {
                columnKey: "image",
                show: true,
              },
            ],
          },
          footer: {},
        },
        showTitle: true,
        showSubTitle: true,
      },
    },
  },
];
