Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe new conflicts #6

Closed
LLinVIP opened this issue Aug 30, 2022 · 5 comments
Closed

Maybe new conflicts #6

LLinVIP opened this issue Aug 30, 2022 · 5 comments

Comments

@LLinVIP
Copy link

LLinVIP commented Aug 30, 2022

Excellent work, compared with 'unocss-preset-uni', maybe some giant changes happened in this tool.

However, there is a question. Before I using 'unocss-applet', the compile process could go on smoothly, after using this, an error occoured. This is screenshot:

image

tm-sheet is a component which I using.

image
After deleting line 24, vite could pass, but weChat miniprogram tool occured error:

image
image

I think there may be some problems.

By the way, an another question is does unocss has the configuration which could set individual prefix like Tailwind CSS

image

it may solve the conflicts between components and Unocss.

Thanks!

@liwenfengg
Copy link
Contributor

You can use this version "UnoCSS-applet": "^0.1.2" first

@zguolee
Copy link
Member

zguolee commented Aug 31, 2022

We fixed whitespace was expected in v0.2.5, because the transformer-attributify make mistakes. However, there are still problems, even if only UnoCSS is used for TMUI.

vite v2.9.15 building for development...
[plugin:vite:vue] [@vue/compiler-sfc] Unexpected token (71:8)

/Users/zguo/Downloads/tmui/src/tmui/components/tm-checkbox/tm-checkbox.vue
114|      beforChecked:{
115|          type:[Function,String,Boolean],
116|          =>{
   |          ^
117|              return false;
118|          }
at tmui/components/tm-checkbox/tm-checkbox.vue:71:8

@zguolee
Copy link
Member

zguolee commented Aug 31, 2022

By the way, an another question is does unocss has the configuration which could set individual prefix like Tailwind CSS

It's provided. You can check PresetMiniOptions, and PresetAppletOptions extends PresetMiniOptions.

@LLinVIP
Copy link
Author

LLinVIP commented Aug 31, 2022

By the way, an another question is does unocss has the configuration which could set individual prefix like Tailwind CSS

It's provided. You can check PresetMiniOptions, and PresetAppletOptions extends PresetMiniOptions.

Thanks. After adding this item, it works fine and prevent some conflicts.
image

@LLinVIP
Copy link
Author

LLinVIP commented Aug 31, 2022

We fixed whitespace was expected in v0.2.5, because the transformer-attributify make mistakes. However, there are still problems, even if only UnoCSS is used for TMUI.

vite v2.9.15 building for development...
[plugin:vite:vue] [@vue/compiler-sfc] Unexpected token (71:8)

/Users/zguo/Downloads/tmui/src/tmui/components/tm-checkbox/tm-checkbox.vue
114|      beforChecked:{
115|          type:[Function,String,Boolean],
116|          =>{
   |          ^
117|              return false;
118|          }
at tmui/components/tm-checkbox/tm-checkbox.vue:71:8

We need a little change in the code like this:
image

It will compile well.

@zguolee zguolee closed this as completed Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants