您这个是参考那个demo做的,那个小三角应该是在paint方法中绘制的,
比如这个demo
http://demo.gcpowertools.com.cn/spreadjs/doublecolor_treegrid/ 就是画了个三角- if (collapsed) {
- ctx.moveTo(x - 5, y);
- ctx.lineTo(x, y + 3);
- ctx.lineTo(x - 5, y + 6);
- } else {
- ctx.moveTo(x, y);
- ctx.lineTo(x, y + 5);
- ctx.lineTo(x - 5, y + 5);
- }
- ctx.fill();
复制代码 |