|
|
@ -232,7 +232,6 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
created() { |
|
|
|
// 获取现在的时间 |
|
|
|
// 获取现在的时间 |
|
|
|
|
|
|
|
|
|
|
|
this.nowDate = (() => { |
|
|
|
this.nowDate = (() => { |
|
|
|
const date = new Date() |
|
|
|
const date = new Date() |
|
|
|
var y = date.getFullYear(); |
|
|
|
var y = date.getFullYear(); |
|
|
@ -246,23 +245,6 @@ export default { |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
closeIt() { |
|
|
|
closeIt() { |
|
|
|
this.$emit('update:showImg', false) |
|
|
|
this.$emit('update:showImg', false) |
|
|
|
}, |
|
|
|
|
|
|
|
test() { |
|
|
|
|
|
|
|
console.log('jinitaimei!') |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
debounce(fn,delay) { |
|
|
|
|
|
|
|
let time= null; // 私有化数据 |
|
|
|
|
|
|
|
return function (){ |
|
|
|
|
|
|
|
let context = this,args = arguments; |
|
|
|
|
|
|
|
if(time) { // 下一次点击的时候获取到上一下的time,也就是保持数据。 |
|
|
|
|
|
|
|
clearTimeout(time) |
|
|
|
|
|
|
|
// 思考题 这里要不要清空time |
|
|
|
|
|
|
|
// time = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
time = setTimeout(function (){ |
|
|
|
|
|
|
|
fn.apply(context,args); |
|
|
|
|
|
|
|
},delay) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|