Coder Social home page Coder Social logo

Comments (6)

tanukihee avatar tanukihee commented on May 25, 2024 1

支持🎉🎉🎉

文档对初学vue时的我提供了很大的帮助(当时vue3的官方文档还非常不完善),谢谢作者!
(然后我就去写 react 去了

from learning-vue3.

chengpeiquan avatar chengpeiquan commented on May 25, 2024

我 Mark 一下,之前这个语法糖很长时间一直在草案没定下来,就没有怎么去用它,等我找时间看看~

from learning-vue3.

tanukihee avatar tanukihee commented on May 25, 2024

我在一个小项目里面试了试 pug,写起来还是很舒服的,也的确减少了许多代码量。只用装两个依赖,pug 和 pug-plain-loader,也不需要其他的配置。就是有两点

  1. vsc 没有好用的 pug formatter,prettier 不能格式化 pug,强迫症受不了
  2. 对于一些比较长的属性,比如 :style 有时候就会很长,
<div
    :style="
        {
            foo: bar
        }
    "
>
</div>

这种,需要在长属性里折行。但是 pug 里折行就必须得用 js 的 ` 引号,而如果属性里也有用于字符串拼接的 ` 引号出现时,就会产生冲突。

至于 ref 语法糖,好像社区里这个的评价不是很高的样子…另外可能是跟 ts 的相性不太好,我没用成功😂

from learning-vue3.

tanukihee avatar tanukihee commented on May 25, 2024

另外要不要讲一讲 babel?我刚开始用 vue3 的时候还是 vue-cli 4,会自动调用 polyfill 生成 es5 代码,但是到了 vue-cli 5,就不会自动转换了。虽然现在 es6 基本是标配,但我有时候会用一些非常新的 api(比如 replaceAll 之类的),为了照顾一些老设备(比如 ios 13),还是要用 babel 转一下的😂

from learning-vue3.

chengpeiquan avatar chengpeiquan commented on May 25, 2024

哈哈哈好,我最近项目有点赶,等过些日子来梳理一下

from learning-vue3.

chengpeiquan avatar chengpeiquan commented on May 25, 2024

呀~ 突然想起之前就忘记回复这个 issue 了,后面有补充了一些新内容(都整理在 更新记录 里),不过因为去年底被出版社签约了,所以在线文档就不再更新内容了,以后新文档会跟最早期的时候一样,作为个人博客上的文章发布哈~

from learning-vue3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.