let scale9Sprite = new ccui.Scale9Sprite(filePath);scale9Sprite.setCapInsets(cc.rect(x,y,w,h));而非
let scale9Sprite = new ccui.Scale9Sprite(filePath,cc.rect(x,y,w,h));