From fa7b938dca3cb362c9eab41bd236350327e837cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=9C=E6=81=92?= <2323333339@qq.com>
Date: Fri, 16 Apr 2021 18:00:42 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
assets/js/joe.short.js | 29 +++++++-----------
assets/js/joe.short.min.js | 2 +-
core/factory.php | 8 ++---
core/function.php | 2 +-
core/short.php | 12 +++-----
package.json | 2 +-
public/include.php | 4 +--
typecho/write/css/joe.write.min.css | 2 +-
typecho/write/css/joe.write.min.scss | 46 ++++++++++++++++++++++++++++
typecho/write/js/_actions.js | 38 +++++++++++++++++++++++
typecho/write/js/_create.js | 1 +
typecho/write/js/_tools.js | 5 +++
typecho/write/js/joe.write.chunk.js | 29 ++++++++++++++++--
typecho/write/js/joe.write.js | 3 ++
14 files changed, 144 insertions(+), 39 deletions(-)
diff --git a/assets/js/joe.short.js b/assets/js/joe.short.js
index 0530ecb..3fb55ba 100644
--- a/assets/js/joe.short.js
+++ b/assets/js/joe.short.js
@@ -91,12 +91,6 @@ document.addEventListener('DOMContentLoaded', () => {
}
}
window.customElements.define('joe-abtn', JoeAbtn);
-
- /*
- ------------------------以下未测试------------------------------------------
- */
-
- /* 便条按钮 */
class JoeAnote extends HTMLElement {
constructor() {
super();
@@ -104,22 +98,21 @@ document.addEventListener('DOMContentLoaded', () => {
icon: this.getAttribute('icon') || 'fa-download',
href: this.getAttribute('href') || '#',
type: /^secondary$|^success$|^warning$|^error$|^info$/.test(this.getAttribute('type')) ? this.getAttribute('type') : 'secondary',
- content: this.innerHTML.trim().replace(/^(
)|(
)$/g, '') || '标签按钮'
+ content: this.getAttribute('content') || '标签按钮'
};
- this.render();
- }
- get template() {
- return `
-
- ${this.options.content}
-
- `;
- }
- render() {
- this.innerHTML = this.template;
+ this.innerHTML = `
+
+ ${this.options.content}
+
+ `;
}
}
window.customElements.define('joe-anote', JoeAnote);
+
+ /*
+ ------------------------以下未测试------------------------------------------
+ */
+
/* 点击复制 */
class JoeCopy extends HTMLElement {
constructor() {
diff --git a/assets/js/joe.short.min.js b/assets/js/joe.short.min.js
index 27327e8..441ef9b 100644
--- a/assets/js/joe.short.min.js
+++ b/assets/js/joe.short.min.js
@@ -1 +1 @@
-document.addEventListener("DOMContentLoaded",()=>{class t extends HTMLElement{constructor(){super(),this.innerHTML=`\n\t\t\t\t