feat: 更新表单组件,简化代码结构并添加调试插件
This commit is contained in:
10
formkit.config.plugin.debug.ts
Normal file
10
formkit.config.plugin.debug.ts
Normal file
@ -0,0 +1,10 @@
|
||||
export function debugPlugin(node: import('@formkit/core').FormKitNode) {
|
||||
if (['button', 'submit', 'hidden', 'group', 'list', 'meta'].includes(node.props.type)) return;
|
||||
|
||||
node.on('created', () => {
|
||||
console.group('[node created]', node.props.label || node.props.submitLabel);
|
||||
console.debug(`node :>> `, node);
|
||||
console.debug(`node.props.definition :>> `, node.props.definition);
|
||||
console.groupEnd();
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user