* fix: border type case

* fix: json
main
bokuweb 2020-04-30 20:06:01 +09:00 committed by GitHub
parent 587d895fad
commit d041018007
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 29 deletions

View File

@ -21,25 +21,25 @@ import * as wasm from "./pkg";
const convertBorderType = (t: BorderType) => {
switch (t) {
case "Nil":
case "nil":
return wasm.BorderType.Nil;
case "None":
case "none":
return wasm.BorderType.None;
case "Single":
case "single":
return wasm.BorderType.Single;
case "Thick":
case "thick":
return wasm.BorderType.Thick;
case "Double":
case "double":
return wasm.BorderType.Double;
case "Dotted":
case "dotted":
return wasm.BorderType.Dotted;
case "Dashed":
case "dashed":
return wasm.BorderType.Dashed;
case "DotDash":
case "dotDash":
return wasm.BorderType.DotDash;
case "DotDotDash":
case "dotDotDash":
return wasm.BorderType.DotDotDash;
case "Triple":
case "triple":
return wasm.BorderType.Triple;
default:
return wasm.BorderType.Single;

View File

@ -1,14 +1,14 @@
export type BorderType =
| "Nil"
| "None"
| "Single"
| "Thick"
| "Double"
| "Dotted"
| "Dashed"
| "DotDash"
| "DotDotDash"
| "Triple";
| "nil"
| "none"
| "single"
| "thick"
| "double"
| "dotted"
| "dashed"
| "dotDash"
| "dotDotDash"
| "triple";
export type BorderPosition =
| "left"

View File

@ -35,7 +35,7 @@ export class TableCellBorders {
}
clear(position: BorderPosition) {
let nil = new TableCellBorder(position).border_type("Nil");
let nil = new TableCellBorder(position).border_type("nil");
switch (position) {
case "top":
this.top = nil;
@ -54,12 +54,12 @@ export class TableCellBorders {
}
clearAll() {
this.top = new TableCellBorder("top").border_type("Nil");
this.left = new TableCellBorder("left").border_type("Nil");
this.bottom = new TableCellBorder("bottom").border_type("Nil");
this.right = new TableCellBorder("right").border_type("Nil");
this.insideH = new TableCellBorder("insideH").border_type("Nil");
this.insideV = new TableCellBorder("insideV").border_type("Nil");
this.top = new TableCellBorder("top").border_type("nil");
this.left = new TableCellBorder("left").border_type("nil");
this.bottom = new TableCellBorder("bottom").border_type("nil");
this.right = new TableCellBorder("right").border_type("nil");
this.insideH = new TableCellBorder("insideH").border_type("nil");
this.insideV = new TableCellBorder("insideV").border_type("nil");
return this;
}
}

View File

@ -53,7 +53,7 @@ export class TableCell {
clearBorder(position: BorderPosition) {
this.property.borders[
position.toLowerCase() as PositionKeys
] = new TableCellBorder(position).border_type("Nil");
] = new TableCellBorder(position).border_type("nil");
return this;
}
}

View File

@ -1,6 +1,6 @@
{
"name": "docx-wasm",
"version": "0.0.65",
"version": "0.0.66",
"main": "dist/node/index.js",
"browser": "dist/web/index.js",
"author": "bokuweb <bokuweb12@gmail.com>",