Row() {}.leftTriangle();
// 向下
@Styles
function downTriangle() {
.width(0)
.height(0)
.borderWidth({ left: 20, right: 20, top: 40 })
.borderColor({ left: Color.Transparent, right: Color.Transparent, top: Color.Red })
}
// 向上
@Styles
function upTriangle() {
.width(0)
.height(0)
.borderWidth({ left: 20, right: 20, bottom: 40 })
.borderColor({ left: Color.Transparent, right: Color.Transparent, bottom: Color.Red })
}
// 向右
@Styles
function rightTriangle() {
.width(0)
.height(0)
.borderWidth({ top: 20, bottom: 20, left: 40 })
.borderColor({ top: Color.Transparent, bottom: Color.Transparent, left: Color.Red })
}
// 向左
@Styles
function leftTriangle() {
.width(0)
.height(0)
.borderWidth({ top: 20, bottom: 20, right: 40 })
.borderColor({ top: Color.Transparent, bottom: Color.Transparent, right: Color.Red })
}