We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
配置範例如下 (使用官方參考的配置聯動2 + Array 形式)
import { Context, Schema } from 'koishi' export const name = 'test' export interface ConfigRef { shared: string type: 'foo' | 'bar' | 'baz' value?: number text?: string } export interface Config { configs: ConfigRef[] } export const Config: Schema<Config> = Schema.object({ configs: Schema.array(Schema.intersect([ Schema.object({ shared: Schema.string(), type: Schema.union(['foo', 'bar', 'baz']).required(), }).description('基础配置'), Schema.union([ Schema.object({ type: Schema.const('foo').required(), value: Schema.number().default(114514), }).description('特殊配置 1'), Schema.object({ type: Schema.const('bar').required(), text: Schema.string(), }).description('特殊配置 2'), Schema.object({} as any) ]) ])) }) export function apply(ctx: Context) { // write your plugin here }
使用後,按下 添加項目 沒有反應且在 F12 console 出現如下報錯:
此問題只在 dev 出現,build好後從koishi市場下載插件,則沒有這個問題
The text was updated successfully, but these errors were encountered:
No branches or pull requests
配置範例如下 (使用官方參考的配置聯動2 + Array 形式)
使用後,按下 添加項目 沒有反應且在 F12 console 出現如下報錯:
此問題只在 dev 出現,build好後從koishi市場下載插件,則沒有這個問題
The text was updated successfully, but these errors were encountered: