webui icon indicating copy to clipboard operation
webui copied to clipboard

Bug: `computed` 类型配置项使用 i18n 设置文本无效

Open dingyi222666 opened this issue 1 year ago • 0 comments

复现代码:

export interface Config {}

export const Config: Schema<Config> = Schema.object({
    test: Schema.union([Schema.string(), Schema.any().hidden()])
    .role('computed')
    .default('')
}).i18n({
  'zh-CN': {
    test: {
      $description: '测试'
    }
  }
})

预期效果(注释掉上面设置 role 后的效果):

image

实际效果 (上面代码的效果):

image

环境信息:

System:
OS: Windows 11 10.0.22631

Binaries:
Node: 20.15.0
Yarn: 4.1.1

Koishi:
Core: 4.18.0
Console: 5.29.4

经过测试,只在 role 为 computed 时并且使用 i18n 设置文本会出现此问题。

dingyi222666 avatar Sep 27 '24 13:09 dingyi222666