Skip to content

Commit aaefecc

Browse files
committed
feat: #22 support vetur tags, attributes
1 parent e2ffc79 commit aaefecc

File tree

3 files changed

+120
-1
lines changed

3 files changed

+120
-1
lines changed

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"files": [
1313
"lib",
1414
"dist",
15-
"types/index.d.ts"
15+
"types/index.d.ts",
16+
"vetur"
1617
],
1718
"scripts": {
1819
"build": "rollup -c --environment BUILD:production",
@@ -73,5 +74,9 @@
7374
],
7475
"dependencies": {
7576
"is-mobile": "^2.2.2"
77+
},
78+
"vetur": {
79+
"tags": "vetur/tags.json",
80+
"attributes": "vetur/attributes.json"
7681
}
7782
}

vetur/attributes.json

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"vue-final-modal/name": {
3+
"type": "string",
4+
"description": "The modal name."
5+
},
6+
"vue-final-modal/ssr": {
7+
"type": "boolean",
8+
"description": "Use `v-if` (false) or `v-show` (true) to display the modal."
9+
},
10+
"vue-final-modal/classes": {
11+
"type": "string|object|array",
12+
"description": "Custom class names for the modal container element."
13+
},
14+
"vue-final-modal/overlay-class": {
15+
"type": "string|object|array",
16+
"description": "Custom class names for the modal overlay element."
17+
},
18+
"vue-final-modal/content-class": {
19+
"type": "string|object|array",
20+
"description": "Custom class names for the modal content element."
21+
},
22+
"vue-final-modal/styles": {
23+
"type": "string|object|array",
24+
"description": "Style that will be applied to the modal container element."
25+
},
26+
"vue-final-modal/overlay-style": {
27+
"type": "string|object|array",
28+
"description": "Style that will be applied to the modal overlay element."
29+
},
30+
"vue-final-modal/content-style": {
31+
"type": "string|object|array",
32+
"description": "Style that will be applied to the modal content element."
33+
},
34+
"vue-final-modal/lock-scroll": {
35+
"type": "boolean",
36+
"description": "Disabled the scrolling of body while the modal is displayed."
37+
},
38+
"vue-final-modal/hide-overlay": {
39+
"type": "boolean",
40+
"description": "Hide the display of the overlay."
41+
},
42+
"vue-final-modal/click-to-close": {
43+
"type": "boolean",
44+
"description": "Clicking overlay of modal to close the modal."
45+
},
46+
"vue-final-modal/esc-to-close": {
47+
"type": "boolean",
48+
"description": "Press `esc` to close the modal."
49+
},
50+
"vue-final-modal/prevent-click": {
51+
"type": "boolean",
52+
"description": "The click event will not be blocked by overlay. Set the root element of `vue-final-modal` style to `pointer-events: none;`."
53+
},
54+
"vue-final-modal/attach": {
55+
"type": "null",
56+
"description": "Specifies which DOM element that this component should detach to. 1. Set `false` will disabled this feature. 2. String can be any valid `querySelector`, e.g. `'body'`, `'#app'`. 3. Object can be any valid `Node`, e.g. `this.$refs.container`."
57+
},
58+
"vue-final-modal/transition": {
59+
"type": "string",
60+
"description": "CSS transition applied to the modal container element."
61+
},
62+
"vue-final-modal/overlay-transition": {
63+
"type": "string",
64+
"description": "CSS transition applied to the modal overlay element."
65+
},
66+
"vue-final-modal/z-index-auto": {
67+
"type": "boolean",
68+
"description": "Auto binding `z-index` base on the prop `zIndexBase` and adding `2` by each stackable modal. If zIndex is set, `zIndexAuto`, `zIndexBase` will be ignored."
69+
},
70+
"vue-final-modal/z-index-base": {
71+
"type": "string|number",
72+
"description": "Calculate `z-index` automatically with zIndexBase. If zIndex is set, `zIndexAuto`, `zIndexBase` will be ignored."
73+
},
74+
"vue-final-modal/z-index": {
75+
"type": "boolean|string|number",
76+
"description": "Set specific `z-index` to root of the modal element. If zIndex is set, `zIndexAuto`, `zIndexBase` will be ignored."
77+
},
78+
"vue-final-modal/focus-retain": {
79+
"type": "boolean",
80+
"description": "Focus the modal `vfm__container` after the modal enter."
81+
},
82+
"vue-final-modal/focus-trap": {
83+
"type": "boolean",
84+
"description": "Enables focus trap meaning that only inputs/buttons that are withing the modal window can be focused by pressing Tab (plugin uses very naive implementation of the focus trap)."
85+
}
86+
}

vetur/tags.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"vue-final-modal": {
3+
"attributes": [
4+
"name",
5+
"ssr",
6+
"classes",
7+
"overlay-class",
8+
"content-class",
9+
"styles",
10+
"overlay-style",
11+
"content-style",
12+
"lock-scroll",
13+
"hide-overlay",
14+
"click-to-close",
15+
"esc-to-close",
16+
"prevent-click",
17+
"attach",
18+
"transition",
19+
"overlay-transition",
20+
"z-index-auto",
21+
"z-index-base",
22+
"z-index",
23+
"focus-retain",
24+
"focus-trap"
25+
],
26+
"description": ""
27+
}
28+
}

0 commit comments

Comments
 (0)