12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- // components/customPreviewImage/customPreviewImage.js
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- src: {
- type: String,
- value: '',
- },
- isShow: {
- type: Boolean,
- value: true
- }
- },
- /**
- * 组件的初始数据
- */
- data: {
- },
- /**
- * 组件的方法列表
- */
- methods: {
- handleClose() {
- console.log(this.endTime, this.startTime, this.endTime - this.startTime)
- if (this.endTime - this.startTime < 350) {
- this.triggerEvent("closeCallback")
- }
- },
- handleStart() {
- this.startTime = new Date().getTime()
- },
- handleEnd() {
- this.endTime = new Date().getTime()
- },
- longPress() {
- // nothing to do
- }
- }
- })
|