mint-loadmore报错 Ignored attempt to cancel a touchmove event with cancelable=false, for example beca...

vue mint-ui框架 在使用mt-loadmore时 滚动到底部,报错如下:

解决方法:

在需要滚动的标签外层 添加 touch-action: none样式

即在包含mt-loadmore的标签元素上添加此样式。

THE END !

 

---------- * 以下 深入了解touch-action *---------

CSS属性 touch-action 用于指定某个给定的区域是否允许用户操作,

以及如何响应用户操作(比如浏览器自带的划动、缩放等)。

touch-action: auto;  /* 初始值 */
touch-action: none;
touch-action: pan-x;
touch-action: pan-left;
touch-action: pan-right;
touch-action: pan-y;
touch-action: pan-up;
touch-action: pan-down;
touch-action: pinch-zoom;
touch-action: manipulation;

/* Global values */
touch-action: inherit;
touch-action: initial;
touch-action: unset;

auto

  当触控事件发生在元素上时,由浏览器来决定进行哪些操作,比如对viewport进行平滑、缩放等。

none

  当触控事件发生在元素上时,不进行任何操作。

pan-x

  启用单指水平平移手势。可以与 pan-y 、pan-up、pan-down 和/或 pinch-zoom 组合使用。

pan-y

  启用单指垂直平移手势。可以与 pan-x 、pan-left 、pan-right 和/或 pinch-zoom 组合使用。

manipulation

  浏览器只允许进行滚动和持续缩放操作。任何其它被auto值支持的行为不被支持。启用平移和缩小缩放手势,但禁用其他非标准手势,例如双击以进行缩放。 禁用双击可缩放功能可减少浏览器在用户点击屏幕时延迟生成点击事件的需要。 这是“pan-x pan-y pinch-zoom”(为了兼容性本身仍然有效)的别名。

pan-leftpan-right,pan-up,pan-down 

  启用以指定方向滚动开始的单指手势。 一旦滚动开始,方向可能仍然相反。 请注意,滚动“向上”(pan-up)意味着用户正在将其手指向下拖动到屏幕表面上,同样 pan-left 表示用户将其手指向右拖动。 多个方向可以组合,除非有更简单的表示(例如,“pan-left pan-right”无效,因为“pan-x”更简单,而“pan-left pan-down”有效)。

pinch-zoom

  启用多手指平移和缩放页面。 这可以与任何平移值组合。

 

转载于:https://www.cnblogs.com/bigsister/p/10773122.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
请修正下列代码:import socket import time import requests import re import tkinter as tk # 英文输入端 host = "192.168.185.60" # 服务器端可以写"localhost",可以为空字符串"",也为本机IP地址 port = 8888 # 端口号 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((host, port)) s.listen(1) conn, addr = s.accept() print('connected with', addr) def send_message(): trigger = input_text.get() input_text.delete(0, tk.END) chat_text.configure(state='normal') chat_text.insert(tk.END, 'You: ' + trigger + '\n') chat_text.configure(state='disable') s.sendall(trigger.encode()) data = s.recv(1024) data = data.decode() data2 = {'doctype': 'json', 'type': 'auto', 'i': ''} data2['i'] = data r = requests.get("http://fanyi.youdao.com/translate", params=data2) # 访问翻译网站 result = r.json() # 获取翻译内容 t1 = result.setdefault('translateResult') t2 = t1[0] t3 = t2[0] # 解层翻译内容 localTime = time.asctime(time.localtime(time.time())) chat_text.configure(state='normal') chat_text.insert(tk.END, 'Server: ' + t3.setdefault('tgt') + '\n') chat_text.insert(tk.END, '\n') chat_text.configure(state='disable') if trigger.lower() == 'Mint': # 发送Mint结束连接 s.close() conn.close() s.close() root = tk.Tk() root.title('Chat Window') chat_frame = tk.Frame(root) scrollbar = tk.Scrollbar(chat_frame) scrollbar.pack(side=tk.RIGHT, fill=tk.Y) chat_text = tk.Text(chat_frame, wrap=tk.WORD, yscrollcommand=scrollbar.set, state='disable') chat_text.pack(expand=True, fill=tk.BOTH) scrollbar.config(command=chat_text.yview) input_frame = tk.Frame(root) input_text = tk.Entry(input_frame) input_text.pack(side=tk.LEFT, expand=True, fill=tk.BOTH) send_button = tk.Button(input_frame, text='Send', command=send_message) send_button.pack(side=tk.RIGHT) chat_frame.pack(expand=True, fill=tk.BOTH) input_frame.pack(expand=True, fill=tk.BOTH) root.mainloop()
06-13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值