@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.
@@ -24,7 +24,7 @@ declare global {
24
24
  /**添加描边 -富文本*/
25
25
  addOutline(colorHex: string, font: number): string
26
26
  /**添加粗体 -富文本*/
27
- addBold(text: string): string
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}>描边</outline>`
790
+ return `<outline color=${colorHex} width=${font}>${this}</outline>`
791
791
  };
792
792
  // 实现字符串扩展方法
793
- String.prototype.addBold = function (text): string {
794
- return `<b>${text}</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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cc-component/cc-ex-component",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "engine": ">=3.8.6",
5
5
  "description": "系统组件添加常用扩展方法",
6
6
  "main": "index.ts",