diff --git a/src/app/pages/left-domain/left-domain.component.html b/src/app/pages/left-domain/left-domain.component.html index e51375e..555a440 100644 --- a/src/app/pages/left-domain/left-domain.component.html +++ b/src/app/pages/left-domain/left-domain.component.html @@ -74,7 +74,7 @@

-

+

@@ -101,7 +101,7 @@

-

+

diff --git a/src/app/pages/left-domain/left-domain.component.ts b/src/app/pages/left-domain/left-domain.component.ts index b1665e1..d9021f9 100644 --- a/src/app/pages/left-domain/left-domain.component.ts +++ b/src/app/pages/left-domain/left-domain.component.ts @@ -207,6 +207,26 @@ export class LeftDomainComponent implements OnInit { //编辑模式 } + //是否换行 + isLineFeed(str: string):boolean { + if (str) { + let strlen = 0; + for (var i = 0;i < str.length; i++) { + if(str.charCodeAt(i) > 255) //如果是汉字,则字符串长度加2 + strlen += 2; + else + strlen++; + } + if (strlen >= 16) { + return false + } else { + return true + } + } else { + return true + } + } + //获取设备 数量 getFacilityNum(type: string): string { let num = 0