label-print-design
Version:
操作简单,组件丰富的一站式打印解决方案打印设计器
266 lines (261 loc) • 12.5 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
var vueDemi = require('vue-demi');
var business = require('./business.vue.js');
var basic = require('./basic.vue.js');
var custom = require('../../../constants/provider/custom.js');
var myScrollbar = require('../../my/scrollbar/my-scrollbar.vue.js');
var myWidgetCollapse = require('../../my/collapse/my-widget-collapse.vue.js');
var index = require('../../../locales/index.js');
var elementUtil = require('../../../utils/elementUtil.js');
var iconsVue = require('@element-plus/icons-vue');
const _hoisted_1 = { class: "option-container display-flex-column" };
const _hoisted_2 = { class: "option-container display-flex-column" };
const _hoisted_3 = { style: { "padding": "20px 20px 1px 20px", "background-color": "#fff", "border-bottom": "1px solid #dedede" } };
const _hoisted_4 = {
class: "display-flex display-flex-wrap design-btn",
style: { "gap": "5px", "padding-left": "20px" }
};
const _hoisted_5 = {
class: "display-flex",
style: { "flex-wrap": "wrap", "padding-left": "20px" }
};
const _hoisted_6 = {
class: "display-flex display-flex-wrap",
style: { "gap": "5px", "padding-left": "20px" }
};
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
__name: "index",
props: {
moduleName: { default: index.i18n("common.default.name") },
showBackButton: { type: Boolean, default: true }
},
emits: ["back"],
setup(__props, { emit: __emit }) {
const $emit = __emit;
const provider = elementUtil.getProvider();
function back() {
$emit("back");
}
const state = vueDemi.reactive({
labelType: "",
name: "",
paperWidth: 100,
paperHeight: 100,
flipText: "\u65CB\u8F6C180\u5EA6",
autoWrap: 0
});
return (_ctx, _cache) => {
const _component_el_option = vue.resolveComponent("el-option");
const _component_el_select = vue.resolveComponent("el-select");
const _component_el_form_item = vue.resolveComponent("el-form-item");
const _component_el_input = vue.resolveComponent("el-input");
const _component_el_radio_button = vue.resolveComponent("el-radio-button");
const _component_el_radio_group = vue.resolveComponent("el-radio-group");
const _component_el_switch = vue.resolveComponent("el-switch");
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
vue.createElementVNode("div", _hoisted_2, [
vue.createVNode(myScrollbar.default, null, {
default: vue.withCtx(() => [
vue.createElementVNode("div", _hoisted_3, [
vue.createVNode(_component_el_form_item, {
label: "\u6807\u7B7E\u7C7B\u578B: ",
prop: "labelType",
"label-width": "98px"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_el_select, {
modelValue: vue.unref(state).labelType,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.unref(state).labelType = $event),
"suffix-icon": vue.unref(iconsVue.CaretBottom),
placeholder: "\u8BF7\u9009\u62E9"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_el_option, {
label: "\u4E3B\u6253\u5370\u673A",
value: 0
}),
vue.createVNode(_component_el_option, {
label: "\u8F85\u6253\u5370\u673A",
value: 1
})
]),
_: 1
/* STABLE */
}, 8, ["modelValue", "suffix-icon"])
]),
_: 1
/* STABLE */
}),
vue.createVNode(_component_el_form_item, {
label: "\u6807\u7B7E\u540D\u79F0: ",
prop: "name",
"label-width": "98px"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_el_input, {
modelValue: vue.unref(state).name,
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.unref(state).name = $event),
maxlength: "30",
placeholder: "",
style: { "width": "100%" }
}, null, 8, ["modelValue"])
]),
_: 1
/* STABLE */
})
]),
vue.createVNode(myWidgetCollapse.default, { title: "\u6761\u4EF6\u5C5E\u6027" }, {
default: vue.withCtx(() => [
vue.createElementVNode("div", _hoisted_4, [
vue.createVNode(_component_el_form_item, {
label: "\u6807\u7B7E\u5C3A\u5BF8: ",
prop: "widthHeight",
"label-width": "100px"
}, {
default: vue.withCtx(() => [
_cache[6] || (_cache[6] = vue.createElementVNode(
"span",
{ style: { "font-size": "20px", "color": "#0101017f" } },
"\u957F(mm)\xA0\xA0",
-1
/* HOISTED */
)),
vue.createVNode(_component_el_input, {
modelValue: vue.unref(state).paperWidth,
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.unref(state).paperWidth = $event),
disabled: "",
maxlength: "30",
placeholder: ""
}, null, 8, ["modelValue"]),
_cache[7] || (_cache[7] = vue.createTextVNode(" \xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0")),
_cache[8] || (_cache[8] = vue.createElementVNode(
"span",
{ style: { "font-size": "20px", "color": "#0101017f" } },
"\u5BBD(mm)\xA0\xA0",
-1
/* HOISTED */
)),
vue.createVNode(_component_el_input, {
modelValue: vue.unref(state).paperHeight,
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.unref(state).paperHeight = $event),
disabled: "",
maxlength: "30",
placeholder: ""
}, null, 8, ["modelValue"])
]),
_: 1
/* STABLE */
}),
vue.createVNode(_component_el_form_item, {
label: "\u65CB\u8F6C: ",
prop: "height",
"label-width": "60px"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_el_radio_group, {
modelValue: vue.unref(state).flipText,
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.unref(state).flipText = $event),
size: "large"
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_el_radio_button, {
label: "\u4E0D\u65CB\u8F6C",
value: "\u4E0D\u65CB\u8F6C"
}),
vue.createVNode(_component_el_radio_button, {
label: "\u65CB\u8F6C180\u5EA6",
value: "\u65CB\u8F6C180\u5EA6"
})
]),
_: 1
/* STABLE */
}, 8, ["modelValue"]),
_cache[9] || (_cache[9] = vue.createElementVNode(
"span",
{ style: { "font-size": "20px", "color": "rgba(1, 1, 1, 0.5)" } },
"\xA0\xA0\u81EA\u52A8\u6362\u884C: \xA0\xA0",
-1
/* HOISTED */
)),
vue.createVNode(_component_el_switch, {
modelValue: vue.unref(state).autoWrap,
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vue.unref(state).autoWrap = $event),
"active-value": 1,
"inactive-value": 0,
"inline-prompt": ""
}, null, 8, ["modelValue"])
]),
_: 1
/* STABLE */
})
])
]),
_: 1
/* STABLE */
}),
vue.createVNode(myWidgetCollapse.default, {
title: vue.unref(index.i18n)("common.common.widget")
}, {
default: vue.withCtx(() => [
vue.createElementVNode("div", _hoisted_5, [
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList(vue.unref(custom.customProvider).elementList, (element, index) => {
return vue.openBlock(), vue.createBlock(basic.default, {
key: index,
data: element,
pageUnit: vue.unref(custom.customProvider).pageUnit
}, null, 8, ["data", "pageUnit"]);
}),
128
/* KEYED_FRAGMENT */
))
]),
vue.createCommentVNode(' <el-collapse-item title="\u8BBE\u8BA1\u8F85\u52A9" name="3" v-if="auxiliaryProvider.length> 0">'),
vue.createCommentVNode(' <div class="display-flex" style="flex-wrap: wrap;">'),
vue.createCommentVNode(' <basic v-for="(element, index) in auxiliaryProvider" :key="index" :data="element" />'),
vue.createCommentVNode(" </div>"),
vue.createCommentVNode(" </el-collapse-item>")
]),
_: 1
/* STABLE */
}, 8, ["title"]),
vue.unref(provider).elementList != null && vue.unref(provider).elementList.length > 0 ? (vue.openBlock(), vue.createBlock(myWidgetCollapse.default, {
key: 0,
title: vue.unref(index.i18n)("common.business.widget")
}, {
default: vue.withCtx(() => [
vue.createElementVNode("div", _hoisted_6, [
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList(vue.unref(provider).elementList, (element, index) => {
return vue.openBlock(), vue.createBlock(business.default, {
key: index,
data: element,
pageUnit: vue.unref(provider).pageUnit
}, null, 8, ["data", "pageUnit"]);
}),
128
/* KEYED_FRAGMENT */
))
])
]),
_: 1
/* STABLE */
}, 8, ["title"])) : vue.createCommentVNode("v-if", true)
]),
_: 1
/* STABLE */
})
]),
vue.createCommentVNode(' <div class="option-bottom">\n <img class="my-logo" src="../../../assets/myprint-logo.png" alt="my-logo"/>\n <div class="my-version">{{ _package.version }}</div>\n </div> ')
]);
};
}
});
exports.default = _sfc_main;
//# sourceMappingURL=index.vue2.js.map