element-ui 캐러셀 버튼 스타일 수정
.el-carousel__arrow {
width: 30px;
height: 30px;
top: 55%;
background-color: transparent;
.el-icon-arrow-right:before {
content: none;
}
.el-icon-arrow-left:before {
content: none;
}
}
.el-carousel__arrow--left {
background: url(../../../images/left-checked.png);
background-size: 100%;
}
.el-carousel__arrow--right {
background: url(../../../images/right-checked.png);
background-size: 100%;
}
}
scss 공개 경로 사용
$commonUrl: "../../../images/";
background: url($commonUrl+'down.png') no-repeat left center;
그러나 이것의 단점은 vscode 플러그인을 통해 아이콘을 볼 수 없다는 것입니다.
VSCode 이미지 미리보기 플러그인 이미지 미리보기
버튼 텍스트 수정, 현재 요소의 텍스트 수정
<em @click="togglebox($event)">收缩</em>
togglebox:function(e){
this.boxshow = !this.boxshow;
if(this.boxshow==true){
e.toElement.innerHTML="收缩";
}else{
e.toElement.innerHTML="展开";
}
},
scss 스타일 상속 @extend
<style lang="scss" scoped>
.blue {
cursor: pointer;
min-width: 80px;
color: #fff;
font-size: 14px;
border-radius: 6px !important;
}
.blues {
@extend .blue;
height: 38px;
}
</style>
Vue는 탭 전환 또는 페이지 이동 시 마지막 인터페이스 요청을 취소합니다.
main.js 요청 인터셉터에 쓰기
window._axiosPromiseArr = []; // axios中设置放置要取消的对象
Vue.prototype.$http.interceptors.request.use(config => {
const token = localStorage.getItem("header");
if (token) {
config.headers.Authorization = token;
}
// console.log('config的路径,参数 :>> ', config.url,config.data);
if (
config.url.indexOf("getTradeSetting") > -1 ||
config.url.indexOf("address/list") > -1 ||
config.url.indexOf("dic/data_dic") > -1
) {
//配置请求不取消
return config;
}
config.cancelToken = new axios.CancelToken(cancel => {
window._axiosPromiseArr.push({ cancel });
});
return config;
});
router.js 라우팅 구성 파일에서
router.beforeEach((to, from, next) => {
//匹配元路由中的meta字段,如果设置了需要校验用户信息
//如果用户本地没有登录状态,跳转到登录页面
window._axiosPromiseArr.forEach((ele, index) => {
ele.cancel(); // 路由跳转之前,清空(终止)上一个页面正在请求的内容
// 清空请求的参数 清空请求的参数
delete window._axiosPromiseArr[index];
});
});
특정 vue 파일에서 탭 스위치를 클릭하십시오.
toggleTabs() {
window._axiosPromiseArr.forEach((ele, index) => {
ele.cancel(); // 路由跳转之前,清空(终止)上一个页面正在请求的内容
// 清空请求的参数 清空请求的参数
delete window._axiosPromiseArr[index];
});}
vscode 단축키
Ctrl+Shift+L 또는 Ctrl+F2 모든 문자 선택 - 현재 선택 항목의 모든 항목을 선택합니다.
터미널을 열려면 Ctrl+Shift+C
새 터미널을 생성하려면 Ctrl+Shift+`
개요: 없음, 적용되지 않음
input {
outline: none;
}
해결책
input {
float: none;
&:focus{
border-color: #dcdfe6;
outline: none;
box-shadow:none;
}
}