在 Microsoft PowerApps 中自定义卡Customize a card in Microsoft PowerApps

举例来说,通过更改卡控件执行基本的自定义(无需解锁卡)。Perform basic customization (without unlocking a card) by, for example, changing its control. 例如,通过解锁卡及添加默认情况下该卡无法使用的控件来执行高级自定义。Perform advanced customization by unlocking the card and, for example, adding a control that isn't available for that card by default.

有关概述,请参阅 了解数据卡For an overview, see Understand data cards.

先决条件Prerequisites

自定义锁定的卡Customize a locked card

在此过程中,会将切换控件替换为单选控件,而无需解锁卡。In this procedure, you'll replace a Toggle control with a Radio control without unlocking the card.

  1. 在“EditScreen1”中,单击或点击“已付款”卡以将其选中。In EditScreen1, click or tap the Paid card to select it.

  2. 在右侧窗格中,依次单击或点击“已付款”数据卡的数据卡选择器和“编辑选项”。In the right-hand pane, click or tap the card selector for the Paid card, and then click or tap Edit Options.

    屏幕将体现所做的更改。The screen reflects your change.

    有关哪些类型的 SharePoint 列支持哪些类型的卡的信息,请参阅 已知问题For information about which types of SharePoint columns support which types of cards, see Known issues.

解锁和自定义卡Unlock and customize a card

在此过程中,将解锁卡,然后将文本输入控件替换为滑块控件。In this procedure, you'll unlock a card and then replace a Text input control with a Slider control.

  1. 在“EditScreen1”中,单击或点击“数量”卡。In EditScreen1, click or tap the Quantity card.
  2. 在右侧窗格中,单击或点击该卡的省略号图标,然后单击或点击“高级选项”。In the right-hand pane, click or tap the ellipsis icon for that card, and then click or tap Advanced options.

    打开高级选项

  3. 在右侧窗格顶部,单击或点击锁图标以解锁卡。At the top of the right-hand pane, click or tap the lock icon to unlock the card.

    解锁卡

  4. 在卡中,删除“输入文本”控件,添加“滑块”控件,并将新的控件命名为 QtySliderIn the card, delete the Input text control, add a Slider control, and name the new control QtySlider.
  5. 在右侧窗格中,将“数量”卡的“Update”属性设置为以下公式:In the right-hand pane, set the Update property of the Quantity card to this formula:
    QtySlider.Value QtySlider.Value

    注意:如果未出现“Update”属性,则单击或点击“数据”部分底部的“更多选项”。Note: If the Update property doesn't appear, click or tap More options at the bottom of the Data section.

    设置“更新”属性

  6. 单击或点击滑块以将其选中,然后打开右侧窗格顶部的控件列表。Click or tap the slider to select it, and then open the list of controls at the top of the right-hand pane.
  7. 单击或点击“ErrorMessage4”,然后将其“Height”属性设置为以下公式:Click or tap ErrorMessage4, and then set its Height property to this formula:
    QtySlider.Y + QtySlider.Height QtySlider.Y + QtySlider.Height