import{ax as i,z as a,A as t,b2 as n}from"./chunks/framework.DkLJC2NO.js";const d=JSON.parse('{"title":"componentListService方法","description":"","frontmatter":{},"headers":[],"relativePath":"api/editor/componentListServiceMethods.md","filePath":"api/editor/componentListServiceMethods.md"}'),e={name:"api/editor/componentListServiceMethods.md"};function l(p,s,h,k,r,o){return t(),a("div",null,[...s[0]||(s[0]=[n(`

componentListService方法

setList

js
import { componentListService } from '@tmagic/editor';

componentListService.setList([
  {
    title: '基础组件',
    items: [
      {
        icon: 'text-icon',
        text: '文本',
        type: 'text',
      },
      {
        icon: 'button-icon',
        text: '按钮',
        type: 'button',
      },
    ],
  },
]);

getList

js
import { componentListService } from '@tmagic/editor';

const list = componentListService.getList();
console.log(list);

resetState

js
import { componentListService } from '@tmagic/editor';

componentListService.resetState();

destroy

js
import { componentListService } from '@tmagic/editor';

componentListService.destroy();
`,13)])])}const c=i(e,[["render",l]]);export{d as __pageData,c as default};