摘要: package com.atjava.test; class WindowRun implements Runnable{ private int ticket = 100; @Override public void run() { while (true){ if(ticket > 0){ tr 阅读全文
posted @ 2023-08-21 01:13 sgj191024 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 1、继承Thread public class ThreadTest { public static void main(String[] args) { MyThread myThread = new MyThread(); myThread.start(); for (int i = 0; i 阅读全文
posted @ 2023-08-18 00:37 sgj191024 阅读(5) 评论(0) 推荐(0) 编辑
摘要: data(){ return{ searchParams : { "category1Id": "", "category2Id": "", "category3Id": "", "categoryName": "", "keyword": "", "order": "", "pageNo": 1, 阅读全文
posted @ 2023-08-10 00:30 sgj191024 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 这里使用的是swiper5 npm install swiper@5 main.js引入 import "swiper/css/swiper.min.css" 页面用 import Swiper from "swiper"; <div class="swiper-container" id="myS 阅读全文
posted @ 2023-08-06 22:41 sgj191024 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 点击三级分类跳转的时候带上了query参数,然后再次点击关键字搜索,需要把keyword和原来的参数合并 console.log("qury",this.$route.query); let query = JSON.parse(JSON.stringify(this.$route.query)) 阅读全文
posted @ 2023-08-05 23:35 sgj191024 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 要过度的元素需要有v-if或者v-show,用transition包裹 <transition name="sort"> <div class="sort" v-show="show"> <div class="all-sort-list2" @click="goSearch"> <div clas 阅读全文
posted @ 2023-08-05 22:13 sgj191024 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 1、因为一级,二级,三级分类都是a标签for循环出来的,如果我们直接给他加点击事件,假设循环了1000个a标签,就会有1000个点击事件,这回非常损耗性能,如果利用事件委派去做,就只用一次 自定义属性 <a href="#" :data-categoryname="c1.categoryName"> 阅读全文
posted @ 2023-08-04 01:21 sgj191024 阅读(11) 评论(0) 推荐(0) 编辑
摘要: import _ from "lodash" // 节流 // change:_.throttle(function(){ // console.log(123); // },1000) // 防抖 change:_.debounce(function(){ console.log(123); }, 阅读全文
posted @ 2023-08-03 01:18 sgj191024 阅读(59) 评论(0) 推荐(0) 编辑
摘要: mouse over时 this.currentIndex = index,给item项加动态样式 :class="{ cur : currentIndex==index}" .cur{ background-color: skyblue; } 方式一: 在二级分类的平级 &表示二级分类的上一级 & 阅读全文
posted @ 2023-08-03 01:17 sgj191024 阅读(222) 评论(0) 推荐(0) 编辑
摘要: import Vue from 'vue'; import Vuex from 'vuex'; Vue.use(Vuex); import home from "./home" import search from "./search" const store = new Vuex.Store({ 阅读全文
posted @ 2023-08-01 23:20 sgj191024 阅读(29) 评论(0) 推荐(0) 编辑