自定义指令(公用)
// import ppbtn from './commons/ppbtn.js' //限制按钮连续点击次数过多
// Vue.use(ppbtn)
export default {
install(Vue) {
// 禁止短时间内重复点击
Vue.directive('ppbtn', {
inserted(button, bind) {
button.addEventListener('click', () => {
if (!button.disabled) {
button.disabled = true;
setTimeout(() => {
button.disabled = false
}, 300000)
}
})
}
})
}
}
ctrl+a 背景色巧妙隐藏
/*ctrl+a 背景色巧妙隐藏*/
.ppbtn{
float: right;
.ppbtned{
color:#ffffff;
background-color: #ffffff;
border: 3px #ffffff solid;
}
}