[{"data":1,"prerenderedAt":1337},["ShallowReactive",2],{"navigation_docs_zh":3,"-zh-core-xml-components":237,"-zh-core-xml-components-surround":1332},[4,23,61,91,163],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":22},"快速开始","i-lucide-rocket","\u002Fzh\u002Fgetting-started","zh\u002F01.getting-started",[10,14,18],{"title":11,"path":12,"stem":13},"简介","\u002Fzh\u002Fgetting-started\u002Fintroduction","zh\u002F01.getting-started\u002F01.introduction",{"title":15,"path":16,"stem":17},"安装","\u002Fzh\u002Fgetting-started\u002Finstallation","zh\u002F01.getting-started\u002F02.installation",{"title":19,"path":20,"stem":21},"AI 集成","\u002Fzh\u002Fgetting-started\u002Fai-integration","zh\u002F01.getting-started\u002F03.ai-integration",false,{"title":24,"icon":25,"path":26,"stem":27,"children":28,"page":22},"CORE","i-lucide-box","\u002Fzh\u002Fcore","zh\u002F02.core",[29,33,37,41,45,49,53,57],{"title":30,"path":31,"stem":32},"@office-open\u002Fcore","\u002Fzh\u002Fcore\u002Foverview","zh\u002F02.core\u002F01.overview",{"title":34,"path":35,"stem":36},"XML 组件","\u002Fzh\u002Fcore\u002Fxml-components","zh\u002F02.core\u002F02.xml-components",{"title":38,"path":39,"stem":40},"值与验证","\u002Fzh\u002Fcore\u002Fvalues","zh\u002F02.core\u002F03.values",{"title":42,"path":43,"stem":44},"单位转换器","\u002Fzh\u002Fcore\u002Fconverters","zh\u002F02.core\u002F04.converters",{"title":46,"path":47,"stem":48},"Formatter","\u002Fzh\u002Fcore\u002Fformatter","zh\u002F02.core\u002F05.formatter",{"title":50,"path":51,"stem":52},"Parser","\u002Fzh\u002Fcore\u002Fparser","zh\u002F02.core\u002F06.parser",{"title":54,"path":55,"stem":56},"Archive","\u002Fzh\u002Fcore\u002Farchive","zh\u002F02.core\u002F07.archive",{"title":58,"path":59,"stem":60},"Charts","\u002Fzh\u002Fcore\u002Fcharts","zh\u002F02.core\u002F08.charts",{"title":62,"icon":63,"path":64,"stem":65,"children":66,"page":22},"XML","i-lucide-code-xml","\u002Fzh\u002Fxml","zh\u002F03.xml",[67,71,75,79,83,87],{"title":68,"path":69,"stem":70},"@office-open\u002Fxml","\u002Fzh\u002Fxml\u002Foverview","zh\u002F03.xml\u002F01.overview",{"title":72,"path":73,"stem":74},"解析","\u002Fzh\u002Fxml\u002Fparsing","zh\u002F03.xml\u002F02.parsing",{"title":76,"path":77,"stem":78},"序列化","\u002Fzh\u002Fxml\u002Fserialization","zh\u002F03.xml\u002F03.serialization",{"title":80,"path":81,"stem":82},"查询工具","\u002Fzh\u002Fxml\u002Fquery-utilities","zh\u002F03.xml\u002F04.query-utilities",{"title":84,"path":85,"stem":86},"XML 转义","\u002Fzh\u002Fxml\u002Fescape","zh\u002F03.xml\u002F05.escape",{"title":88,"path":89,"stem":90},"类型参考","\u002Fzh\u002Fxml\u002Ftypes","zh\u002F03.xml\u002F06.types",{"title":92,"icon":93,"path":94,"stem":95,"children":96,"page":22},"DOCX","i-lucide-file-text","\u002Fzh\u002Fdocx","zh\u002F04.docx",[97,101,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160],{"title":98,"path":99,"stem":100},"@office-open\u002Fdocx","\u002Fzh\u002Fdocx\u002Foverview","zh\u002F04.docx\u002F01.overview",{"title":5,"path":102,"stem":103},"\u002Fzh\u002Fdocx\u002Fquickstart","zh\u002F04.docx\u002F02.quickstart",{"title":105,"path":106,"stem":107},"文本与段落","\u002Fzh\u002Fdocx\u002Ftext-and-paragraphs","zh\u002F04.docx\u002F03.text-and-paragraphs",{"title":109,"path":110,"stem":111},"表格","\u002Fzh\u002Fdocx\u002Ftables","zh\u002F04.docx\u002F04.tables",{"title":113,"path":114,"stem":115},"图片","\u002Fzh\u002Fdocx\u002Fimages","zh\u002F04.docx\u002F05.images",{"title":117,"path":118,"stem":119},"图表","\u002Fzh\u002Fdocx\u002Fcharts","zh\u002F04.docx\u002F06.charts",{"title":121,"path":122,"stem":123},"SmartArt","\u002Fzh\u002Fdocx\u002Fsmartart","zh\u002F04.docx\u002F07.smartart",{"title":125,"path":126,"stem":127},"媒体","\u002Fzh\u002Fdocx\u002Fmedia","zh\u002F04.docx\u002F08.media",{"title":129,"path":130,"stem":131},"链接","\u002Fzh\u002Fdocx\u002Flinks","zh\u002F04.docx\u002F09.links",{"title":133,"path":134,"stem":135},"页眉与页脚","\u002Fzh\u002Fdocx\u002Fheaders-and-footers","zh\u002F04.docx\u002F10.headers-and-footers",{"title":137,"path":138,"stem":139},"公式与符号","\u002Fzh\u002Fdocx\u002Fequations-and-symbols","zh\u002F04.docx\u002F11.equations-and-symbols",{"title":141,"path":142,"stem":143},"样式与主题","\u002Fzh\u002Fdocx\u002Fstyles-and-themes","zh\u002F04.docx\u002F12.styles-and-themes",{"title":145,"path":146,"stem":147},"页面布局","\u002Fzh\u002Fdocx\u002Fpage-layout","zh\u002F04.docx\u002F13.page-layout",{"title":149,"path":150,"stem":151},"引用","\u002Fzh\u002Fdocx\u002Freferences","zh\u002F04.docx\u002F14.references",{"title":153,"path":154,"stem":155},"批注与修订","\u002Fzh\u002Fdocx\u002Fcomments-and-revisions","zh\u002F04.docx\u002F15.comments-and-revisions",{"title":157,"path":158,"stem":159},"导出","\u002Fzh\u002Fdocx\u002Fexport","zh\u002F04.docx\u002F16.export",{"title":72,"path":161,"stem":162},"\u002Fzh\u002Fdocx\u002Fparsing","zh\u002F04.docx\u002F17.parsing",{"title":164,"icon":165,"path":166,"stem":167,"children":168,"page":22},"PPTX","i-lucide-presentation","\u002Fzh\u002Fpptx","zh\u002F05.pptx",[169,173,176,180,183,186,189,192,195,198,201,204,208,211,215,219,223,227,230,233],{"title":170,"path":171,"stem":172},"@office-open\u002Fpptx","\u002Fzh\u002Fpptx\u002Foverview","zh\u002F05.pptx\u002F01.overview",{"title":5,"path":174,"stem":175},"\u002Fzh\u002Fpptx\u002Fquickstart","zh\u002F05.pptx\u002F02.quickstart",{"title":177,"path":178,"stem":179},"形状与文本","\u002Fzh\u002Fpptx\u002Fshapes-and-text","zh\u002F05.pptx\u002F03.shapes-and-text",{"title":109,"path":181,"stem":182},"\u002Fzh\u002Fpptx\u002Ftables","zh\u002F05.pptx\u002F04.tables",{"title":113,"path":184,"stem":185},"\u002Fzh\u002Fpptx\u002Fimages","zh\u002F05.pptx\u002F05.images",{"title":117,"path":187,"stem":188},"\u002Fzh\u002Fpptx\u002Fcharts","zh\u002F05.pptx\u002F06.charts",{"title":121,"path":190,"stem":191},"\u002Fzh\u002Fpptx\u002Fsmartart","zh\u002F05.pptx\u002F07.smartart",{"title":125,"path":193,"stem":194},"\u002Fzh\u002Fpptx\u002Fmedia","zh\u002F05.pptx\u002F08.media",{"title":129,"path":196,"stem":197},"\u002Fzh\u002Fpptx\u002Flinks","zh\u002F05.pptx\u002F09.links",{"title":133,"path":199,"stem":200},"\u002Fzh\u002Fpptx\u002Fheaders-and-footers","zh\u002F05.pptx\u002F10.headers-and-footers",{"title":137,"path":202,"stem":203},"\u002Fzh\u002Fpptx\u002Fequations-and-symbols","zh\u002F05.pptx\u002F11.equations-and-symbols",{"title":205,"path":206,"stem":207},"线条与连接符","\u002Fzh\u002Fpptx\u002Flines-and-connectors","zh\u002F05.pptx\u002F12.lines-and-connectors",{"title":141,"path":209,"stem":210},"\u002Fzh\u002Fpptx\u002Fstyles-and-themes","zh\u002F05.pptx\u002F13.styles-and-themes",{"title":212,"path":213,"stem":214},"效果与填充","\u002Fzh\u002Fpptx\u002Feffects-and-fills","zh\u002F05.pptx\u002F14.effects-and-fills",{"title":216,"path":217,"stem":218},"幻灯片布局","\u002Fzh\u002Fpptx\u002Fslide-layout","zh\u002F05.pptx\u002F15.slide-layout",{"title":220,"path":221,"stem":222},"切换效果","\u002Fzh\u002Fpptx\u002Ftransitions","zh\u002F05.pptx\u002F16.transitions",{"title":224,"path":225,"stem":226},"动画效果","\u002Fzh\u002Fpptx\u002Fanimations","zh\u002F05.pptx\u002F17.animations",{"title":157,"path":228,"stem":229},"\u002Fzh\u002Fpptx\u002Fexport","zh\u002F05.pptx\u002F18.export",{"title":72,"path":231,"stem":232},"\u002Fzh\u002Fpptx\u002Fparsing","zh\u002F05.pptx\u002F19.parsing",{"title":234,"path":235,"stem":236},"批注","\u002Fzh\u002Fpptx\u002Fcomments","zh\u002F05.pptx\u002F20.comments",{"id":238,"title":34,"body":239,"description":1326,"extension":1327,"links":1328,"meta":1329,"navigation":312,"path":35,"seo":1330,"stem":36,"__hash__":1331},"docs_zh\u002Fzh\u002F02.core\u002F02.xml-components.md",{"type":240,"value":241,"toc":1309},"minimark",[242,256,260,263,378,385,506,509,512,625,630,633,754,757,761,764,914,918,921,1008,1012,1015,1083,1087,1100,1191,1194,1198,1201,1258,1261,1305],[243,244,245,248,249,251,252,255],"p",{},[246,247,98],"code",{}," 和 ",[246,250,170],{}," 中的所有 OOXML 元素都基于 ",[246,253,254],{},"XmlComponent"," 构建。本页介绍核心构建模块。",[257,258,254],"h2",{"id":259},"xmlcomponent",[243,261,262],{},"OOXML 元素的主要基类。每个元素包装一个 XML 标签名并管理子元素。",[264,265,270],"pre",{"className":266,"code":267,"language":268,"meta":269,"style":269},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { XmlComponent } from \"@office-open\u002Fcore\";\n\nclass MyElement extends XmlComponent {\n    constructor() {\n        super(\"w:myElement\");\n    }\n}\n","ts","",[246,271,272,307,314,333,344,366,372],{"__ignoreMap":269},[273,274,277,281,285,289,292,295,298,301,304],"span",{"class":275,"line":276},"line",1,[273,278,280],{"class":279},"s7zQu","import",[273,282,284],{"class":283},"sMK4o"," {",[273,286,288],{"class":287},"sTEyZ"," XmlComponent",[273,290,291],{"class":283}," }",[273,293,294],{"class":279}," from",[273,296,297],{"class":283}," \"",[273,299,30],{"class":300},"sfazB",[273,302,303],{"class":283},"\"",[273,305,306],{"class":283},";\n",[273,308,310],{"class":275,"line":309},2,[273,311,313],{"emptyLinePlaceholder":312},true,"\n",[273,315,317,321,325,328,330],{"class":275,"line":316},3,[273,318,320],{"class":319},"spNyl","class",[273,322,324],{"class":323},"sBMFI"," MyElement",[273,326,327],{"class":319}," extends",[273,329,288],{"class":323},[273,331,332],{"class":283}," {\n",[273,334,336,339,342],{"class":275,"line":335},4,[273,337,338],{"class":319},"    constructor",[273,340,341],{"class":283},"()",[273,343,332],{"class":283},[273,345,347,350,354,356,359,361,364],{"class":275,"line":346},5,[273,348,349],{"class":287},"        super",[273,351,353],{"class":352},"swJcz","(",[273,355,303],{"class":283},[273,357,358],{"class":300},"w:myElement",[273,360,303],{"class":283},[273,362,363],{"class":352},")",[273,365,306],{"class":283},[273,367,369],{"class":275,"line":368},6,[273,370,371],{"class":283},"    }\n",[273,373,375],{"class":275,"line":374},7,[273,376,377],{"class":283},"}\n",[243,379,380,381,384],{},"在构造时使用 ",[246,382,383],{},"root"," 添加子元素：",[264,386,388],{"className":266,"code":387,"language":268,"meta":269,"style":269},"import { XmlComponent, onOffObj } from \"@office-open\u002Fcore\";\n\nclass BoldElement extends XmlComponent {\n    constructor() {\n        super(\"w:b\");\n        this.root.push(onOffObj(\"w:bCs\", true));\n    }\n}\n",[246,389,390,416,420,433,441,458,497,501],{"__ignoreMap":269},[273,391,392,394,396,398,401,404,406,408,410,412,414],{"class":275,"line":276},[273,393,280],{"class":279},[273,395,284],{"class":283},[273,397,288],{"class":287},[273,399,400],{"class":283},",",[273,402,403],{"class":287}," onOffObj",[273,405,291],{"class":283},[273,407,294],{"class":279},[273,409,297],{"class":283},[273,411,30],{"class":300},[273,413,303],{"class":283},[273,415,306],{"class":283},[273,417,418],{"class":275,"line":309},[273,419,313],{"emptyLinePlaceholder":312},[273,421,422,424,427,429,431],{"class":275,"line":316},[273,423,320],{"class":319},[273,425,426],{"class":323}," BoldElement",[273,428,327],{"class":319},[273,430,288],{"class":323},[273,432,332],{"class":283},[273,434,435,437,439],{"class":275,"line":335},[273,436,338],{"class":319},[273,438,341],{"class":283},[273,440,332],{"class":283},[273,442,443,445,447,449,452,454,456],{"class":275,"line":346},[273,444,349],{"class":287},[273,446,353],{"class":352},[273,448,303],{"class":283},[273,450,451],{"class":300},"w:b",[273,453,303],{"class":283},[273,455,363],{"class":352},[273,457,306],{"class":283},[273,459,460,463,465,468,472,474,477,479,481,484,486,488,492,495],{"class":275,"line":368},[273,461,462],{"class":283},"        this.",[273,464,383],{"class":287},[273,466,467],{"class":283},".",[273,469,471],{"class":470},"s2Zo4","push",[273,473,353],{"class":352},[273,475,476],{"class":470},"onOffObj",[273,478,353],{"class":352},[273,480,303],{"class":283},[273,482,483],{"class":300},"w:bCs",[273,485,303],{"class":283},[273,487,400],{"class":283},[273,489,491],{"class":490},"sfNiH"," true",[273,493,494],{"class":352},"))",[273,496,306],{"class":283},[273,498,499],{"class":275,"line":374},[273,500,371],{"class":283},[273,502,504],{"class":275,"line":503},8,[273,505,377],{"class":283},[257,507,508],{"id":508},"元素构建器",[243,510,511],{},"零分配辅助函数，返回普通对象。优先使用这些函数而非已弃用的元素类。",[513,514,515,531],"table",{},[516,517,518],"thead",{},[519,520,521,525,528],"tr",{},[522,523,524],"th",{},"函数",[522,526,527],{},"生成内容",[522,529,530],{},"示例",[532,533,534,550,565,580,595,610],"tbody",{},[519,535,536,542,545],{},[537,538,539],"td",{},[246,540,541],{},"onOffObj(name, val?)",[537,543,544],{},"布尔开关元素",[537,546,547],{},[246,548,549],{},"onOffObj(\"w:b\", true)",[519,551,552,557,560],{},[537,553,554],{},[246,555,556],{},"hpsMeasureObj(name, val)",[537,558,559],{},"半磅测量值",[537,561,562],{},[246,563,564],{},"hpsMeasureObj(\"w:sz\", 24)",[519,566,567,572,575],{},[537,568,569],{},[246,570,571],{},"stringValObj(name, val)",[537,573,574],{},"字符串值属性",[537,576,577],{},[246,578,579],{},"stringValObj(\"w:val\", \"hello\")",[519,581,582,587,590],{},[537,583,584],{},[246,585,586],{},"numberValObj(name, val)",[537,588,589],{},"数值属性",[537,591,592],{},[246,593,594],{},"numberValObj(\"w:count\", 3)",[519,596,597,602,605],{},[537,598,599],{},[246,600,601],{},"stringEnumValObj(name, val)",[537,603,604],{},"字符串枚举值",[537,606,607],{},[246,608,609],{},"stringEnumValObj(\"w:align\", \"center\")",[519,611,612,617,620],{},[537,613,614],{},[246,615,616],{},"stringContainerObj(name, val)",[537,618,619],{},"包裹文本的元素",[537,621,622],{},[246,623,624],{},"stringContainerObj(\"w:t\", \"Hello\")",[626,627,629],"h3",{"id":628},"builderelement","BuilderElement",[243,631,632],{},"具有显式属性和子元素配置的灵活元素：",[264,634,636],{"className":266,"code":635,"language":268,"meta":269,"style":269},"import { BuilderElement } from \"@office-open\u002Fcore\";\n\nconst el = new BuilderElement({\n    name: \"w:spacing\",\n    attributes: { before: 240, after: 120 },\n    children: [],\n});\n",[246,637,638,659,663,684,702,733,745],{"__ignoreMap":269},[273,639,640,642,644,647,649,651,653,655,657],{"class":275,"line":276},[273,641,280],{"class":279},[273,643,284],{"class":283},[273,645,646],{"class":287}," BuilderElement",[273,648,291],{"class":283},[273,650,294],{"class":279},[273,652,297],{"class":283},[273,654,30],{"class":300},[273,656,303],{"class":283},[273,658,306],{"class":283},[273,660,661],{"class":275,"line":309},[273,662,313],{"emptyLinePlaceholder":312},[273,664,665,668,671,674,677,679,681],{"class":275,"line":316},[273,666,667],{"class":319},"const",[273,669,670],{"class":287}," el ",[273,672,673],{"class":283},"=",[273,675,676],{"class":283}," new",[273,678,646],{"class":470},[273,680,353],{"class":287},[273,682,683],{"class":283},"{\n",[273,685,686,689,692,694,697,699],{"class":275,"line":335},[273,687,688],{"class":352},"    name",[273,690,691],{"class":283},":",[273,693,297],{"class":283},[273,695,696],{"class":300},"w:spacing",[273,698,303],{"class":283},[273,700,701],{"class":283},",\n",[273,703,704,707,709,711,714,716,720,722,725,727,730],{"class":275,"line":346},[273,705,706],{"class":352},"    attributes",[273,708,691],{"class":283},[273,710,284],{"class":283},[273,712,713],{"class":352}," before",[273,715,691],{"class":283},[273,717,719],{"class":718},"sbssI"," 240",[273,721,400],{"class":283},[273,723,724],{"class":352}," after",[273,726,691],{"class":283},[273,728,729],{"class":718}," 120",[273,731,732],{"class":283}," },\n",[273,734,735,738,740,743],{"class":275,"line":368},[273,736,737],{"class":352},"    children",[273,739,691],{"class":283},[273,741,742],{"class":287}," []",[273,744,701],{"class":283},[273,746,747,750,752],{"class":275,"line":374},[273,748,749],{"class":283},"}",[273,751,363],{"class":287},[273,753,306],{"class":283},[257,755,756],{"id":756},"属性组件",[626,758,760],{"id":759},"xmlattributecomponent","XmlAttributeComponent",[243,762,763],{},"将 TypeScript 属性映射到 XML 属性名：",[264,765,767],{"className":266,"code":766,"language":268,"meta":269,"style":269},"import { XmlAttributeComponent, XmlComponent } from \"@office-open\u002Fcore\";\n\ninterface ISpacingAttributes {\n    readonly before?: number;\n    readonly after?: number;\n}\n\nclass SpacingAttributes extends XmlAttributeComponent\u003CISpacingAttributes> {\n    protected readonly xmlKeys = { before: \"w:before\", after: \"w:after\" };\n}\n",[246,768,769,794,798,808,823,835,839,843,865,909],{"__ignoreMap":269},[273,770,771,773,775,778,780,782,784,786,788,790,792],{"class":275,"line":276},[273,772,280],{"class":279},[273,774,284],{"class":283},[273,776,777],{"class":287}," XmlAttributeComponent",[273,779,400],{"class":283},[273,781,288],{"class":287},[273,783,291],{"class":283},[273,785,294],{"class":279},[273,787,297],{"class":283},[273,789,30],{"class":300},[273,791,303],{"class":283},[273,793,306],{"class":283},[273,795,796],{"class":275,"line":309},[273,797,313],{"emptyLinePlaceholder":312},[273,799,800,803,806],{"class":275,"line":316},[273,801,802],{"class":319},"interface",[273,804,805],{"class":323}," ISpacingAttributes",[273,807,332],{"class":283},[273,809,810,813,815,818,821],{"class":275,"line":335},[273,811,812],{"class":319},"    readonly",[273,814,713],{"class":352},[273,816,817],{"class":283},"?:",[273,819,820],{"class":323}," number",[273,822,306],{"class":283},[273,824,825,827,829,831,833],{"class":275,"line":346},[273,826,812],{"class":319},[273,828,724],{"class":352},[273,830,817],{"class":283},[273,832,820],{"class":323},[273,834,306],{"class":283},[273,836,837],{"class":275,"line":368},[273,838,377],{"class":283},[273,840,841],{"class":275,"line":374},[273,842,313],{"emptyLinePlaceholder":312},[273,844,845,847,850,852,854,857,860,863],{"class":275,"line":503},[273,846,320],{"class":319},[273,848,849],{"class":323}," SpacingAttributes",[273,851,327],{"class":319},[273,853,777],{"class":323},[273,855,856],{"class":283},"\u003C",[273,858,859],{"class":323},"ISpacingAttributes",[273,861,862],{"class":283},">",[273,864,332],{"class":283},[273,866,868,871,874,877,880,882,884,886,888,891,893,895,897,899,901,904,906],{"class":275,"line":867},9,[273,869,870],{"class":319},"    protected",[273,872,873],{"class":319}," readonly",[273,875,876],{"class":352}," xmlKeys",[273,878,879],{"class":283}," =",[273,881,284],{"class":283},[273,883,713],{"class":352},[273,885,691],{"class":283},[273,887,297],{"class":283},[273,889,890],{"class":300},"w:before",[273,892,303],{"class":283},[273,894,400],{"class":283},[273,896,724],{"class":352},[273,898,691],{"class":283},[273,900,297],{"class":283},[273,902,903],{"class":300},"w:after",[273,905,303],{"class":283},[273,907,908],{"class":283}," };\n",[273,910,912],{"class":275,"line":911},10,[273,913,377],{"class":283},[626,915,917],{"id":916},"nextattributecomponent","NextAttributeComponent",[243,919,920],{},"使用显式键值对，无需名称映射：",[264,922,924],{"className":266,"code":923,"language":268,"meta":269,"style":269},"import { NextAttributeComponent } from \"@office-open\u002Fcore\";\n\nclass MyAttributes extends NextAttributeComponent({\n    size: \"w:sz\",\n    color: \"w:color\",\n}) {}\n",[246,925,926,947,951,966,982,998],{"__ignoreMap":269},[273,927,928,930,932,935,937,939,941,943,945],{"class":275,"line":276},[273,929,280],{"class":279},[273,931,284],{"class":283},[273,933,934],{"class":287}," NextAttributeComponent",[273,936,291],{"class":283},[273,938,294],{"class":279},[273,940,297],{"class":283},[273,942,30],{"class":300},[273,944,303],{"class":283},[273,946,306],{"class":283},[273,948,949],{"class":275,"line":309},[273,950,313],{"emptyLinePlaceholder":312},[273,952,953,955,958,960,962,964],{"class":275,"line":316},[273,954,320],{"class":319},[273,956,957],{"class":323}," MyAttributes",[273,959,327],{"class":319},[273,961,934],{"class":470},[273,963,353],{"class":287},[273,965,683],{"class":283},[273,967,968,971,973,975,978,980],{"class":275,"line":335},[273,969,970],{"class":352},"    size",[273,972,691],{"class":283},[273,974,297],{"class":283},[273,976,977],{"class":300},"w:sz",[273,979,303],{"class":283},[273,981,701],{"class":283},[273,983,984,987,989,991,994,996],{"class":275,"line":346},[273,985,986],{"class":352},"    color",[273,988,691],{"class":283},[273,990,297],{"class":283},[273,992,993],{"class":300},"w:color",[273,995,303],{"class":283},[273,997,701],{"class":283},[273,999,1000,1002,1005],{"class":275,"line":368},[273,1001,749],{"class":283},[273,1003,1004],{"class":287},") ",[273,1006,1007],{"class":283},"{}\n",[257,1009,1011],{"id":1010},"importedxmlcomponent","ImportedXmlComponent",[243,1013,1014],{},"将原始 XML 内容包装为可嵌入文档树的组件：",[264,1016,1018],{"className":266,"code":1017,"language":268,"meta":269,"style":269},"import { ImportedXmlComponent } from \"@office-open\u002Fcore\";\n\nconst imported = ImportedXmlComponent.fromXmlString(\n    '\u003Cw:pPr xmlns:w=\"...\">\u003Cw:jc w:val=\"center\"\u002F>\u003C\u002Fw:pPr>',\n);\n",[246,1019,1020,1041,1045,1064,1077],{"__ignoreMap":269},[273,1021,1022,1024,1026,1029,1031,1033,1035,1037,1039],{"class":275,"line":276},[273,1023,280],{"class":279},[273,1025,284],{"class":283},[273,1027,1028],{"class":287}," ImportedXmlComponent",[273,1030,291],{"class":283},[273,1032,294],{"class":279},[273,1034,297],{"class":283},[273,1036,30],{"class":300},[273,1038,303],{"class":283},[273,1040,306],{"class":283},[273,1042,1043],{"class":275,"line":309},[273,1044,313],{"emptyLinePlaceholder":312},[273,1046,1047,1049,1052,1054,1056,1058,1061],{"class":275,"line":316},[273,1048,667],{"class":319},[273,1050,1051],{"class":287}," imported ",[273,1053,673],{"class":283},[273,1055,1028],{"class":287},[273,1057,467],{"class":283},[273,1059,1060],{"class":470},"fromXmlString",[273,1062,1063],{"class":287},"(\n",[273,1065,1066,1069,1072,1075],{"class":275,"line":335},[273,1067,1068],{"class":283},"    '",[273,1070,1071],{"class":300},"\u003Cw:pPr xmlns:w=\"...\">\u003Cw:jc w:val=\"center\"\u002F>\u003C\u002Fw:pPr>",[273,1073,1074],{"class":283},"'",[273,1076,701],{"class":283},[273,1078,1079,1081],{"class":275,"line":346},[273,1080,363],{"class":287},[273,1082,306],{"class":283},[626,1084,1086],{"id":1085},"converttoxmlcomponent","convertToXmlComponent",[243,1088,1089,1090,1093,1094,1096,1097,1099],{},"将解析后的 ",[246,1091,1092],{},"Element","（来自 ",[246,1095,68],{},"）转换为 ",[246,1098,254],{}," 树：",[264,1101,1103],{"className":266,"code":1102,"language":268,"meta":269,"style":269},"import { convertToXmlComponent } from \"@office-open\u002Fcore\";\nimport { parse } from \"@office-open\u002Fxml\";\n\nconst element = parse(\"\u003Cw:p>\u003Cw:r>\u003Cw:t>Hello\u003C\u002Fw:t>\u003C\u002Fw:r>\u003C\u002Fw:p>\");\nconst component = convertToXmlComponent(element);\n",[246,1104,1105,1126,1147,1151,1175],{"__ignoreMap":269},[273,1106,1107,1109,1111,1114,1116,1118,1120,1122,1124],{"class":275,"line":276},[273,1108,280],{"class":279},[273,1110,284],{"class":283},[273,1112,1113],{"class":287}," convertToXmlComponent",[273,1115,291],{"class":283},[273,1117,294],{"class":279},[273,1119,297],{"class":283},[273,1121,30],{"class":300},[273,1123,303],{"class":283},[273,1125,306],{"class":283},[273,1127,1128,1130,1132,1135,1137,1139,1141,1143,1145],{"class":275,"line":309},[273,1129,280],{"class":279},[273,1131,284],{"class":283},[273,1133,1134],{"class":287}," parse",[273,1136,291],{"class":283},[273,1138,294],{"class":279},[273,1140,297],{"class":283},[273,1142,68],{"class":300},[273,1144,303],{"class":283},[273,1146,306],{"class":283},[273,1148,1149],{"class":275,"line":316},[273,1150,313],{"emptyLinePlaceholder":312},[273,1152,1153,1155,1158,1160,1162,1164,1166,1169,1171,1173],{"class":275,"line":335},[273,1154,667],{"class":319},[273,1156,1157],{"class":287}," element ",[273,1159,673],{"class":283},[273,1161,1134],{"class":470},[273,1163,353],{"class":287},[273,1165,303],{"class":283},[273,1167,1168],{"class":300},"\u003Cw:p>\u003Cw:r>\u003Cw:t>Hello\u003C\u002Fw:t>\u003C\u002Fw:r>\u003C\u002Fw:p>",[273,1170,303],{"class":283},[273,1172,363],{"class":287},[273,1174,306],{"class":283},[273,1176,1177,1179,1182,1184,1186,1189],{"class":275,"line":346},[273,1178,667],{"class":319},[273,1180,1181],{"class":287}," component ",[273,1183,673],{"class":283},[273,1185,1113],{"class":470},[273,1187,1188],{"class":287},"(element)",[273,1190,306],{"class":283},[257,1192,1193],{"id":1193},"工具函数",[626,1195,1197],{"id":1196},"wrapel","wrapEl",[243,1199,1200],{},"将子组件包装在命名元素中：",[264,1202,1204],{"className":266,"code":1203,"language":268,"meta":269,"style":269},"import { wrapEl } from \"@office-open\u002Fcore\";\n\nconst wrapped = wrapEl(\"w:rPr\", someChildComponent);\n",[246,1205,1206,1227,1231],{"__ignoreMap":269},[273,1207,1208,1210,1212,1215,1217,1219,1221,1223,1225],{"class":275,"line":276},[273,1209,280],{"class":279},[273,1211,284],{"class":283},[273,1213,1214],{"class":287}," wrapEl",[273,1216,291],{"class":283},[273,1218,294],{"class":279},[273,1220,297],{"class":283},[273,1222,30],{"class":300},[273,1224,303],{"class":283},[273,1226,306],{"class":283},[273,1228,1229],{"class":275,"line":309},[273,1230,313],{"emptyLinePlaceholder":312},[273,1232,1233,1235,1238,1240,1242,1244,1246,1249,1251,1253,1256],{"class":275,"line":316},[273,1234,667],{"class":319},[273,1236,1237],{"class":287}," wrapped ",[273,1239,673],{"class":283},[273,1241,1214],{"class":470},[273,1243,353],{"class":287},[273,1245,303],{"class":283},[273,1247,1248],{"class":300},"w:rPr",[273,1250,303],{"class":283},[273,1252,400],{"class":283},[273,1254,1255],{"class":287}," someChildComponent)",[273,1257,306],{"class":283},[257,1259,1260],{"id":1260},"其他组件",[513,1262,1263,1273],{},[516,1264,1265],{},[519,1266,1267,1270],{},[522,1268,1269],{},"组件",[522,1271,1272],{},"说明",[532,1274,1275,1285,1295],{},[519,1276,1277,1282],{},[537,1278,1279],{},[246,1280,1281],{},"IgnoreIfEmptyXmlComponent",[537,1283,1284],{},"为空时从 XML 输出中排除",[519,1286,1287,1292],{},[537,1288,1289],{},[246,1290,1291],{},"InitializableXmlComponent",[537,1293,1294],{},"可从另一个组件实例初始化",[519,1296,1297,1302],{},[537,1298,1299],{},[246,1300,1301],{},"EmptyElement",[537,1303,1304],{},"表示空的 XML 元素",[1306,1307,1308],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":269,"searchDepth":309,"depth":309,"links":1310},[1311,1312,1315,1319,1322,1325],{"id":259,"depth":309,"text":254},{"id":508,"depth":309,"text":508,"children":1313},[1314],{"id":628,"depth":316,"text":629},{"id":756,"depth":309,"text":756,"children":1316},[1317,1318],{"id":759,"depth":316,"text":760},{"id":916,"depth":316,"text":917},{"id":1010,"depth":309,"text":1011,"children":1320},[1321],{"id":1085,"depth":316,"text":1086},{"id":1193,"depth":309,"text":1193,"children":1323},[1324],{"id":1196,"depth":316,"text":1197},{"id":1260,"depth":309,"text":1260},"构建 OOXML XML 元素树的基类和辅助工具","md",null,{},{"title":34,"description":1326},"ro9_GZLXruD9LiCH-7J9urBBYROX5QgdY2U1EC8pntg",[1333,1335],{"title":30,"path":31,"stem":32,"description":1334,"children":-1},"共享 XML 组件、值验证、格式化和单位转换器",{"title":38,"path":39,"stem":40,"description":1336,"children":-1},"OOXML 规范值类型的运行时验证和类型转换",1778862992975]