UNPKG

comic-plus

Version:

<p align="center"> <img width="200px" src="./logo.png"/> </p>

60 lines (59 loc) 1.93 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); const vue = require("vue"); const index = require("../../button/index.js"); require("../../../icons/index.js"); const components = require("../../../icons/components/components.js"); const _hoisted_1 = { key: 1, class: "cu-upload__trigger" }; const _hoisted_2 = { key: 0, class: "cu-upload__choose-item" }; const _sfc_main = /* @__PURE__ */ vue.defineComponent({ ...{ name: "CuUploadChoose" }, __name: "upload-choose", props: { type: { type: String, required: true }, disabled: Boolean }, emits: ["choose"], setup(__props, { emit: __emit }) { const emit = __emit; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [ vue.createElementVNode("span", { class: "cu-upload__choose-item", onClick: _cache[0] || (_cache[0] = ($event) => emit("choose")) }, [ vue.renderSlot(_ctx.$slots, "trigger", {}, () => [ __props.type === "list" ? (vue.openBlock(), vue.createBlock(vue.unref(index.CuButton), { key: 0, disabled: __props.disabled, size: "small", type: "primary" }, { default: vue.withCtx(() => _cache[1] || (_cache[1] = [ vue.createTextVNode("选择文件") ])), _: 1 }, 8, ["disabled"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [ vue.createVNode(vue.unref(components.Plus)) ])) ]) ]), _ctx.$slots["default"] ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, [ vue.renderSlot(_ctx.$slots, "default") ])) : vue.createCommentVNode("", true) ], 64); }; } }); exports.default = _sfc_main;