pywebio / PyWebIO

Write interactive web app in script way.
https://pywebio.readthedocs.io
MIT License
4.49k stars 384 forks source link

use_scope()函数的clear=True参数似乎无效 #556

Closed honesthnter closed 1 year ago

honesthnter commented 1 year ago

BUG描述 use_scope()函数的clear=True参数似乎无效,无法清楚指定的scope的内容,要专门用clear()才能清除指定scope的内容

环境信息

wang0618 commented 1 year ago

请提供一个复现此问题的代码片段

honesthnter commented 1 year ago

下面的语句(缩进可能显示不正常) image

这个效果 image 之前用1.5.2没有这个问题

honesthnter commented 1 year ago

我是用tornado搭建的应用 image

honesthnter commented 1 year ago

通过自己的装饰器做的路由:

建立影射列表 image

调用影射的对应函数 image

wang0618 commented 1 year ago

请确认输出了hello1和hello2的页面是调用了你贴出来的tt函数,你可以在tt函数中新增输出其他内容,看看页面显不显示。

我怀疑你那个输出了hello1和hello2的页面并不是调用的 tt函数

honesthnter commented 1 year ago

是调用的,我用clear可以清除。我这个路由框架用了有1年了,我现在在1.5.2还在用的。

image

image

wang0618 commented 1 year ago

感觉是 webio-handler中传入的cdn和pywebio版本不对应

honesthnter commented 1 year ago

哦,对对,要同步更新,我更新pywebio组件,没有更新cdn,应该是这个问题,我试一下。