当前位置: 首页 > news >正文

网站建设服务费应该算什么科目研究院网站建设

网站建设服务费应该算什么科目,研究院网站建设,欧美一级a做爰片免费网站,天津智能网站建设多少钱原文链接#xff1a;https://blazor-university.com/components/replacing-attributes-on-child-components/替换子组件的属性源代码[1]到目前为止#xff0c;我们已经了解了如何创建代码生成的属性[2]#xff0c;以及如何捕获意外参数[3]。除了这两种技术之外#xff0c;B… 原文链接https://blazor-university.com/components/replacing-attributes-on-child-components/替换子组件的属性源代码[1]到目前为止我们已经了解了如何创建代码生成的属性[2]以及如何捕获意外参数[3]。除了这两种技术之外Blazor 还允许我们重写/替换子组件中的现有属性。采取以下页面标记ChildComponent firstconsumer-value-1 secondconsumer-value-2 /它使用以下子组件div attributesAllOtherAttributesRight-click and inspect the HTML for this element to see the results! /divcode {[Parameter(CaptureUnmatchedValuestrue)]public Dictionarystring, object AllOtherAttributes { get; set; } }正如我们之前在代码生成的属性[4]中看到的那样ChildComponent 会将使用者提供的属性第一个和第二个捕获到我们的参数 AllOtherAttributes 中并且对 attributesAllOtherAttributes 的调用将指示 Blazor 在 Dictionarystring, object 中输出名称/值对。前面的代码将输出以下 HTML。div firstconsumer-value-1 secondconsumer-value-2Right-click and inspect the HTML for this element to see the results! /div替换子属性如果我们想为 first 和 second 指定默认值以在使用者不提供它们时输出怎么办如果未设置值则可能很容易重写 SetParametersAsync[5] 并插入值但有一种更简单的方法我们所要做的就是写出我们的默认值作为子组件标记的一部分attributes 指令将使用使用者传递的任何值覆盖它们。因此如果我们更改子组件以指定一些默认属性值如下所示div first1 second2 third3 fourth4  attributesAllOtherAttributesRight-click and inspect the HTML for this element to see the results! /div然后我们可以像这样替换组件的那些默认值ChildComponent firstconsumer-value-1 secondconsumer-value-2 /这将呈现以下 HTMLdiv firstconsumer-value-1 secondconsumer-value-2 third3 fourth4Right-click and inspect the HTML for this element to see the results! /div我们的子组件将始终呈现其所有四个 HTML 属性但也将允许使用者替换它们的值。保护属性不被替换在某些情况下我们可能希望允许组件的使用者替换某些属性但我们希望保护其他属性不被更改。例如input classform-control typenumber attributesAllOtherAttributes /在这个假设的 InputNumber 控件中我们希望允许我们的使用者替换默认的 CSS 类属性但不希望他们意外地将 type 从 number 更改为 checkbox。在 Blazor 中我们的 attributes 指令的位置很重要。指令之前的任何属性在其上方或左侧都可以由使用者替换其值但在它之后在其下方或右侧的所有属性都受到保护以免其值被替换。鉴于以下标记ChildComponentfirstconsumer-value-1secondconsumer-value-2insertedconsumer-inserted-value /然后调整 attributes 在我们的 ChildComponent 中的位置将为我们提供以下输出// Example 1 divattributesAllOtherAttributesfirst1second2 /// Generated HTML divinsertedconsumer-inserted-valuefirst1second2 /// Example 2 divfirst1attributesAllOtherAttributessecond2 /// Generated HTML divfirstconsumer-value-1insertedconsumer-inserted-valuesecond2 /// Example 3 divfirst1second2attributesAllOtherAttributes /// Generated HTML divfirstconsumer-value-1secondconsumer-value-2insertedconsumer-inserted-value /R.I.P. 默认值记住哪些值优先的一种简单方法是使用“R.I.P.方法”。attributes 指令将始终插入来自使用者的附加值因此将 I 视为插入的含义。I 之前的每个属性值都可以替换(R)I 之后的每个属性值都受保护(P)。div first1 second2 attributesAllOtherAttributes third3 fourth4 /参考资料[1]源代码: https://blazor-university.com/components/replacing-attributes-on-child-components/
http://wiki.neutronadmin.com/news/139154/

相关文章:

  • 哪个网站可以做练习题网站建设吉金手指排名14
  • 包头市住房与城乡建设部网站百度推广弄个网站头像要钱吗?
  • 嘉兴企业网站网络营销软文范例大全800
  • 燕赵邯郸网站建设重庆传媒公司
  • 创意网站展示广东省有多少个市
  • 给个网站谢谢刷关键词排名软件有用吗
  • 快速搭建网站的好处银川网站建设推广
  • 四川住房城乡建设厅官方网站茂名中小企业网站制作
  • 信息网站建设情况工作会新建的网站怎么上首页
  • 比比西旅游网站建设python基础教程pdf第三版
  • 沧州网站设计报价外贸出口建站
  • wordpress网站密码搭建网站架构是什么意思
  • 在哪个网站上做简历网站设计师网站
  • 上海网站建设网络公司wordpress更新网站内容
  • 繁昌网站建设wordpress设置的页面跳转失败
  • 丽江建设工程信息网站上海网站建设信息网
  • 视频背景网站网名大全
  • 网站建设 中ip域名查询网
  • 学校网站建设机构wordpress页脚美化
  • 高质量的高密网站建设长沙哪里有专业做网站
  • 小说网站采集可以做嘛wordpress v3.3.1空间上传php
  • 北京设计企业网站4399全部网页游戏大全
  • 建设美食网站wordpress代码执行
  • 网站建设与管理书籍wordpress 添加友情链接
  • 西安网站开发制作建网站要服务器
  • 台州做网站那家好.网站排版
  • 贵阳微信网站制作网站色调为绿色
  • 肇庆做网站设计公司商丘网站建设软件公司
  • 网站建设电脑小杨哥直播带货平台
  • 东台网站建设北京建设部网站首页