fix: Tree展开/收起同步三角图标状态; 模块JS注入统一加版本参数防缓存(20260831a)
This commit is contained in:
parent
2d145ddf8e
commit
a77200c5ae
@ -37,9 +37,9 @@
|
|||||||
<script type="module"
|
<script type="module"
|
||||||
src="{{entire_url('/bricks/3parties/model-viewer.min.js')}}">
|
src="{{entire_url('/bricks/3parties/model-viewer.min.js')}}">
|
||||||
</script>
|
</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() %}
|
{% 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 %}
|
{% endfor %}
|
||||||
<script>
|
<script>
|
||||||
const opts = {
|
const opts = {
|
||||||
|
|||||||
@ -78,6 +78,8 @@ bricks.TreeNode = class extends bricks.VBox {
|
|||||||
}
|
}
|
||||||
this.container.show();
|
this.container.show();
|
||||||
if (this.icon_w && this.icons_urls.open) this.icon_w.set_url(this.icons_urls.open);
|
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(){
|
collapse(){
|
||||||
this.node_state = 'close'
|
this.node_state = 'close'
|
||||||
@ -86,6 +88,8 @@ bricks.TreeNode = class extends bricks.VBox {
|
|||||||
}
|
}
|
||||||
this.container.hide();
|
this.container.hide();
|
||||||
if (this.icon_w && this.icons_urls.close) this.icon_w.set_url(this.icons_urls.close);
|
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(){
|
create_triple(){
|
||||||
return new bricks.StatedSvg({
|
return new bricks.StatedSvg({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user