committed by
GitHub
4 changed files with 43 additions and 0 deletions
@ -0,0 +1,6 @@ |
|||||
|
--- |
||||
|
'@vben/web-antdv-next': patch |
||||
|
'@vben/playground': patch |
||||
|
--- |
||||
|
|
||||
|
fix: bind VbenTiptap through the standard Vue model protocol |
||||
@ -0,0 +1,33 @@ |
|||||
|
import { describe, expect, it, vi } from 'vitest'; |
||||
|
|
||||
|
import { initSetupVbenForm } from './form'; |
||||
|
|
||||
|
const mocks = vi.hoisted(() => ({ |
||||
|
setupVbenForm: vi.fn(), |
||||
|
})); |
||||
|
|
||||
|
vi.mock('@vben/common-ui', () => ({ |
||||
|
setupVbenForm: mocks.setupVbenForm, |
||||
|
useVbenForm: vi.fn(), |
||||
|
z: {}, |
||||
|
})); |
||||
|
|
||||
|
vi.mock('@vben/locales', () => ({ |
||||
|
$t: (key: string) => key, |
||||
|
})); |
||||
|
|
||||
|
describe('antdv-next form adapter', () => { |
||||
|
it('keeps VbenTiptap on the standard Vue model protocol', async () => { |
||||
|
await initSetupVbenForm(); |
||||
|
|
||||
|
expect(mocks.setupVbenForm).toHaveBeenCalledWith( |
||||
|
expect.objectContaining({ |
||||
|
config: expect.objectContaining({ |
||||
|
modelPropNameMap: expect.objectContaining({ |
||||
|
RichEditor: 'modelValue', |
||||
|
}), |
||||
|
}), |
||||
|
}), |
||||
|
); |
||||
|
}); |
||||
|
}); |
||||
Loading…
Reference in new issue