You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
47 KiB
JavaScript
1 line
47 KiB
JavaScript
"use strict";(self.webpackChunkfurion=self.webpackChunkfurion||[]).push([[3009],{8069:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>d,default:()=>x,frontMatter:()=>l,metadata:()=>a,toc:()=>t});var s=r(5893),i=r(1151),c=r(510);const l={id:"clayobj",title:"29. \u7c98\u571f\u5bf9\u8c61",sidebar_label:"29. \u7c98\u571f\u5bf9\u8c61"},d=void 0,a={id:"clayobj",title:"29. \u7c98\u571f\u5bf9\u8c61",description:"\ud83d\udcdd \u6a21\u5757\u66f4\u65b0\u65e5\u5fd7",source:"@site/docs/clayobj.mdx",sourceDirName:".",slug:"/clayobj",permalink:"/docs/clayobj",draft:!1,unlisted:!1,editUrl:"https://gitee.com/dotnetchina/Furion/tree/v4/handbook/docs/clayobj.mdx",tags:[],version:"current",lastUpdatedBy:"\u767e\u5c0f\u50e7",lastUpdatedAt:1696858025,formattedLastUpdatedAt:"Oct 9, 2023",frontMatter:{id:"clayobj",title:"29. \u7c98\u571f\u5bf9\u8c61",sidebar_label:"29. \u7c98\u571f\u5bf9\u8c61"},sidebar:"docs",previous:{title:"28. \u6a21\u5757\u5316\u5f00\u53d1",permalink:"/docs/module-dev"},next:{title:"30. \u8131\u654f\u5904\u7406",permalink:"/docs/sensitive-detection"}},o={},t=[{value:"29.1 \u5173\u4e8e\u7c98\u571f\u5bf9\u8c61",id:"291-\u5173\u4e8e\u7c98\u571f\u5bf9\u8c61",level:2},{value:"29.1.1 \u4f7f\u7528\u573a\u666f",id:"2911-\u4f7f\u7528\u573a\u666f",level:3},{value:"29.1.2 \u5173\u4e8e\u6027\u80fd",id:"2912-\u5173\u4e8e\u6027\u80fd",level:3},{value:"29.2 <code>Clay</code> \u5bf9\u8c61",id:"292-clay-\u5bf9\u8c61",level:2},{value:"29.3 \u5982\u4f55\u4f7f\u7528",id:"293-\u5982\u4f55\u4f7f\u7528",level:2},{value:"29.3.1 \u521b\u5efa\u4e00\u4e2a\u5bf9\u8c61",id:"2931-\u521b\u5efa\u4e00\u4e2a\u5bf9\u8c61",level:3},{value:"29.3.2 \u8bfb\u53d6/\u83b7\u53d6\u5c5e\u6027",id:"2932-\u8bfb\u53d6\u83b7\u53d6\u5c5e\u6027",level:3},{value:"29.3.3 \u65b0\u589e\u5c5e\u6027",id:"2933-\u65b0\u589e\u5c5e\u6027",level:3},{value:"29.3.4 \u66f4\u65b0\u5c5e\u6027\u503c",id:"2934-\u66f4\u65b0\u5c5e\u6027\u503c",level:3},{value:"29.3.5 \u5220\u9664\u5c5e\u6027",id:"2935-\u5220\u9664\u5c5e\u6027",level:3},{value:"29.3.6 \u5224\u65ad\u952e/\u7d22\u5f15\u662f\u5426\u5b58\u5728",id:"2936-\u5224\u65ad\u952e\u7d22\u5f15\u662f\u5426\u5b58\u5728",level:3},{value:"29.3.7 \u904d\u5386\u5bf9\u8c61",id:"2937-\u904d\u5386\u5bf9\u8c61",level:3},{value:"29.3.8 \u8f6c\u6362\u6210\u5177\u4f53\u5bf9\u8c61",id:"2938-\u8f6c\u6362\u6210\u5177\u4f53\u5bf9\u8c61",level:3},{value:"29.3.9 \u56fa\u5316\u7c98\u571f",id:"2939-\u56fa\u5316\u7c98\u571f",level:3},{value:"29.3.10 \u8f93\u51fa <code>JSON</code>",id:"29310-\u8f93\u51fa-json",level:3},{value:"29.3.11 \u8f93\u51fa <code>XML</code> \u5bf9\u8c61",id:"29311-\u8f93\u51fa-xml-\u5bf9\u8c61",level:3},{value:"29.3.12 \u5173\u952e\u5b57\u5904\u7406",id:"29312-\u5173\u952e\u5b57\u5904\u7406",level:3},{value:"29.3.13 \u8f6c\u6362\u6210\u5b57\u5178\u7c7b\u578b",id:"29313-\u8f6c\u6362\u6210\u5b57\u5178\u7c7b\u578b",level:3},{value:"29.3.14 \u83b7\u53d6\u4e0d\u5b58\u5728 <code>Key</code> \u5904\u7406",id:"29314-\u83b7\u53d6\u4e0d\u5b58\u5728-key-\u5904\u7406",level:3},{value:"29.3.15 \u8f6c\u6362\u4e3a\u7279\u5b9a\u96c6\u5408",id:"29315-\u8f6c\u6362\u4e3a\u7279\u5b9a\u96c6\u5408",level:3},{value:"29.4 \u5e8f\u5217\u5316\u652f\u6301",id:"294-\u5e8f\u5217\u5316\u652f\u6301",level:2},{value:"29.5 \u53cd\u9988\u4e0e\u5efa\u8bae",id:"295-\u53cd\u9988\u4e0e\u5efa\u8bae",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components},{Details:r}=n;return r||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(r,{children:[(0,s.jsx)("summary",{children:"\ud83d\udcdd \u6a21\u5757\u66f4\u65b0\u65e5\u5fd7"}),(0,s.jsx)("div",{children:(0,s.jsxs)("div",{children:[(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"\u65b0\u7279\u6027"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\xa0",(0,s.jsx)(c.Z,{children:"\u65b0\u589e"})," \u7c98\u571f\u5bf9\u8c61 ",(0,s.jsx)(n.code,{children:".ConvertTo"})," \u652f\u6301\u81ea\u5b9a\u4e49\u503c\u63d0\u4f9b\u5668 ",(0,s.jsx)("sup",{children:"4.8.8.40"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.08.03"})," ",(0,s.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/70d58888b3cec88c5c2a8458654dca1881e2a88b",children:"70d5888"})]}),"\n",(0,s.jsxs)(n.li,{children:["\xa0",(0,s.jsx)(c.Z,{children:"\u65b0\u589e"})," \u7c98\u571f\u5bf9\u8c61\u652f\u6301\u7ed3\u6784 ",(0,s.jsx)(n.code,{children:"struct"})," \u5bf9\u8c61\u7c7b\u578b ",(0,s.jsx)("sup",{children:"4.8.8.7"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.04.30"})," ",(0,s.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/a0fa3aa7ae536e948740401b510d99cf45e251dc",children:"a0fa3aa"})]}),"\n",(0,s.jsxs)(n.li,{children:["\xa0",(0,s.jsx)(c.Z,{children:"\u65b0\u589e"})," \u7c98\u571f\u5bf9\u8c61\u53ef\u53cd\u5c04\u8f6c\u6362\u6210\u7279\u5b9a ",(0,s.jsx)(n.code,{children:"IEnumerable<T>"})," \u7c7b\u578b\uff1a",(0,s.jsx)(n.code,{children:"clay.ConverTo<T>()"})," ",(0,s.jsx)("sup",{children:"4.8.8"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.04.13"})," ",(0,s.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/5d54a6579be3d710649bb199dd985f60acaf9787",children:"5d54a65"})]}),"\n",(0,s.jsxs)(n.li,{children:["\xa0",(0,s.jsx)(c.Z,{children:"\u65b0\u589e"})," ",(0,s.jsxs)(n.strong,{children:["\u7c98\u571f\u5bf9\u8c61\u53ef\u914d\u7f6e\u8bbf\u95ee\u4e0d\u5b58\u5728 ",(0,s.jsx)(n.code,{children:"Key"})," \u65f6\u662f\u629b\u5f02\u5e38\u8fd8\u662f\u8fd4\u56de ",(0,s.jsx)(n.code,{children:"null"})]})," ",(0,s.jsx)("sup",{children:"4.8.7.40"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.04.10"})," ",(0,s.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/e994d53b64a825461673f48960df1716be44f192",children:"e994d53"})]}),"\n",(0,s.jsxs)(n.li,{children:["\xa0",(0,s.jsx)(c.Z,{children:"\u65b0\u589e"})," ",(0,s.jsxs)(n.strong,{children:["\u7c98\u571f\u5bf9\u8c61\u53ef\u8f6c\u6362\u6210 ",(0,s.jsx)(n.code,{children:"IEnumerable<T>"})," \u5bf9\u8c61\u5e76\u5b9e\u73b0 ",(0,s.jsx)(n.code,{children:"Lambda/Linq"})," \u64cd\u4f5c"]})," ",(0,s.jsx)("sup",{children:"4.8.7.19"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.22"})," ",(0,s.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/2b14ed9da03699619b1fade6e053f65b77a5b0fe",children:"2b14ed9"})]}),"\n"]}),"\n"]}),"\n"]}),(0,s.jsxs)(r,{style:{marginLeft:50},children:[(0,s.jsx)("summary",{children:"\u67e5\u770b\u53d8\u5316"}),(0,s.jsx)("div",{children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3-4,6-12}",children:'dynamic clay = Clay.Parse("{\\"Foo\\":\\"json\\",\\"Bar\\":100,\\"Nest\\":{\\"Foobar\\":true},\\"Arr\\":[\\"NOR\\",\\"XOR\\"]}");\r\n\r\n// \u5c06 clay.Arr \u8f6c\u6362\u6210 IEnumerable<dynamic>\r\nIEnumerable<dynamic> query = clay.Arr.AsEnumerator<dynamic>();\r\n\r\n// \u5b9e\u73b0 Lambda/Linq \u64cd\u4f5c\r\nvar result = query.Where(u => u.StartsWith("N"))\r\n .Select(u => new\r\n {\r\n Name = u\r\n })\r\n .ToList();\n'})})})]}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\xa0",(0,s.jsx)(c.Z,{children:"\u65b0\u589e"})," \u7c98\u571f\u5bf9\u8c61\u652f\u6301\u4efb\u4f55\u5b57\u7b26\u4f5c\u4e3a ",(0,s.jsx)(n.code,{children:"JSON/XML"})," \u952e ",(0,s.jsx)("sup",{children:"4.8.6.9"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.02.19"})," ",(0,s.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/f99aee8dafddf3cfd148922166abd3998e8eb087",children:"f99aee8"})," ",(0,s.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/4961e01486f604db12a8d8d71f9bd563ed7d7d48#note_16329657",children:"#note_16329657"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"\u95ee\u9898\u4fee\u590d"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\xa0",(0,s.jsx)(c.Z,{children:"\u4fee\u590d"})," \u7c98\u571f\u5bf9\u8c61\u4e0d\u652f\u6301\u679a\u4e3e\u7c7b\u578b\u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.8.41"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.08.25"})," ",(0,s.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I7VDDL",children:"#I7VDDL"})]}),"\n",(0,s.jsxs)(n.li,{children:["\xa0",(0,s.jsx)(c.Z,{children:"\u4fee\u590d"})," ",(0,s.jsx)(n.code,{children:"ExpandoObject.ToDictionary()"})," \u8f6c\u6362\u5f02\u5e38 ",(0,s.jsx)("sup",{children:"4.8.8.25"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.06.14"})," ",(0,s.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I7BY0P",children:"#I7BY0P"})]}),"\n",(0,s.jsxs)(n.li,{children:["\xa0",(0,s.jsx)(c.Z,{children:"\u4fee\u590d"})," \u7c98\u571f\u5bf9\u8c61\u8f6c\u6362\u4e3a ",(0,s.jsx)(n.code,{children:"Dictionary<string, object>"})," \u7c7b\u578b\u5f02\u5e38 ",(0,s.jsx)("sup",{children:"4.8.7.41"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.04.11"})," ",(0,s.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/f96baebbb06b53fc481ea7925cbbfbcb191f9c10",children:"f96baeb"})]}),"\n",(0,s.jsxs)(n.li,{children:["\xa0",(0,s.jsx)(c.Z,{children:"\u4fee\u590d"})," \u7c98\u571f\u5bf9\u8c61\u4e0d\u652f\u6301\u8fd0\u884c\u65f6\u52a8\u6001\u8bbe\u7f6e\u643a\u5e26\u7279\u6b8a\u5b57\u7b26\u7684 ",(0,s.jsx)(n.code,{children:"Key"})," \u952e ",(0,s.jsx)("sup",{children:"4.8.7.39"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.04.10"})," ",(0,s.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/6572515abbd93c4572cc513da4dd5aa497d144d2",children:"6572515"})]}),"\n",(0,s.jsxs)(n.li,{children:["\xa0",(0,s.jsx)(c.Z,{children:"\u4fee\u590d"})," \u7c98\u571f\u5bf9\u8c61\u904d\u5386\u5bf9\u8c61\u952e\u503c\u5bf9\u56e0 ",(0,s.jsx)(n.code,{children:"4.8.7.19"})," \u7248\u672c\u66f4\u65b0\u5bfc\u81f4\u5f02\u5e38 ",(0,s.jsx)("sup",{children:"4.8.7.25"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.28"})," ",(0,s.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/I6R4ZU",children:"#I6R4ZU"})]}),"\n",(0,s.jsxs)(n.li,{children:["\xa0",(0,s.jsx)(c.Z,{children:"\u4fee\u590d"})," \u7c98\u571f\u5bf9\u8c61\u4e0d\u652f\u6301 ",(0,s.jsx)(n.code,{children:"\u6570\u5b57"})," \u4f5c\u4e3a ",(0,s.jsx)(n.code,{children:"JSON/XML"})," \u952e\u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.6.9"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.02.19"})," ",(0,s.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/4961e01486f604db12a8d8d71f9bd563ed7d7d48#note_16329657",children:"#note_16329657"})]}),"\n",(0,s.jsxs)(n.li,{children:["\xa0",(0,s.jsx)(c.Z,{children:"\u4fee\u590d"})," \u7c98\u571f\u5bf9\u8c61\u4e0d\u652f\u6301 ",(0,s.jsx)(n.code,{children:"\u4e2d\u6587"})," \u4f5c\u4e3a ",(0,s.jsx)(n.code,{children:"JSON/XML"})," \u952e\u95ee\u9898 ",(0,s.jsx)("sup",{children:"4.8.6.6"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.02.18"})," ",(0,s.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/4961e01486f604db12a8d8d71f9bd563ed7d7d48",children:"4961e01"})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"\u5176\u4ed6\u66f4\u6539"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\xa0",(0,s.jsx)(c.Z,{children:"\u8c03\u6574"})," \u7c98\u571f\u5bf9\u8c61 ",(0,s.jsx)(n.code,{children:"number"})," \u7c7b\u578b\u5904\u7406\uff0c\u82e5\u542b ",(0,s.jsx)(n.code,{children:"."})," \u8f6c ",(0,s.jsx)(n.code,{children:"double"})," \u7c7b\u578b\uff0c\u5426\u5219\u8f6c ",(0,s.jsx)(n.code,{children:"long"})," \u7c7b\u578b ",(0,s.jsx)("sup",{children:"4.8.7.24"})," ",(0,s.jsx)("sup",{children:"\u23f1\ufe0f2023.03.28"})," ",(0,s.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/commit/e82e883d54282b749390ae5e93df8c3e7acaa97e",children:"e82e883"})]}),"\n"]}),"\n"]}),"\n"]})]})})]}),"\n",(0,s.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(n.code,{children:"Furion 2.1.12 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsx)(n.h2,{id:"291-\u5173\u4e8e\u7c98\u571f\u5bf9\u8c61",children:"29.1 \u5173\u4e8e\u7c98\u571f\u5bf9\u8c61"}),"\n",(0,s.jsxs)(n.p,{children:["\u7c98\u571f\u5bf9\u8c61\u662f ",(0,s.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u63a8\u51fa\u7684\u4e00\u79cd\u52a8\u6001\u7c7b\u578b\uff0c\u53ef\u4ee5\u6a21\u62df\u5f31\uff08\u52a8\u6001\uff09\u8bed\u8a00\u64cd\u4f5c\u7279\u6027\uff0c\u4f7f C# \u5bf9\u8c61\u5b9e\u73b0\u7c7b\u4f3c ",(0,s.jsx)(n.code,{children:"JavaScript"})," \u4e00\u6837\u64cd\u4f5c\u5bf9\u8c61\u3002\u53ea\u9700\u901a\u8fc7 ",(0,s.jsx)(n.code,{children:"Clay"})," \u7c7b\u521d\u59cb\u5316\u5373\u53ef\u3002"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"\u4e3a\u4ec0\u4e48\u8d77\u540d\u4e3a \u201c\u7c98\u571f\u201d \u5462\uff1f\u56e0\u4e3a\u8fd9\u4e2a\u5bf9\u8c61\u53ef\u4ee5\u81ea\u7531\u7684\u6dfb\u52a0\u5c5e\u6027\uff0c\u79fb\u9664\u5c5e\u6027\uff0c\u53c8\u53ef\u4ee5\u56fa\u5316\u6210\u4efb\u4f55\u5bf9\u8c61\uff0c\u5177\u6709\u53ef\u62d3\u5c55\u3001\u53ef\u5851\u9020\u7684\u7279\u70b9\u3002"})}),"\n",(0,s.jsx)(n.h3,{id:"2911-\u4f7f\u7528\u573a\u666f",children:"29.1.1 \u4f7f\u7528\u573a\u666f"}),"\n",(0,s.jsxs)(n.p,{children:["\u7c98\u571f\u5bf9\u8c61\u5e38\u7528\u4e8e\u9700\u8981\u52a8\u6001\u6784\u5efa\u5bf9\u8c61\u7684\u5730\u65b9\uff0c\u5982 ",(0,s.jsx)(n.code,{children:"CMS"})," \u7cfb\u7edf\u7684 ",(0,s.jsx)(n.code,{children:"ViewModel"}),"\uff0c\u6216\u8005\u8fd0\u884c\u65f6\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5bf9\u8c61\uff0c\u6216\u8005\u8bf7\u6c42\u7b2c\u4e09\u65b9 ",(0,s.jsx)(n.code,{children:"API"})," \u60c5\u51b5\u3002"]}),"\n",(0,s.jsx)(n.h3,{id:"2912-\u5173\u4e8e\u6027\u80fd",children:"29.1.2 \u5173\u4e8e\u6027\u80fd"}),"\n",(0,s.jsx)(n.p,{children:"\u7c98\u571f\u6027\u80fd\u5b9e\u9645\u4e0a\u5e76\u4e0d\u9ad8\u6548\uff0c\u4f46\u662f\u6027\u80fd\u4e5f\u5e76\u4e0d\u4f4e\u4e0b\uff0c\u53ea\u4e0d\u8fc7\u7565\u8f93\u4e8e\u5f3a\u7c7b\u578b\u8c03\u7528\u3002\u4ec0\u4e48\u65f6\u5019\u4f7f\u7528\u53ef\u4ee5\u770b\u4ee5\u4e0a\u7684\u3010\u4f7f\u7528\u573a\u666f\u3011\u3002"}),"\n",(0,s.jsxs)(n.h2,{id:"292-clay-\u5bf9\u8c61",children:["29.2 ",(0,s.jsx)(n.code,{children:"Clay"})," \u5bf9\u8c61"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"Clay"})," \u5bf9\u8c61\u662f\u7ee7\u627f\u81ea ",(0,s.jsx)(n.code,{children:"DynamicObject"})," \u7684\u4e00\u4e2a\u7279\u6b8a\u5bf9\u8c61\uff0c\u63d0\u4f9b\u4e86\u50cf\u5f31\uff08\u52a8\u6001\uff09\u8bed\u8a00\u4e00\u6837\u64cd\u4f5c\u5bf9\u8c61\u7684\u65b9\u6cd5\u53ca\u7d22\u5f15\u83b7\u53d6\u65b9\u5f0f\u3002"]}),"\n",(0,s.jsx)(n.h2,{id:"293-\u5982\u4f55\u4f7f\u7528",children:"29.3 \u5982\u4f55\u4f7f\u7528"}),"\n",(0,s.jsx)(n.h3,{id:"2931-\u521b\u5efa\u4e00\u4e2a\u5bf9\u8c61",children:"29.3.1 \u521b\u5efa\u4e00\u4e2a\u5bf9\u8c61"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {2,5,8}",children:'// \u521b\u5efa\u4e00\u4e2a\u7a7a\u7684\u7c98\u571f\u5bf9\u8c61\r\ndynamic clay = new Clay();\r\n\r\n// \u4ece\u73b0\u6709\u7684\u5bf9\u8c61\u521b\u5efa\r\ndynamic clay2 = Clay.Object(new {});\r\n\r\n// \u4ece json \u5b57\u7b26\u4e32\u521b\u5efa\uff0c\u53ef\u7528\u4e8e\u7b2c\u4e09\u65b9 API \u5bf9\u63a5\uff0c\u975e\u5e38\u6709\u7528\r\ndynamic clay3 = Clay.Parse(@"{""foo"":""json"", ""bar"":100, ""nest"":{ ""foobar"":true } }");\n'})}),"\n",(0,s.jsx)(n.h3,{id:"2932-\u8bfb\u53d6\u83b7\u53d6\u5c5e\u6027",children:"29.3.2 \u8bfb\u53d6/\u83b7\u53d6\u5c5e\u6027"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,11-14}",children:'dynamic clay = Clay.Object(new\r\n{\r\n Foo = "json",\r\n Bar = 100,\r\n Nest = new\r\n {\r\n Foobar = true\r\n }\r\n});\r\n\r\nvar r1 = clay.Foo; // "json" - string\u7c7b\u578b\r\nvar r2 = clay.Bar; // 100 - double\u7c7b\u578b\r\nvar r3 = clay.Nest.Foobar; // true - bool\u7c7b\u578b\r\nvar r4 = clay["Nest"]["Foobar"]; // \u8fd8\u53ef\u4ee5\u548c JavaScript \u4e00\u6837\u901a\u8fc7\u7d22\u5f15\u5668\u83b7\u53d6\n'})}),"\n",(0,s.jsx)(n.h3,{id:"2933-\u65b0\u589e\u5c5e\u6027",children:"29.3.3 \u65b0\u589e\u5c5e\u6027"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,12-14}",children:'dynamic clay = Clay.Object(new\r\n{\r\n Foo = "json",\r\n Bar = 100,\r\n Nest = new\r\n {\r\n Foobar = true\r\n }\r\n});\r\n\r\n// \u65b0\u589e\r\nclay.Arr = new string[] { "NOR", "XOR" }; // \u6dfb\u52a0\u4e00\u4e2a\u6570\u7ec4\r\nclay.Obj1 = new City { }; // \u65b0\u589e\u4e00\u4e2a\u5b9e\u4f8b\u5bf9\u8c61\r\nclay.Obj2 = new { Foo = "abc", Bar = 100 }; // \u65b0\u589e\u4e00\u4e2a\u533f\u540d\u7c7b\n'})}),"\n",(0,s.jsx)(n.h3,{id:"2934-\u66f4\u65b0\u5c5e\u6027\u503c",children:"29.3.4 \u66f4\u65b0\u5c5e\u6027\u503c"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,12-14}",children:'dynamic clay = Clay.Object(new\r\n{\r\n Foo = "json",\r\n Bar = 100,\r\n Nest = new\r\n {\r\n Foobar = true\r\n }\r\n});\r\n\r\n// \u66f4\u65b0\r\nclay.Foo = "Furion";\r\nclay["Nest"].Foobar = false;\r\nclay.Nest["Foobar"] = true;\n'})}),"\n",(0,s.jsx)(n.h3,{id:"2935-\u5220\u9664\u5c5e\u6027",children:"29.3.5 \u5220\u9664\u5c5e\u6027"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,13-16}",children:'dynamic clay = Clay.Object(new\r\n{\r\n Foo = "json",\r\n Bar = 100,\r\n Nest = new\r\n {\r\n Foobar = true\r\n },\r\n Arr = new string[] { "NOR", "XOR" }\r\n});\r\n\r\n// \u5220\u9664\u64cd\u4f5c\r\nclay.Delete("Foo"); // \u901a\u8fc7 Delete \u65b9\u6cd5\u5220\u9664\r\nclay.Arr.Delete(0); // \u652f\u6301\u6570\u7ec4 Delete \u7d22\u5f15\u5220\u9664\r\nclay("Bar"); // \u652f\u6301\u76f4\u63a5\u901a\u8fc7\u5bf9\u8c61\u4f5c\u4e3a\u65b9\u6cd5\u5220\u9664\r\nclay.Arr(1); // \u652f\u6301\u6570\u7ec4\u4f5c\u4e3a\u65b9\u6cd5\u5220\u9664\n'})}),"\n",(0,s.jsx)(n.h3,{id:"2936-\u5224\u65ad\u952e\u7d22\u5f15\u662f\u5426\u5b58\u5728",children:"29.3.6 \u5224\u65ad\u952e/\u7d22\u5f15\u662f\u5426\u5b58\u5728"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,13-18}",children:'dynamic clay = Clay.Object(new\r\n{\r\n Foo = "json",\r\n Bar = 100,\r\n Nest = new\r\n {\r\n Foobar = true\r\n },\r\n Arr = new string[] { "NOR", "XOR" }\r\n});\r\n\r\n// \u5224\u65ad\u5c5e\u6027\u662f\u5426\u5b58\u5728\r\nvar a = clay.IsDefined("Foo"); // true\r\nvar b = clay.IsDefined("Foooo"); // false\r\nvar c = clay.Foo(); // true\r\nvar d = clay.Foooo(); // false;\r\nvar e = clay.Arr.IsDefined(0); // true\r\nvar f = clay.Arr.IsDefined(3); // false\n'})}),"\n",(0,s.jsx)(n.h3,{id:"2937-\u904d\u5386\u5bf9\u8c61",children:"29.3.7 \u904d\u5386\u5bf9\u8c61"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {12,18,24,33,36}",children:'dynamic clay = Clay.Object(new\r\n{\r\n Foo = "json",\r\n Bar = 100,\r\n Nest = new\r\n {\r\n Foobar = true\r\n },\r\n Arr = new string[] { "NOR", "XOR" }\r\n});\r\n\r\n// \u904d\u5386\u6570\u7ec4\r\nforeach (string item in clay.Arr)\r\n{\r\n Console.WriteLine(item); // NOR, XOR\r\n}\r\n\r\n// \u904d\u5386\u6574\u4e2a\u5bf9\u8c61\u5c5e\u6027\u53ca\u503c\uff0c\u7c7b\u4f3c JavaScript \u7684 for (var p in obj)\r\nforeach (KeyValuePair<string, dynamic> item in clay)\r\n{\r\n Console.WriteLine(item.Key + ":" + item.Value); // Foo:json, Bar: 100, Nest: { "Foobar":true}, Arr:["NOR","XOR"]\r\n}\r\n\r\n// \u6570\u7ec4/\u96c6\u5408 \u53ef\u4f7f\u7528 Lambda \u65b9\u5f0f\uff0cFurion 4.8.7.19+ \u652f\u6301\r\nIEnumerable<dynamic> query = clay.Arr.AsEnumerator<dynamic>(); // \u901a\u8fc7 .AsEnumerator<T>() \u8f6c\u6362\u6210 IEnumerable<T> \u7c7b\u578b\r\nvar result = query.Where(u => u.StartsWith("N"))\r\n .Select(u => new\r\n {\r\n Name = u\r\n })\r\n .ToList();\r\n\r\n// \u4e5f\u53ef\u4ee5\u901a\u8fc7\u539f\u751f\u65b9\u6cd5\u8f6c\u6362\u6210 IEnumerable \u5bf9\u8c61\r\nIEnumerable<dynamic> query = ((System.Collections.IEnumerable)clay.Arr).Cast<dynamic>(); // \u5176\u4e2d Cast<T> \u7684 T \u53ef\u4ee5\u65f6\u4efb\u610f\u7c7b\u578b\uff0c\u6bd4\u5982 Cast<string>();\r\n\r\n// \u83b7\u53d6\u5bf9\u8c61\u6240\u6709\u952e\u6216\u6570\u7ec4\u6240\u6709\u7d22\u5f15\r\nIEnumerable<string> keys = clay.GetDynamicMemberNames();\n'})}),"\n",(0,s.jsx)(n.h3,{id:"2938-\u8f6c\u6362\u6210\u5177\u4f53\u5bf9\u8c61",children:"29.3.8 \u8f6c\u6362\u6210\u5177\u4f53\u5bf9\u8c61"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {5-7,11-13}",children:'dynamic clay = new Clay();\r\nclay.Arr = new string[] { "Furion", "Fur" };\r\n\r\n// \u6570\u7ec4\u8f6c\u6362\u793a\u4f8b\r\nvar a1 = clay.Arr.Deserialize<string[]>(); // \u901a\u8fc7 Deserialize \u65b9\u6cd5\r\nvar a2 = (string[])clay.Arr; // \u5f3a\u5236\u8f6c\u6362\r\nstring[] a3 = clay.Arr; // \u58f0\u660e\u65b9\u5f0f\r\n\r\n// \u5bf9\u8c61\u8f6c\u6362\u793a\u4f8b\r\nclay.City = new City { Id = 1, Name = "\u4e2d\u5c71\u5e02" };\r\nvar c1 = clay.City.Deserialize<City>(); // \u901a\u8fc7 Deserialize \u65b9\u6cd5\r\nvar c2 = (City)clay.City; // \u5f3a\u5236\u8f6c\u6362\r\nCity c3 = clay.City; // \u58f0\u660e\u65b9\u5f0f\n'})}),"\n",(0,s.jsx)(n.h3,{id:"2939-\u56fa\u5316\u7c98\u571f",children:"29.3.9 \u56fa\u5316\u7c98\u571f"}),"\n",(0,s.jsxs)(n.p,{children:["\u56fa\u5316\u7c98\u571f\u5728\u5f88\u591a\u65f6\u5019\u548c\u5e8f\u5217\u5316\u5f88\u50cf\uff0c\u4f46\u662f\u5982\u679c\u76f4\u63a5\u8c03\u7528 ",(0,s.jsx)(n.code,{children:"Deserialize<object>"})," \u6216 ",(0,s.jsx)(n.code,{children:"Deserialize<dynamic>"})," \u65e0\u6cd5\u8fd4\u56de\u5b9e\u9645\u7c7b\u578b\uff0c\u6240\u4ee5\u5c31\u6709\u4e86\u56fa\u5316\u7c7b\u578b\u7684\u529f\u80fd\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {2,5,8}",children:"// \u8fd4\u56de object\r\nvar obj = clay.Solidify();\r\n\r\n// \u8fd4\u56de dynamic\r\nvar obj1 = clay.Solidify<dynamic>();\r\n\r\n// \u8fd4\u56de\u5176\u4ed6\u4efb\u610f\u7c7b\u578b\r\nvar obj2 = clay.Solidify<City>();\n"})}),"\n",(0,s.jsxs)(n.h3,{id:"29310-\u8f93\u51fa-json",children:["29.3.10 \u8f93\u51fa ",(0,s.jsx)(n.code,{children:"JSON"})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,13}",children:'dynamic clay = Clay.Object(new\r\n{\r\n Foo = "json",\r\n Bar = 100,\r\n Nest = new\r\n {\r\n Foobar = true\r\n },\r\n Arr = new string[] { "NOR", "XOR" }\r\n});\r\n\r\n// \u8f93\u51fa JSON\r\nvar json = clay.ToString(); // "{\\"Foo\\":\\"json\\",\\"Bar\\":100,\\"Nest\\":{\\"Foobar\\":true},\\"Arr\\":[\\"NOR\\",\\"XOR\\"]}"\n'})}),"\n",(0,s.jsxs)(n.admonition,{type:"tip",children:[(0,s.jsxs)(n.mdxAdmonitionTitle,{children:[(0,s.jsx)(n.code,{children:"Clay"})," \u5e8f\u5217\u5316\u6210 ",(0,s.jsx)(n.code,{children:"JSON"})," \u952e\u5927\u5c0f\u5199\u63a7\u5236"]}),(0,s.jsxs)(n.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c",(0,s.jsx)(n.code,{children:"Clay"})," \u8f93\u51fa\u6210 ",(0,s.jsx)(n.code,{children:"JSON"})," \u540e\u5c06\u4fdd\u6301\u539f\u6837\u8f93\u51fa\uff0c\u5982\u679c\u9700\u8981\u5b9e\u73b0\u952e\u547d\u540d\u63a7\u5236\uff0c\u5219\u9700\u8981\u5148\u8f6c\u6362\u6210 ",(0,s.jsx)(n.code,{children:"Dictionary"})," \u7136\u540e\u518d\u914d\u7f6e ",(0,s.jsx)(n.code,{children:"AddJsonOptions"})," \u670d\u52a1\uff0c\u5982\uff1a"]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {8-9}",children:"public IActionResult OutputClay()\r\n{\r\n dynamic clay = Clay.Object(new\r\n {\r\n // ....\r\n });\r\n\r\n // \u8f6c\u6362\u6210 dictionary\r\n var dic = clay.ToDictionary();\r\n\r\n return new JsonResult(dic);\r\n}\n"})}),(0,s.jsxs)(n.p,{children:["\u914d\u7f6e\u5e8f\u5217\u5316 ",(0,s.jsx)(n.code,{children:"Dictionary"})," \u952e\u547d\u540d\u7b56\u7565\u652f\u6301\uff1a"]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {2,4}",children:"services.AddControllers()\r\n .AddJsonOptions(options =>\r\n {\r\n options.JsonSerializerOptions.DictionaryKeyPolicy = JsonNamingPolicy.CamelCase; // \u914d\u7f6e Dictionary \u7c7b\u578b\u5e8f\u5217\u5316\u8f93\u51fa\r\n });\n"})})]}),"\n",(0,s.jsxs)(n.h3,{id:"29311-\u8f93\u51fa-xml-\u5bf9\u8c61",children:["29.3.11 \u8f93\u51fa ",(0,s.jsx)(n.code,{children:"XML"})," \u5bf9\u8c61"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,13}",children:'dynamic clay = Clay.Object(new\r\n{\r\n Foo = "json",\r\n Bar = 100,\r\n Nest = new\r\n {\r\n Foobar = true\r\n },\r\n Arr = new string[] { "NOR", "XOR" }\r\n});\r\n\r\n// \u8f93\u51fa XElement\r\nvar xml = clay.XmlElement;\n'})}),"\n",(0,s.jsx)(n.h3,{id:"29312-\u5173\u952e\u5b57\u5904\u7406",children:"29.3.12 \u5173\u952e\u5b57\u5904\u7406"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {2-3}",children:'dynamic clay = new Clay();\r\nclay.@int = 1;\r\nclay.@event = "\u4e8b\u4ef6";\n'})}),"\n",(0,s.jsx)(n.h3,{id:"29313-\u8f6c\u6362\u6210\u5b57\u5178\u7c7b\u578b",children:"29.3.13 \u8f6c\u6362\u6210\u5b57\u5178\u7c7b\u578b"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:'dynamic clay = Clay.Object(new { name = "\u5f20\u4e09" });\r\nclay.name = "\u767e\u5c0f\u50e7";\r\nDictionary<string, object> parms = clay.ToDictionary();\n'})}),"\n",(0,s.jsxs)(n.h3,{id:"29314-\u83b7\u53d6\u4e0d\u5b58\u5728-key-\u5904\u7406",children:["29.3.14 \u83b7\u53d6\u4e0d\u5b58\u5728 ",(0,s.jsx)(n.code,{children:"Key"})," \u5904\u7406"]}),"\n",(0,s.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(n.code,{children:"Furion 4.8.7.40 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsxs)(n.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u901a\u8fc7\u7c98\u571f\u5bf9\u8c61\u83b7\u53d6\u4e0d\u5b58\u5728\u7684\u503c\u4f1a\u629b\u51fa ",(0,s.jsx)(n.code,{children:"Microsoft.CSharp.RuntimeBinder.RuntimeBinderException"})," \u5f02\u5e38\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {12}",children:'dynamic clay = Clay.Object(new\r\n{\r\n Foo = "json",\r\n Bar = 100,\r\n Nest = new\r\n {\r\n Foobar = true\r\n }\r\n});\r\n\r\n// \u83b7\u53d6\u4e0d\u5b58\u5728\u7684\u503c\r\nvar undefined = clay["undefined"]; // \u629b\u51fa Microsoft.CSharp.RuntimeBinder.RuntimeBinderException \u5f02\u5e38\n'})}),"\n",(0,s.jsxs)(n.p,{children:["\u8fd9\u65f6\u6211\u4eec\u53ef\u4ee5\u914d\u7f6e\u7c98\u571f\u5bf9\u8c61\u7684 ",(0,s.jsx)(n.code,{children:"ThrowOnUndefined"})," \u5c5e\u6027\u884c\u4e3a\uff0c",(0,s.jsxs)(n.strong,{children:["\u914d\u7f6e ",(0,s.jsx)(n.code,{children:"true"})," \u65f6\u83b7\u53d6\u4e0d\u5b58\u5728\u7684 ",(0,s.jsx)(n.code,{children:"Key"})," \u629b\u5f02\u5e38\uff0c",(0,s.jsx)(n.code,{children:"false"})," \u8868\u793a\u8fd4\u56de ",(0,s.jsx)(n.code,{children:"null"})]}),"\u3002\u5982\uff1a"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,10,12,14,25-27,29,40-41,43-46}",children:'// \u65b9\u5f0f\u4e00\uff0c\u521d\u59cb\u5316\u6307\u5b9a throwOnUndefined: false\uff0c\u6240\u6709\u6784\u9020\u51fd\u6570\u548c\u9759\u6001\u521d\u59cb\u5316\u65b9\u6cd5\u90fd\u6709\u8be5\u53c2\u6570\r\ndynamic clay = Clay.Object(new\r\n{\r\n Foo = "json",\r\n Bar = 100,\r\n Nest = new\r\n {\r\n Foobar = true\r\n }\r\n}, throwOnUndefined: false);\r\n\r\nvar undefined = clay.Undefined; // => null\r\n\r\n// \u65b9\u5f0f\u4e8c\uff0c\u64cd\u4f5c\u65f6\u6307\u5b9a\uff0c\u8bbe\u7f6e ThrowOnUndefined \u5c5e\u6027\r\ndynamic clay = Clay.Object(new\r\n{\r\n Foo = "json",\r\n Bar = 100,\r\n Nest = new\r\n {\r\n Foobar = true\r\n }\r\n});\r\n\r\nvar undefined = clay.Undefined; // \u629b\u51fa Microsoft.CSharp.RuntimeBinder.RuntimeBinderExceptionnull\r\nclay.ThrowOnUndefined = false;\r\nvar undefined = clay.Undefined; // => null\r\n\r\n// \u65b9\u5f0f\u4e09\uff0c\u53ea\u914d\u7f6e\u5c40\u90e8\u5bf9\u8c61\r\ndynamic clay = Clay.Object(new\r\n{\r\n Foo = "json",\r\n Bar = 100,\r\n Nest = new\r\n {\r\n Foobar = true\r\n }\r\n});\r\n\r\nvar undefined = clay.Undefined; // \u629b\u51fa Microsoft.CSharp.RuntimeBinder.RuntimeBinderException\r\nvar bar = clay.Nest.Bar; // \u629b\u51fa Microsoft.CSharp.RuntimeBinder.RuntimeBinderException\r\n\r\n// \u8bbe\u7f6e Nest \u8282\u70b9\u4e0d\u629b\u5f02\u5e38\r\nclay.Nest.ThrowOnUndefined = false;\r\nvar undefined = clay.Undefined; // \u629b\u51fa Microsoft.CSharp.RuntimeBinder.RuntimeBinderException\r\nvar bar = clay.Nest.Bar; // => null\n'})}),"\n",(0,s.jsx)(n.h3,{id:"29315-\u8f6c\u6362\u4e3a\u7279\u5b9a\u96c6\u5408",children:"29.3.15 \u8f6c\u6362\u4e3a\u7279\u5b9a\u96c6\u5408"}),"\n",(0,s.jsx)(n.admonition,{title:"\u7248\u672c\u8bf4\u660e",type:"important",children:(0,s.jsxs)(n.p,{children:["\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u9650 ",(0,s.jsx)(n.code,{children:"Furion 4.8.8 +"})," \u7248\u672c\u4f7f\u7528\u3002"]})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {2}",children:'dynamic clay = Clay.Parse(@"[]");\r\nIEnumerable<SysMenu> data = clay.ConvertTo<SysMenu>();\n'})}),"\n",(0,s.jsxs)(n.p,{children:["\u8fd9\u79cd\u65b9\u5f0f\u533a\u522b\u4e8e ",(0,s.jsx)(n.code,{children:".Solidify<T>"}),"\uff0c",(0,s.jsx)(n.code,{children:"ConvertTo<T>"})," \u5185\u90e8\u901a\u8fc7\u53cd\u5c04\u521b\u5efa\u5bf9\u8c61\u5e76\u81ea\u52a8\u9002\u914d\u5c5e\u6027\u7c7b\u578b\u3002"]}),"\n",(0,s.jsxs)(n.p,{children:["\u53e6\u5916\u5728 ",(0,s.jsx)(n.code,{children:"Furion 4.8.8.40+"})," \u7248\u672c\u63d0\u4f9b\u4e86 ",(0,s.jsx)(n.code,{children:"ConvertTo"})," \u81ea\u5b9a\u4e49\u503c\u53c2\u6570\uff0c\u53ef\u4ee5\u9488\u5bf9\u7279\u5b9a\u5c5e\u6027\u8fdb\u884c\u989d\u5916\u5904\u7406\uff0c\u5982\uff1a"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {1,4-7,12}",children:'Func<PropertyInfo, object, object> valueProvider = (property, oldValue) =>\r\n{\r\n // \u4f8b\u5982\u9488\u5bf9\u5c5e\u6027\u540d\u4e3a Device \u7684\u8fdb\u884c\u989d\u5916\u5904\u7406\r\n if (property.Name == "Device")\r\n {\r\n return JsonSerializer.Deserialize<Device>(oldValue.ToString());\r\n }\r\n\r\n return oldValue;\r\n};\r\n\r\nIEnumerable<SysMenu> data = clay.ConvertTo<SysMenu>(valueProvider);\n'})}),"\n",(0,s.jsx)(n.h2,{id:"294-\u5e8f\u5217\u5316\u652f\u6301",children:"29.4 \u5e8f\u5217\u5316\u652f\u6301"}),"\n",(0,s.jsxs)(n.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c",(0,s.jsx)(n.code,{children:"Clay"})," \u4e3a\u52a8\u6001\u7c7b\u578b\u5bf9\u8c61\uff0c\u4e0d\u652f\u6301\u76f4\u63a5\u901a\u8fc7 ",(0,s.jsx)(n.code,{children:"System.Text.Json"})," \u548c ",(0,s.jsx)(n.code,{children:"Newtonsoft.Json"})," \u8fdb\u884c\u5e8f\u5217\u5316\u548c\u53cd\u5e8f\u5217\u5316\uff0c\u8fd9\u65f6\u53ea\u9700\u6dfb\u52a0\u4ee5\u4e0b\u914d\u7f6e\u5373\u53ef\u3002"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"System.Text.Json"})," \u65b9\u5f0f"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {2,4}",children:"services.AddControllersWithViews()\r\n .AddJsonOptions(options =>\r\n {\r\n options.JsonSerializerOptions.Converters.AddClayConverters();\r\n });\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"Newtonsoft.Json"})," \u65b9\u5f0f"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers {3}",children:".AddNewtonsoftJson(options =>\r\n{\r\n options.SerializerSettings.Converters.AddClayConverters();\r\n})\n"})}),"\n",(0,s.jsx)(n.h2,{id:"295-\u53cd\u9988\u4e0e\u5efa\u8bae",children:"29.5 \u53cd\u9988\u4e0e\u5efa\u8bae"}),"\n",(0,s.jsx)(n.admonition,{title:"\u4e0e\u6211\u4eec\u4ea4\u6d41",type:"note",children:(0,s.jsxs)(n.p,{children:["\u7ed9 Furion \u63d0 ",(0,s.jsx)(n.a,{href:"https://gitee.com/dotnetchina/Furion/issues/new?issue",children:"Issue"}),"\u3002"]})})]})}function x(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},510:(e,n,r)=>{r.d(n,{Z:()=>U});r(7294);const s=(e,n,r)=>e?"string"==typeof e?e:e[n]||r:r;var i=r(5893);const c={display:"block"},l=e=>{let{size:n,color:r,style:l,...d}=e;const a=l?{...c,...l}:c;return(0,i.jsx)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:a,...d,children:(0,i.jsx)("path",{d:"M856.4 292.8c-63.3-63.6-126.6-127.1-190.2-190.3-15.3-15.2-32.7-16.1-48.1-0.8-64.3 63.6-128.1 127.6-191.8 191.9-14 14.2-16.3 31.6-1.7 46 14.8 14.7 31.5 10.6 46.1-2.7 5.1-4.6 9.8-9.7 14.7-14.7 39.2-39.7 78.5-79.5 122.8-124.4 0 170 3 332.2-1.1 494-2.4 96.4-91.2 174.6-187.4 176.6-110.6 2.3-198.6-84.4-199-197.4-0.6-136.3-0.2-272.6-0.1-408.9 0-21.8-7.9-37.4-31.2-39.9-18.9-2-33.2 13.2-33.1 37.5 0 145.8-3.4 291.7 2.4 437.2 6 152.1 160.4 263.5 309.5 230.5C591.8 900 672.8 797.2 673.6 664.6c0.8-144 0.2-288.1 0.2-432.1v-33.3c11.2 10.2 17.6 15.4 23.3 21.3 38.5 38.4 76.7 77 115.3 115.2 14.8 14.6 32.2 19.2 47.8 2.9 13.8-14.8 10.3-31.7-3.8-45.8z",fill:s(r,0,"#333333")})})};l.defaultProps={size:18};const d=l,a={display:"block"},o=e=>{let{size:n,color:r,style:c,...l}=e;const d=c?{...a,...c}:a;return(0,i.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:d,...l,children:[(0,i.jsx)("path",{d:"M143.872 768a51.2 51.2 0 0 1-15.36-2.56 51.2 51.2 0 0 1-35.328-51.2V283.136a148.992 148.992 0 0 1 141.824-153.6h450.56a148.992 148.992 0 0 1 141.824 153.6V512a148.992 148.992 0 0 1-141.824 153.6H244.224l-60.928 80.896a51.2 51.2 0 0 1-39.424 21.504zM235.008 180.224a97.792 97.792 0 0 0-90.624 102.4v430.592L218.624 614.4h466.944a97.792 97.792 0 0 0 90.624-102.4V283.136a97.792 97.792 0 0 0-90.624-102.4z",fill:s(r,0,"#333333")}),(0,i.jsx)("path",{d:"M880.128 875.52a51.2 51.2 0 0 1-39.424-20.48l-60.928-80.896h-243.2a25.6 25.6 0 0 1 0-51.2h268.8l76.288 102.4v-295.936a25.6 25.6 0 0 1 25.6-25.6 25.6 25.6 0 0 1 25.6 25.6v293.888a51.2 51.2 0 0 1-51.2 51.2z",fill:s(r,1,"#333333")})]})};o.defaultProps={size:18};const t=o,h={display:"block"},x=e=>{let{size:n,color:r,style:c,...l}=e;const d=c?{...h,...c}:h;return(0,i.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:d,...l,children:[(0,i.jsx)("path",{d:"M223.425605 449.2744l161.632237 0 0 253.65714c0 16.954137 13.745049 30.699186 30.699186 30.699186 16.95516 0 30.699186-13.745049 30.699186-30.699186l0-284.356326c0-16.95516-13.744026-30.699186-30.699186-30.699186L291.035446 387.876028l217.23665-248.51605L733.039255 387.580293 607.104031 387.580293c-16.954137 0-30.699186 13.745049-30.699186 30.699186l0 284.652062c0 16.954137 13.745049 30.699186 30.699186 30.699186s30.699186-13.745049 30.699186-30.699186L637.803217 448.978664l164.448376 0c12.140505 0 23.140023-7.154957 28.063149-18.251689 4.922103-11.097756 2.841721-24.053835-5.307889-33.05279L530.62315 72.570829c-5.881964-6.495948-14.273075-10.134825-23.024389-10.091846-8.763594 0.076748-17.076934 3.895727-22.844288 10.494005L200.312188 398.371056c-7.92653 9.067516-9.818623 21.931498-4.839215 32.896224S211.383338 449.2744 223.425605 449.2744z",fill:s(r,0,"#333333")}),(0,i.jsx)("path",{d:"M222.354204 829.113381l581.732178 0c16.954137 0 30.699186-13.745049 30.699186-30.699186s-13.745049-30.699186-30.699186-30.699186L222.354204 767.715009c-16.954137 0-30.699186 13.745049-30.699186 30.699186S205.400067 829.113381 222.354204 829.113381z",fill:s(r,1,"#333333")}),(0,i.jsx)("path",{d:"M804.086381 896.729361 222.354204 896.729361c-16.954137 0-30.699186 13.745049-30.699186 30.699186s13.745049 30.699186 30.699186 30.699186l581.732178 0c16.954137 0 30.699186-13.745049 30.699186-30.699186S821.041542 896.729361 804.086381 896.729361z",fill:s(r,2,"#333333")})]})};x.defaultProps={size:18};const j=x,u={display:"block"},y=e=>{let{size:n,color:r,style:c,...l}=e;const d=c?{...u,...c}:u;return(0,i.jsx)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:d,...l,children:(0,i.jsx)("path",{d:"M380.15463648 874.54223633c0 18.12744166-14.83154297 32.95898463-32.95898463 32.95898463s-32.95898463-14.83154297-32.95898462-32.95898463V228.9152832L172.71078883 370.86962865a33.04467773 33.04467773 0 0 1-46.60400416 0 33.04467773 33.04467773 0 0 1 0-46.6040034l197.55615234-198.14941406A32.76782227 32.76782227 0 0 1 347.0967749 116.52514674c0.03295924 0 0.06591772-0.03295924 0.09887695-0.03295924 1.54907201 0 2.90039088 0.69213867 4.41650366 0.88989258 2.66967773 0.39550781 5.40527318 0.59326172 7.94311548 1.61499049 12.03002904 4.94384766 20.59936549 16.71020508 20.59936549 30.45410156v725.0910642z m320.15698192 23.34155248a32.85351537 32.85351537 0 0 1-23.43383789 9.59106445c-0.03295924 0-0.06591772 0.03295924-0.09887696 0.03295924-1.54907201 0-2.90039088-0.69213867-4.41650365-0.92285182-2.70263697-0.36254857-5.40527318-0.56030248-7.94311549-1.61498972-12.03002904-4.91088842-20.59936549-16.67724584-20.59936473-30.42114309V149.45776367c0-18.12744166 14.83154297-32.95898463 32.95898387-32.95898463s32.95898463 14.83154297 32.95898463 32.95898463v645.60058619l141.52587916-141.92138697c12.81445313-12.82104467 33.81591797-12.82104467 46.63037109 0 12.78808619 12.81445313 12.78808619 33.77636719 0 46.60400416L700.3116184 897.88378881z",fill:s(r,0,"#333333")})})};y.defaultProps={size:18};const m=y,p={display:"block"},b=e=>{let{size:n,color:r,style:c,...l}=e;const d=c?{...p,...c}:p;return(0,i.jsx)("svg",{viewBox:"0 0 1172 1024",width:n+"px",height:n+"px",style:d,...l,children:(0,i.jsx)("path",{d:"M870.0416 250.4704a38.4 38.4 0 0 0-8.96 53.5552c13.056 18.2784 24.4224 37.8368 33.7408 58.112a38.4512 38.4512 0 0 0 50.944 18.8928 38.4512 38.4512 0 0 0 18.8416-50.944 436.0192 436.0192 0 0 0-40.96-70.6048 38.3488 38.3488 0 0 0-53.6064-9.0112zM181.4528 566.016a35.9936 35.9936 0 0 0 25.5488-10.5984L351.7952 410.624a36.096 36.096 0 1 0-51.0976-51.0976L217.6 442.5728C250.0096 278.1184 395.264 153.6 569.1392 153.6c50.7904 0 99.8912 10.3936 145.92 30.9248a38.4 38.4 0 1 0 31.232-70.0928 431.36 431.36 0 0 0-177.152-37.632c-214.6816 0-393.1136 156.416-428.4416 361.216L62.1568 359.4752a36.1984 36.1984 0 0 0-51.0976 51.0976l144.8448 144.7936a36.0448 36.0448 0 0 0 25.5488 10.6496zM978.5344 463.104a36.1984 36.1984 0 0 0-51.0976 0l-144.8448 144.7936a36.096 36.096 0 1 0 51.0976 51.0976l88.6272-88.576C894.3104 740.2496 746.8032 870.4 569.1392 870.4a357.7856 357.7856 0 0 1-325.2736-207.7184 38.4 38.4 0 1 0-69.7344 32.3072 434.3808 434.3808 0 0 0 394.9568 252.2112c215.1936 0 393.984-157.184 428.6464-362.7008l74.496 74.496a35.9936 35.9936 0 0 0 51.0976 0 36.096 36.096 0 0 0 0-51.0976l-144.7936-144.7936z",fill:s(r,0,"#333333")})})};b.defaultProps={size:18};const g=b,v={display:"block"},f=e=>{let{size:n,color:r,style:c,...l}=e;const d=c?{...v,...c}:v;return(0,i.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:d,...l,children:[(0,i.jsx)("path",{d:"M302 332a30 30 0 1 1 0-60h420a30 30 0 0 1 0 60H302zM302 542a30 30 0 0 1 0-60h420a30 30 0 0 1 0 60H302zM302 752a30 30 0 0 1 0-60h120a30 30 0 0 1 0 60H302z",fill:s(r,0,"#333333")}),(0,i.jsx)("path",{d:"M789.47 784.1a30 30 0 0 1 39.36 45.3l-144.24 125.25a30 30 0 0 1-19.68 7.35H214.85C163.4 962 122 919.46 122 867.38V156.62C122 104.54 163.4 62 214.85 62h594.3C860.6 62 902 104.54 902 156.62v529.05a30 30 0 1 1-60 0V156.62C842 137.3 827.09 122 809.15 122H214.85C196.91 122 182 137.3 182 156.62v710.76C182 886.7 196.91 902 214.85 902h438.84l135.78-117.9z",fill:s(r,1,"#333333")}),(0,i.jsx)("path",{d:"M692 931.19a30 30 0 1 1-60 0v-174.6C632 704.57 673.4 662 724.85 662h147.78a30 30 0 0 1 0 60h-147.78c-17.94 0-32.85 15.3-32.85 34.62v174.6z",fill:s(r,2,"#333333")})]})};f.defaultProps={size:18};const w=f,C={display:"block"},N=e=>{let{size:n,color:r,style:c,...l}=e;const d=c?{...C,...c}:C;return(0,i.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:d,...l,children:[(0,i.jsx)("path",{d:"M512 883.2A371.2 371.2 0 1 0 140.8 512 371.2 371.2 0 0 0 512 883.2z m0 64a435.2 435.2 0 1 1 435.2-435.2 435.2 435.2 0 0 1-435.2 435.2z",fill:s(r,0,"#333333")}),(0,i.jsx)("path",{d:"M557.056 512l122.368 122.368a31.744 31.744 0 1 1-45.056 45.056L512 557.056l-122.368 122.368a31.744 31.744 0 1 1-45.056-45.056L466.944 512 344.576 389.632a31.744 31.744 0 1 1 45.056-45.056L512 466.944l122.368-122.368a31.744 31.744 0 1 1 45.056 45.056z",fill:s(r,1,"#333333")})]})};N.defaultProps={size:18};const z=N,F={display:"block"},O=e=>{let{size:n,color:r,style:c,...l}=e;const d=c?{...F,...c}:F;return(0,i.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:d,...l,children:[(0,i.jsx)("path",{d:"M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 34.8-28.2 63-63 63H232c-34.8 0-63-28.2-63-63 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5 0.2 13 0.7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7 6 17.2 13.6 33.6 22.7 49 24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2c41.5-24.3 76.2-59 100.5-100.5 9.1-15.5 16.7-31.9 22.7-49C812.1 793.1 836 831.8 836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7 0.4-6.4 0.7-12.8 0.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3-20.1 11.8-42 20-64.9 24.3V484c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v396.5c-22.9-4.3-44.8-12.5-64.9-24.3-30.3-17.7-55.6-43-73.3-73.3C317.7 752 308 716.8 308 680V412h408v268z",fill:s(r,0,"#333333")}),(0,i.jsx)("path",{d:"M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1-17.2-31.5-42.5-56.8-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9-31.5 17.2-56.8 42.5-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z",fill:s(r,1,"#333333")})]})};O.defaultProps={size:18};const L=O,M={display:"block"},B=e=>{let{size:n,color:r,style:c,...l}=e;const d=c?{...M,...c}:M;return(0,i.jsxs)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:d,...l,children:[(0,i.jsx)("path",{d:"M512 71.68c-242.688 0-440.32 197.632-440.32 440.32s197.632 440.32 440.32 440.32 440.32-197.632 440.32-440.32-197.632-440.32-440.32-440.32z m0 819.2c-208.896 0-378.88-169.984-378.88-378.88s169.984-378.88 378.88-378.88 378.88 169.984 378.88 378.88-169.984 378.88-378.88 378.88z",fill:s(r,0,"#333333")}),(0,i.jsx)("path",{d:"M542.72 261.12H481.28v220.16H261.12v61.44h220.16v220.16h61.44v-220.16h220.16V481.28h-220.16z",fill:s(r,1,"#333333")})]})};B.defaultProps={size:18};const S=B,A={display:"block"},D=e=>{let{size:n,color:r,style:c,...l}=e;const d=c?{...A,...c}:A;return(0,i.jsx)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:d,...l,children:(0,i.jsx)("path",{d:"M384 896h-64v-70.4c0-15.2-10.4-28-24.8-31.2C159.2 768 64 644.8 64 496v-32h64v32c0 118.4 73.6 215.2 179.2 236 44.8 8.8 76.8 48 76.8 94.4v69.6zM704 896h-64v-70.4c0-45.6 32-85.6 76.8-94.4C822.4 711.2 896 614.4 896 496v-32h64v32c0 148.8-95.2 272-231.2 298.4-14.4 3.2-24.8 16-24.8 31.2v70.4zM512.8 640l-41.6-37.6c-147.2-133.6-244-208-244-316.8 0-88 68.8-156.8 156.8-156.8 49.6 0 97.6 23.2 128.8 60C544 152 592 128.8 641.6 128.8c88 0 156.8 68.8 156.8 156.8 0 108-96.8 183.2-244 316.8L512.8 640z",fill:s(r,0,"#333333")})})};D.defaultProps={size:18};const R=D,T={display:"block"},I=e=>{let{size:n,color:r,style:c,...l}=e;const d=c?{...T,...c}:T;return(0,i.jsx)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:d,...l,children:(0,i.jsx)("path",{d:"M942.4615936 284.62787926c-14.30911886-14.12709945-37.31996786-14.05468217-51.48229632 0.21920654L517.97142983 661.27810333 139.75544149 286.45003606c-14.30911886-14.16232846-37.31996786-14.05468217-51.51948344 0.21920654-14.16232846 14.30911886-14.05468217 37.35519687 0.21920654 51.51948345l401.99014627 398.34974663c0.61847666 0.61847666 1.41897273 0.76526706 2.03940637 1.34655658 0.14483342 0.14483342 0.18201941 0.32685283 0.32685283 0.47364324 7.09877874 7.02636259 16.38375538 10.55911595 25.63154489 10.55911595 9.35739278 0 18.75001458-3.60516949 25.85075143-10.77636551l398.34974663-401.99014628C956.84312974 321.8382427 956.73548345 298.7921647 942.4615936 284.62787926z",fill:s(r,0,"#333333")})})};I.defaultProps={size:18};const E=I,P={display:"block"},k=e=>{let{size:n,color:r,style:c,...l}=e;const d=c?{...P,...c}:P;return(0,i.jsx)("svg",{viewBox:"0 0 1024 1024",width:n+"px",height:n+"px",style:d,...l,children:(0,i.jsx)("path",{d:"M81.5384064 739.37212074c14.30911886 14.12709945 37.31996786 14.05468217 51.48229632-0.21920654L506.02857017 362.72189667 884.24455851 737.54996394c14.30911886 14.16232846 37.31996786 14.05468217 51.51948344-0.21920654 14.16232846-14.30911886 14.05468217-37.35519687-0.21920654-51.51948345l-401.99014627-398.34974663c-0.61847666-0.61847666-1.41897273-0.76526706-2.03940637-1.34655658-0.14483342-0.14483342-0.18201941-0.32685283-0.32685282-0.47364324-7.09877874-7.02636259-16.38375538-10.55911595-25.6315449-10.55911595-9.35739278 0-18.75001458 3.60516949-25.85075143 10.77636551l-398.34974663 401.99014628C67.15687026 702.1617573 67.26451655 725.2078353 81.5384064 739.37212074z",fill:s(r,0,"#333333")})})};k.defaultProps={size:18};const J=k,V=e=>{let{name:n,...r}=e;switch(n){case"youhua":return(0,i.jsx)(d,{...r});case"dayi":return(0,i.jsx)(t,{...r});case"shengji":return(0,i.jsx)(j,{...r});case"tiaozheng":return(0,i.jsx)(m,{...r});case"gengxin":return(0,i.jsx)(g,{...r});case"wendang":return(0,i.jsx)(w,{...r});case"shanchu":return(0,i.jsx)(z,{...r});case"bug":return(0,i.jsx)(L,{...r});case"xinzeng":return(0,i.jsx)(S,{...r});case"fuwu":return(0,i.jsx)(R,{...r});case"down":return(0,i.jsx)(E,{...r});case"up":return(0,i.jsx)(J,{...r})}return null},Z={label:"label_p8vM",icon:"icon_knQK"};function U(e){const{children:n}=e,r={"\u65b0\u589e":{icon:"xinzeng",bgColor:"#39b54a"},"\u4fee\u590d":{icon:"bug",bgColor:"#9c26b0"},"\u6587\u6863":{icon:"wendang",bgColor:"rgb(79, 147, 255)"},"\u66f4\u65b0":{icon:"gengxin",bgColor:"#0081ff"},"\u8c03\u6574":{icon:"tiaozheng",bgColor:"#333"},"\u5347\u7ea7":{icon:"shengji",bgColor:"#e03997"},"\u79fb\u9664":{icon:"shanchu",bgColor:"#666"},"\u7b54\u7591":{icon:"dayi",bgColor:"#bbb"},"\u4f18\u5316":{icon:"youhua",bgColor:"#38e550"}};return(0,i.jsxs)("label",{className:Z.label,title:n,style:{backgroundColor:r[n].bgColor},children:[(0,i.jsx)(V,{name:r[n].icon,color:"white",size:14,className:Z.icon})," ",n]})}},1151:(e,n,r)=>{r.d(n,{Z:()=>d,a:()=>l});var s=r(7294);const i={},c=s.createContext(i);function l(e){const n=s.useContext(c);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),s.createElement(c.Provider,{value:n},e.children)}}}]); |