1 parent
9e7d0aeee6
commit
e64a8e9bc5
26 files changed
+1111
-77
No files matched your search
@@ -0,0 +1,43 @@
|
||||
|
||||
//这个函数在整个wps加载项中是第一个执行的
|
||||
function OnAddinLoad(ribbonUI) {
|
||||
if (typeof (window.Application.ribbonUI) != "object") {
|
||||
window.Application.ribbonUI = ribbonUI
|
||||
}
|
||||
|
||||
if (typeof (window.Application.Enum) != "object") { // 如果没有内置枚举值
|
||||
window.Application.Enum = WPS_Enum
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
function OnAction(control) {
|
||||
const eleId = control.Id
|
||||
switch (eleId) {
|
||||
case "btnShowAbout":
|
||||
{
|
||||
alert("关于我们\n\n作者:Jianxin\n\n版本:1.0.0\n\n说明:自动化插件\n\n感谢使用!")
|
||||
}
|
||||
break;
|
||||
case "contactAuthor":
|
||||
{
|
||||
wps.ShowDialog(GetUrlPath() + "/ui/author.html", "联系作者", 400 * window.devicePixelRatio, 400 * window.devicePixelRatio, false)
|
||||
}
|
||||
default:
|
||||
break
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
function GetImage(control) {
|
||||
const eleId = control.Id
|
||||
switch (eleId) {
|
||||
case "btnShowAbout":
|
||||
return "images/about.svg"
|
||||
default:
|
||||
;
|
||||
}
|
||||
return "images/newFromTemp.svg"
|
||||
}
|
||||
Reference in new issue
Block a user