跳转到内容

Widget:Uploader:修订间差异

来自萌娘共享
Vue2转为mw自带Vue3
(编辑自 Special:Permalink/2589047) // Edit Via InPageEdit
标签手工回退
 
(未显示2个用户的4个中间版本)
第4行: 第4行:
"use strict";
"use strict";
window.RLQ = window.RLQ || [];
window.RLQ = window.RLQ || [];
window.RLQ.push([["mediawiki.api", "jquery", "vue"], async (Vue) => {
window.RLQ.push([["mediawiki.api", "jquery", "vue"], async () => {
     if (mw.config.get("wgPageName") !== "MediaWiki:Uploader") {
     if (mw.config.get("wgPageName") !== "MediaWiki:Uploader") {
         return;
         return;
第640行: 第640行:
         },
         },
     }).attach().classes;
     }).attach().classes;
     const { createApp, defineComponent } = Vue;
     const { createApp, defineComponent } = window.Vue;
     const App = defineComponent({
     const App = defineComponent({
         template: template,
         template: template,
第844行: 第844行:
                 if (!url) { return; }
                 if (!url) { return; }
                 this.files.push(this.createFileItem(url));
                 this.files.push(this.createFileItem(url));
            },
            copyFileName(fileName) {
                const inputTag = document.createElement("input");
                inputTag.value = fileName;
                inputTag.style.cssText = "position: fixed; left: -9999px;";
                document.body.appendChild(inputTag);
                inputTag.focus();
                document.execCommand("selectAll");
                document.execCommand("copy");
                setTimeout(() => document.body.removeChild(inputTag), 1000);
             },
             },



2025年9月7日 (日) 22:13的最新版本