添加创建箭头的方法。

scripts
王良 2024-04-24 10:51:20 +08:00
parent 3193e8a00f
commit ace82a268a
1 changed files with 10 additions and 0 deletions

View File

@ -220,6 +220,16 @@
body.prepend(context.pluginElement);
}
// 创建箭头
api.createArrow = (options) => {
// 创建箭头元素
context.arrowElement = document.createElement('div');
context.arrowElement.id = PRE + "arrow";
context.arrowElement.className = "____ds-arrow___";
// 将箭头元素添加到插件div中
context.pluginElement.append(context.arrowElement);
}
// 隐藏插件
api.hidePlugin = () => {
if (context.pluginElement) {