🚧BorderStyle
// 畫框線的設定
function BorderStyle(
{
top = null,
left = null,
bottom = null,
right = null,
vertical = null,
horizontal = null,
color = 'black',
style = SpreadsheetApp.BorderStyle.SOLID
}={}
) {
// edges
this.edge = {
top : top,
left : left,
bottom: bottom,
right : right
};
// internalBorder
this.internalBorder = {
vertical : vertical,
horizontal: horizontal
};
// color
this.color = color;
// style
this.style = style;
}
⬆️ 需要: app (app.style)
// 🔸 BorderStyle.allThin()
BorderStyle.allThin = function(){
return new BorderStyle({
top:true, bottom:true,
left:true, right:true,
vertical:true, horizontal:true
});
};
// 🔸 BorderStyle.thickTopBottom()
BorderStyle.thickTopBottom = function(){
return new BorderStyle({
top : true,
bottom: true,
style : app.style.border.solidMedium // app.style
});
};
// 🔸 BorderStyle.thinBottom()
BorderStyle.thinBottom = function(){
return new BorderStyle({bottom: true});
};
Last updated