Evan You
eaf5455d77
chore: Merge branch 'main' into minor
2024-08-07 18:25:58 +08:00
skirtle
e359ff0046
fix(runtime-core): fix warning for missing event handler ( #11489 )
...
fix #4803
close #8268
2024-08-07 11:29:41 +08:00
Evan You
f15ba2c2e2
chore: Merge branch 'main' into minor
2024-07-17 17:32:31 +08:00
Evan You
de174e1aa7
fix(defineModel): force local update when setter results in same emitted value
...
fix #10279
fix #10301
2024-07-11 17:00:39 +08:00
Evan You
75c8cf63a1
feat(types): provide internal options for directly using user types in language tools ( #10801 )
2024-04-27 11:48:37 +08:00
renovate[bot]
237cb45319
chore(deps): update lint ( #10112 )
...
* chore(deps): update lint
* [autofix.ci] apply automated fixes
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-01-15 18:15:47 +08:00
三咲智子 Kevin Deng
bfe6b459d3
style: update format & lint config ( #9162 )
...
Co-authored-by: 丶远方 <yangpanteng@gmail.com>
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
Co-authored-by: Guo Xingjun <99574369+Plumbiu@users.noreply.github.com>
2023-12-26 19:39:47 +08:00
Evan You
982a145d38
chore: Merge branch 'main' into minor
2023-12-11 22:03:28 +08:00
丶远方
a6503e3e77
refactor(types): simplify `EmitsToProps` types ( #9788 )
2023-12-11 20:01:36 +08:00
三咲智子 Kevin Deng
927ab17cfc
feat(types): add emits and slots type to `FunctionalComponent` ( #8644 )
2023-12-08 22:24:58 +08:00
renovate[bot]
16a6438236
chore(deps): update lint ( #9627 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-11-18 10:33:24 +08:00
丶远方
3798c5480b
chore: remove unnecessary type assertions ( #8311 )
2023-05-19 07:49:28 +08:00
Evan You
7d0c63ff43
fix(custom-elements): use strict number casting
...
close #4946
close #2598
close #2604
This commit also refactors internal usage of previous loose
implementation of `toNumber` to the stricter version where applicable.
Use of `looseToNumber` is preserved for `v-model.number` modifier to
ensure backwards compatibility and consistency with Vue 2 behavior.
2022-11-14 16:20:12 +08:00
三咲智子 (Kevin)
bbb66d7ac7
ci: check prettier format ( #6830 )
2022-10-28 09:39:34 +08:00
shadowings-zy
018b850399
fix(v-model): fix trim modifier on events with non-string args ( ( #5770 )
...
fix #5765
2022-10-26 05:47:05 -04:00
Daniel Roe
c3465c1e88
fix(runtime-core): only set cache for object keys ( #6266 )
2022-08-28 23:10:16 -04:00
小刘(liulinboyi)
71066b5afe
fix(v-model): fix case where .trim and .number modifiers are used together ( #5842 )
...
fix #5839
2022-05-12 19:52:16 -04:00
Thorsten Lünborg
71c9536625
fix(runtime-core): ensure custom events are not emitted anymore after unmount. ( #5679 )
...
close #5674
2022-04-13 23:47:24 -04:00
Evan You
6cfd72e760
refactor: move type utils to shared
2022-01-16 15:47:00 +08:00
webfansplz
1ce34e25d5
fix(types): fix tsx emit-mapped handler return type ( #4290 )
...
fix #4288
2021-08-11 10:52:36 -04:00
Amour1688
69344ff1ae
feat(types): map declared emits to onXXX props in inferred prop types ( #3926 )
2021-07-19 18:22:19 -04:00
LYlanfeng
011dee8644
fix(runtime-core): fix multiple .once event handlers on same component ( #3904 )
...
fix #3902
2021-06-08 09:52:45 -04:00
Evan You
51d2be2038
perf: avoid deopt for props/emits normalization when global mixins are used
2021-06-02 15:22:52 -04:00
Evan You
bb76cfae12
wip: test for v-model compat
2021-04-29 16:22:39 -04:00
Evan You
a75b00c558
wip: treat compat model listener as already declared
2021-04-21 19:13:26 -04:00
Evan You
183f9b0013
wip: component v-model compat
2021-04-09 23:10:29 -04:00
Evan You
f8e2361d83
wip: make tests pass again
2021-04-08 16:33:53 -04:00
Evan You
960e9deaed
wip: vm.$listeners compat
2021-04-08 10:06:12 -04:00
Evan You
db09805688
wip: instance event emitter api compat
2021-04-07 16:19:24 -04:00
Evan You
c1cd42e627
fix(runtime-core): fix v-on object kebab-case event emit matching
...
fix #3527
2021-04-01 19:47:58 -04:00
Evan You
60d777d228
fix(runtime-core): fix erraneous emits warnings w/ mixins
...
fix #2651
2021-03-26 16:29:40 -04:00
shadowings-zy
3532b2b021
fix(runtime-core): fix emit listener check on kebab-case events ( #2542 )
...
fix #2540
2020-11-27 15:24:29 -05:00
Hunter
128ec460ec
fix(v-model): built in modifiers support on component ( #2348 )
...
close #2326
2020-10-20 09:59:27 -04:00
Evan You
4bbb2b2ee6
fix(runtime-core): fix component .once listener logic
2020-10-20 09:50:18 -04:00
ᴜɴвʏтᴇ
052a621762
feat(compile-core): handle falsy dynamic args for v-on and v-bind ( #2393 )
...
fix #2388
2020-10-19 17:15:53 -04:00
shadowings-zy
62f26173ba
fix(runtime-core): use consistent camelCase event casing for render functions ( #2278 )
...
close #2249
2020-10-06 18:28:56 -04:00
Evan You
a66e53a24f
fix(runtime-core): fix SSR memoery leak due to props normalization cache
...
fix #2225
The previous props/emits normlaization was caching normalized result per
app instance, but during SSR there is a new app instance created for
every request.
The fix now de-opts props/emits normlaization caching when there are
props/emits declared in global mixins - which is a very rare use case.
2020-10-06 15:31:29 -04:00
wonderful-panda
5dbd6b36a0
fix(types): fix using tuple type as EmitsOptions ( #2160 )
...
fix #2159
2020-09-22 10:05:37 -04:00
Evan You
8ed0b342d4
fix(runtime-core): fix props/emits resolving with global mixins
...
fix #1975
2020-08-31 18:32:07 -04:00
Guillaume Chau
23233dc8b8
feat(devtools): catch events
2020-08-24 01:33:12 +02:00
Evan You
eb2ae44d94
refactor(types): widen `Component` type to include consutructor types
...
returned from `defineComponent`
ref: https://github.com/vuejs/vue-router-next/pull/421
also close #1880
Previous `Component` type is now exported as `ConcreteComponent`.
This introduces a minor breaking change when calling `h(comp, { ... })`
will now fail if `comp` is a of generic `Component` type, since it does
not specify what props it expects.
2020-08-19 16:19:25 -04:00
Evan You
54727f9874
feat: provide ability to overwrite feature flags in esm-bundler builds
...
e.g. by replacing `__VUE_OPTIONS_API__` to `false` using webpack's
`DefinePlugin`, the final bundle will drop all code supporting the
options API.
This does not break existing usage, but requires the user to explicitly
configure the feature flags via bundlers to properly tree-shake the
disabled branches. As a result, users will see a console warning if
the flags have not been properly configured.
2020-07-20 21:51:30 -04:00
Evan You
00ab9e2e85
refactor: adjust event options handling to be JSX friendly
2020-07-14 13:20:59 -04:00
Evan You
380c6792d8
fix(v-on): refactor DOM event options modifer handling
...
fix #1567
Previously multiple `v-on` handlers with different event attach option
modifers (`.once`, `.capture` and `.passive`) are generated as an array
of objects in the form of `[{ handler, options }]` - however, this
makes it pretty complex for `runtime-dom` to properly handle all
possible value permutations, as each handler may need to be attached
with different options.
With this commit, they are now generated as event props with different
keys - e.g. `v-on:click.capture` is now generated as a prop named
`onClick.capture`. This allows them to be patched as separate props
which makes the runtime handling much simpler.
2020-07-14 11:48:05 -04:00
Evan You
ba3b3cdda9
fix(runtime-core/emits): merge emits options from mixins/extends
...
fix #1562
2020-07-13 11:55:46 -04:00
Carlos Rodrigues
1e90605c15
types(runtime-core): provide valid type for default `$emit` ( #1498 )
2020-07-08 11:51:03 -04:00
Evan You
2417a0cb30
fix(runtime-core): respect props from mixins and extends
...
fix #1236 , close #1250
2020-06-09 11:27:40 -04:00
doly mood
d3c436ae2e
feat(types): mixins/extends support in TypeScript ( #626 )
2020-06-09 10:37:00 -04:00
Andrew Talbot
054ccecd58
perf(core): use `startsWith` instead of `indexOf` ( #989 )
2020-04-20 15:44:20 -04:00
Evan You
0709380c5f
feat(runtime-core): skip emit warn if has equivalent onXXX prop
2020-04-16 11:27:52 -04:00