上一页 1 2 3 4 5 6 ··· 10 下一页
摘要: vue2的node版本12以上,vue3的node版本16以上 1.命令安装vite最新版本:npm init vite@latest 2.vsCode使用vue3需要安装两个扩展,需要把vue2的扩展Vetur做个禁用,需要使用vue2时再打开,把vue3的扩展关闭,否则会有冲突 阅读全文
posted @ 2023-11-20 21:54 小闫的姑娘 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 用于在react组件中创建不是由事件引起的而是由渲染本身引起的,比如发送Ajax请求、更改dom等等 import { useEffect, useState } from 'react'; function App() { const [count,setcount] =useState(0) c 阅读全文
posted @ 2023-11-10 17:23 小闫的姑娘 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 1.父组件向子组件通信 import { useState } from 'react'; function Button(props){ return( <div>{props.name}</div> ) } function App() { const msg=useState('神雕侠侣') 阅读全文
posted @ 2023-11-10 14:50 小闫的姑娘 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 1.lodash里面有很多工具类,排序,节流,防抖等 npm i -- save lodash 使用:导入到项目中 import _ from 'lodash' _.orderBy(list(代表数组),'like(代表要排序的字段)','desc(代表倒序排列)') _.orderBy(list, 阅读全文
posted @ 2023-11-08 15:57 小闫的姑娘 阅读(19) 评论(0) 推荐(0) 编辑
摘要: <template> <view class="u-wrap"> <view class="u-search-box"> <view class="u-search-inner"> <u-icon name="search" color="#909399" :size="28"></u-icon> 阅读全文
posted @ 2023-10-27 11:31 小闫的姑娘 阅读(847) 评论(0) 推荐(0) 编辑
摘要: this.timer = setInterval(this.getTime, 1000); //实时刷新时间 getTime() { const date = new Date(); const year = date.getFullYear(); const month = date.getMon 阅读全文
posted @ 2023-09-05 10:11 小闫的姑娘 阅读(10) 评论(0) 推荐(0) 编辑
摘要: selectTotalPrice() { let totalPrice = this.goods.reduce((prev, cur) => { const curPrice = cur.goods.sku?.price || cur.goods.price; return parseFloat(p 阅读全文
posted @ 2023-08-21 17:35 小闫的姑娘 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 1.安装node.js环境,版本在14或16以上 使用vite搭建项目 npm init vite@latest 使用vue搭建项目 npm init vue@latest 项目名称,一直yes 阅读全文
posted @ 2023-07-25 16:38 小闫的姑娘 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 科普:v-viewer 简单来说:v-viewer是一款支持vue项目中的图片浏览组件,它支持图片旋转、缩放、翻转等操作,支持配置化.非常强大 官网目录:v-viewer 安装依赖 直接执行命令: npm install v-viewer --save 引入并使用依赖 下载完成之后,就可以配置了,具 阅读全文
posted @ 2023-07-25 14:42 小闫的姑娘 阅读(2214) 评论(0) 推荐(0) 编辑
摘要: <template> <view class=""> <view class="top"> <view class="search-box mt10 flex alcenter"> <view class="search-input"><u-search :showAction="false" pl 阅读全文
posted @ 2023-06-06 19:20 小闫的姑娘 阅读(120) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 10 下一页