Jump to content

User:Chlod/sandbox.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
mw.loader.using([
	"vue",
	"@wikimedia/codex"
], (require) => {
	"use strict";
	const e = require("vue"), i = require("@wikimedia/codex");
	const l = e.defineComponent({components: {CdxButton: i.CdxButton}});
	const p = (t, n) => {
	    const o = t.__vccOpts || t;
	    for (const [r, c] of n) o[r] = c;
	    return o
	}, d = t => (
	    e.pushScopeId("data-v-6ef96ef5"), t = t(), e.popScopeId(), t
	), u = d(() => e.createElementVNode("h1", null, "Welcome to Codex", -1));
	
	function f(t, n, o, r, c, m) {
	    const s = e.resolveComponent("cdx-button");
	    return e.openBlock(), e.createElementBlock(
	        "main", null, [
	            u,
	            e.createVNode(
	                s, {action: "progressive", weight: "primary"},
	                {default: e.withCtx(() => [e.createTextVNode(" Click me! ")]), _: 1}
	            )
	        ])
	}
	
	const a = p(l, [["render", f], ["__scopeId", "data-v-6ef96ef5"]]);
	e.createApp(a).mount("#app");
});