@forsakringskassan/docs-generator 2.9.0 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -789,6 +789,16 @@ async function translateAPI(filePath) {
|
|
|
789
789
|
const props = api.props ? translateProps(api.props) : [];
|
|
790
790
|
const events = api.events ? translateEvents(api.events) : [];
|
|
791
791
|
const slots = api.slots ? translateSlots(api.slots) : [];
|
|
792
|
+
for (const event of events) {
|
|
793
|
+
if (!event.name.startsWith("update:")) {
|
|
794
|
+
continue;
|
|
795
|
+
}
|
|
796
|
+
const prop = event.name.slice("update:".length);
|
|
797
|
+
const entry = props.find((it) => it.name === prop);
|
|
798
|
+
if (entry) {
|
|
799
|
+
entry.name = prop === "modelValue" ? "v-model" : `v-model:${prop}`;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
792
802
|
return {
|
|
793
803
|
props,
|
|
794
804
|
events,
|