@dimailn/vuetify 2.7.2-alpha39 → 2.7.2-alpha40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vuetify.js +56 -27
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +1 -1
- package/dist/vuetify.min.js +2 -2
- package/es5/components/VChip/VChip.js +1 -1
- package/es5/components/VChip/VChip.js.map +1 -1
- package/es5/components/VContent/VContent.js +1 -1
- package/es5/components/VContent/VContent.js.map +1 -1
- package/es5/components/VFooter/VFooter.js +1 -1
- package/es5/components/VFooter/VFooter.js.map +1 -1
- package/es5/components/VGrid/VCol.js +1 -1
- package/es5/components/VGrid/VCol.js.map +1 -1
- package/es5/components/VGrid/VContainer.js +3 -1
- package/es5/components/VGrid/VContainer.js.map +1 -1
- package/es5/components/VGrid/VRow.js +1 -1
- package/es5/components/VGrid/VRow.js.map +1 -1
- package/es5/components/VGrid/grid.js +3 -1
- package/es5/components/VGrid/grid.js.map +1 -1
- package/es5/components/VIcon/VIcon.js +1 -1
- package/es5/components/VIcon/VIcon.js.map +1 -1
- package/es5/components/VItemGroup/VItemGroup.js +1 -1
- package/es5/components/VItemGroup/VItemGroup.js.map +1 -1
- package/es5/components/VLazy/VLazy.js +1 -1
- package/es5/components/VLazy/VLazy.js.map +1 -1
- package/es5/components/VList/VList.js +1 -1
- package/es5/components/VList/VList.js.map +1 -1
- package/es5/components/VList/VListItem.js +1 -1
- package/es5/components/VList/VListItem.js.map +1 -1
- package/es5/components/VMain/VMain.js +1 -1
- package/es5/components/VMain/VMain.js.map +1 -1
- package/es5/components/VMenu/VMenu.js +6 -2
- package/es5/components/VMenu/VMenu.js.map +1 -1
- package/es5/components/VNavigationDrawer/VNavigationDrawer.js +3 -2
- package/es5/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/es5/components/VSheet/VSheet.js +3 -1
- package/es5/components/VSheet/VSheet.js.map +1 -1
- package/es5/components/VSlideGroup/VSlideGroup.js +23 -15
- package/es5/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/es5/components/VSnackbar/VSnackbar.js +7 -3
- package/es5/components/VSnackbar/VSnackbar.js.map +1 -1
- package/es5/components/VStepper/VStepper.js +1 -1
- package/es5/components/VStepper/VStepper.js.map +1 -1
- package/es5/components/VToolbar/VToolbar.js +1 -1
- package/es5/components/VToolbar/VToolbar.js.map +1 -1
- package/es5/components/VTooltip/VTooltip.js +1 -1
- package/es5/components/VTooltip/VTooltip.js.map +1 -1
- package/es5/framework.js +1 -1
- package/es5/util/helpers.js +9 -2
- package/es5/util/helpers.js.map +1 -1
- package/lib/components/VChip/VChip.js +2 -2
- package/lib/components/VChip/VChip.js.map +1 -1
- package/lib/components/VContent/VContent.js +2 -2
- package/lib/components/VContent/VContent.js.map +1 -1
- package/lib/components/VFooter/VFooter.js +2 -2
- package/lib/components/VFooter/VFooter.js.map +1 -1
- package/lib/components/VGrid/VCol.js +2 -2
- package/lib/components/VGrid/VCol.js.map +1 -1
- package/lib/components/VGrid/VContainer.js +2 -1
- package/lib/components/VGrid/VContainer.js.map +1 -1
- package/lib/components/VGrid/VRow.js +2 -2
- package/lib/components/VGrid/VRow.js.map +1 -1
- package/lib/components/VGrid/grid.js +2 -1
- package/lib/components/VGrid/grid.js.map +1 -1
- package/lib/components/VIcon/VIcon.js +2 -2
- package/lib/components/VIcon/VIcon.js.map +1 -1
- package/lib/components/VItemGroup/VItemGroup.js +2 -2
- package/lib/components/VItemGroup/VItemGroup.js.map +1 -1
- package/lib/components/VLazy/VLazy.js +2 -2
- package/lib/components/VLazy/VLazy.js.map +1 -1
- package/lib/components/VList/VList.js +2 -2
- package/lib/components/VList/VList.js.map +1 -1
- package/lib/components/VList/VListItem.js +2 -2
- package/lib/components/VList/VListItem.js.map +1 -1
- package/lib/components/VMain/VMain.js +2 -2
- package/lib/components/VMain/VMain.js.map +1 -1
- package/lib/components/VMenu/VMenu.js +2 -2
- package/lib/components/VMenu/VMenu.js.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js +4 -3
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/lib/components/VSheet/VSheet.js +3 -2
- package/lib/components/VSheet/VSheet.js.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.js +2 -2
- package/lib/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.js +1 -1
- package/lib/components/VSnackbar/VSnackbar.js.map +1 -1
- package/lib/components/VStepper/VStepper.js +2 -2
- package/lib/components/VStepper/VStepper.js.map +1 -1
- package/lib/components/VToolbar/VToolbar.js +2 -2
- package/lib/components/VToolbar/VToolbar.js.map +1 -1
- package/lib/components/VTooltip/VTooltip.js +2 -2
- package/lib/components/VTooltip/VTooltip.js.map +1 -1
- package/lib/framework.js +1 -1
- package/lib/util/helpers.js +5 -2
- package/lib/util/helpers.js.map +1 -1
- package/package.json +1 -1
- package/src/components/VChip/VChip.ts +2 -2
- package/src/components/VContent/VContent.ts +2 -2
- package/src/components/VFooter/VFooter.ts +2 -2
- package/src/components/VGrid/VCol.ts +2 -2
- package/src/components/VGrid/VContainer.ts +3 -1
- package/src/components/VGrid/VRow.ts +2 -2
- package/src/components/VGrid/grid.ts +3 -1
- package/src/components/VIcon/VIcon.ts +2 -2
- package/src/components/VItemGroup/VItemGroup.ts +2 -2
- package/src/components/VLazy/VLazy.ts +2 -2
- package/src/components/VList/VList.ts +2 -2
- package/src/components/VList/VListItem.ts +2 -2
- package/src/components/VMain/VMain.ts +2 -2
- package/src/components/VMenu/VMenu.ts +2 -2
- package/src/components/VNavigationDrawer/VNavigationDrawer.ts +3 -2
- package/src/components/VSheet/VSheet.ts +2 -1
- package/src/components/VSlideGroup/VSlideGroup.ts +2 -2
- package/src/components/VSnackbar/VSnackbar.ts +1 -1
- package/src/components/VStepper/VStepper.ts +2 -2
- package/src/components/VToolbar/VToolbar.ts +2 -2
- package/src/components/VTooltip/VTooltip.ts +2 -2
- package/src/util/helpers.ts +9 -2
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ import Sizeable from '../../mixins/sizeable'
|
|
|
17
17
|
|
|
18
18
|
// Utilities
|
|
19
19
|
import { breaking } from '../../util/console'
|
|
20
|
-
import { getSlot } from '../../util/helpers'
|
|
20
|
+
import { getSlot, getTagValue } from '../../util/helpers'
|
|
21
21
|
|
|
22
22
|
// Types
|
|
23
23
|
import { PropValidator, PropType } from 'vue/types/options'
|
|
@@ -197,7 +197,7 @@ export default mixins(
|
|
|
197
197
|
const color = this.textColor || (this.outlined && this.color)
|
|
198
198
|
|
|
199
199
|
return withDirectives(
|
|
200
|
-
h(tag, this.setTextColor(color, data), children),
|
|
200
|
+
h(getTagValue(tag), this.setTextColor(color, data), children),
|
|
201
201
|
directives
|
|
202
202
|
)
|
|
203
203
|
},
|
|
@@ -5,7 +5,7 @@ import { VNode, defineComponent } from 'vue'
|
|
|
5
5
|
// Extensions
|
|
6
6
|
import VMain from '../VMain/VMain'
|
|
7
7
|
import { deprecate } from '../../util/console'
|
|
8
|
-
import { normalizeClasses } from '../../util/helpers'
|
|
8
|
+
import { normalizeClasses, getTagValue } from '../../util/helpers'
|
|
9
9
|
|
|
10
10
|
/* @vue/component */
|
|
11
11
|
export default defineComponent({
|
|
@@ -31,6 +31,6 @@ export default defineComponent({
|
|
|
31
31
|
node.children[0].data = { ...node.children[0].data, class: wrapClasses }
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
return h(
|
|
34
|
+
return h(getTagValue(this.tag), node.data, node.children)
|
|
35
35
|
},
|
|
36
36
|
})
|
|
@@ -11,7 +11,7 @@ import SSRBootable from '../../mixins/ssr-bootable'
|
|
|
11
11
|
|
|
12
12
|
// Utilities
|
|
13
13
|
import mixins from '../../util/mixins'
|
|
14
|
-
import { convertToUnit, getSlot } from '../../util/helpers'
|
|
14
|
+
import { convertToUnit, getSlot, getTagValue } from '../../util/helpers'
|
|
15
15
|
|
|
16
16
|
// Types
|
|
17
17
|
import { VNode } from 'vue/types/vnode'
|
|
@@ -111,6 +111,6 @@ export default mixins(
|
|
|
111
111
|
style: this.styles,
|
|
112
112
|
})
|
|
113
113
|
|
|
114
|
-
return h(this.tag, data, getSlot(this))
|
|
114
|
+
return h(getTagValue(this.tag), data, getSlot(this))
|
|
115
115
|
},
|
|
116
116
|
})
|
|
@@ -2,7 +2,7 @@ import './VGrid.sass'
|
|
|
2
2
|
|
|
3
3
|
import { defineComponent, VNode, PropOptions, getCurrentInstance } from 'vue'
|
|
4
4
|
import mergeData from '../../util/mergeData'
|
|
5
|
-
import { upperFirst } from '../../util/helpers'
|
|
5
|
+
import { upperFirst, getTagValue } from '../../util/helpers'
|
|
6
6
|
import {h} from 'vue'
|
|
7
7
|
// no xs
|
|
8
8
|
const breakpoints = ['sm', 'md', 'lg', 'xl']
|
|
@@ -134,6 +134,6 @@ export default defineComponent({
|
|
|
134
134
|
cache.set(cacheKey, classList)
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
return h(props.tag, mergeData({ class: classList }, data), children)
|
|
137
|
+
return h(getTagValue(props.tag), mergeData({ class: classList }, data), children)
|
|
138
138
|
},
|
|
139
139
|
})
|
|
@@ -6,6 +6,8 @@ import Grid from './grid'
|
|
|
6
6
|
import mergeData from '../../util/mergeData'
|
|
7
7
|
import { defineComponent, h } from 'vue'
|
|
8
8
|
|
|
9
|
+
import { getTagValue } from '../../util/helpers'
|
|
10
|
+
|
|
9
11
|
/* @vue/component */
|
|
10
12
|
export default defineComponent({
|
|
11
13
|
name: 'v-container',
|
|
@@ -60,7 +62,7 @@ export default defineComponent({
|
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
return h(
|
|
63
|
-
this.tag,
|
|
65
|
+
getTagValue(this.tag),
|
|
64
66
|
data,
|
|
65
67
|
this.$slots.default?.()
|
|
66
68
|
)
|
|
@@ -2,7 +2,7 @@ import './VGrid.sass'
|
|
|
2
2
|
|
|
3
3
|
import { defineComponent, PropOptions } from 'vue'
|
|
4
4
|
import mergeData from '../../util/mergeData'
|
|
5
|
-
import { upperFirst } from '../../util/helpers'
|
|
5
|
+
import { upperFirst, getTagValue } from '../../util/helpers'
|
|
6
6
|
import {h} from 'vue'
|
|
7
7
|
// no xs
|
|
8
8
|
const breakpoints = ['sm', 'md', 'lg', 'xl']
|
|
@@ -128,7 +128,7 @@ export default defineComponent({
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
return h(
|
|
131
|
-
props.tag,
|
|
131
|
+
getTagValue(props.tag),
|
|
132
132
|
mergeData(this.$attrs, {
|
|
133
133
|
class: classList.concat('row'),
|
|
134
134
|
}),
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// Types
|
|
2
2
|
import { defineComponent, VNode, h } from 'vue'
|
|
3
3
|
|
|
4
|
+
import { getTagValue } from '../../util/helpers'
|
|
5
|
+
|
|
4
6
|
export default function VGrid (name: string) {
|
|
5
7
|
/* @vue/component */
|
|
6
8
|
return defineComponent({
|
|
@@ -49,7 +51,7 @@ export default function VGrid (name: string) {
|
|
|
49
51
|
data.id = componentProps.id
|
|
50
52
|
}
|
|
51
53
|
|
|
52
|
-
return h(componentProps?.tag || 'div', data, children)
|
|
54
|
+
return h(getTagValue(componentProps?.tag || 'div'), data, children)
|
|
53
55
|
}
|
|
54
56
|
})
|
|
55
57
|
}
|
|
@@ -13,7 +13,7 @@ import { convertToUnit, keys, remapInternalIcon } from '../../util/helpers'
|
|
|
13
13
|
import { defineComponent, CreateElement, VNode, VNodeChildren, VNodeData, h } from 'vue'
|
|
14
14
|
import mixins from '../../util/mixins'
|
|
15
15
|
import { VuetifyIcon, VuetifyIconComponent } from 'vuetify/types/services/icons'
|
|
16
|
-
import { normalizeAttrs, normalizeClasses } from '../../util/helpers'
|
|
16
|
+
import { normalizeAttrs, normalizeClasses, getTagValue } from '../../util/helpers'
|
|
17
17
|
|
|
18
18
|
enum SIZE_MAP {
|
|
19
19
|
xSmall = '12px',
|
|
@@ -192,7 +192,7 @@ export const VIconInternal = mixins(
|
|
|
192
192
|
|
|
193
193
|
this.applyColors(fontData)
|
|
194
194
|
|
|
195
|
-
return h(this.hasClickListener ? 'button' : this.tag, fontData, {default: () => newChildren})
|
|
195
|
+
return h(this.hasClickListener ? 'button' : getTagValue(this.tag), fontData, {default: () => newChildren})
|
|
196
196
|
},
|
|
197
197
|
renderSvgIcon (icon: string): VNode {
|
|
198
198
|
const size = this.getSize()
|
|
@@ -11,7 +11,7 @@ import Themeable from '../../mixins/themeable'
|
|
|
11
11
|
// Utilities
|
|
12
12
|
import mixins from '../../util/mixins'
|
|
13
13
|
import { consoleWarn } from '../../util/console'
|
|
14
|
-
import { getSlot } from '../../util/helpers'
|
|
14
|
+
import { getSlot, getTagValue } from '../../util/helpers'
|
|
15
15
|
|
|
16
16
|
// Types
|
|
17
17
|
import { VNode } from 'vue/types'
|
|
@@ -266,7 +266,7 @@ export const BaseItemGroup = mixins(
|
|
|
266
266
|
|
|
267
267
|
render (): VNode {
|
|
268
268
|
const data = this.genData()
|
|
269
|
-
return h(this.tag, {
|
|
269
|
+
return h(getTagValue(this.tag), {
|
|
270
270
|
class: data.class,
|
|
271
271
|
...data.attrs,
|
|
272
272
|
}, getSlot(this))
|
|
@@ -8,7 +8,7 @@ import intersect from '../../directives/intersect'
|
|
|
8
8
|
|
|
9
9
|
// Utilities
|
|
10
10
|
import mixins from '../../util/mixins'
|
|
11
|
-
import { getSlot } from '../../util/helpers'
|
|
11
|
+
import { getSlot, getTagValue } from '../../util/helpers'
|
|
12
12
|
|
|
13
13
|
// Types
|
|
14
14
|
import { VNode } from 'vue'
|
|
@@ -74,7 +74,7 @@ export default mixins(
|
|
|
74
74
|
},
|
|
75
75
|
|
|
76
76
|
render (): VNode {
|
|
77
|
-
return withDirectives(h(this.tag, {
|
|
77
|
+
return withDirectives(h(getTagValue(this.tag), {
|
|
78
78
|
class: 'v-lazy',
|
|
79
79
|
...this.$attrs,
|
|
80
80
|
style: this.styles,
|
|
@@ -5,7 +5,7 @@ import VListGroup from './VListGroup'
|
|
|
5
5
|
|
|
6
6
|
// Components
|
|
7
7
|
import VSheet from '../VSheet/VSheet'
|
|
8
|
-
import { getSlot } from '../../util/helpers'
|
|
8
|
+
import { getSlot, getTagValue } from '../../util/helpers'
|
|
9
9
|
|
|
10
10
|
// Types
|
|
11
11
|
import { VNode, defineComponent } from 'vue'
|
|
@@ -97,6 +97,6 @@ export default defineComponent({
|
|
|
97
97
|
...this.listeners$,
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
return h(this.tag, this.setBackgroundColor(this.color, data), getSlot(this))
|
|
100
|
+
return h(getTagValue(this.tag), this.setBackgroundColor(this.color, data), getSlot(this))
|
|
101
101
|
},
|
|
102
102
|
})
|
|
@@ -13,7 +13,7 @@ import { factory as ToggleableFactory } from '../../mixins/toggleable'
|
|
|
13
13
|
import Ripple from '../../directives/ripple'
|
|
14
14
|
|
|
15
15
|
// Utilities
|
|
16
|
-
import { getSlot, keyCodes } from './../../util/helpers'
|
|
16
|
+
import { getSlot, keyCodes, getTagValue } from './../../util/helpers'
|
|
17
17
|
import mergeData, { mergeClasses } from './../../util/mergeData'
|
|
18
18
|
import { ExtractVue } from './../../util/mixins'
|
|
19
19
|
import { removed, breaking } from '../../util/console'
|
|
@@ -224,7 +224,7 @@ export default baseMixins.extend({
|
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
const node = typeof tag === 'string'
|
|
227
|
-
? h(tag, nodeData, children)
|
|
227
|
+
? h(getTagValue(tag), nodeData, children)
|
|
228
228
|
: h(tag, nodeData, () => children)
|
|
229
229
|
|
|
230
230
|
return withDirectives(node, directives)
|
|
@@ -3,7 +3,7 @@ import './VMain.sass'
|
|
|
3
3
|
|
|
4
4
|
// Mixins
|
|
5
5
|
import SSRBootable from '../../mixins/ssr-bootable'
|
|
6
|
-
import { getSlot } from '../../util/helpers'
|
|
6
|
+
import { getSlot, getTagValue } from '../../util/helpers'
|
|
7
7
|
|
|
8
8
|
// Types
|
|
9
9
|
import { VNode, defineComponent, h } from 'vue'
|
|
@@ -43,7 +43,7 @@ export default defineComponent({
|
|
|
43
43
|
ref: 'main',
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
return h(this.tag, data, [
|
|
46
|
+
return h(getTagValue(this.tag), data, [
|
|
47
47
|
h(
|
|
48
48
|
'div',
|
|
49
49
|
{ class: 'v-main__wrap' },
|
|
@@ -333,7 +333,7 @@ export default baseMixins.extend({
|
|
|
333
333
|
|
|
334
334
|
return h(Transition, {
|
|
335
335
|
name: this.transition
|
|
336
|
-
}, [content])
|
|
336
|
+
}, () => [content])
|
|
337
337
|
},
|
|
338
338
|
genDirectives (): VNodeDirective[] {
|
|
339
339
|
const directives = [[
|
|
@@ -528,7 +528,7 @@ export default baseMixins.extend({
|
|
|
528
528
|
root: true,
|
|
529
529
|
light: this.light,
|
|
530
530
|
dark: this.dark,
|
|
531
|
-
}, [this.genTransition()]),
|
|
531
|
+
}, () => [this.genTransition()]),
|
|
532
532
|
]),
|
|
533
533
|
]), directives)
|
|
534
534
|
},
|
|
@@ -20,7 +20,7 @@ import Resize from '../../directives/resize'
|
|
|
20
20
|
import Touch from '../../directives/touch'
|
|
21
21
|
|
|
22
22
|
// Utilities
|
|
23
|
-
import { convertToUnit, getSlot } from '../../util/helpers'
|
|
23
|
+
import { convertToUnit, getSlot, getTagValue } from '../../util/helpers'
|
|
24
24
|
import { breaking } from '../../util/console'
|
|
25
25
|
import mixins from '../../util/mixins'
|
|
26
26
|
|
|
@@ -466,7 +466,8 @@ export default baseMixins.extend({
|
|
|
466
466
|
|
|
467
467
|
if (this.src || getSlot(this, 'img')) children.unshift(this.genBackground())
|
|
468
468
|
|
|
469
|
-
|
|
469
|
+
// this.$tag сейчас всегда равен nav|aside, но оборачиваем в getTagValue на случай возможных изменений
|
|
470
|
+
const node = h(getTagValue(this.$tag), this.setBackgroundColor(this.color, {
|
|
470
471
|
class: this.classes,
|
|
471
472
|
style: this.styles,
|
|
472
473
|
...this.genListeners(),
|
|
@@ -12,6 +12,7 @@ import Themeable from '../../mixins/themeable'
|
|
|
12
12
|
|
|
13
13
|
// Helpers
|
|
14
14
|
import mixins from '../../util/mixins'
|
|
15
|
+
import { getTagValue } from '../../util/helpers'
|
|
15
16
|
|
|
16
17
|
// Types
|
|
17
18
|
import { VNode, defineComponent } from 'vue'
|
|
@@ -61,7 +62,7 @@ export default defineComponent({
|
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
return h(
|
|
64
|
-
this.tag,
|
|
65
|
+
getTagValue(this.tag),
|
|
65
66
|
this.setBackgroundColor(this.color, data),
|
|
66
67
|
this.$slots.default?.()
|
|
67
68
|
)
|
|
@@ -325,7 +325,7 @@ export const BaseSlideGroup = mixins<options &
|
|
|
325
325
|
|
|
326
326
|
return h(VIcon, {
|
|
327
327
|
disabled: !hasAffix,
|
|
328
|
-
}, (this as any)[`${icon}Icon`])
|
|
328
|
+
}, () => (this as any)[`${icon}Icon`])
|
|
329
329
|
},
|
|
330
330
|
// Always generate prev for scrollable hint
|
|
331
331
|
genPrev (): VNode | null {
|
|
@@ -342,7 +342,7 @@ export const BaseSlideGroup = mixins<options &
|
|
|
342
342
|
}, [slot])
|
|
343
343
|
},
|
|
344
344
|
genTransition (location: 'prev' | 'next') {
|
|
345
|
-
return h(VFadeTransition, {}, [this.genIcon(location)])
|
|
345
|
+
return h(VFadeTransition, {}, () => [this.genIcon(location)])
|
|
346
346
|
},
|
|
347
347
|
genWrapper (): VNode {
|
|
348
348
|
return withDirectives(h('div', {
|
|
@@ -16,7 +16,7 @@ import Proxyable from '../../mixins/proxyable'
|
|
|
16
16
|
// Utilities
|
|
17
17
|
import mixins from '../../util/mixins'
|
|
18
18
|
import { breaking } from '../../util/console'
|
|
19
|
-
import { getSlot } from '../../util/helpers'
|
|
19
|
+
import { getSlot, getTagValue } from '../../util/helpers'
|
|
20
20
|
|
|
21
21
|
// Types
|
|
22
22
|
import { VNode } from 'vue'
|
|
@@ -135,7 +135,7 @@ export default baseMixins.extend({
|
|
|
135
135
|
},
|
|
136
136
|
|
|
137
137
|
render (): VNode {
|
|
138
|
-
return h(this.tag, {
|
|
138
|
+
return h(getTagValue(this.tag), {
|
|
139
139
|
class: ['v-stepper', this.classes],
|
|
140
140
|
style: this.styles,
|
|
141
141
|
}, getSlot(this))
|
|
@@ -9,7 +9,7 @@ import VSheet from '../VSheet/VSheet'
|
|
|
9
9
|
import VImg, { srcObject } from '../VImg/VImg'
|
|
10
10
|
|
|
11
11
|
// Utilities
|
|
12
|
-
import { convertToUnit, getSlot } from '../../util/helpers'
|
|
12
|
+
import { convertToUnit, getSlot, getTagValue } from '../../util/helpers'
|
|
13
13
|
import { breaking } from '../../util/console'
|
|
14
14
|
|
|
15
15
|
// Types
|
|
@@ -162,6 +162,6 @@ export default defineComponent({
|
|
|
162
162
|
if (this.isExtended) children.push(this.genExtension())
|
|
163
163
|
if (this.src || this.$slots.img) children.unshift(this.genBackground())
|
|
164
164
|
|
|
165
|
-
return h(this.tag, {...this.attrs$, ...data}, children)
|
|
165
|
+
return h(getTagValue(this.tag), {...this.attrs$, ...data}, children)
|
|
166
166
|
}
|
|
167
167
|
})
|
|
@@ -9,7 +9,7 @@ import Dependent from '../../mixins/dependent'
|
|
|
9
9
|
import Menuable from '../../mixins/menuable'
|
|
10
10
|
|
|
11
11
|
// Helpers
|
|
12
|
-
import { convertToUnit, keyCodes, getSlotType } from '../../util/helpers'
|
|
12
|
+
import { convertToUnit, keyCodes, getSlotType, getTagValue } from '../../util/helpers'
|
|
13
13
|
import { consoleError } from '../../util/console'
|
|
14
14
|
|
|
15
15
|
// Types
|
|
@@ -213,7 +213,7 @@ export default mixins(Colorable, Delayable, Dependent, Menuable).extend({
|
|
|
213
213
|
},
|
|
214
214
|
|
|
215
215
|
render (): VNode {
|
|
216
|
-
return h(this.tag, {
|
|
216
|
+
return h(getTagValue(this.tag), {
|
|
217
217
|
class: ['v-tooltip', this.classes],
|
|
218
218
|
}, [
|
|
219
219
|
this.showLazyContent(() => [this.genTransition()]),
|
package/src/util/helpers.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import { defineComponent, h } from 'vue'
|
|
1
|
+
import { defineComponent, h, resolveComponent } from 'vue'
|
|
2
2
|
import { VNode, VNodeDirective } from 'vue/types'
|
|
3
3
|
import { VuetifyIcon } from 'vuetify/types/services/icons'
|
|
4
4
|
import { DataTableCompareFunction, SelectItemKey, ItemGroup } from 'vuetify/types'
|
|
5
5
|
|
|
6
|
+
/** Резолвит пропс tag как компонент, если это строка с составным именем (например v-card или VCard) */
|
|
7
|
+
export const getTagValue = (tag: string) => (
|
|
8
|
+
tag.includes('-') || /^[A-Z]/.test(tag)
|
|
9
|
+
? resolveComponent(tag)
|
|
10
|
+
: tag
|
|
11
|
+
)
|
|
12
|
+
|
|
6
13
|
export function createSimpleFunctional (
|
|
7
14
|
c: string,
|
|
8
15
|
el = 'div',
|
|
@@ -25,7 +32,7 @@ export function createSimpleFunctional (
|
|
|
25
32
|
|
|
26
33
|
data.class = (`${c} ${data.class || ''}`).trim()
|
|
27
34
|
|
|
28
|
-
return h(this.tag, data, this.$slots.default?.())
|
|
35
|
+
return h(getTagValue(this.tag), data, this.$slots.default?.())
|
|
29
36
|
},
|
|
30
37
|
})
|
|
31
38
|
}
|