]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
feat: add Vetur support
authorEduardo San Martin Morote <posva13@gmail.com>
Tue, 4 Aug 2020 14:52:02 +0000 (16:52 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Tue, 4 Aug 2020 14:52:02 +0000 (16:52 +0200)
Close #381

package.json
vetur/attributes.json [new file with mode: 0644]
vetur/tags.json [new file with mode: 0644]

index 304f0dea879915bf28b2c82b15a97fe172465e9d..1e54abd2c59d9b9dfa3092a3d87f3705c1208b58 100644 (file)
@@ -15,6 +15,8 @@
   "files": [
     "dist/*.js",
     "dist/vue-router.d.ts",
+    "vetur/tags.json",
+    "vetur/attributes.json",
     "README.md"
   ],
   "scripts": {
   "peerDependencies": {
     "vue": "^3.0.0-beta.20"
   },
+  "vetur": {
+    "tags": "vetur/tags.json",
+    "attributes": "vetur/attributes.json"
+  },
   "devDependencies": {
     "@microsoft/api-documenter": "^7.8.21",
     "@microsoft/api-extractor": "^7.8.1",
diff --git a/vetur/attributes.json b/vetur/attributes.json
new file mode 100644 (file)
index 0000000..355b93f
--- /dev/null
@@ -0,0 +1,24 @@
+{
+  "name": {
+    "type": "string | symbol",
+    "description": "When a `<router-view>` has a `name` prop, it will render the component with the corresponding name in the matched route record's components option."
+  },
+  "route": {
+    "description": "When a `<router-view>` has a `route` prop, it will use that resolved Route Location instead of the current location."
+  },
+  "to": {
+    "description": "Denotes the target route of the link. When clicked, the value of the `to` prop will be internally passed to `router.push()`, so the value can be either a string or a location descriptor object."
+  },
+  "replace": {
+    "type": "boolean",
+    "description": "Setting replace prop will call `router.replace()` instead of `router.push()` when clicked, so the navigation will replace the current history entry."
+  },
+  "active-class": {
+    "type": "string",
+    "description": "Configure the active CSS class applied when the link is active. Note the default value can also be configured globally via the `linkActiveClass` router constructor option."
+  },
+  "exact-active-class": {
+    "type": "string",
+    "description": "Configure the active CSS class applied when the link is exactly active. Note the default value can also be configured globally via the `linkExactActiveClass` router constructor option."
+  }
+}
diff --git a/vetur/tags.json b/vetur/tags.json
new file mode 100644 (file)
index 0000000..73c5e27
--- /dev/null
@@ -0,0 +1,10 @@
+{
+  "router-view": {
+    "attributes": ["name", "route"],
+    "description": "Component that renders the matched component for the current location. Components rendered by `<router-view>` can also contain their own `<router-view>` to render nested routes."
+  },
+  "router-link": {
+    "attributes": ["to", "activeClass","exactActiveClass", "custom"],
+    "description": "Component that renders an `<a>` with the correct `href` attribute and click listeners to trigger a local navigation when clicked. Can also customize its rendering by providing the `custom` prop and using its `v-slot` API."
+  }
+}