Skip to content

Commit

Permalink
chore: fix dead links
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 19, 2022
1 parent 3717cdf commit 2a0ea76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/built-in-directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Update the element's [innerHTML](https://developer.mozilla.org/en-US/docs/Web/AP
Dynamically rendering arbitrary HTML on your website can be very dangerous because it can easily lead to [XSS attacks](https://en.wikipedia.org/wiki/Cross-site_scripting). Only use `v-html` on trusted content and **never** on user-provided content.
:::

In [Single-File Components](/guide/scaling-up/sfc), `scoped` styles will not apply to content inside `v-html`, because that HTML is not processed by Vue's template compiler. If you want to target `v-html` content with scoped CSS, you can instead use [CSS modules](./sfc-css-features.html#style-module) or an additional, global `<style>` element with a manual scoping strategy such as BEM.
In [Single-File Components](/guide/scaling-up/sfc), `scoped` styles will not apply to content inside `v-html`, because that HTML is not processed by Vue's template compiler. If you want to target `v-html` content with scoped CSS, you can instead use [CSS modules](./sfc-css-features.html#css-modules) or an additional, global `<style>` element with a manual scoping strategy such as BEM.

- **示例:**

Expand Down
2 changes: 1 addition & 1 deletion src/api/composition-api-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default {
</template>
```

Note that [refs](/api/built-in-special-attributes.html#ref) returned from `setup` are [automatically shallow unwrapped](/guide/essentials/reactivity-fundamentals.html#ref-unwrapping-in-templates) when accessed in the template so you do not need to use `.value` when accessing them. They are also unwrapped in the same way when accessed on `this`.
Note that [refs](/api/reactivity-core.html#ref) returned from `setup` are [automatically shallow unwrapped](/guide/essentials/reactivity-fundamentals.html#ref-unwrapping-in-templates) when accessed in the template so you do not need to use `.value` when accessing them. They are also unwrapped in the same way when accessed on `this`.

:::tip
`setup()` itself does not have access to the component instance - `this` will have a value of `null` inside `setup()`. You can access Composition-API-exposed values from Options API, but not the other way around.
Expand Down

0 comments on commit 2a0ea76

Please sign in to comment.