diff --git a/settings.yaml b/settings.yaml index 686335f0..ea796a49 100644 --- a/settings.yaml +++ b/settings.yaml @@ -478,3 +478,8 @@ spec: value: true - label: 关闭 value: false + - $formkit: url + name: img_error + label: 图片加载失败图 + help: 图片加载失败时显示的图片 + placeholder: 请输入图片 url \ No newline at end of file diff --git a/templates/assets/zhheo/blogex.js b/templates/assets/zhheo/blogex.js index a6cfac0a..c50264ce 100644 --- a/templates/assets/zhheo/blogex.js +++ b/templates/assets/zhheo/blogex.js @@ -282,3 +282,12 @@ window.onscroll = function () { percent(); }; + + +function imgError(url) { + $("img").on("error", function () { + $(this).attr("src", url); + }); +} + + diff --git a/templates/category.html b/templates/category.html index ac97d343..65ff86f1 100644 --- a/templates/category.html +++ b/templates/category.html @@ -17,9 +17,9 @@ 首页
@@ -36,7 +36,8 @@