#
tailwindcss 样式不生效解决方法
将tailwind.config.js中内容改成以下: bash /** @type {import('tailwindcss').Config} */ module.exports = { content: [ "./src/**/*.{html, js, ts, vue}", "./src/**/*" ], // ... }
Posted by spike on 2023-05-13
#
原生js简单实现ajax请求
bash // 1. 创建 XMLHttpRequest 对象 var xhr = new XMLHttpRequest(); // 2. 设置请求参数 xhr.open('GET', 'https://example.com/api/data', true); // 3. 注册回调函数 xhr.onreadystatechange = function() { ...
Posted by spike on 2023-03-05
#
npm run dev的时候vite无法识别 解决方案
https://stackoverflow.com/questions/71844271/vite-is-not-recognized-on-npm-run-dev yarn add vite npm run dev 这两个命令测试过了,好用
Posted by spike on 2023-01-29
#
vue3 defineprops和 script setup使用方法
https://chengpeiquan.com/article/vue3-script-setup.html defineprops传值问题 https://juejin.cn/post/7158284048362635300
Posted by spike on 2023-01-01
#
vue3中watch监听器
watch监听器 bash //监听多个数据--数组形式 const name1=ref('') const name2=ref('batman') const wa=watch([name1,name2],(newvalues,oldvalues)= { console.log('name1 old value:',oldvalue[0]) consol...