From f3a6ad1bd269a7b5520109aeb9df7cddc12e5e4e Mon Sep 17 00:00:00 2001 From: waynzh Date: Fri, 15 Nov 2024 14:06:57 +0800 Subject: [PATCH] docs: update --- docs/rules/no-v-text-v-html-on-component.md | 27 ++++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/docs/rules/no-v-text-v-html-on-component.md b/docs/rules/no-v-text-v-html-on-component.md index 8e504d859..638a1bde2 100644 --- a/docs/rules/no-v-text-v-html-on-component.md +++ b/docs/rules/no-v-text-v-html-on-component.md @@ -25,11 +25,15 @@ If you use v-text / v-html on a component, it will overwrite the component's con
+ + {{ content }} + + ``` @@ -39,14 +43,15 @@ If you use v-text / v-html on a component, it will overwrite the component's con ```json { - "vue/no-v-text-v-html-on-component": [ - "error", - { "allow": ["router-link", "nuxt-link"] } - ] + "vue/no-v-text-v-html-on-component": ["error", { + "allow": ["router-link", "nuxt-link"], + "ignoreElementNamespaces": false + }] } ``` - `allow` (`string[]`) ... Specify a list of custom components for which the rule should not apply. +- `ignoreElementNamespaces` (`boolean`) ... Specify whether to ignore the namespace restrictions for SVG and MathML elements, so that the rule should not apply. Default is `false`. ### `{ "allow": ["router-link", "nuxt-link"] }` @@ -65,6 +70,20 @@ If you use v-text / v-html on a component, it will overwrite the component's con +### `{ "ignoreElementNamespaces": true }` + + + +```vue + +``` + + + ## :rocket: Version This rule was introduced in eslint-plugin-vue v8.4.0