mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-05 07:27:09 +08:00
95 lines
82 KiB
HTML
95 lines
82 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en-US" dir="ltr">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||
<title>editorService方法 | tmagic-editor</title>
|
||
<meta name="description" content="页面可视化平台">
|
||
<meta name="generator" content="VitePress v1.6.3">
|
||
<link rel="preload stylesheet" href="/tmagic-editor/docs/assets/style.D3lBSx2e.css" as="style">
|
||
<link rel="preload stylesheet" href="/tmagic-editor/docs/vp-icons.css" as="style">
|
||
|
||
<script type="module" src="/tmagic-editor/docs/assets/app.CTxZuwPV.js"></script>
|
||
<link rel="preload" href="/tmagic-editor/docs/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
||
<link rel="modulepreload" href="/tmagic-editor/docs/assets/chunks/theme.CgftMYhc.js">
|
||
<link rel="modulepreload" href="/tmagic-editor/docs/assets/chunks/framework.BCBheFgR.js">
|
||
<link rel="modulepreload" href="/tmagic-editor/docs/assets/api_editor_editorServiceMethods.md.BkDhL-Jz.lean.js">
|
||
<meta name="theme-color" content="#646cff">
|
||
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
||
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
||
</head>
|
||
<body>
|
||
<div id="app"><div class="Layout" data-v-6dfe06bb><!--[--><!--]--><!--[--><span tabindex="-1" data-v-ae2ac445></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-ae2ac445>Skip to content</a><!--]--><!----><header class="VPNav" data-v-6dfe06bb data-v-77ceb46e><div class="VPNavBar" data-v-77ceb46e data-v-90d7d232><div class="wrapper" data-v-90d7d232><div class="container" data-v-90d7d232><div class="title" data-v-90d7d232><div class="VPNavBarTitle has-sidebar" data-v-90d7d232 data-v-53247a16><a class="title" href="/tmagic-editor/docs/" data-v-53247a16><!--[--><!--]--><!--[--><img class="VPImage logo" src="./favicon.png" alt data-v-d81a7e16><!--]--><span data-v-53247a16>tmagic-editor</span><!--[--><!--]--></a></div></div><div class="content" data-v-90d7d232><div class="content-body" data-v-90d7d232><!--[--><!--]--><div class="VPNavBarSearch search" data-v-90d7d232><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-90d7d232 data-v-3bf1ab04><span id="main-nav-aria-label" class="visually-hidden" data-v-3bf1ab04> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/tmagic-editor/docs/guide/" tabindex="0" data-v-3bf1ab04 data-v-3536d535><!--[--><span data-v-3536d535>文档</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink active" href="/tmagic-editor/docs/api/editor/props.html" tabindex="0" data-v-3bf1ab04 data-v-3536d535><!--[--><span data-v-3536d535>API</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/tmagic-editor/docs/form-config/fields/text.html" tabindex="0" data-v-3bf1ab04 data-v-3536d535><!--[--><span data-v-3536d535>表单配置</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://github.com/Tencent/tmagic-editor/releases" target="_blank" rel="noreferrer" tabindex="0" data-v-3bf1ab04 data-v-3536d535><!--[--><span data-v-3536d535>更新日志</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://tencent.github.io/tmagic-editor/playground/index.html" target="_blank" rel="noreferrer" tabindex="0" data-v-3bf1ab04 data-v-3536d535><!--[--><span data-v-3536d535>Playground</span><!--]--></a><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-90d7d232 data-v-c02c67ee><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-c02c67ee data-v-1920dc4a data-v-9de62149><span class="check" data-v-9de62149><span class="icon" data-v-9de62149><!--[--><span class="vpi-sun sun" data-v-1920dc4a></span><span class="vpi-moon moon" data-v-1920dc4a></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-90d7d232 data-v-8c084606 data-v-9ea5b2de><!--[--><a class="VPSocialLink no-icon" href="https://github.com/Tencent/tmagic-editor" aria-label="github" target="_blank" rel="noopener" data-v-9ea5b2de data-v-fbc8ca05><span class="vpi-social-github"></span></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-90d7d232 data-v-600d423b data-v-09c9f8b4><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-09c9f8b4><span class="vpi-more-horizontal icon" data-v-09c9f8b4></span></button><div class="menu" data-v-09c9f8b4><div class="VPMenu" data-v-09c9f8b4 data-v-813f2462><!----><!--[--><!--[--><!----><div class="group" data-v-600d423b><div class="item appearance" data-v-600d423b><p class="label" data-v-600d423b>Appearance</p><div class="appearance-action" data-v-600d423b><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-600d423b data-v-1920dc4a data-v-9de62149><span class="check" data-v-9de62149><span class="icon" data-v-9de62149><!--[--><span class="vpi-sun sun" data-v-1920dc4a></span><span class="vpi-moon moon" data-v-1920dc4a></span><!--]--></span></span></button></div></div></div><div class="group" data-v-600d423b><div class="item social-links" data-v-600d423b><div class="VPSocialLinks social-links-list" data-v-600d423b data-v-9ea5b2de><!--[--><a class="VPSocialLink no-icon" href="https://github.com/Tencent/tmagic-editor" aria-label="github" target="_blank" rel="noopener" data-v-9ea5b2de data-v-fbc8ca05><span class="vpi-social-github"></span></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-90d7d232 data-v-fe1766e7><span class="container" data-v-fe1766e7><span class="top" data-v-fe1766e7></span><span class="middle" data-v-fe1766e7></span><span class="bottom" data-v-fe1766e7></span></span></button></div></div></div></div><div class="divider" data-v-90d7d232><div class="divider-line" data-v-90d7d232></div></div></div><!----></header><div class="VPLocalNav has-sidebar empty" data-v-6dfe06bb data-v-38fd278f><div class="container" data-v-38fd278f><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-38fd278f><span class="vpi-align-left menu-icon" data-v-38fd278f></span><span class="menu-text" data-v-38fd278f>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-38fd278f data-v-0096f25c><button data-v-0096f25c>Return to top</button><!----></div></div></div><aside class="VPSidebar" data-v-6dfe06bb data-v-99b3c27c><div class="curtain" data-v-99b3c27c></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-99b3c27c><span class="visually-hidden" id="sidebar-aria-label" data-v-99b3c27c> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="no-transition group" data-v-30ef2553><section class="VPSidebarItem level-0 has-active" data-v-30ef2553 data-v-ca1de9d4><div class="item" role="button" tabindex="0" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><h2 class="text" data-v-ca1de9d4>编辑器</h2><!----></div><div class="items" data-v-ca1de9d4><!--[--><section class="VPSidebarItem level-1" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" role="button" tabindex="0" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><h3 class="text" data-v-ca1de9d4>Editor组件</h3><!----></div><div class="items" data-v-ca1de9d4><!--[--><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/editor/props.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>props</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/editor/slots.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>slots</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/editor/events.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>events</p><!--]--></a><!----></div><!----></div><!--]--></div></section><section class="VPSidebarItem level-1 has-active" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" role="button" tabindex="0" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><h3 class="text" data-v-ca1de9d4>editorService</h3><!----></div><div class="items" data-v-ca1de9d4><!--[--><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/editor/editorServiceMethods.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>方法</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/editor/editorServiceEvents.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>事件</p><!--]--></a><!----></div><!----></div><!--]--></div></section><section class="VPSidebarItem level-1" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" role="button" tabindex="0" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><h3 class="text" data-v-ca1de9d4>propsService</h3><!----></div><div class="items" data-v-ca1de9d4><!--[--><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/editor/propsServiceMethods.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>方法</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/editor/propsServiceEvents.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>事件</p><!--]--></a><!----></div><!----></div><!--]--></div></section><section class="VPSidebarItem level-1" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" role="button" tabindex="0" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><h3 class="text" data-v-ca1de9d4>historyService</h3><!----></div><div class="items" data-v-ca1de9d4><!--[--><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/editor/historyServiceMethods.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>方法</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/editor/historyServiceEvents.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>事件</p><!--]--></a><!----></div><!----></div><!--]--></div></section><div class="VPSidebarItem level-1 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/editor/eventsServiceMethods.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>eventsService</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/editor/uiServiceMethods.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>uiService</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/editor/codeBlockServiceMethods.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>codeBlockService</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/editor/componentListServiceMethods.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>componentListService</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/editor/storageServiceMethods.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>storageService</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-30ef2553><section class="VPSidebarItem level-0" data-v-30ef2553 data-v-ca1de9d4><div class="item" role="button" tabindex="0" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><h2 class="text" data-v-ca1de9d4>表单</h2><!----></div><div class="items" data-v-ca1de9d4><!--[--><section class="VPSidebarItem level-1" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" role="button" tabindex="0" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><h3 class="text" data-v-ca1de9d4>Form组件</h3><!----></div><div class="items" data-v-ca1de9d4><!--[--><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/form/form-props.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>props</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/form/form-methods.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>methods</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/form/form-events.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>events</p><!--]--></a><!----></div><!----></div><!--]--></div></section><section class="VPSidebarItem level-1" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" role="button" tabindex="0" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><h3 class="text" data-v-ca1de9d4>FormDialog组件</h3><!----></div><div class="items" data-v-ca1de9d4><!--[--><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/form/form-dialog-props.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>props</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/form/form-dialog-methods.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>methods</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/form/form-dialog-events.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>events</p><!--]--></a><!----></div><!----></div><!--]--></div></section><!--]--></div></section></div><div class="no-transition group" data-v-30ef2553><section class="VPSidebarItem level-0" data-v-30ef2553 data-v-ca1de9d4><div class="item" role="button" tabindex="0" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><h2 class="text" data-v-ca1de9d4>表格</h2><!----></div><div class="items" data-v-ca1de9d4><!--[--><section class="VPSidebarItem level-1" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" role="button" tabindex="0" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><h3 class="text" data-v-ca1de9d4>Table组件</h3><!----></div><div class="items" data-v-ca1de9d4><!--[--><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/table/props.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>props</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/table/methods.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>methods</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/table/events.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>events</p><!--]--></a><!----></div><!----></div><!--]--></div></section><!--]--></div></section></div><div class="no-transition group" data-v-30ef2553><section class="VPSidebarItem level-0" data-v-30ef2553 data-v-ca1de9d4><div class="item" role="button" tabindex="0" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><h2 class="text" data-v-ca1de9d4>stage</h2><!----></div><div class="items" data-v-ca1de9d4><!--[--><section class="VPSidebarItem level-1" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" role="button" tabindex="0" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><h3 class="text" data-v-ca1de9d4>StageCore</h3><!----></div><div class="items" data-v-ca1de9d4><!--[--><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/stage/coreMethods.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>方法</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-ca1de9d4 data-v-ca1de9d4><div class="item" data-v-ca1de9d4><div class="indicator" data-v-ca1de9d4></div><a class="VPLink link link" href="/tmagic-editor/docs/api/stage/coreEvents.html" data-v-ca1de9d4><!--[--><p class="text" data-v-ca1de9d4>事件</p><!--]--></a><!----></div><!----></div><!--]--></div></section><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-6dfe06bb data-v-1b3f546a><div class="VPDoc has-sidebar has-aside" data-v-1b3f546a data-v-a5165e9c><!--[--><!--]--><div class="container" data-v-a5165e9c><div class="aside" data-v-a5165e9c><div class="aside-curtain" data-v-a5165e9c></div><div class="aside-container" data-v-a5165e9c><div class="aside-content" data-v-a5165e9c><div class="VPDocAside" data-v-a5165e9c data-v-302fb326><!--[--><!--]--><!--[--><!--]--><nav aria-labelledby="doc-outline-aria-label" class="VPDocAsideOutline" data-v-302fb326 data-v-1e498253><div class="content" data-v-1e498253><div class="outline-marker" data-v-1e498253></div><div aria-level="2" class="outline-title" id="doc-outline-aria-label" role="heading" data-v-1e498253>On this page</div><ul class="VPDocOutlineItem root" data-v-1e498253 data-v-1bc86f42><!--[--><!--]--></ul></div></nav><!--[--><!--]--><div class="spacer" data-v-302fb326></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-a5165e9c><div class="content-container" data-v-a5165e9c><!--[--><!--]--><main class="main" data-v-a5165e9c><div style="position:relative;" class="vp-doc _tmagic-editor_docs_api_editor_editorServiceMethods" data-v-a5165e9c><div><h1 id="editorservice方法" tabindex="-1">editorService方法 <a class="header-anchor" href="#editorservice方法" aria-label="Permalink to "editorService方法""></a></h1><h2 id="get" tabindex="-1">get <a class="header-anchor" href="#get" aria-label="Permalink to "get""></a></h2><ul><li><p><strong>参数:</strong></p><ul><li><code>{'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'modifiedNodeIds' | 'pageLength' | 'stage'} name</code></li></ul></li><li><p><strong>返回:</strong></p><ul><li><code>{any} value</code></li></ul></li><li><p><strong>详情:</strong></p><p>获取当前指指定name的值</p><p>'root': 当前整个配置,也就是当前编辑器的值</p><p>'page': 当前正在编辑的页面配置</p><p>'parent': 当前选中的节点的父节点</p><p>'node': 当前选中的第一个节点</p><p>'highlightNode': 当前高亮的节点</p><p>'nodes': 当前选中的所有节点</p><p>'modifiedNodeIds': 当前页面所有改动过的节点id</p><p>'pageLength': 所以页面个数</p><p>'stage': <a href="./../stage/coreMethods.html">StageCore</a>实例</p></li><li><p><strong>示例:</strong></p></li></ul><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { editorService } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '@tmagic/editor'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> node</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> editorService.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'node'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><h2 id="set" tabindex="-1">set <a class="header-anchor" href="#set" aria-label="Permalink to "set""></a></h2><ul><li><p><code>{'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'modifiedNodeIds' | 'pageLength' | 'stage'} name</code></p></li><li><p><code>{any} value</code></p></li><li><p><strong>详情:</strong> 参考<a href="#get">get</a>方法</p></li><li><p><strong>示例:</strong></p></li></ul><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { editorService } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '@tmagic/editor'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> node</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> editorService.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'node'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">editorService.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">set</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'node'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, {</span></span>
|
||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">node,</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> name: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'new name'</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><h2 id="getnodeinfo" tabindex="-1">getNodeInfo <a class="header-anchor" href="#getnodeinfo" aria-label="Permalink to "getNodeInfo""></a></h2><ul><li><p><strong>参数:</strong></p><ul><li><p><code>{number | string}</code> id 组件id</p></li><li><p><code>{boolean}</code> raw 是否使用toRaw,默认为true</p></li></ul></li></ul><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>如果raw为false,对获取到的对象进行操作会触发vue响应式处理</p></div><ul><li><p><strong>返回:</strong></p><ul><li>{<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/editor/src/type.ts#L139-L143" target="_blank" rel="noreferrer">EditorNodeInfo</a>}</li></ul></li><li><p><strong>详情:</strong></p><p>根据id获取组件、组件的父组件以及组件所属的页面节点</p></li><li><p><strong>示例:</strong></p></li></ul><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { editorService } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '@tmagic/editor'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> info</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> editorService.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getNodeInfo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'text_123'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">console.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">log</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(info.node);</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">console.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">log</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(info.parent);</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">console.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">log</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(info.page);</span></span></code></pre></div><h2 id="getnodebyid" tabindex="-1">getNodeById <a class="header-anchor" href="#getnodebyid" aria-label="Permalink to "getNodeById""></a></h2><ul><li><p><strong>参数:</strong></p><ul><li><p><code>{number | string}</code> id</p></li><li><p><code>{boolean}</code> raw 是否使用toRaw,默认为true</p></li></ul></li><li><p><strong>返回:</strong></p><ul><li>{<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>} 组件节点配置</li></ul></li><li><p><strong>详情:</strong></p><p>根据id获取组件的信息</p></li><li><p><strong>示例:</strong></p></li></ul><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { editorService } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '@tmagic/editor'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> node</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> editorService.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getNodeById</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'text_123'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">console.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">log</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(node);</span></span></code></pre></div><h2 id="getparentbyid" tabindex="-1">getParentById <a class="header-anchor" href="#getparentbyid" aria-label="Permalink to "getParentById""></a></h2><ul><li><p><strong>参数:</strong></p><ul><li><p><code>{number | string}</code> id</p></li><li><p><code>{boolean}</code> raw 是否使用toRaw,默认为true</p></li></ul></li><li><p><strong>返回:</strong></p><ul><li>{<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>} 指点组件的父节点配置</li></ul></li><li><p><strong>详情:</strong></p><p>根据ID获取指点节点的父节点配置</p></li><li><p><strong>示例:</strong></p></li></ul><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { editorService } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '@tmagic/editor'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> parent</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> editorService.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getParentById</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'text_123'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">console.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">log</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(parent);</span></span></code></pre></div><h2 id="getlayout" tabindex="-1">getLayout <a class="header-anchor" href="#getlayout" aria-label="Permalink to "getLayout""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p><ul><li><p>{<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>} parent</p></li><li><p>{<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>} node 可选</p></li></ul></li><li><p><strong>返回:</strong></p><ul><li>{Promise<<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/editor/src/type.ts#L297-L302" target="_blank" rel="noreferrer">Layout</a>>} 当前布局模式</li></ul></li><li><p><strong>详情:</strong></p><p>只有容器拥有布局,目前支持的布局有流式布局(relative),绝对定位布局(absolute),固定定位布局(fixed)</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>固定定位布局需要从当前选中节点判断,固需要传递可选参数 node</p><p>其他布局则是从父组件(容器)来判断</p></div></li><li><p><strong>示例:</strong></p></li></ul><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { editorService } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '@tmagic/editor'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> parent</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> editorService.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getParentById</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'text_123'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">editorService.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getLayout</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(parent).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">then</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">((</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">layout</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=></span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> console.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">log</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(parent);</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><h2 id="select" tabindex="-1">select <a class="header-anchor" href="#select" aria-label="Permalink to "select""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p><ul><li>{number | string | <a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>} config 需要选中的节点或节点ID</li></ul></li><li><p><strong>返回:</strong></p><ul><li>{Promise<<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>>} 当前选中的节点配置</li></ul></li><li><p><strong>详情:</strong></p><p>选中指点节点(将指点节点设置成当前选中状态)</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>editorService.select只是设置了编辑器的选中状态,并没有设置画布的选中状态,所以根据实际情况可以调用<a href="./../stage/coreMethods.html#select">stage.select</a>来设置画布的选中态</p></div></li><li><p><strong>示例:</strong></p></li></ul><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { editorService } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '@tmagic/editor'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">editorService.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">select</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'text_123'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">editorService.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'stage'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)?.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">select</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'text_123'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><h2 id="multiselect" tabindex="-1">multiSelect <a class="header-anchor" href="#multiselect" aria-label="Permalink to "multiSelect""></a></h2><ul><li><p><strong>参数:</strong></p><ul><li>{(number | string)[]} ids 需要选中的节点ID集合</li></ul></li><li><p><strong>返回:</strong></p><ul><li><code>{Promise<void>}</code></li></ul></li><li><p><strong>详情:</strong></p><p>选中多个节点</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>editorService.multiSelect只是设置了编辑器的选中状态,并没有设置画布的选中状态,所以根据实际情况可以调用<a href="./../stage/coreMethods.html#multiSelect">stage.multiSelect</a>来设置画布的选中态</p></div></li><li><p><strong>示例:</strong></p></li></ul><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { editorService } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '@tmagic/editor'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">editorService.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">multiSelect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'text_123'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'button_123'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]);</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">editorService.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'stage'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)?.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">multiSelect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'text_123'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'button_123'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]);</span></span></code></pre></div><h2 id="highlight" tabindex="-1">highlight <a class="header-anchor" href="#highlight" aria-label="Permalink to "highlight""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p><ul><li>{number | string | <a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>} config 需要高亮的节点或节点ID</li></ul></li><li><p><strong>返回:</strong></p><ul><li><code>{Promise<void>}</code></li></ul></li><li><p><strong>详情:</strong></p><p>高亮指定节点</p></li><li><p><strong>示例:</strong></p></li></ul><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { editorService } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '@tmagic/editor'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">editorService.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">highlight</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'text_123'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><h2 id="doadd" tabindex="-1">doAdd <a class="header-anchor" href="#doadd" aria-label="Permalink to "doAdd""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p><ul><li><p>{<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>} node 新组件节点</p></li><li><p>{<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L54-L59" target="_blank" rel="noreferrer">MContainer</a>} parent 指定的容器节点</p></li></ul></li><li><p><strong>返回:</strong></p><ul><li>{Promise<<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>>} 新增的组件</li></ul></li><li><p><strong>详情:</strong></p><p>往指定的容器中添加组件</p></li></ul><h2 id="add" tabindex="-1">add <a class="header-anchor" href="#add" aria-label="Permalink to "add""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p><ul><li><p>{<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a> | <a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>[]} node 新组件节点配置或多个节点集合</p></li><li><p>{<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L54-L59" target="_blank" rel="noreferrer">MContainer</a>} parent 指定的容器组件节点配置,如果不设置,默认为当前选中的组件的父节点</p></li></ul></li><li><p><strong>返回:</strong></p><ul><li>{Promise<<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a> | <a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>[]>} 新增的组件或组件集合</li></ul></li><li><p><strong>详情:</strong></p><p>往指定的容器或当前容器中添加组件</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p><strong>与<a href="#doadd">doAdd</a>的区别:</strong></p><p>add可以支持一次添加多个组件,add是通过调用<a href="#doadd">doAdd</a>来最终实现添加的。</p><p>编辑器内部添加组件都是调用add来实现的,add除了添加操作外,还会记录历史堆栈,还会更新编辑中相关的状态,而<a href="#doadd">doAdd</a>就仅仅是完成添加的行为</p></div></li></ul><h2 id="doremove" tabindex="-1">doRemove <a class="header-anchor" href="#doremove" aria-label="Permalink to "doRemove""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p><ul><li>{<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>} node 要删除的节点</li></ul></li><li><p><strong>返回:</strong></p><ul><li><code>{Promise<void>}</code></li></ul></li><li><p><strong>详情:</strong></p><p>删除指定的组件或者页面</p></li></ul><h2 id="remove" tabindex="-1">remove <a class="header-anchor" href="#remove" aria-label="Permalink to "remove""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p><ul><li>{<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a> | <a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>[])} node 要删除的节点或节点集合</li></ul></li><li><p><strong>返回:</strong></p><ul><li><code>{Promise<void>}</code></li></ul></li><li><p><strong>详情:</strong></p><p>删除指定的组件或者页面或组件集合</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p><strong>与<a href="#doRemove">doRemove</a>的区别:</strong></p><p>remove可以支持一次删除多个组件,remove是通过调用<a href="#doRemove">doRemove</a>来最终实现删除的。</p><p>编辑器内部删除组件都是调用remove来实现的,remove除了删除操作外,还会记录历史堆。</p></div></li></ul><h2 id="doupdate" tabindex="-1">doUpdate <a class="header-anchor" href="#doupdate" aria-label="Permalink to "doUpdate""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p></li><li><p>{<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a> | <a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>)} node 新的节点</p></li><li><p><strong>返回:</strong></p><ul><li>{Promise<<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a> | <a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>>} 新的节点</li></ul></li><li><p><strong>详情:</strong></p><p>更新节点</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>节点中应该要有id,不然不知道要更新哪个节点</p></div></li></ul><h2 id="update" tabindex="-1">update <a class="header-anchor" href="#update" aria-label="Permalink to "update""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p><ul><li>{Promise<<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a> | <a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>[]>} node 新的节点或节点集合</li></ul></li><li><p><strong>返回:</strong></p><ul><li>{Promise<<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a> | <a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>[]>} 新的节点或节点集合</li></ul></li><li><p><strong>详情:</strong></p><p>更新单个或多个节点</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p><strong>与<a href="#doupdate">doUpdate</a>的区别:</strong></p><p>update可以支持一次更新多个组件,update是通过调用<a href="#doupdate">doUpdate</a>来最终实现更新的。</p><p>编辑器内部更新组件都是调用update来实现的,update除了更新操作外,还会记录历史堆,还会更新<a href="./../../guide/advanced/code-block.html">代码块</a>关系链。</p></div></li></ul><h2 id="sort" tabindex="-1">sort <a class="header-anchor" href="#sort" aria-label="Permalink to "sort""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p><ul><li><code>{ string | number }</code> id1</li><li><code>{ string | number }</code> id2</li></ul></li><li><p><strong>返回:</strong></p><ul><li><code>{Promise<void>}</code></li></ul></li><li><p><strong>详情:</strong></p><p>将id为id1的组件移动到id为id2的组件位置上,例如:[1,2,3,4] -> sort(1,3) -> [2,1,3,4]</p><p>用于流式布局下的组件拖动更新</p></li></ul><h2 id="copy" tabindex="-1">copy <a class="header-anchor" href="#copy" aria-label="Permalink to "copy""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p><ul><li>{Promise<<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a> | <a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>[]>} node 需要复制的节点或节点集合</li></ul></li><li><p><strong>返回:</strong></p><ul><li><code>{Promise<void>}</code></li></ul></li><li><p><strong>详情:</strong></p></li></ul><p>复制组件节点或节点集合</p><p>通过<a href="./storageServiceMethods.html#setitem">storageService.setItem</a>,将组将节点配置转化成string,然后存储到localStorage中</p><h2 id="dopaste" tabindex="-1">doPaste <a class="header-anchor" href="#dopaste" aria-label="Permalink to "doPaste""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p><ul><li></li></ul></li><li><p><strong>返回:</strong></p><ul><li><code>{Promise<void>}</code></li></ul></li><li><p><strong>详情:</strong></p></li></ul><p>粘贴前置操作:返回分配了新id以及校准了坐标的配置</p><h2 id="paste" tabindex="-1">paste <a class="header-anchor" href="#paste" aria-label="Permalink to "paste""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p><ul><li>{<a href="https://github.com/Tencent/tmagic-editor/blob/239b5d3efeae916a8cf3e3566d88063ecccc0553/packages/editor/src/type.ts#L152-L163" target="_blank" rel="noreferrer">PastePosition</a>} position 粘贴的坐标</li></ul></li><li><p><strong>返回:</strong></p><ul><li>{Promise<<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a> | <a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>[]>} 添加后的组件节点配置</li></ul></li><li><p><strong>详情:</strong></p></li></ul><p>粘贴组件节点或节点集合</p><p>通过<a href="./storageServiceMethods.html#setitem">storageService.getItem</a>,从localStorage中获取节点,然后添加到当前容器中</p><h2 id="doaligncenter" tabindex="-1">doAlignCenter <a class="header-anchor" href="#doaligncenter" aria-label="Permalink to "doAlignCenter""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p><ul><li>{<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>} config 需要居中的组件</li></ul></li><li><p><strong>返回:</strong></p><ul><li>{Promise<<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>>}</li></ul></li><li><p><strong>详情:</strong></p><p>水平居中组件节点,仅在<a href="./../../guide/advanced/layout.html">流式布局</a>下有效</p><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>仅是计算出left,并未更新到编辑器中</p></div></li></ul><h2 id="aligncenter" tabindex="-1">alignCenter <a class="header-anchor" href="#aligncenter" aria-label="Permalink to "alignCenter""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p><ul><li>{Promise<<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a> | <a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>[]>} config 需要居中的组件或者组件集合</li></ul></li><li><p><strong>返回:</strong></p><ul><li>{Promise<<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a> | <a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>[]>}</li></ul></li><li><p><strong>详情:</strong></p></li></ul><p>水平居中组件或者组件集合,仅在<a href="./../../guide/advanced/layout.html">流式布局</a>下有效</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p><strong>与<a href="#doaligncentere">doAlignCenter</a>的区别:</strong></p><p>alignCenter可以支持一次水平居中多个组件,alignCenter是通过调用<a href="#doaligncentere">doAlignCenter</a>来获取到已设置好水平居中的位置信息的节点,然后调用update更新。</p></div><h2 id="movelayer" tabindex="-1">moveLayer <a class="header-anchor" href="#movelayer" aria-label="Permalink to "moveLayer""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p><ul><li><code>{number | 'top' | 'bottom'}</code> offset</li></ul></li><li><p><strong>返回:</strong></p><ul><li><code>{Promise<void>}</code></li></ul></li><li><p><strong>详情:</strong></p><p>移动当前选中节点位置</p><p>用于实现上移一层、下移一层、置顶、置底</p></li></ul><h2 id="movetocontainer" tabindex="-1">moveToContainer <a class="header-anchor" href="#movetocontainer" aria-label="Permalink to "moveToContainer""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p><ul><li>{<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a>} config 需要移动的节点</li><li><code>{string | number}</code> targetId 容器ID</li></ul></li><li><p><strong>返回:</strong></p><ul><li>Promise<<a href="https://github.com/Tencent/tmagic-editor/blob/c143a5f7670ae61d80c1a2cfcc780cfb5259849d/packages/schema/src/index.ts#L99" target="_blank" rel="noreferrer">MNode</a> | undefined></li></ul></li><li><p><strong>详情:</strong></p><p>移动到指定容器中</p></li></ul><h2 id="undo" tabindex="-1">undo <a class="header-anchor" href="#undo" aria-label="Permalink to "undo""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>返回:</strong></p><ul><li>{Promise<<a href="https://github.com/Tencent/tmagic-editor/blob/239b5d3efeae916a8cf3e3566d88063ecccc0553/packages/editor/src/type.ts#L400-L404" target="_blank" rel="noreferrer">StepValue</a> | null>}</li></ul></li><li><p><strong>详情:</strong></p><p>撤销当前操作</p></li></ul><h2 id="redo" tabindex="-1">redo <a class="header-anchor" href="#redo" aria-label="Permalink to "redo""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>返回:</strong></p><ul><li>{Promise<<a href="https://github.com/Tencent/tmagic-editor/blob/239b5d3efeae916a8cf3e3566d88063ecccc0553/packages/editor/src/type.ts#L400-L404" target="_blank" rel="noreferrer">StepValue</a> | null>}</li></ul></li><li><p><strong>详情:</strong></p><p>恢复到下一步</p></li></ul><h2 id="move" tabindex="-1">move <a class="header-anchor" href="#move" aria-label="Permalink to "move""></a></h2><ul><li><p><strong><a href="./../../guide/editor-expand.html#行为扩展">扩展支持</a>:</strong> 是</p></li><li><p><strong>参数:</strong></p><ul><li><code>{number}</code> left</li><li><code>{number}</code> top</li></ul></li><li><p><strong>返回:</strong></p><ul><li><code>{Promise<void>}</code></li></ul></li><li><p><strong>详情:</strong></p><p>更新当前选中组件位置,通常用于键盘上下左右快捷键操作</p></li></ul><h2 id="resetmodifiednodeid" tabindex="-1">resetModifiedNodeId <a class="header-anchor" href="#resetmodifiednodeid" aria-label="Permalink to "resetModifiedNodeId""></a></h2><ul><li><strong>详情:</strong></li></ul><p>重置当前记录的修改过的节点id记录,通常用于保存之后</p><h2 id="resetstate" tabindex="-1">resetState <a class="header-anchor" href="#resetstate" aria-label="Permalink to "resetState""></a></h2><ul><li><strong>详情:</strong></li></ul><p>清空state</p><h2 id="destroy" tabindex="-1">destroy <a class="header-anchor" href="#destroy" aria-label="Permalink to "destroy""></a></h2><ul><li><p><strong>详情:</strong></p><p>销毁editorService</p><p>移除所有事件监听,清空state,移除所有插件</p></li></ul><h2 id="use" tabindex="-1">use <a class="header-anchor" href="#use" aria-label="Permalink to "use""></a></h2><p>使用中间件的方式扩展方法,上述方法中标记有<code>扩展支持: 是</code>的方法都支持使用use扩展</p><ul><li><strong>示例:</strong></li></ul><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { editorService, getAddParent } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '@tmagic/editor'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { ElMessageBox } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'element-plus'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">editorService.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">use</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 添加是否删除节点确认提示</span></span>
|
||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> async</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> remove</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">node</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">next</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
|
||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ElMessageBox.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">confirm</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'是否删除'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'提示'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, {</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> confirmButtonText: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'确定'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cancelButtonText: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'取消'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> type: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'warning'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> });</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> next</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> add</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">node</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">next</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
|
||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // text组件只能添加到container中</span></span>
|
||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> parentNode</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> getAddParent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(node);</span></span>
|
||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (node.type </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">===</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'text'</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &&</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> parentNode?.type </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">!==</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'container'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
|
||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> next</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><h2 id="useplugin" tabindex="-1">usePlugin <a class="header-anchor" href="#useplugin" aria-label="Permalink to "usePlugin""></a></h2><ul><li><strong>详情:</strong></li></ul><p>相对于<a href="#use">use</a>, usePlugin支持更加灵活更加细致的扩展, 上述方法中标记有<code>扩展支持: 是</code>的方法都支持使用usePlugin扩展</p><p>每个支持扩展的方法都支持定制before、after两个hook来干预原有方法的行为,before可以用于修改传入参数,after可以用于修改返回的值</p><ul><li><strong>示例:</strong></li></ul><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { editorService } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '@tmagic/editor'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">editorService.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">usePlugin</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 添加组件的时候设置一个添加时间</span></span>
|
||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> beforeDoAdd</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">config</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">parent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=></span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> config.addTime </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> new</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Date</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getTime</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [config, parent];</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><h2 id="removeallplugins" tabindex="-1">removeAllPlugins <a class="header-anchor" href="#removeallplugins" aria-label="Permalink to "removeAllPlugins""></a></h2><ul><li><strong>详情:</strong></li></ul><p>删掉当前设置的所有扩展</p></div></div></main><footer class="VPDocFooter" data-v-a5165e9c data-v-f8258240><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-f8258240><span class="visually-hidden" id="doc-footer-aria-label" data-v-f8258240>Pager</span><div class="pager" data-v-f8258240><a class="VPLink link pager-link prev" href="/tmagic-editor/docs/api/editor/events.html" data-v-f8258240><!--[--><span class="desc" data-v-f8258240>Previous page</span><span class="title" data-v-f8258240>events</span><!--]--></a></div><div class="pager" data-v-f8258240><a class="VPLink link pager-link next" href="/tmagic-editor/docs/api/editor/editorServiceEvents.html" data-v-f8258240><!--[--><span class="desc" data-v-f8258240>Next page</span><span class="title" data-v-f8258240>事件</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-6dfe06bb data-v-89c31066><div class="container" data-v-89c31066><p class="message" data-v-89c31066>Powered by 腾讯视频会员平台技术中心</p><p class="copyright" data-v-89c31066>Copyright (C) 2023 THL A29 Limited, a Tencent company.</p></div></footer><!--[--><!--]--></div></div>
|
||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"api_editor_codeblockservicemethods.md\":\"ByEWNde9\",\"api_editor_componentlistservicemethods.md\":\"BlIpybO4\",\"api_editor_datasourceservicemethods.md\":\"dOFTimur\",\"api_editor_editorserviceevents.md\":\"NWnbRW-u\",\"api_editor_editorservicemethods.md\":\"BkDhL-Jz\",\"api_editor_events.md\":\"D-n7YlOa\",\"api_editor_eventsservicemethods.md\":\"B7XiPAU9\",\"api_editor_historyserviceevents.md\":\"Ch4EzexV\",\"api_editor_historyservicemethods.md\":\"BGNz7JVb\",\"api_editor_props.md\":\"C6nXtNoN\",\"api_editor_propsserviceevents.md\":\"Bi16r2I6\",\"api_editor_propsservicemethods.md\":\"CtS4AyA6\",\"api_editor_slots.md\":\"DJc0kZyD\",\"api_editor_storageservicemethods.md\":\"B8JZCP8b\",\"api_editor_uiservicemethods.md\":\"BhNAYUwK\",\"api_form_form-dialog-events.md\":\"B1Tvd5mR\",\"api_form_form-dialog-methods.md\":\"BHbhKE0E\",\"api_form_form-dialog-props.md\":\"DGgPNL4j\",\"api_form_form-events.md\":\"DjtkQ04g\",\"api_form_form-methods.md\":\"D8KfiSNh\",\"api_form_form-props.md\":\"BuujGPjG\",\"api_stage_coreevents.md\":\"DWLYMszB\",\"api_stage_coremethods.md\":\"DiiD7c0X\",\"api_table_events.md\":\"CfFQQmdb\",\"api_table_methods.md\":\"DK7PIkqn\",\"api_table_props.md\":\"DO3IJxZ9\",\"form-config_compare.md\":\"CzwGEwJZ\",\"form-config_fields_cascader.md\":\"DVdum0nR\",\"form-config_fields_checkbox.md\":\"DE6q5Ibr\",\"form-config_fields_color-picker.md\":\"DXoJjSov\",\"form-config_fields_date-picker.md\":\"D2VhlcjQ\",\"form-config_fields_datetime-picker.md\":\"LJjuzKo6\",\"form-config_fields_display.md\":\"B7Bf4Lpm\",\"form-config_fields_hidden.md\":\"3tLOI4Ku\",\"form-config_fields_link.md\":\"XRLOekQP\",\"form-config_fields_number.md\":\"CFsP0NKf\",\"form-config_fields_radio.md\":\"CNVjIAaP\",\"form-config_fields_select.md\":\"y8DvtD5s\",\"form-config_fields_switch.md\":\"CoIuX0Sf\",\"form-config_fields_text.md\":\"TX1l0lwW\",\"form-config_fields_textarea.md\":\"BBSDxUFe\",\"form-config_fields_time-picker.md\":\"C9wRi_IB\",\"form-config_layout.md\":\"fUDi4ZGv\",\"form-config_relate.md\":\"Dw-kLwJI\",\"guide_advanced_code-block.md\":\"1m2EdpET\",\"guide_advanced_coupling.md\":\"XSIQCzCw\",\"guide_advanced_data-source.md\":\"Q6P421HC\",\"guide_advanced_js-schema.md\":\"XQRodkeW\",\"guide_advanced_layout.md\":\"PE5_6dEb\",\"guide_advanced_page.md\":\"BeH6A7ti\",\"guide_advanced_tmagic-form.md\":\"BAl3iNDg\",\"guide_advanced_tmagic-ui.md\":\"D6lHMeDC\",\"guide_component.md\":\"C3ln72FC\",\"guide_conception.md\":\"DLxZBuUJ\",\"guide_editor-expand.md\":\"C0W8uGZG\",\"guide_index.md\":\"BM-Tluo7\",\"guide_introduction.md\":\"Ch_-Uv4O\",\"guide_migration.md\":\"Cgzwa-8h\",\"guide_publish.md\":\"DuQIDRyD\",\"guide_runtime.md\":\"DXMc06eN\",\"guide_tutorial_hello-world.md\":\"BrEh5Nq7\",\"guide_tutorial_index.md\":\"CbM8aiXv\",\"guide_tutorial_render.md\":\"D_6uyszN\",\"guide_tutorial_runtime.md\":\"BQ9hcU3d\",\"index.md\":\"CFu6CvwY\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"tmagic-editor\",\"description\":\"页面可视化平台\",\"base\":\"/tmagic-editor/docs/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"./favicon.png\",\"search\":{\"provider\":\"local\"},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/Tencent/tmagic-editor\"}],\"footer\":{\"message\":\"Powered by 腾讯视频会员平台技术中心\",\"copyright\":\"Copyright (C) 2023 THL A29 Limited, a Tencent company.\"},\"nav\":[{\"text\":\"文档\",\"link\":\"/guide/\",\"activeMatch\":\"/guide/\"},{\"text\":\"API\",\"link\":\"/api/editor/props\",\"activeMatch\":\"/api/\"},{\"text\":\"表单配置\",\"link\":\"/form-config/fields/text\",\"activeMatch\":\"/form-config/\"},{\"text\":\"更新日志\",\"link\":\"https://github.com/Tencent/tmagic-editor/releases\"},{\"text\":\"Playground\",\"link\":\"https://tencent.github.io/tmagic-editor/playground/index.html\"}],\"sidebar\":{\"/guide/\":[{\"text\":\"文档\",\"items\":[{\"text\":\"介绍\",\"link\":\"/guide/introduction.md\"},{\"text\":\"快速开始\",\"link\":\"/guide/\"},{\"text\":\"基础概念\",\"link\":\"/guide/conception.md\"},{\"text\":\"页面发布\",\"link\":\"/guide/publish.md\"},{\"text\":\"RUNTIME\",\"link\":\"/guide/runtime.md\"},{\"text\":\"组件开发\",\"link\":\"/guide/component.md\"},{\"text\":\"编辑器扩展\",\"link\":\"/guide/editor-expand.md\"},{\"text\":\"升级到1.5.x\",\"link\":\"/guide/migration.md\"}]},{\"text\":\"进阶指南\",\"items\":[{\"text\":\"JS Schema\",\"link\":\"/guide/advanced/js-schema.md\"},{\"text\":\"布局原理\",\"link\":\"/guide/advanced/layout.md\"},{\"text\":\"页面渲染\",\"link\":\"/guide/advanced/page.md\"},{\"text\":\"联动原理\",\"link\":\"/guide/advanced/coupling.md\"},{\"text\":\"代码块\",\"link\":\"/guide/advanced/code-block.md\"},{\"text\":\"数据源\",\"link\":\"/guide/advanced/data-source.md\"},{\"text\":\"@tmagic/ui\",\"link\":\"/guide/advanced/tmagic-ui.md\"},{\"text\":\"@tmagic/form\",\"link\":\"/guide/advanced/tmagic-form.md\"}]},{\"text\":\"教程\",\"items\":[{\"text\":\"写在前面\",\"link\":\"/guide/tutorial/\"},{\"text\":\"1.Hello World\",\"link\":\"/guide/tutorial/hello-world.md\"},{\"text\":\"2.Runtime\",\"link\":\"/guide/tutorial/runtime.md\"},{\"text\":\"3.DSL解析渲染\",\"link\":\"/guide/tutorial/render.md\"}]}],\"/api/\":[{\"text\":\"编辑器\",\"items\":[{\"text\":\"Editor组件\",\"items\":[{\"text\":\"props\",\"link\":\"/api/editor/props.md\"},{\"text\":\"slots\",\"link\":\"/api/editor/slots.md\"},{\"text\":\"events\",\"link\":\"/api/editor/events.md\"}]},{\"text\":\"editorService\",\"items\":[{\"text\":\"方法\",\"link\":\"/api/editor/editorServiceMethods.md\"},{\"text\":\"事件\",\"link\":\"/api/editor/editorServiceEvents.md\"}]},{\"text\":\"propsService\",\"items\":[{\"text\":\"方法\",\"link\":\"/api/editor/propsServiceMethods.md\"},{\"text\":\"事件\",\"link\":\"/api/editor/propsServiceEvents.md\"}]},{\"text\":\"historyService\",\"items\":[{\"text\":\"方法\",\"link\":\"/api/editor/historyServiceMethods.md\"},{\"text\":\"事件\",\"link\":\"/api/editor/historyServiceEvents.md\"}]},{\"text\":\"eventsService\",\"link\":\"/api/editor/eventsServiceMethods.md\"},{\"text\":\"uiService\",\"link\":\"/api/editor/uiServiceMethods.md\"},{\"text\":\"codeBlockService\",\"link\":\"/api/editor/codeBlockServiceMethods.md\"},{\"text\":\"componentListService\",\"link\":\"/api/editor/componentListServiceMethods.md\"},{\"text\":\"storageService\",\"link\":\"/api/editor/storageServiceMethods.md\"}]},{\"text\":\"表单\",\"items\":[{\"text\":\"Form组件\",\"items\":[{\"text\":\"props\",\"link\":\"/api/form/form-props\"},{\"text\":\"methods\",\"link\":\"/api/form/form-methods\"},{\"text\":\"events\",\"link\":\"/api/form/form-events\"}]},{\"text\":\"FormDialog组件\",\"items\":[{\"text\":\"props\",\"link\":\"/api/form/form-dialog-props\"},{\"text\":\"methods\",\"link\":\"/api/form/form-dialog-methods\"},{\"text\":\"events\",\"link\":\"/api/form/form-dialog-events\"}]}]},{\"text\":\"表格\",\"items\":[{\"text\":\"Table组件\",\"items\":[{\"text\":\"props\",\"link\":\"/api/table/props\"},{\"text\":\"methods\",\"link\":\"/api/table/methods\"},{\"text\":\"events\",\"link\":\"/api/table/events\"}]}]},{\"text\":\"stage\",\"items\":[{\"text\":\"StageCore\",\"items\":[{\"text\":\"方法\",\"link\":\"/api/stage/coreMethods\"},{\"text\":\"事件\",\"link\":\"/api/stage/coreEvents\"}]}]}],\"/form-config/\":[{\"text\":\"基础配置\",\"items\":[{\"text\":\"Input输入框\",\"link\":\"/form-config/fields/text.md\"},{\"text\":\"Textarea文本域\",\"link\":\"/form-config/fields/textarea.md\"},{\"text\":\"InputNumber计数器\",\"link\":\"/form-config/fields/number.md\"},{\"text\":\"Display只读文本\",\"link\":\"/form-config/fields/display.md\"},{\"text\":\"Hidden隐藏域\",\"link\":\"/form-config/fields/hidden.md\"},{\"text\":\"Link链接\",\"link\":\"/form-config/fields/link.md\"},{\"text\":\"Checkbox多选框\",\"link\":\"/form-config/fields/checkbox.md\"},{\"text\":\"Radio单选框\",\"link\":\"/form-config/fields/radio.md\"},{\"text\":\"Switch开关\",\"link\":\"/form-config/fields/switch.md\"},{\"text\":\"Select选择器\",\"link\":\"/form-config/fields/select.md\"},{\"text\":\"Cascader级联选择器\",\"link\":\"/form-config/fields/cascader.md\"},{\"text\":\"ColorPicker颜色选择器\",\"link\":\"/form-config/fields/color-picker.md\"},{\"text\":\"DatePick日期选择器\",\"link\":\"/form-config/fields/date-picker.md\"},{\"text\":\"DatetimePick日期时间选择器\",\"link\":\"/form-config/fields/datetime-picker.md\"},{\"text\":\"TimePick时间选择器\",\"link\":\"/form-config/fields/time-picker.md\"}]},{\"text\":\"布局配置\",\"items\":[{\"text\":\"布局\",\"link\":\"/form-config/layout.md\"}]},{\"text\":\"联动配置\",\"items\":[{\"text\":\"联动\",\"link\":\"/form-config/relate.md\"}]},{\"text\":\"表单对比\",\"items\":[{\"text\":\"表单对比\",\"link\":\"/form-config/compare.md\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||
|
||
</body>
|
||
</html> |