fix: Tree展开/收起同步三角图标状态; 模块JS注入统一加版本参数防缓存(20260831a)

This commit is contained in:
yumoqing 2026-08-30 21:53:26 +08:00
parent 2d145ddf8e
commit a77200c5ae
2 changed files with 6 additions and 2 deletions

View File

@ -37,9 +37,9 @@
<script type="module"
src="{{entire_url('/bricks/3parties/model-viewer.min.js')}}">
</script>
<script src="{{entire_url('/bricks/bricks.js')}}?v={% if assets_ver %}{{assets_ver()}}{% else %}20260830e{% endif %}"></script>
<script src="{{entire_url('/bricks/bricks.js')}}?v={% if assets_ver %}{{assets_ver()}}{% else %}20260831a{% endif %}"></script>
{% for myjs in jsfiles() %}
<script src="{{entire_url(myjs)}}{% if assets_ver %}?v={{assets_ver()}}{% endif %}"></script>
<script src="{{entire_url(myjs)}}?v={% if assets_ver %}{{assets_ver()}}{% else %}20260831a{% endif %}"></script>
{% endfor %}
<script>
const opts = {

View File

@ -78,6 +78,8 @@ bricks.TreeNode = class extends bricks.VBox {
}
this.container.show();
if (this.icon_w && this.icons_urls.open) this.icon_w.set_url(this.icons_urls.open);
// 点击节点行展开时同步三角图标状态set_state 同状态去重,不会死循环)
if (this.triple) this.triple.set_state('open');
}
collapse(){
this.node_state = 'close'
@ -86,6 +88,8 @@ bricks.TreeNode = class extends bricks.VBox {
}
this.container.hide();
if (this.icon_w && this.icons_urls.close) this.icon_w.set_url(this.icons_urls.close);
// 收起时同步三角图标状态
if (this.triple) this.triple.set_state('close');
}
create_triple(){
return new bricks.StatedSvg({