github.com/e154/smart-home@v0.17.2-0.20240311175135-e530a6e5cd45/static_source/admin/types/custom-types.d.ts (about) 1 import { SlateDescendant } from '@wangeditor/editor' 2 3 declare module 'slate' { 4 interface CustomTypes { 5 // 扩展 text 6 Text: { 7 text: string 8 bold?: boolean 9 italic?: boolean 10 code?: boolean 11 through?: boolean 12 underline?: boolean 13 sup?: boolean 14 sub?: boolean 15 color?: string 16 bgColor?: string 17 fontSize?: string 18 fontFamily?: string 19 } 20 21 // 扩展 Element 的 type 属性 22 Element: { 23 type: string 24 children: SlateDescendant[] 25 } 26 } 27 }