KIRAKIRA-DOUGA / KIRAKIRA-Cerasus

KIRAKIRA's frontend powered by Nuxt 3.
https://kirakira.moe
BSD 3-Clause "New" or "Revised" License
108 stars 18 forks source link

启用 Vue 3.4 引入的 v-bind 同名简写功能 #118

Closed otomad closed 7 months ago

otomad commented 9 months ago

Vue 3.4 版本引入了 v-bind 同名简写功能,更简洁且好用。

目前不清楚哪个 Nuxt 版本会跟进更新,待到更新之后再解决此议题。

原写法:

<input :disabled="disabled" />

新写法:

<input :disabled />
Aira-Sakuranomiya commented 9 months ago

Nuxt 3.9 应该已经支持了 Vue 3.4,要不要试试?

otomad commented 9 months ago

试!

Aira-Sakuranomiya commented 9 months ago

看起来还是不能用,不知道是不是需要什么方法才能启用这个写法。

otomad commented 9 months ago

看起来还是不能用,不知道是不是需要什么方法才能启用这个写法。

看了下文档,看起来就是项目中的 Vue 没有升到 3.4。

https://nuxt.com/blog/v3-9

Aira-Sakuranomiya commented 9 months ago

已经升级到3.4.7了,你可以看下package-lock

otomad commented 9 months ago

那就不知道了,查 Nuxt 那边也没人提到。

Aira-Sakuranomiya commented 9 months ago

找到了,等吧。 https://github.com/vuejs/language-tools/issues/3830