@cc-component/cc-ex-component 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/ex/ExCommon.ts +4 -4
- package/package.json +1 -1
package/assets/ex/ExCommon.ts
CHANGED
|
@@ -24,7 +24,7 @@ declare global {
|
|
|
24
24
|
/**添加描边 -富文本*/
|
|
25
25
|
addOutline(colorHex: string, font: number): string
|
|
26
26
|
/**添加粗体 -富文本*/
|
|
27
|
-
addBold(
|
|
27
|
+
addBold(): string
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
interface Any {
|
|
@@ -787,11 +787,11 @@ String.prototype.addSize = function (font: number): string {
|
|
|
787
787
|
};
|
|
788
788
|
// 实现字符串扩展方法
|
|
789
789
|
String.prototype.addOutline = function (colorHex: string, font: number): string {
|
|
790
|
-
return `<outline color=${colorHex} width=${font}
|
|
790
|
+
return `<outline color=${colorHex} width=${font}>${this}</outline>`
|
|
791
791
|
};
|
|
792
792
|
// 实现字符串扩展方法
|
|
793
|
-
String.prototype.addBold = function (
|
|
794
|
-
return `<b>${
|
|
793
|
+
String.prototype.addBold = function (): string {
|
|
794
|
+
return `<b>${this}</b>`
|
|
795
795
|
};
|
|
796
796
|
Label.prototype.fromHEX = function (this: Label, hex: string): void {
|
|
797
797
|
const label = this;
|