mirror of
				https://github.com/YunaiV/ruoyi-vue-pro.git
				synced 2025-11-04 08:06:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			529 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			529 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { SlateDescendant } from '@wangeditor/editor'
 | 
						|
 | 
						|
declare module 'slate' {
 | 
						|
  interface CustomTypes {
 | 
						|
    // 扩展 text
 | 
						|
    Text: {
 | 
						|
      text: string
 | 
						|
      bold?: boolean
 | 
						|
      italic?: boolean
 | 
						|
      code?: boolean
 | 
						|
      through?: boolean
 | 
						|
      underline?: boolean
 | 
						|
      sup?: boolean
 | 
						|
      sub?: boolean
 | 
						|
      color?: string
 | 
						|
      bgColor?: string
 | 
						|
      fontSize?: string
 | 
						|
      fontFamily?: string
 | 
						|
    }
 | 
						|
 | 
						|
    // 扩展 Element 的 type 属性
 | 
						|
    Element: {
 | 
						|
      type: string
 | 
						|
      children: SlateDescendant[]
 | 
						|
    }
 | 
						|
  }
 | 
						|
}
 |