chore: fix typos (#6708)

This commit is contained in:
Kid 2022-09-24 15:13:39 +08:00 committed by GitHub
parent fbd697a4b6
commit 96ba71d0cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 8 deletions

View File

@ -30,7 +30,7 @@ body:
description: | description: |
The easiest way to provide a reproduction is by showing the bug in [The SFC Playground](https://sfc.vuejs.org/). The easiest way to provide a reproduction is by showing the bug in [The SFC Playground](https://sfc.vuejs.org/).
If it cannot be reproduced in the playground and requires a proper build setup, try [StackBlitz](https://vite.new/vue). If it cannot be reproduced in the playground and requires a proper build setup, try [StackBlitz](https://vite.new/vue).
If neither of these are suitable, you can always provide a GitHub reporistory. If neither of these are suitable, you can always provide a GitHub repository.
The reproduction should be **minimal** - i.e. it should contain only the bare minimum amount of code needed The reproduction should be **minimal** - i.e. it should contain only the bare minimum amount of code needed
to show the bug. See [Bug Reproduction Guidelines](https://github.com/vuejs/core/blob/main/.github/bug-repro-guidelines.md) for more details. to show the bug. See [Bug Reproduction Guidelines](https://github.com/vuejs/core/blob/main/.github/bug-repro-guidelines.md) for more details.

View File

@ -471,7 +471,7 @@ defineExpose({ foo: 123 })
</script> </script>
<template> <template>
<div @click="$emit('update:a');"></div> <div @click="$emit('update:a');"></div>
</tempalte> </template>
`) `)
}) })
}) })

View File

@ -37,7 +37,7 @@ describe('ssr: attrs fallthrough', () => {
`) `)
}) })
test('fallthrough component content (root with coomments)', () => { test('fallthrough component content (root with comments)', () => {
expect(compile(`<!--root--><transition><div/></transition>`).code) expect(compile(`<!--root--><transition><div/></transition>`).code)
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
"const { ssrRenderAttrs: _ssrRenderAttrs } = require(\\"vue/server-renderer\\") "const { ssrRenderAttrs: _ssrRenderAttrs } = require(\\"vue/server-renderer\\")

View File

@ -53,23 +53,23 @@ export function compatCoerceAttr(
instance: ComponentInternalInstance | null = null instance: ComponentInternalInstance | null = null
): boolean { ): boolean {
if (isEnumeratedAttr(key)) { if (isEnumeratedAttr(key)) {
const v2CocercedValue = const v2CoercedValue =
value === null value === null
? 'false' ? 'false'
: typeof value !== 'boolean' && value !== undefined : typeof value !== 'boolean' && value !== undefined
? 'true' ? 'true'
: null : null
if ( if (
v2CocercedValue && v2CoercedValue &&
compatUtils.softAssertCompatEnabled( compatUtils.softAssertCompatEnabled(
DeprecationTypes.ATTR_ENUMERATED_COERCION, DeprecationTypes.ATTR_ENUMERATED_COERCION,
instance, instance,
key, key,
value, value,
v2CocercedValue v2CoercedValue
) )
) { ) {
el.setAttribute(key, v2CocercedValue) el.setAttribute(key, v2CoercedValue)
return true return true
} }
} else if ( } else if (

View File

@ -311,7 +311,7 @@ Features that start with `COMPILER_` are compiler-specific: if you are using the
| V_ON_KEYCODE_MODIFIER | ✔ | `v-on` no longer supports keyCode modifiers | [link](https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html) | | V_ON_KEYCODE_MODIFIER | ✔ | `v-on` no longer supports keyCode modifiers | [link](https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html) |
| CUSTOM_DIR | ✔ | Custom directive hook names changed | [link](https://v3-migration.vuejs.org/breaking-changes/custom-directives.html) | | CUSTOM_DIR | ✔ | Custom directive hook names changed | [link](https://v3-migration.vuejs.org/breaking-changes/custom-directives.html) |
| ATTR_FALSE_VALUE | ✔ | No longer removes attribute if binding value is boolean `false` | [link](https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html) | | ATTR_FALSE_VALUE | ✔ | No longer removes attribute if binding value is boolean `false` | [link](https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html) |
| ATTR_ENUMERATED_COERSION | ✔ | No longer special case enumerated attributes | [link](https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html) | | ATTR_ENUMERATED_COERCION | ✔ | No longer special case enumerated attributes | [link](https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html) |
| TRANSITION_GROUP_ROOT | ✔ | `<transition-group>` no longer renders a root element by default | [link](https://v3-migration.vuejs.org/breaking-changes/transition-group.html) | | TRANSITION_GROUP_ROOT | ✔ | `<transition-group>` no longer renders a root element by default | [link](https://v3-migration.vuejs.org/breaking-changes/transition-group.html) |
| COMPONENT_ASYNC | ✔ | Async component API changed (now requires `defineAsyncComponent`) | [link](https://v3-migration.vuejs.org/breaking-changes/async-components.html) | | COMPONENT_ASYNC | ✔ | Async component API changed (now requires `defineAsyncComponent`) | [link](https://v3-migration.vuejs.org/breaking-changes/async-components.html) |
| COMPONENT_FUNCTIONAL | ✔ | Functional component API changed (now must be plain functions) | [link](https://v3-migration.vuejs.org/breaking-changes/functional-components.html) | | COMPONENT_FUNCTIONAL | ✔ | Functional component API changed (now must be plain functions) | [link](https://v3-migration.vuejs.org/breaking-changes/functional-components.html) |