@kp-ui/lowcode 2.16.0 → 2.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/form-designer/form-widget/field-widget/useField.js +94 -94
- package/src/components/form-designer/form-widget/field-widget/useField.js.map +1 -1
- package/src/components/form-render/container-items/grid-widget.vue.js +2 -2
- package/src/components/form-render/container-items/grid-widget.vue2.js +1 -1
- package/src/components/form-render/container-items/grid-widget.vue2.js.map +1 -1
- package/src/components/form-render/container-items/vf-box-widget.vue.js +2 -2
- package/src/components/form-render/container-items/vf-box-widget.vue2.js +12 -12
- package/src/components/form-render/container-items/vf-box-widget.vue2.js.map +1 -1
- package/stats.html +1 -1
- package/styles/style.css +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as m, computed as s, createBlock as g, createCommentVNode as f, unref as l, openBlock as t, normalizeProps as u, mergeProps as x, withCtx as b, createElementBlock as w, normalizeStyle as c, createVNode as R } from "vue";
|
|
2
2
|
import $ from "../RenderWigetList.vue.js";
|
|
3
3
|
import v from "./container-wrapper.vue.js";
|
|
4
4
|
import { ComponentNameEnum as h, ContainerTypeEnum as B } from "../../../constants/WidgetTypeEnum.js";
|
|
5
5
|
import { useField as F } from "../../form-designer/form-widget/field-widget/useField.js";
|
|
6
|
-
const k = /* @__PURE__ */
|
|
6
|
+
const k = /* @__PURE__ */ m({
|
|
7
7
|
name: B.VfBoxWidget,
|
|
8
8
|
componentName: h.VfBoxWidget,
|
|
9
9
|
__name: "vf-box-widget",
|
|
@@ -17,24 +17,24 @@ const k = /* @__PURE__ */ a({
|
|
|
17
17
|
subFormRowId: {}
|
|
18
18
|
},
|
|
19
19
|
setup(d, { expose: r }) {
|
|
20
|
-
const i = d, { handleHidden: n, defineExposed: p } = F(i),
|
|
21
|
-
const
|
|
22
|
-
return
|
|
20
|
+
const i = d, { handleHidden: n, defineExposed: p } = F(i, !1), a = s(() => {
|
|
21
|
+
const e = i.widget.options.boxModel || {}, o = {};
|
|
22
|
+
return e.borderShow && (o.borderRadius = `${e.borderRadius}px`, o.border = `${e.borderStyle} ${e.borderWidth}px ${e.borderColor}`), (e.paddingTop !== void 0 || e.paddingRight !== void 0 || e.paddingBottom !== void 0 || e.paddingLeft !== void 0) && (o.padding = `${e.paddingTop || 0}px ${e.paddingRight || 0}px ${e.paddingBottom || 0}px ${e.paddingLeft || 0}px`), (e.marginTop !== void 0 || e.marginRight !== void 0 || e.marginBottom !== void 0 || e.marginLeft !== void 0) && (o.margin = `${e.marginTop || 0}px ${e.marginRight || 0}px ${e.marginBottom || 0}px ${e.marginLeft || 0}px`), o;
|
|
23
23
|
});
|
|
24
24
|
return r({
|
|
25
25
|
...p
|
|
26
|
-
}), (
|
|
26
|
+
}), (e, o) => l(n) ? f("", !0) : (t(), g(v, u(x({ key: 0 }, i)), {
|
|
27
27
|
default: b(() => [
|
|
28
28
|
(t(), w("div", {
|
|
29
29
|
class: "box-container",
|
|
30
|
-
key:
|
|
31
|
-
style: c(
|
|
30
|
+
key: e.widget.id,
|
|
31
|
+
style: c(a.value)
|
|
32
32
|
}, [
|
|
33
33
|
R($, {
|
|
34
|
-
subFormRowIndex:
|
|
35
|
-
subFormRowId:
|
|
36
|
-
widgetList:
|
|
37
|
-
parentWidget:
|
|
34
|
+
subFormRowIndex: e.subFormRowIndex,
|
|
35
|
+
subFormRowId: e.subFormRowId,
|
|
36
|
+
widgetList: e.widget.widgetList || [],
|
|
37
|
+
parentWidget: e.widget
|
|
38
38
|
}, null, 8, ["subFormRowIndex", "subFormRowId", "widgetList", "parentWidget"])
|
|
39
39
|
], 4))
|
|
40
40
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vf-box-widget.vue2.js","sources":["../../../../../src/components/form-render/container-items/vf-box-widget.vue"],"sourcesContent":["<template>\n <container-wrapper v-bind=\"props\" v-if=\"!handleHidden\">\n <div class=\"box-container\" :key=\"widget.id\" :style=\"boxStyle\">\n <RenderWigetList\n :subFormRowIndex=\"subFormRowIndex\"\n :subFormRowId=\"subFormRowId\"\n :widgetList=\"widget.widgetList || []\"\n :parentWidget=\"widget\"\n />\n </div>\n </container-wrapper>\n</template>\n\n<script lang=\"ts\" setup>\n import RenderWigetList from '../RenderWigetList.vue';\n import ContainerWrapper from './container-wrapper.vue';\n import { WidgetProps } from '@/components/form-designer/form-widget/container-widget/useContainerWidget';\n import { computed, CSSProperties } from 'vue';\n import { ComponentNameEnum, ContainerTypeEnum } from '@/constants/WidgetTypeEnum';\n import { useField } from '@/components/form-designer/form-widget/field-widget/useField';\n\n defineOptions({\n name: ContainerTypeEnum.VfBoxWidget,\n componentName: ComponentNameEnum.VfBoxWidget\n });\n\n const props = defineProps<WidgetProps>();\n const { handleHidden, defineExposed } = useField(props);\n const boxStyle = computed(() => {\n const boxModel = props.widget.options.boxModel || {};\n const style = {} as CSSProperties;\n\n if (boxModel.borderShow) {\n style.borderRadius = `${boxModel.borderRadius}px`;\n style.border = `${boxModel.borderStyle} ${boxModel.borderWidth}px ${boxModel.borderColor}`;\n }\n\n // 设置内边距\n if (\n boxModel.paddingTop !== undefined ||\n boxModel.paddingRight !== undefined ||\n boxModel.paddingBottom !== undefined ||\n boxModel.paddingLeft !== undefined\n ) {\n style.padding = `${boxModel.paddingTop || 0}px ${boxModel.paddingRight || 0}px ${\n boxModel.paddingBottom || 0\n }px ${boxModel.paddingLeft || 0}px`;\n }\n\n // 设置外边距\n if (\n boxModel.marginTop !== undefined ||\n boxModel.marginRight !== undefined ||\n boxModel.marginBottom !== undefined ||\n boxModel.marginLeft !== undefined\n ) {\n style.margin = `${boxModel.marginTop || 0}px ${boxModel.marginRight || 0}px ${\n boxModel.marginBottom || 0\n }px ${boxModel.marginLeft || 0}px`;\n }\n\n return style;\n });\n\n defineExpose({\n ...defineExposed\n });\n</script>\n\n<style lang=\"less\" scoped>\n .box-container {\n width: 100%;\n position: relative;\n }\n</style>\n"],"names":["props","__props","handleHidden","defineExposed","useField","boxStyle","computed","boxModel","style","__expose","_unref","_openBlock","_createBlock","ContainerWrapper","_createElementBlock","widget","_createVNode","RenderWigetList","subFormRowIndex","subFormRowId"],"mappings":";;;;;;;;;;;;;;;;;;;AA0BI,UAAMA,IAAQC,GACR,EAAE,cAAAC,GAAc,eAAAC,
|
|
1
|
+
{"version":3,"file":"vf-box-widget.vue2.js","sources":["../../../../../src/components/form-render/container-items/vf-box-widget.vue"],"sourcesContent":["<template>\n <container-wrapper v-bind=\"props\" v-if=\"!handleHidden\">\n <div class=\"box-container\" :key=\"widget.id\" :style=\"boxStyle\">\n <RenderWigetList\n :subFormRowIndex=\"subFormRowIndex\"\n :subFormRowId=\"subFormRowId\"\n :widgetList=\"widget.widgetList || []\"\n :parentWidget=\"widget\"\n />\n </div>\n </container-wrapper>\n</template>\n\n<script lang=\"ts\" setup>\n import RenderWigetList from '../RenderWigetList.vue';\n import ContainerWrapper from './container-wrapper.vue';\n import { WidgetProps } from '@/components/form-designer/form-widget/container-widget/useContainerWidget';\n import { computed, CSSProperties } from 'vue';\n import { ComponentNameEnum, ContainerTypeEnum } from '@/constants/WidgetTypeEnum';\n import { useField } from '@/components/form-designer/form-widget/field-widget/useField';\n\n defineOptions({\n name: ContainerTypeEnum.VfBoxWidget,\n componentName: ComponentNameEnum.VfBoxWidget\n });\n\n const props = defineProps<WidgetProps>();\n const { handleHidden, defineExposed } = useField(props, false);\n const boxStyle = computed(() => {\n const boxModel = props.widget.options.boxModel || {};\n const style = {} as CSSProperties;\n\n if (boxModel.borderShow) {\n style.borderRadius = `${boxModel.borderRadius}px`;\n style.border = `${boxModel.borderStyle} ${boxModel.borderWidth}px ${boxModel.borderColor}`;\n }\n\n // 设置内边距\n if (\n boxModel.paddingTop !== undefined ||\n boxModel.paddingRight !== undefined ||\n boxModel.paddingBottom !== undefined ||\n boxModel.paddingLeft !== undefined\n ) {\n style.padding = `${boxModel.paddingTop || 0}px ${boxModel.paddingRight || 0}px ${\n boxModel.paddingBottom || 0\n }px ${boxModel.paddingLeft || 0}px`;\n }\n\n // 设置外边距\n if (\n boxModel.marginTop !== undefined ||\n boxModel.marginRight !== undefined ||\n boxModel.marginBottom !== undefined ||\n boxModel.marginLeft !== undefined\n ) {\n style.margin = `${boxModel.marginTop || 0}px ${boxModel.marginRight || 0}px ${\n boxModel.marginBottom || 0\n }px ${boxModel.marginLeft || 0}px`;\n }\n\n return style;\n });\n\n defineExpose({\n ...defineExposed\n });\n</script>\n\n<style lang=\"less\" scoped>\n .box-container {\n width: 100%;\n position: relative;\n }\n</style>\n"],"names":["props","__props","handleHidden","defineExposed","useField","boxStyle","computed","boxModel","style","__expose","_unref","_openBlock","_createBlock","ContainerWrapper","_createElementBlock","widget","_createVNode","RenderWigetList","subFormRowIndex","subFormRowId"],"mappings":";;;;;;;;;;;;;;;;;;;AA0BI,UAAMA,IAAQC,GACR,EAAE,cAAAC,GAAc,eAAAC,EAAA,IAAkBC,EAASJ,GAAO,EAAK,GACvDK,IAAWC,EAAS,MAAM;AAC5B,YAAMC,IAAWP,EAAM,OAAO,QAAQ,YAAY,CAAA,GAC5CQ,IAAQ,CAAA;AAEd,aAAID,EAAS,eACTC,EAAM,eAAe,GAAGD,EAAS,YAAY,MAC7CC,EAAM,SAAS,GAAGD,EAAS,WAAW,IAAIA,EAAS,WAAW,MAAMA,EAAS,WAAW,MAKxFA,EAAS,eAAe,UACxBA,EAAS,iBAAiB,UAC1BA,EAAS,kBAAkB,UAC3BA,EAAS,gBAAgB,YAEzBC,EAAM,UAAU,GAAGD,EAAS,cAAc,CAAC,MAAMA,EAAS,gBAAgB,CAAC,MACvEA,EAAS,iBAAiB,CAC9B,MAAMA,EAAS,eAAe,CAAC,QAK/BA,EAAS,cAAc,UACvBA,EAAS,gBAAgB,UACzBA,EAAS,iBAAiB,UAC1BA,EAAS,eAAe,YAExBC,EAAM,SAAS,GAAGD,EAAS,aAAa,CAAC,MAAMA,EAAS,eAAe,CAAC,MACpEA,EAAS,gBAAgB,CAC7B,MAAMA,EAAS,cAAc,CAAC,OAG3BC;AAAA,IACX,CAAC;AAED,WAAAC,EAAa;AAAA,MACT,GAAGN;AAAA,IAAA,CACN,aAjEwCO,EAAAR,CAAA,iBAAzCS,EAAA,GAAAC,EASoBC,mBATOb,CAAK,CAAA,GAAA;AAAA,iBAC5B,MAOM;AAAA,cAPNc,EAOM,OAAA;AAAA,UAPD,OAAM;AAAA,UAAiB,KAAKC,EAAAA,OAAO;AAAA,UAAK,SAAOV,EAAA,KAAQ;AAAA,QAAA;UACxDW,EAKEC,GAAA;AAAA,YAJG,iBAAiBC,EAAAA;AAAAA,YACjB,cAAcC,EAAAA;AAAAA,YACd,YAAYJ,EAAAA,OAAO,cAAU,CAAA;AAAA,YAC7B,cAAcA,EAAAA;AAAAA,UAAAA;;;;;;;"}
|