新ota快速宝典

 (<Query type="GET_ONE"

      //  resource="permission/menu"

      resource={getUrlMenu(props, 'menu')}

      payload={{ id: record.parentId }}>

      {({ data, loading, error }) => {

        if (loading) { return null; }

        if (error) { return null; }

        return <>

          <Labeled label="Parent Menu Name">

            <Typography gutterBottom variant="body1">

              {data.menuName}

            </Typography>

          </Labeled>

        </>

      }}

    </Query>) : null;



SelectField

 *

 * @example Display all the comments of the current post as a datagrid

 * <ReferenceManyField reference="comments" target="post_id">

 *     <Datagrid>

 *         <TextField source="id" />

 *         <TextField source="body" />

 *         <DateField source="created_at" />

 *         <EditButton />

 *     </Datagrid>

 * </ReferenceManyField>

 *

 * @example Display all the books by the current author, only the title

 * <ReferenceManyField reference="books" target="author_id">

 *     <SingleFieldList>

 *         <ChipField source="title" />

 *     </SingleFieldList>

 * </ReferenceManyField>

 *

 * By default, restricts the possible values to 25. You can extend this limit

 * by setting the `perPage` prop.

 *

 * @example

 * <ReferenceManyField perPage={10} reference="comments" target="post_id">

 *    ...

 * </ReferenceManyField>

 *

 * By default, orders the possible values by id desc. You can change this order

 * by setting the `sort` prop (an object with `field` and `order` properties).

 *

 * @example

 * <ReferenceManyField sort={{ field: 'created_at', order: 'DESC' }} reference="comments" target="post_id">

 *    ...

 * </ReferenceManyField>

 *

 * Also, you can filter the query used to populate the possible values. Use the

 * `filter` prop for that.

 *

 * @example

 * <ReferenceManyField filter={{ is_published: true }} reference="comments" target="post_id">

 *    ...

 * </ReferenceManyField>

 */

<ReferenceManyField

    // source="permissionVoList"

    reference="permission/auth"

    target="parentId"  //叫什么名字 默认是url上的id

    perPage={10000}

    record={record}

    {...rest}

  >

选中操作

show 里面的 BooleanField

<SelectArrayInput source="authors" choices={choices} optionText="full_name" optionValue="_id" />

自定义表格

select自定义: 

 <SelectField

            label="Menu Icon"

            choices={options}

            source="menuCss"

            optionText={<IconField />}

          />

 <SelectInput

          style={{minWidth: 600}}

          source="supplierId"

          optionText="supplierName"

          label=""

          choices={suppliersList && suppliersList.filter(lib => formData.supplierIds && formData.supplierIds.indexOf(lib.id) > -1)}

          validate={required()}

        />

optionText,optionValue, optionText="full_name" optionValue="_id"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值