魔改ELEMENT(测试版)
// ==UserScript==
// @name 魔改ELEMENT(测试版)
// @namespace http://tampermonkey.net/
// @version 0.6
// @description try to take over the world!
// @author You
// @match https://bbs.tampermonkey.net.cn/forum.php
// @icon https://www.google.com/s2/favicons?domain=tampermonkey.net.cn
//@resource ELEMENT_CSS https://cdn.jsdelivr.net/npm/element-plus/dist/index.css
// @require https://raw.githubusercontent.com/lihengdao666/Modify-Tampermonkey-Libs/master/vue.js
// @require https://raw.githubusercontent.com/lihengdao666/Modify-Tampermonkey-Libs/master/element.js
// @grant unsafeWindow
// @grant GM_getResourceText
// @grant GM_addStyle
// ==/UserScript==
const elementcss = GM_getResourceText("ELEMENT_CSS");
GM_addStyle(elementcss);
let text=`<div id="app" style="position: absolute;top: 50vh;left: 50vw;background: #fb7d7d;width: 100px;height: 100px;">
<el-button>{{ message }}</el-button>
</div>`
var el=document.createElement('div')
el.innerHTML=text;
document.body.append(el)
const App = {
data() {
return {
message: "Hello Element Plus",
};
},
};
const app = Vue.createApp(App);
app.use(ElementPlus);
app.mount("#app");