首页
Python
Java
前端
数据库
Linux
Chatgpt专题
开发者工具箱
中想专题
在rollup中想使用require 写node脚本
如果在使用 Rollup 写 require 而 Rollup 默认使用的是 ECMAScript 模块系统。 要解决这个问题,你需要在 Rollup 的配置文件(通常是 rollup.config.js)中使用插件来将 CommonJS 模块转化为 ECMAScript 模块。需要配置2个插件 import resolve from '@rollup/plugin-node-resolve'
阅读更多...
【无标题】Vue3想在scss中想使用动态的变量
Vue3想在css中想使用动态的变量 首先在组件中定义 :style="{ '--custom-style-color': customStyle.color }",customStyle.color就是那个传过来的变量,也可以是自定义的-color 值 const props = defineProps({customStyle: {type: Object,default: () =>
阅读更多...