@dcloudio/uni-app-plus 3.0.0-alpha-4050320250224001 → 3.0.0-alpha-4060120250318001

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.
@@ -10285,7 +10285,10 @@ class CanvasContext {
10285
10285
  var self = this;
10286
10286
  this.state.font = value;
10287
10287
  // eslint-disable-next-line
10288
- var fontFormat = value.match(/^(([\w\-]+\s)*)(\d+r?px)(\/(\d+\.?\d*(r?px)?))?\s+(.*)/);
10288
+ var fontFormat = value.match(
10289
+ // 支持小数点 github #5329
10290
+ /^(([\w\-]+\s)*)(\d+\.?\d*r?px)(\/(\d+\.?\d*(r?px)?))?\s+(.*)/);
10291
+ //
10289
10292
  if (fontFormat) {
10290
10293
  var style = fontFormat[1].trim().split(/\s/);
10291
10294
  var fontSize = parseFloat(fontFormat[3]);
@@ -10299,7 +10302,8 @@ class CanvasContext {
10299
10302
  });
10300
10303
  self.state.fontStyle = value;
10301
10304
  }
10302
- else if (['bold', 'normal'].indexOf(value) > -1) {
10305
+ else if (['bold', 'normal', 'lighter', 'bolder'].indexOf(value) > -1 ||
10306
+ /^\d+$/.test(value)) {
10303
10307
  actions.push({
10304
10308
  method: 'setFontWeight',
10305
10309
  data: [value],