mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-10 17:05:06 +08:00
初始化项目,自 v1.7.1 版本开始
This commit is contained in:
27
types/custom-types.d.ts
vendored
Normal file
27
types/custom-types.d.ts
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
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[]
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user