上一页 1 2 3 4 5 6 ··· 13 下一页
摘要: 分环境打包配置 新建.env.dev(或者.env) VITE_NODE_ENV = 'dev' VITE_HOST = 'http://local.host.com' 执行yarn dev ,控制台执行结果如下 新建.env.test VITE_NODE_ENV = 'test' VITE_HOS 阅读全文
posted @ 2021-11-30 16:28 知九 阅读(1793) 评论(0) 推荐(0) 编辑
摘要: 报错一 warning package.json: No license field$ vue-tsc --noEmit && vite build 解决方案,添加这两行,只添加一个是没有用的 报错二 node_modules/@vue/runtime-core/dist/runtime-core. 阅读全文
posted @ 2021-11-24 14:27 知九 阅读(4825) 评论(0) 推荐(0) 编辑
摘要: vite.config.ts配置 配置路径处理模块 安装ts的类型声明文件 yarn add @types/node -D 通过配置alias来定义路径的别名 resolve: { alias: { '@': path.resolve(__dirname, 'src'), '@coms': path 阅读全文
posted @ 2021-11-23 10:41 知九 阅读(2866) 评论(0) 推荐(0) 编辑
摘要: 集成vue-router 使用yarn yarn add vue-router@next --save 安装完成之后在src目录下创建文件夹router/index.ts,创建完成之后需要在Vue-Router中对Vue-Router进行初始化配置。我们暂时把初始化的工作搁置一下,先需要创建page 阅读全文
posted @ 2021-11-23 10:41 知九 阅读(1841) 评论(0) 推荐(0) 编辑
摘要: vite 初始化项目 使用npm npm init vite@latest 使用yarn yarn create vite 使用pnpm pnpx create-vite 根据提示输入项目名称,选择vue框架,选择vue-ts,然后根据提示 cd <project name> npm install 阅读全文
posted @ 2021-11-23 10:04 知九 阅读(691) 评论(0) 推荐(0) 编辑
摘要: npm init vite-app <project-name> cd <project-name> 根据控制台的提示执行: npm install / yarn npm run dev / yarn dev 然后就可以看到启动页了 阅读全文
posted @ 2021-11-23 09:54 知九 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 因为需要兼容其他vue2.0的项目,所以先卸载vue-cli,再全局安装桥接工具 卸载vue-cli2.0 npm uninstall vue-cli -g 安装vue-cli3.0 npm install -g @vue/cli 安装桥接工具 npm install -g @vue/cli-ini 阅读全文
posted @ 2021-11-22 17:23 知九 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 项目搭建 使用webpack、babel、react、antdesign配置单页面应用开发环境 阅读全文
posted @ 2021-07-23 16:32 知九 阅读(73) 评论(0) 推荐(0) 编辑
摘要: https://github.com/xuqiang521/nuxt-ssr-demo https://www.cnblogs.com/laozhang-is-phi/p/10249248.html https://zh.nuxtjs.org/guide/ https://juejin.cn/pos 阅读全文
posted @ 2020-12-17 17:45 知九 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 这里注意如果自己的页面有滚动条,一定阻止滚动事件的默认行为,否则缩放图片的时候,页面会跟着滚动@mousewheel.prevent 阻止默认行为 <div ref="imgWrap" @mousewheel.prevent="rollImg" class="modal-img-wrap"> <im 阅读全文
posted @ 2020-12-14 16:52 知九 阅读(3002) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 13 下一页