Skip to content
New issue

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

php framework laravel build vue3 use defineModel not run #12664

Closed
422190916 opened this issue Jan 8, 2025 · 4 comments
Closed

php framework laravel build vue3 use defineModel not run #12664

422190916 opened this issue Jan 8, 2025 · 4 comments
Labels
can't reproduce need more info Further information is requested

Comments

@422190916
Copy link

Vue version

3.5.13

Link to minimal reproduction

https://play.vuejs.org/#eNp9UstOwzAQ/JWVL4CEgkrhUoVKgDiAxEPADaMqJJvWxVlbfpSiKv/OJmnTClW9JPbsrGd27JW4tjZZRBQjkfrcKRvAY4gWdEbTKymCl2IsSVXWuAArKLBUhI+mQA01lM5UcMTtR0yhgK7McoQHo+ieSrOSFFUxolh9oTuVFH4tTnpAUi1JksYA83WDh6tdgXRz0Mfn+PhEUk9LFpmOyGSADwCW4QVIwWJSjAas1O3Xej1Wt99/9PM99A7bSx/uoTdY/SkpPesS5Lx4E7CyOgvIO4B0NhhzTOkZ/xviTlGccsi5oVJNk7k3xDfRakqRm8oqje7ZBmWIL2K0dZNpbX4eWiy4iL2rfIb59x587pcNJsWLQ49ugVJsJ8ncFENXvnt7wiWv+2JliqiZfaD4it7o2HjsaDeRCra9w2vd3rdvSNH03d8tA5LfDNUY3QYuBQd1e2D0rd1hctH2cfyc4mSBrjmTAxwml8lgKOo/+vPv+Q==

Steps to reproduce

npm install
npm install laravel-mix
npm install vue
npm install ts-loader
npm install typescript

What is expected?

Laravel Mix v6.0.49

✔ Compiled Successfully in 2632ms

webpack compiled successfully

What is actually happening?

npm run watch

watch
mix watch

✖ Mix
Compiled with some errors in 18.32s

ERROR in Join.vue.ts
14:29-35
[tsl] ERROR in Join.vue.ts(14,30)
TS2558: Expected 3-5 type arguments, but got 1.

ERROR in Join.vue.ts
15:0-16
[tsl] ERROR in Join.vue.ts(15,1)
TS2322: Type 'string' is not assignable to type 'T[K]'.
'string' is assignable to the constraint of type 'T[K]', but 'T[K]' could be instantiated with a different subtype of constraint 'any'.

webpack compiled with 2 errors

System Info

No response

Any additional comments?

No response

@edison1105
Copy link
Member

Please provide a reproducible repository.

@edison1105 edison1105 added can't reproduce need more info Further information is requested labels Jan 8, 2025
@422190916
Copy link
Author

Please provide a reproducible repository.

<script setup lang="ts"> import { defineModel } from 'vue' interface JoinInfo{ uid:number, type_id:number } let joinInfos = defineModel() joinInfos.value = [ { "uid":1, "type_id":1, }, { "uid":2, "type_id":2, }, { "uid":3, "type_id":3, }] </script>

vue

@edison1105
Copy link
Member

A minimal reproducible example that includes laravel-mix, vue, ts-loader, and typescript would speed up resolving the issue.
Please provide the exact reproduction steps, such as the commands to run to reproduce the error. If this cannot be provided, the issue will be closed.

@422190916
Copy link
Author

defineModel not with type is ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can't reproduce need more info Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants