Skip to content

Commit

Permalink
fix: theme null on .v-popper
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Mar 11, 2022
1 parent b7ba8b6 commit 25db8e8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/docs/src/guide/custom-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default {
mixins: [
PopperMethods,
ThemeClass,
ThemeClass(),
],
inheritAttrs: false,
Expand Down
2 changes: 1 addition & 1 deletion packages/floating-vue/src/components/PopperContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default defineComponent({
},
mixins: [
ThemeClass,
ThemeClass(),
],
props: {
Expand Down
2 changes: 1 addition & 1 deletion packages/floating-vue/src/components/PopperWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default defineComponent({
mixins: [
PopperMethods,
ThemeClass,
ThemeClass('finalTheme'),
],
inheritAttrs: false,
Expand Down
6 changes: 3 additions & 3 deletions packages/floating-vue/src/components/ThemeClass.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { getThemeClasses } from '../config'

// @vue/component
export default {
export default (prop = 'theme') => ({
computed: {
themeClass () {
return getThemeClasses(this.theme)
return getThemeClasses(this[prop])
},
},
}
})

0 comments on commit 25db8e8

Please sign in to comment.