您好,感谢您提供了可重现问题的Demo,
您在代码中使用了jquery的animate 函数来改变div样式,
改变完成后需要回调一下spread.refresh()
我把改动部分的代码贴在这里:
- $("#btn").click(function() {
- var spread = GC.Spread.Sheets.findControl("ss");
- var callback = function(){
- spread.refresh();
- }
- if(Select_show === 1) {
- $(".section3").stop().animate({
- height: "899px",
- width: '1920px'
- },
- "slow",
- null,
- callback
- );
- $("#vp_vp").stop().animate({
- height: "800px",
- width: '1890px'
- },
- "slow",
- null,
- callback
- );
- $("#vp").stop().animate({
- height: "800px",
- width: '1890px'
- },
- "slow",
- null,
- callback
- );
- Select_show=0;
- } else {
- $(".section3").stop().animate({
- height: "545px",
- maxWidth: '1810px'
- },
- "slow",
- null,
- callback
- );
- $("#vp_vp").stop().animate({
- height: "474px",
- width: '1788px'
- },
- "slow",
- null,
- callback
- );
- $("#vp").stop().animate({
- height: "474px",
- width: '1788px'
- },
- "slow",
- null,
- callback
- );
- Select_show=1;
-
- }
- })
复制代码 |