web:support text font style
This commit is contained in:
parent
c92435f1e0
commit
2225514921
@ -41,7 +41,24 @@ export class DoricTextNode extends DoricViewNode {
|
|||||||
}
|
}
|
||||||
break
|
break
|
||||||
case "fontStyle":
|
case "fontStyle":
|
||||||
v.style.fontWeight = ""
|
switch (prop) {
|
||||||
|
case "bold":
|
||||||
|
v.style.fontWeight = "bold"
|
||||||
|
v.style.fontStyle = "normal"
|
||||||
|
break
|
||||||
|
case "italic":
|
||||||
|
v.style.fontWeight = "normal"
|
||||||
|
v.style.fontStyle = "italic"
|
||||||
|
break
|
||||||
|
case "bold_italic":
|
||||||
|
v.style.fontWeight = "bold"
|
||||||
|
v.style.fontStyle = "italic"
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
v.style.fontWeight = "normal"
|
||||||
|
v.style.fontStyle = "normal"
|
||||||
|
break
|
||||||
|
}
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
super.blendProps(v, propName, prop)
|
super.blendProps(v, propName, prop)
|
||||||
|
Reference in New Issue
Block a user