import{At as e,E as t,Ot as n,Xt as r}from"./chunks/framework.ECw2lWOt.js";var i=JSON.parse(`{"title":"componentListService方法","description":"","frontmatter":{},"headers":[],"relativePath":"api/editor/componentListServiceMethods.md","filePath":"api/editor/componentListServiceMethods.md"}`),a={name:`api/editor/componentListServiceMethods.md`};function o(t,i,a,o,s,c){return r(),n(`div`,null,[...i[0]||=[e(`

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)]])}var s=t(a,[[`render`,o]]);export{i as __pageData,s as default};