File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ function baseStyled<P extends Record<string, any>>(target: string | InstanceType
6767 return defineComponent (
6868 ( props , { slots } ) => {
6969 const tailwindClasses = ref < string [ ] > ( [ ] )
70- const myAttrs = ref ( { ...attributes } )
70+ const myAttrs = ref ( { class : '' , ...attributes } )
7171 const theme = inject < Record < string , string | number > > ( '$theme' , reactive ( { } ) )
7272 let context = {
7373 theme,
@@ -76,13 +76,13 @@ function baseStyled<P extends Record<string, any>>(target: string | InstanceType
7676
7777 const defaultClassName = generateClassName ( )
7878
79- myAttrs . value . class = defaultClassName
79+ myAttrs . value . class += ` ${ defaultClassName } `
8080
8181 // Inject the tailwind classes to the class attribute
8282 watch (
8383 tailwindClasses ,
8484 ( classNames ) => {
85- myAttrs . value . class = `${ defaultClassName } ${ classNames . join ( ' ' ) } `
85+ myAttrs . value . class + = ` ${ defaultClassName } ${ classNames . join ( ' ' ) } `
8686 } ,
8787 { deep : true } ,
8888 )
@@ -106,7 +106,7 @@ function baseStyled<P extends Record<string, any>>(target: string | InstanceType
106106 } )
107107
108108 onUnmounted ( ( ) => {
109- removeStyle ( myAttrs . value . class )
109+ removeStyle ( defaultClassName )
110110 } )
111111
112112 // Return the render function
You can’t perform that action at this time.
0 commit comments