mirror of
https://github.com/any86/any-rule.git
synced 2025-07-14 15:38:58 +08:00
fix: 暂时取消autoFoucs
This commit is contained in:
parent
cd33cf683a
commit
849cd6de02
@ -11,6 +11,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"clipboard": "^2.0.4",
|
"clipboard": "^2.0.4",
|
||||||
"core-js": "^2.6.5",
|
"core-js": "^2.6.5",
|
||||||
|
"lodash": "^4.17.11",
|
||||||
"node-sass": "^4.12.0",
|
"node-sass": "^4.12.0",
|
||||||
"sass-loader": "^7.1.0",
|
"sass-loader": "^7.1.0",
|
||||||
"vue": "^2.6.10"
|
"vue": "^2.6.10"
|
||||||
|
20
src/App.vue
20
src/App.vue
@ -81,6 +81,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import RULES from '@/RULES';
|
import RULES from '@/RULES';
|
||||||
import ClipboardJS from 'clipboard';
|
import ClipboardJS from 'clipboard';
|
||||||
|
import throttle from 'lodash/throttle';
|
||||||
export default {
|
export default {
|
||||||
name: 'app',
|
name: 'app',
|
||||||
|
|
||||||
@ -90,6 +91,7 @@ export default {
|
|||||||
Object.freeze(RULES.reverse());
|
Object.freeze(RULES.reverse());
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
timer: null,
|
||||||
keyword: '',
|
keyword: '',
|
||||||
rules: RULES,
|
rules: RULES,
|
||||||
list: RULES.map(() => ({
|
list: RULES.map(() => ({
|
||||||
@ -136,10 +138,18 @@ export default {
|
|||||||
this.$refs.searchInput.select();
|
this.$refs.searchInput.select();
|
||||||
},
|
},
|
||||||
|
|
||||||
mouseenterHandler(index) {
|
autoFocus(index) {
|
||||||
this.$refs.input[index].focus();
|
this.$refs.input[index].focus();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
mouseenterHandler(index){
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
// mouseenterHandler: throttle((index)=>{
|
||||||
|
// this.$refs.input[index].focus();
|
||||||
|
// },1000).bind(this),
|
||||||
|
|
||||||
reset(index) {
|
reset(index) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.list[index].value = '';
|
this.list[index].value = '';
|
||||||
@ -174,14 +184,16 @@ $radius: 4px;
|
|||||||
|
|
||||||
@keyframes shrinkBorder {
|
@keyframes shrinkBorder {
|
||||||
from {
|
from {
|
||||||
|
transform: translateY(-100%);
|
||||||
}
|
}
|
||||||
50% {
|
50% {
|
||||||
width: 30px;
|
width: 4px;
|
||||||
opacity: 0.62;
|
opacity: 0.62;
|
||||||
}
|
}
|
||||||
|
|
||||||
to {
|
to {
|
||||||
left: 0;
|
left: 0;
|
||||||
|
transform: translateY(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
main {
|
main {
|
||||||
@ -195,7 +207,7 @@ main {
|
|||||||
.fixed {
|
.fixed {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 1986;
|
z-index: 1986;
|
||||||
left: 15px;
|
right: 15px;
|
||||||
bottom: 15px;
|
bottom: 15px;
|
||||||
box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.1);
|
box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.1);
|
||||||
border-radius: $radius;
|
border-radius: $radius;
|
||||||
@ -271,7 +283,7 @@ main {
|
|||||||
border-radius: $radius;
|
border-radius: $radius;
|
||||||
border-color: #eee;
|
border-color: #eee;
|
||||||
> .border {
|
> .border {
|
||||||
animation: shrinkBorder 1s;
|
animation: shrinkBorder 0.5s;
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user