• PowerApps Component 介绍


    PowerApps的不足是必须在web端开发. 这导致了传统意义上的合作开发变得困难.

    但是PowerApps现在有了component可以让大家使用.

    Component 微软传送门(https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/create-component)

    Component是Canvas中的一个custom UI control, 便于创作一些模块化组件.  Component为合作开发带来了非常大便利. Component 支持input 和 output value. 当前支持的data type也非常多. 基本囊括了我们当前所需的类别.

    首先需要创建一个component.

    其次设计我们的component. 这里我就创建了一个header

    然后我们选中刚创建的component, 并且在右侧的properties中点击"new custom property"

    我们可以看到, new custom property 中property type 支持input  和 output两种

    这里要介绍一下"Screen" data type

     使用screen, 可以传递要跳转的screen value,  component中的控件点击之后可以直接跳转页面.

    我们这里使用screen 的 data type

    我们需要把Input 值和 UI Control做绑定.

    我们点击需要绑定的UI Control, 并且在"OnSelect" 里 赋值"Navigate(Header.DestinationScreen, ScreenTransition.Cover)"

    然后我们回到screen, 并且在Insert -> Custom 中找到我们需要添加的component

    在添加component之后, 找到我们的DestinationScreen, 在function中填入需要跳转的页面.

    Component 中除了input 也还有output值可以从Component中传出.

    这里我们创建一个custom properties

     然后我们设定一个variable如下

    Set(varNumber, 100 * 2);

    然后我们需要选定component之后 在advanced 中找到刚才创建的output

    当我们引用这个component在screen中, 我们创建一个label 并且 text 绑定component.NumberOut

    我们可以看到 component中的值会传出到screen2 的label里.

  • 相关阅读:
    C#各版本新特性
    ubantu操作积累
    C# System.Net.Http.HttpClient使用说明
    IIS下VUE跳转
    融合主流的技术 分布式中间件+微服务+微架构架构
    论减少代码中return语句的骚操作
    shell脚本--多个代码库批量pull最新master代码
    SpringBoot单元测试
    Qt音视频开发36-USB摄像头解码qcamera方案
    Qt音视频开发35-Onvif图片参数
  • 原文地址:https://www.cnblogs.com/TheMiao/p/13231102.html
Copyright © 2020-2023  润新知