如何将缓出转换应用于Visual Studio Code API中的TextEditorDecorationType
?
var flashDecorationType = vscode.window.createTextEditorDecorationType({
backgroundColor: 'rgba(100,200,100,0.5)'
});
var range = getCurrentRange();
var decoration = { range: range }
activeEditor.setDecorations(flashDecorationType, [decoration]);
上面的代码应用了装饰,但它是静态的,我希望背景颜色在1秒内消失。这可以在vscode中完成吗?
我希望能够做到这样的事情:
var flashDecorationType = vscode.window.createTextEditorDecorationType({
backgroundColor: 'rgba(100,200,100,0.5)',
transition: 'backgroundColor 1s ease-out'
});