您好,您可以通过监听FloatingObjectChanged事件来实现这个需求:
Code:- var customFloatingObject =
- new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
- var btn = document.createElement("button");
- btn.style.width = "60px";
- btn.style.height = "30px";
- btn.innerText = "button";
- customFloatingObject.content(btn);
- sheet.floatingObjects.add(customFloatingObject);
- sheet.bind(
- GC.Spread.Sheets.Events.FloatingObjectChanged,
- function (e, info) {
- console.log(info);
- }
- );
复制代码
|