UNPKG

@ccos/webos-vue

Version:

A Web-Ui Framework for Skyworth/Coocaa TV

65 lines (64 loc) 2.52 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); const vue = require("vue"); const index = require("./index5.js"); require("./index33.js"); const _pluginVue_exportHelper = require("./index34.js"); const _sfc_main = { __name: "button", props: { type: String, size: String, //small,default,large text: String, lefticon: String, //icon在左侧 righticon: String, //icon在右侧 loading: Boolean //是否为加载中状态 }, setup(__props) { const props = __props; const hasText = vue.computed(() => props.text !== null && props.text !== void 0); return (_ctx, _cache) => { return hasText.value ? (vue.openBlock(), vue.createElementBlock("button", { key: 0, class: vue.normalizeClass([[__props.size, "type-" + __props.type], "tv-button"]) }, [ vue.createElementVNode("div", { class: vue.normalizeClass([__props.loading ? "loading" : "", "lefticon"]) }, [ __props.lefticon ? (vue.openBlock(), vue.createBlock(index.default, { key: 0, type: __props.lefticon }, null, 8, ["type"])) : vue.createCommentVNode("", true) ], 2), vue.createTextVNode(" " + vue.toDisplayString(__props.text) + " ", 1), vue.createElementVNode("div", { class: vue.normalizeClass([__props.loading ? "loading" : "", "righticon"]) }, [ __props.righticon ? (vue.openBlock(), vue.createBlock(index.default, { key: 0, type: __props.righticon }, null, 8, ["type"])) : vue.createCommentVNode("", true) ], 2) ], 2)) : (vue.openBlock(), vue.createElementBlock("button", { key: 1, class: vue.normalizeClass([[__props.size, "type-" + __props.type, "icon-" + __props.size], "tv-button"]) }, [ vue.createElementVNode("div", { class: vue.normalizeClass(__props.loading ? "loading" : ""), style: { "display": "inline-block" } }, [ __props.lefticon != "" || __props.righticon != "" ? (vue.openBlock(), vue.createBlock(index.default, { key: 0, type: __props.lefticon || __props.righticon }, null, 8, ["type"])) : vue.createCommentVNode("", true) ], 2) ], 2)); }; } }; const TvButton = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-421740cb"]]); exports.default = TvButton;