Commit Graph

63 Commits

Author SHA1 Message Date
Rizumu Ayaka 205e5b5e27
feat(reactivity): base `watch`, `getCurrentWatcher`, and `onWatcherCleanup` (#9927) 2024-08-20 08:21:44 +08:00
Kevin Deng 三咲智子 928af5fe2f
refactor(types): enable `isolatedDeclarations` (#11178) 2024-08-08 23:05:21 +08:00
Evan You eaf5455d77
chore: Merge branch 'main' into minor 2024-08-07 18:25:58 +08:00
Alex Liu 1058ce8e74
fix(types): allow `DirectiveArguments` third parameter to accept undefined (#11540) 2024-08-07 17:02:15 +08:00
Evan You 26356264d2
chore: Merge branch 'main' into minor 2024-06-14 12:32:28 +02:00
Evan You 9daf90e29f
refactor(runtime-core): extract getComponentPublicInstance helper 2024-06-10 17:37:32 +08:00
nandi95 1ffd5a601b
chore(types): added `getSSRProps` type argument (#5691) 2024-05-27 16:56:59 +08:00
Evan You 801666fdad
chore: add internal flag to work around ts issue 2024-05-03 16:57:47 -07:00
Carlos Rodrigues 4cc9ca870c
types(defineComponent): support for GlobalComponents, typed Directives and respect `expose` on defineComponent (#3399)
close #3367
2024-04-25 16:04:03 +08:00
zhangenming 64e9c9616d
refactor(runtime-core): use currentRenderingInstance directly 2024-01-09 15:26:07 +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 37a14a5dae Revert "fix(types): propagate type parameter constraints for TypeScript 4.8 (#6351)"
This reverts commit 516fabb725.
2023-07-12 11:38:59 +08:00
Daniel Rosenwasser 516fabb725
fix(types): propagate type parameter constraints for TypeScript 4.8 (#6351)
* fix(types): propagate type parameter constraints for TypeScript 4.8

* fix: add more constraints

---------

Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2023-07-09 13:04:08 +08:00
Cédric Exbrayat 04553786e4
fix(runtime-core): do not throw on unknown directives (#6671)
fix #6340

This commit improves the case when a directive is not found in a template.
As `resolveDirective` returns `undefined`, some code was failing with the following error:

```
TypeError: Cannot read properties of undefined (reading 'deep')
```
2022-11-07 21:49:49 -05:00
Thorsten Lünborg f44087e171
fix(runtime-core): ensure custom directive instance properly exposes properties on closed instances. (#5022)
fix #5018
2022-04-12 03:54:03 -04:00
Evan You 60cf175d88 feat(ssr): support custom directive getSSRProps in optimized compilation
close #5304
2022-02-04 08:58:31 +08:00
C.Y.Kun 5eb72630a5
fix(runtime-core): add `v-memo` to built-in directives check (#4787) 2021-10-18 20:22:44 -04:00
Evan You 2937530bef fix(v-model): handle mutations of v-model bound array/sets
fix #4096
2021-07-15 12:14:19 -04:00
HcySunYang ff50e8d78c
fix(runtime-core): should disable tracking inside directive lifecycle hooks (#3699) 2021-05-27 16:53:19 -04:00
Evan You f05d6dfd98 wip: render function compat 2021-04-09 18:56:31 -04:00
Evan You 47b765d63a wip: custom directive compat 2021-04-07 16:19:24 -04:00
Evan You aea88c3280 refactor: fix implementation of SFC :slotted id handling
fix #2892
2021-03-05 18:28:12 -05:00
Evan You 11804fe93f feat(directives): introduce `created` custom directive hook and ensure
`v-model` event listener fire before template/props listeners

fix #1931
2020-08-24 17:12:16 -04: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
edison 7dd067206c
chore: remove unused type `VNodeDirectiveData` (#1893) 2020-08-19 09:51:44 -04:00
underfin 419b86d190
feat(types): support typing directive value via generic argument (#1007)
close #998
2020-06-11 16:37:14 -04:00
Evan You 583ba0c172 feat(types): re-expose `withDirectives` as public type 2020-05-02 10:19:40 -04:00
Evan You c9bf7ded2e refactor(types): mark internal API exports and exclude from d.ts
BREAKING CHANGE: Internal APIs are now excluded from type decalrations.
2020-04-30 17:04:35 -04:00
Evan You be91b43564 types: improve directive hook argument types 2020-03-18 12:30:26 -04:00
Evan You aa4ab39c1a refactor: separate vnode hooks and directive hooks 2020-03-18 12:30:26 -04:00
Evan You 6679799540 refactor: refactor vnode hooks invocation 2020-03-18 12:30:26 -04:00
Evan You c450ede12d feat(ssr): support getSSRProps for vnode directives 2020-03-16 18:36:19 -04:00
Evan You 23701666cb Revert "refactor(directives): remove binding.instance"
This reverts commit 52cc7e8231.
2020-03-16 13:06:46 -04:00
Evan You 7971b0468c fix(directives): ignore invalid directive hooks
fix #795
2020-03-03 12:26:48 -06:00
Evan You 52cc7e8231 refactor(directives): remove binding.instance
BREAKING CHANGE: custom directive bindings no longer expose instance

    This is a rarely used property that creates extra complexity in
    ensuring it points to the correct instance. From a design
    perspective, a custom directive should be scoped to the element and
    data it is bound to and should not have access to the entire
    instance in the first place.
2020-02-25 19:35:48 -05:00
Evan You c97d83aff2 refactor(runtime-core): tweak component proxy implementation 2019-12-10 11:14:29 -05:00
Evan You 93561b080e feat(transition): base transition component 2019-11-20 22:46:32 -05:00
Evan You 43f4bd3aaa chore: fix typing for withDirectives 2019-10-26 16:32:27 -04:00
Evan You 07ce2c5fa7 perf: improve directive runtime performance 2019-10-26 16:00:07 -04:00
Evan You b5886189ba types: massive refactor 2019-10-22 11:53:32 -04:00
Jooger 67eb29f63b refactor(errorHandlling): handle array in callWithAsyncErrorHandling (#332) 2019-10-21 13:59:10 -04:00
HcySunYang 71f3826f99 chore: rename & property missing (#335) 2019-10-21 10:00:23 -04:00
Evan You e98a85f3cb refactor: applyDirectives -> withDirectives 2019-10-18 16:35:01 -04:00
Evan You b5194b16bf refactor: rename vnode hooks
So that they can be used as @vnodeMounted="..." in templates
2019-10-18 14:54:35 -04:00
Dmitry Sharshakov 2238925fbe feat(core): validate directives names (#326) 2019-10-18 12:34:45 -04:00
Dmitry Sharshakov 0bac763f5a feat(directives): add support for function directives (#252) 2019-10-16 02:12:26 -04:00
Dmitry Sharshakov 374a85b861 types: improve directive typing (#253) 2019-10-13 22:40:29 -04:00
Evan You a42ad6cc9d feat(runtime-dom): v-model directive runtime 2019-10-11 17:55:34 -04:00
Evan You 8da5b007b1 types: improve typing 2019-10-08 12:43:13 -04:00
月迷津渡 9d6783053c types: simplify types (#104) 2019-10-05 10:09:34 -04:00