tmagic-editor/docs/assets/api_editor_slots.md.ChfXa7kw.js
2025-12-11 11:05:26 +00:00

53 lines
34 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{ax as i,z as a,A as t,b2 as l}from"./chunks/framework.DkLJC2NO.js";const E=JSON.parse('{"title":"Editor组件 slots","description":"","frontmatter":{},"headers":[],"relativePath":"api/editor/slots.md","filePath":"api/editor/slots.md"}'),e={name:"api/editor/slots.md"};function n(p,s,h,r,k,o){return t(),a("div",null,[...s[0]||(s[0]=[l(`<h1 id="editor组件-slots" tabindex="-1">Editor组件 slots <a class="header-anchor" href="#editor组件-slots" aria-label="Permalink to &quot;Editor组件 slots&quot;"></a></h1><h2 id="header" tabindex="-1">header <a class="header-anchor" href="#header" aria-label="Permalink to &quot;header&quot;"></a></h2><ul><li><p><strong>详情:</strong> 编辑器最顶部区域</p></li><li><p><strong>默认:</strong> 无</p></li><li><p><strong>示例:</strong></p></li></ul><div class="language-html vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">html</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">m-editor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> #header</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">div</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> class</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;custom-header&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;自定义头部内容&lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">div</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">m-editor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span></code></pre></div><h2 id="nav" tabindex="-1">nav <a class="header-anchor" href="#nav" aria-label="Permalink to &quot;nav&quot;"></a></h2><ul><li><p><strong>详情:</strong> 编辑器顶部菜单栏</p></li><li><p><strong>默认:</strong> <a href="https://github.com/Tencent/tmagic-editor/blob/239b5d3efeae916a8cf3e3566d88063ecccc0553/packages/editor/src/layouts/NavMenu.vue" target="_blank" rel="noreferrer">NavMenu.vue</a></p></li><li><p><strong>插槽 Props</strong></p><ul><li><code>editorService</code>: editorService 实例</li></ul></li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>属性配置<a href="./props.html#menu">menu</a>由默认组件接收如设置该slot<a href="./props.html#menu">menu</a>配置将失效</p></div><ul><li><strong>示例:</strong></li></ul><div class="language-html vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">html</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">m-editor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> #nav</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;{ editorService }&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">div</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> class</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;custom-nav&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">button</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> @click</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;save&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;保存&lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">button</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">div</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">m-editor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span></code></pre></div><h2 id="content-before" tabindex="-1">content-before <a class="header-anchor" href="#content-before" aria-label="Permalink to &quot;content-before&quot;"></a></h2><ul><li><p><strong>详情:</strong> 编辑器主要内容区域之前</p></li><li><p><strong>默认:</strong> 无</p></li></ul><h2 id="src-code" tabindex="-1">src-code <a class="header-anchor" href="#src-code" aria-label="Permalink to &quot;src-code&quot;"></a></h2><ul><li><p><strong>详情:</strong> 源码查看区域</p></li><li><p><strong>默认:</strong> 默认的代码编辑器</p></li><li><p><strong>插槽 Props</strong></p><ul><li><code>editorService</code>: editorService 实例</li></ul></li></ul><h2 id="sidebar" tabindex="-1">sidebar <a class="header-anchor" href="#sidebar" aria-label="Permalink to &quot;sidebar&quot;"></a></h2><ul><li><p><strong>详情:</strong> 左边栏</p></li><li><p><strong>默认:</strong> <a href="https://github.com/Tencent/tmagic-editor/blob/239b5d3efeae916a8cf3e3566d88063ecccc0553/packages/editor/src/layouts/sidebar/Sidebar.vue" target="_blank" rel="noreferrer">Sidebar.vue</a></p></li><li><p><strong>插槽 Props</strong></p><ul><li><code>editorService</code>: editorService 实例</li></ul></li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>属性配置<a href="./props.html#sidebar">sidebar</a>由默认组件接收如设置该slot<a href="./props.html#sidebar">sidebar</a>配置将失效</p></div><ul><li><strong>示例:</strong></li></ul><div class="language-html vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">html</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">m-editor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> #sidebar</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;{ editorService }&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">div</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> class</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;custom-sidebar&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> &lt;!-- 自定义侧边栏内容 --&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">div</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">m-editor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span></code></pre></div><h2 id="component-list" tabindex="-1">component-list <a class="header-anchor" href="#component-list" aria-label="Permalink to &quot;component-list&quot;"></a></h2><ul><li><p><strong>详情:</strong> 左边栏中的组件列表</p></li><li><p><strong>默认:</strong> 默认的组件列表</p></li><li><p><strong>插槽 Props</strong></p><ul><li><code>componentGroupList</code>: 组件分组列表</li></ul></li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>如设置了<a href="#sidebar">sidebar</a>插槽,此插槽将失效</p></div><h2 id="component-list-panel-header" tabindex="-1">component-list-panel-header <a class="header-anchor" href="#component-list-panel-header" aria-label="Permalink to &quot;component-list-panel-header&quot;"></a></h2><ul><li><p><strong>详情:</strong> 左边栏中的组件列表内上方位置</p></li><li><p><strong>默认:</strong> 无</p></li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>如设置了<a href="#sidebar">sidebar</a>插槽,此插槽将失效</p></div><h2 id="component-list-item" tabindex="-1">component-list-item <a class="header-anchor" href="#component-list-item" aria-label="Permalink to &quot;component-list-item&quot;"></a></h2><ul><li><p><strong>详情:</strong> 左边栏中的组件列表中组件item</p></li><li><p><strong>默认:</strong> 图片加文案</p></li><li><p><strong>插槽 Props</strong></p><ul><li><code>component</code>: 组件配置对象</li></ul></li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>如设置了<a href="#sidebar">sidebar</a>插槽,此插槽将失效</p></div><ul><li><strong>示例:</strong></li></ul><div class="language-html vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">html</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">m-editor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> #component-list-item</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;{ component }&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">div</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> class</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;custom-item&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">span</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;{{ component.text }}&lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">span</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">div</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">m-editor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span></code></pre></div><h2 id="layer-panel-header" tabindex="-1">layer-panel-header <a class="header-anchor" href="#layer-panel-header" aria-label="Permalink to &quot;layer-panel-header&quot;"></a></h2><ul><li><p><strong>详情:</strong> 左边栏中的已选组件(组件树)内顶部位置</p></li><li><p><strong>默认:</strong> 无</p></li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>如设置了<a href="#sidebar">sidebar</a>插槽,此插槽将失效</p></div><h2 id="layer-node-content" tabindex="-1">layer-node-content <a class="header-anchor" href="#layer-node-content" aria-label="Permalink to &quot;layer-node-content&quot;"></a></h2><ul><li><p><strong>详情:</strong> 左边栏中的已选组件(组件树)节点完整内容</p></li><li><p><strong>默认:</strong> 组件名称加id和工具按钮</p></li><li><p><strong>插槽 Props</strong></p><ul><li><code>data</code>: 节点数据</li></ul></li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>如设置了<a href="#sidebar">sidebar</a>插槽,此插槽将失效</p></div><h2 id="layer-node-label" tabindex="-1">layer-node-label <a class="header-anchor" href="#layer-node-label" aria-label="Permalink to &quot;layer-node-label&quot;"></a></h2><ul><li><p><strong>详情:</strong> 左边栏中的已选组件(组件树)节点标签部分</p></li><li><p><strong>默认:</strong> 组件名称加id</p></li><li><p><strong>插槽 Props</strong></p><ul><li><code>data</code>: 节点数据</li></ul></li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>如设置了<a href="#sidebar">sidebar</a>插槽,此插槽将失效</p></div><ul><li><strong>示例:</strong></li></ul><div class="language-html vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">html</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">m-editor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> #layer-node-label</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;{ data }&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">span</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;{{ data.type }} - {{ data.name }}&lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">span</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">m-editor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span></code></pre></div><h2 id="layer-node-tool" tabindex="-1">layer-node-tool <a class="header-anchor" href="#layer-node-tool" aria-label="Permalink to &quot;layer-node-tool&quot;"></a></h2><ul><li><p><strong>详情:</strong> 左边栏中的已选组件(组件树)节点右侧工具区域</p></li><li><p><strong>默认:</strong> 无</p></li><li><p><strong>插槽 Props</strong></p><ul><li><code>data</code>: 节点数据</li></ul></li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>如设置了<a href="#sidebar">sidebar</a>插槽,此插槽将失效</p></div><h2 id="code-block-panel-header" tabindex="-1">code-block-panel-header <a class="header-anchor" href="#code-block-panel-header" aria-label="Permalink to &quot;code-block-panel-header&quot;"></a></h2><ul><li><p><strong>详情:</strong> 左边栏中的代码块列表内顶部位置</p></li><li><p><strong>默认:</strong> 无</p></li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>如设置了<a href="#sidebar">sidebar</a>插槽,此插槽将失效</p></div><h2 id="code-block-panel-tool" tabindex="-1">code-block-panel-tool <a class="header-anchor" href="#code-block-panel-tool" aria-label="Permalink to &quot;code-block-panel-tool&quot;"></a></h2><ul><li><p><strong>详情:</strong> 左边栏中的代码块列表中代码块右侧位置</p></li><li><p><strong>默认:</strong> 无</p></li><li><p><strong>插槽 Props</strong></p><ul><li><code>id</code>: 代码块id</li><li><code>data</code>: 代码块数据</li></ul></li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>如设置了<a href="#sidebar">sidebar</a>插槽,此插槽将失效</p></div><h2 id="code-block-panel-search" tabindex="-1">code-block-panel-search <a class="header-anchor" href="#code-block-panel-search" aria-label="Permalink to &quot;code-block-panel-search&quot;"></a></h2><ul><li><p><strong>详情:</strong> 左边栏中的代码块列表搜索框位置</p></li><li><p><strong>默认:</strong> 无</p></li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>如设置了<a href="#sidebar">sidebar</a>插槽,此插槽将失效</p></div><h2 id="data-source-panel-tool" tabindex="-1">data-source-panel-tool <a class="header-anchor" href="#data-source-panel-tool" aria-label="Permalink to &quot;data-source-panel-tool&quot;"></a></h2><ul><li><p><strong>详情:</strong> 左边栏中的数据源列表中数据源右侧位置</p></li><li><p><strong>默认:</strong> 无</p></li><li><p><strong>插槽 Props</strong></p><ul><li><code>data</code>: 数据源数据</li></ul></li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>如设置了<a href="#sidebar">sidebar</a>插槽,此插槽将失效</p></div><h2 id="data-source-panel-search" tabindex="-1">data-source-panel-search <a class="header-anchor" href="#data-source-panel-search" aria-label="Permalink to &quot;data-source-panel-search&quot;"></a></h2><ul><li><p><strong>详情:</strong> 左边栏中的数据源列表搜索框位置</p></li><li><p><strong>默认:</strong> 无</p></li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>如设置了<a href="#sidebar">sidebar</a>插槽,此插槽将失效</p></div><h2 id="workspace" tabindex="-1">workspace <a class="header-anchor" href="#workspace" aria-label="Permalink to &quot;workspace&quot;"></a></h2><ul><li><p><strong>详情:</strong> 编辑器中间区域</p></li><li><p><strong>默认:</strong> <a href="https://github.com/Tencent/tmagic-editor/blob/239b5d3efeae916a8cf3e3566d88063ecccc0553/packages/editor/src/layouts/workspace/Workspace.vue" target="_blank" rel="noreferrer">Workspace.vue</a></p></li><li><p><strong>插槽 Props</strong></p><ul><li><code>editorService</code>: editorService 实例</li></ul></li></ul><h2 id="stage" tabindex="-1">stage <a class="header-anchor" href="#stage" aria-label="Permalink to &quot;stage&quot;"></a></h2><ul><li><p><strong>详情:</strong> 画布</p></li><li><p><strong>默认:</strong> <a href="https://github.com/Tencent/tmagic-editor/blob/239b5d3efeae916a8cf3e3566d88063ecccc0553/packages/editor/src/layouts/workspace/Stage.vue" target="_blank" rel="noreferrer">Stage.vue</a></p></li></ul><h2 id="workspace-content" tabindex="-1">workspace-content <a class="header-anchor" href="#workspace-content" aria-label="Permalink to &quot;workspace-content&quot;"></a></h2><ul><li><p><strong>详情:</strong> 编辑器中间区域内,画布上方位置</p></li><li><p><strong>默认:</strong> 无</p></li><li><p><strong>插槽 Props</strong></p><ul><li><code>editorService</code>: editorService 实例</li></ul></li></ul><h2 id="page-bar" tabindex="-1">page-bar <a class="header-anchor" href="#page-bar" aria-label="Permalink to &quot;page-bar&quot;"></a></h2><ul><li><p><strong>详情:</strong> 编辑器中间区域底部页面标签栏</p></li><li><p><strong>默认:</strong> 默认的页面标签栏</p></li></ul><h2 id="page-bar-add-button" tabindex="-1">page-bar-add-button <a class="header-anchor" href="#page-bar-add-button" aria-label="Permalink to &quot;page-bar-add-button&quot;"></a></h2><ul><li><p><strong>详情:</strong> 页面标签栏中的&quot;添加页面&quot;按钮</p></li><li><p><strong>默认:</strong> 默认的添加按钮</p></li></ul><h2 id="page-bar-title" tabindex="-1">page-bar-title <a class="header-anchor" href="#page-bar-title" aria-label="Permalink to &quot;page-bar-title&quot;"></a></h2><ul><li><p><strong>详情:</strong> 编辑器中间区域底部页面标题</p></li><li><p><strong>默认:</strong> 页面名称</p></li><li><p><strong>插槽 Props</strong></p><ul><li><code>page</code>: 页面配置对象</li></ul></li><li><p><strong>示例:</strong></p></li></ul><div class="language-html vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">html</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">m-editor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> #page-bar-title</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;{ page }&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">span</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;{{ page.name }} - {{ page.id }}&lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">span</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">m-editor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span></code></pre></div><h2 id="page-bar-popover" tabindex="-1">page-bar-popover <a class="header-anchor" href="#page-bar-popover" aria-label="Permalink to &quot;page-bar-popover&quot;"></a></h2><ul><li><p><strong>详情:</strong> 编辑器中间区域底部页面标题悬浮框内容</p></li><li><p><strong>默认:</strong> 页面详细信息</p></li><li><p><strong>插槽 Props</strong></p><ul><li><code>page</code>: 页面配置对象</li></ul></li></ul><h2 id="page-list-popover" tabindex="-1">page-list-popover <a class="header-anchor" href="#page-list-popover" aria-label="Permalink to &quot;page-list-popover&quot;"></a></h2><ul><li><p><strong>详情:</strong> 页面列表弹出框内容</p></li><li><p><strong>默认:</strong> 页面列表</p></li><li><p><strong>插槽 Props</strong></p><ul><li><code>list</code>: 页面列表</li></ul></li></ul><h2 id="props-panel" tabindex="-1">props-panel <a class="header-anchor" href="#props-panel" aria-label="Permalink to &quot;props-panel&quot;"></a></h2><ul><li><p><strong>详情:</strong> 编辑器右侧属性配置</p></li><li><p><strong>默认:</strong> <a href="https://github.com/Tencent/tmagic-editor/blob/239b5d3efeae916a8cf3e3566d88063ecccc0553/packages/editor/src/layouts/PropsPanel.vue" target="_blank" rel="noreferrer">PropsPanel.vue</a></p></li></ul><h2 id="props-panel-header" tabindex="-1">props-panel-header <a class="header-anchor" href="#props-panel-header" aria-label="Permalink to &quot;props-panel-header&quot;"></a></h2><ul><li><p><strong>详情:</strong> 编辑器右侧属性配置内顶部区域</p></li><li><p><strong>默认:</strong> 无</p></li></ul><h2 id="content-after" tabindex="-1">content-after <a class="header-anchor" href="#content-after" aria-label="Permalink to &quot;content-after&quot;"></a></h2><ul><li><p><strong>详情:</strong> 编辑器主要内容区域之后</p></li><li><p><strong>默认:</strong> 无</p></li></ul><h2 id="footer" tabindex="-1">footer <a class="header-anchor" href="#footer" aria-label="Permalink to &quot;footer&quot;"></a></h2><ul><li><p><strong>详情:</strong> 编辑器底部区域</p></li><li><p><strong>默认:</strong> 无</p></li></ul><h2 id="empty" tabindex="-1">empty <a class="header-anchor" href="#empty" aria-label="Permalink to &quot;empty&quot;"></a></h2><ul><li><p><strong>详情:</strong> 当前没有页面时,编辑器中间区域</p></li><li><p><strong>默认:</strong> <a href="https://github.com/Tencent/tmagic-editor/blob/239b5d3efeae916a8cf3e3566d88063ecccc0553/packages/editor/src/layouts/AddPageBox.vue" target="_blank" rel="noreferrer">AddPageBox.vue</a></p></li><li><p><strong>插槽 Props</strong></p><ul><li><code>editorService</code>: editorService 实例</li></ul></li><li><p><strong>示例:</strong></p></li></ul><div class="language-html vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">html</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">m-editor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> #empty</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;{ editorService }&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">div</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> class</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;custom-empty&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">p</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;暂无页面&lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">p</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">button</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> @click</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;createFirstPage&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;创建第一个页面&lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">button</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">div</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">m-editor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;/</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">template</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;</span></span></code></pre></div>`,86)])])}const g=i(e,[["render",n]]);export{E as __pageData,g as default};