Commit Graph

49 Commits

Author SHA1 Message Date
远方os 94b9b37362
test: improve test coverage (#9203)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Haoqun Jiang <haoqunjiang@gmail.com>
2024-05-28 17:36:29 +08:00
btea 481b1b6f38
refactor(types): use explicit modifiers type (#10856) 2024-05-07 06:23:04 +08:00
Wick 15ffe8f2c9
fix(runtime-dom): force update v-model number with leading 0 (#10506)
close #10503 
close #10615
2024-04-15 22:02:57 +08:00
yangxiuxiu db374e54c9
fix(runtime-dom): `v-model` string/number coercion for multiselect options (#10576)
Co-authored-by: RicardoErii <‘1974364190@qq.com’>
Co-authored-by: yangchangtao <yangchangtao@kuaishou.com>
2024-03-28 22:09:16 +08:00
zhoulixiang c224897dd4
fix(runtime-dom): ensure v-show respects display value set via v-bind (#10297)
close #10151
2024-02-09 10:17:35 +08:00
Evan You 2cd5b05c3b revert: fix(runtime-dom): ensure v-show respects display value set via v-bind (#10161)
This reverts commit 9b19f09121.

close #10294
reopen #10151
2024-02-09 08:30:51 +08:00
Doctor Wu 9b19f09121
fix(runtime-dom): ensure v-show respects display value set via v-bind (#10161)
close #10151
2024-02-07 12:54:21 +08:00
Evan You 2ffb956efe perf(v-model): optimize v-model multiple select w/ large lists
close #10014
2024-01-18 19:55:15 +08:00
Evan You 07b19a53a5 test: test case for style binding w/ object value + v-show
ref #10074
2024-01-11 17:14:49 +08:00
Evan You ceb215e45d test: update vShow tests to workaround jsdom regression 2024-01-08 15:03:10 +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
Thorsten Lünborg 04d2c05054
fix(runtime-dom): cache event handlers by key/modifiers (#9851)
close #9849
2023-12-16 21:54:37 +08:00
白雾三语 40f4b77bb5
fix(v-model): avoid overwriting number input with same value (#7004)
close #7003
2023-11-09 15:14:38 +08:00
zqran 736cf154cc
chore(test): replace deprecated `initEvent` (#8490) 2023-07-11 17:38:32 +08:00
丶远方 b01fc7ea84
chore: remove unnecessary imports (#8262) 2023-05-19 07:54:12 +08:00
Evan You 8867bb259a wip(vitest-migration): reactivity tests passing 2023-01-26 15:25:55 +08:00
小刘(liulinboyi) 6ce75c10f1
test(runtime-dom): vModel tests for input range (#5907) 2022-05-18 19:56:46 -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
那里好脏不可以 6042ab0f2f
chore: type [ci skip] 2022-05-09 22:51:51 -04:00
Evan You 47f488350c chore: run updated prettier 2021-07-19 18:24:18 -04:00
Evan You 3056e9b3dc fix(v-model): properly detect input type=number
fix #3813
2021-07-19 17:46:04 -04:00
HcySunYang 5ad4036e29
fix(v-show): v-show takes higher priority than style attribute (#3230)
fix #2757
2021-02-25 10:26:54 -05:00
Evan You 48f00c0f1b fix(v-model): respect checkbox true-value/false-value on initial render
fix #2694
2020-12-01 12:02:37 -05:00
Evan You f2b0a8e81d fix(v-model): avoid mutation when using Set models + fix multi select Set model update 2020-12-01 11:40:14 -05:00
Evan You 83a79a829c Revert "fix(v-model): mutate original array for v-model multi checkbox (#2663)"
This reverts commit 87581cd266.

ref: #2700
2020-12-01 11:16:40 -05:00
HcySunYang 87581cd266
fix(v-model): mutate original array for v-model multi checkbox (#2663)
Note: this change will break non-deep `watch` on the `v-model` bound array since the array is no longer replaced. This can be considered part of the Array watch changes in v3 as detailed at https://v3.vuejs.org/guide/migration/watch.html

This is unfortunate but unavoidable since the issue that it fixes is more important: `v-model` should definitely work with a non-ref reactive array.

fix #2662
2020-11-30 17:48:51 -05:00
Pick 6a554feb13
perf(runtime-dom/vModel): remove looseHas if model is Set (#2236) 2020-10-13 16:20:05 -04:00
edison d744b8a2dc
fix(runtime-dom): v-model should support number modifier with select tag (#2308)
close #2252
2020-10-07 15:06:41 -04:00
Pick cf1b6c666f
feat(runtime-dom): allow native Set as v-model checkbox source (#1957) 2020-09-14 11:16:50 -04: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
learningMaster 324167d3d2
test(runtime-dom): add test for vModel composition session (#1631) 2020-07-21 10:34:08 -04:00
motao b8db7ab889
test(runtime-dom): improve v-on system key modifiers test (#1597) 2020-07-18 22:55:39 -04:00
underfin 425335c28b
fix(v-model): consistent nullish value handling with 2.x (#1530)
fix #1528
2020-07-06 19:02:33 -04:00
Albert Kaaman ab86b190ce
fix(runtime-dom): event handlers with modifiers should get all event arguments (#1193) 2020-05-18 10:11:39 -04:00
HiiTea 22717772dd
chore: fix typos (#1090) 2020-05-01 09:42:58 -04:00
Evan You f87d6b501e test: fix runtime-dom v-on test 2020-04-07 11:41:48 -04:00
Evan You f42d11e8e1 fix(v-model): handle dynamic assigners and array assigners
close #923
2020-04-04 20:51:42 -04:00
Evan You 8080c38323 chore: avoid v-cloak test warning 2020-04-01 21:39:47 -04:00
likui 0ed147d336
fix(runtime-dom): v-cloak should be removed after compile on the root element (#893)
fix #890
2020-03-31 18:13:59 -04:00
Evan You c07751fd36 refactor: adjust `createApp` related API signatures
BREAKING CHANGE: `createApp` API has been adjusted.

  - `createApp()` now accepts the root component, and optionally a props
  object to pass to the root component.
  - `app.mount()` now accepts a single argument (the root container)
  - `app.unmount()` no longer requires arguments.

  New behavior looks like the following:

  ``` js
  const app = createApp(RootComponent)
  app.mount('#app')
  app.unmount()
  ```
2020-01-27 16:00:17 -05:00
Chris Fritz 1c4cdd841d refactor(createComponent): rename to defineComponent (#549) 2019-12-22 10:58:12 -05:00
likui 00857ac816 feat(core): support v-show directive (#310) 2019-11-24 22:04:26 -05:00
Cédric Exbrayat fe66194a77 feat(vModel): handle true-value and false-value for checkbox (#449) 2019-11-12 16:24:39 -05:00
Evan You 7fa676e55f feat(v-on): adjust key modifier behavior to match 2.x 2019-11-08 17:50:59 -05:00
Evan You e98a85f3cb refactor: applyDirectives -> withDirectives 2019-10-18 16:35:01 -04:00
Evan You cba34453db refactor(v-on): avoid empty modifier guard with only key modifier 2019-10-18 16:20:45 -04:00
宋铄运 db5c343c33 test(runtime-dom): add test coverage for v-on runtime guards, fix "exact" guard (#298) 2019-10-15 17:08:43 -04:00
Evan You 2b3d5b3f96 chore: move vModel.spec.ts 2019-10-14 17:45:15 -04:00
宋铄运 57a94b530d feat(dom): transform + runtime for v-on (#213) 2019-10-14 00:33:23 -04:00