V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
zxCoder
V2EX  ›  Vue.js

在 html 上使用 vue, cdn 引入文件后,怎么让 ide 有提示呢

  •  
  •   zxCoder · Oct 15, 2021 · 2802 views
    This topic created in 1658 days ago, the information mentioned may be changed or developed.

    https://v3.cn.vuejs.org/guide/installation.html#cdn

    按文档写的引入这个文件,然后现在 WebStorm 提示不了,还需要引入什么文件吗

    5 replies    2021-10-16 16:33:26 +08:00
    raiz
        1
    raiz  
       Oct 15, 2021
    开发阶段直接本地引用?
    mxT52CRuqR6o5
        2
    mxT52CRuqR6o5  
       Oct 15, 2021 via Android
    写个.d.ts 文件声明一下 cdn 引入文件在全局空间注入的东西类型就好了
    mxT52CRuqR6o5
        3
    mxT52CRuqR6o5  
       Oct 15, 2021 via Android
    需要 npm install @types/vue 之类的东西
    dengshen
        4
    dengshen  
       Oct 16, 2021 via iPhone
    webstorm 有个库功能。在里面下载 vue 就好了
    Q4h7388nR28s95fa
        5
    Q4h7388nR28s95fa  
       Oct 16, 2021
    写一个 vue-web-loader 加载器来加载 vue 单文件组件页面,然后就可以了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2413 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 01:09 · PVG 09:09 · LAX 18:09 · JFK 21:09
    ♥ Do have faith in what you're doing.