UNPKG

vxe-design

Version:

A PC-based visual designer based on Vxe UI, used for building zero-code and low-code platforms

54 lines (53 loc) 1.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WidgetTextViewComponent = void 0; var _vue = require("vue"); var _comp = require("../../ui/src/comp"); var _core = require("@vxe-ui/core"); var _use = require("../../form-design/src/use"); const WidgetTextViewComponent = exports.WidgetTextViewComponent = (0, _comp.defineVxeComponent)({ props: { renderOpts: { type: Object, default: () => ({}) }, renderParams: { type: Object, default: () => ({}) } }, emits: [], setup(props) { const VxeUIFormItemComponent = _core.VxeUI.getComponent('vxe-form-item'); const { computeKebabCaseName } = (0, _use.useWidgetName)(props); return () => { const { renderParams } = props; const { widget } = renderParams; const { options } = widget; const kebabCaseName = computeKebabCaseName.value; return (0, _vue.h)(VxeUIFormItemComponent, { class: ['vxe-form-design--widget-render-form-item', `widget-${kebabCaseName}`], align: options.align }, { default() { return (0, _vue.h)('div', { style: { fontSize: options.fontSize, fontWeight: options.bold ? 'bold' : '' } }, widget.title); } }); }; } });