Javascript Keystonejs:生成的URL类型字段未作为链接通过单击打开
我使用Keystone JSJavascript Keystonejs:生成的URL类型字段未作为链接通过单击打开,javascript,node.js,keystonejs,Javascript,Node.js,Keystonejs,我使用Keystone JSTypes.Urltype字段在生成的管理UI中显示对象的可单击(通过链接)字段: Message.add({ uId: { type: String, initial: true, required: true }, title: { type: String, initial: true, required: true }, stat: { type: Types.Url, default: '', required: false, label: 'S
Types.Url
type字段在生成的管理UI中显示对象的可单击(通过链接)字段:
Message.add({
uId: { type: String, initial: true, required: true },
title: { type: String, initial: true, required: true },
stat: { type: Types.Url, default: '', required: false, label: 'Statistics' }
})
Message.schema.add({ status: mongoose.Schema.Types.Mixed })
Message.schema.pre('save', function (next) {
this.stat = 'link_to_config'
next()
})
Message.defaultColumns = 'uId, stat'
Message.register()
在生成的管理UI中,
正确显示字段'stat'
问题:
字段“stat”不是通过单击打开的,但是浏览器地址栏中的链接已正确更改,或者可以使用ctrl+单击打开该字段
这是一个bug还是我做错了什么?URL
类型不应在管理面板中显示为URL。它旨在为存储为URL的项目提供验证和格式设置;它们在管理面板中根本没有可点击链接的功能
来源:很遗憾,因为在项目页面(而不是项目详细信息页面)上,该项目字段看起来是可点击的(生成的标记)。但它不能正常工作。