@tmagic/form 1.0.0-beta.15 → 1.0.0-beta.16
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/coverage/clover.xml +207 -206
- package/coverage/coverage-final.json +2 -2
- package/coverage/lcov-report/index.html +18 -18
- package/coverage/lcov-report/src/Form.vue.html +1 -1
- package/coverage/lcov-report/src/FormDialog.vue.html +1 -1
- package/coverage/lcov-report/src/containers/Col.vue.html +1 -1
- package/coverage/lcov-report/src/containers/Container.vue.html +25 -13
- package/coverage/lcov-report/src/containers/Fieldset.vue.html +1 -1
- package/coverage/lcov-report/src/containers/GroupList.vue.html +1 -1
- package/coverage/lcov-report/src/containers/GroupListItem.vue.html +1 -1
- package/coverage/lcov-report/src/containers/Panel.vue.html +1 -1
- package/coverage/lcov-report/src/containers/Row.vue.html +1 -1
- package/coverage/lcov-report/src/containers/Step.vue.html +1 -1
- package/coverage/lcov-report/src/containers/Table.vue.html +28 -4
- package/coverage/lcov-report/src/containers/Tabs.vue.html +1 -1
- package/coverage/lcov-report/src/containers/index.html +19 -19
- package/coverage/lcov-report/src/fields/Cascader.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Checkbox.vue.html +1 -1
- package/coverage/lcov-report/src/fields/CheckboxGroup.vue.html +1 -1
- package/coverage/lcov-report/src/fields/ColorPicker.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Date.vue.html +1 -1
- package/coverage/lcov-report/src/fields/DateTime.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Daterange.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Display.vue.html +1 -1
- package/coverage/lcov-report/src/fields/DynamicField.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Hidden.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Link.vue.html +2 -2
- package/coverage/lcov-report/src/fields/Number.vue.html +1 -1
- package/coverage/lcov-report/src/fields/RadioGroup.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Select.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Switch.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Text.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Textarea.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Time.vue.html +1 -1
- package/coverage/lcov-report/src/fields/index.html +1 -1
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/index.ts.html +1 -1
- package/coverage/lcov-report/src/theme/index.html +1 -1
- package/coverage/lcov-report/src/theme/index.scss.html +1 -1
- package/coverage/lcov-report/src/utils/config.ts.html +1 -1
- package/coverage/lcov-report/src/utils/createForm.ts.html +1 -1
- package/coverage/lcov-report/src/utils/fieldProps.ts.html +1 -1
- package/coverage/lcov-report/src/utils/form.ts.html +1 -1
- package/coverage/lcov-report/src/utils/index.html +1 -1
- package/coverage/lcov-report/src/utils/useAddField.ts.html +1 -1
- package/coverage/lcov.info +465 -460
- package/dist/style.css +7 -9
- package/dist/tmagic-form.es.js +12 -4
- package/dist/tmagic-form.es.js.map +1 -1
- package/dist/tmagic-form.umd.js +12 -4
- package/dist/tmagic-form.umd.js.map +1 -1
- package/dist/types/src/containers/Container.vue.d.ts +1 -0
- package/package.json +3 -3
- package/src/containers/Container.vue +7 -3
- package/src/containers/Table.vue +10 -2
- package/src/fields/Link.vue +1 -1
- package/src/theme/form.scss +24 -17
package/dist/style.css
CHANGED
|
@@ -17,26 +17,24 @@
|
|
|
17
17
|
opacity: 0;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.m-form,
|
|
21
|
-
.m-form-panel.el-card .el-card__body {
|
|
22
|
-
color: #333;
|
|
23
|
-
background-color: #fff;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
20
|
.m-form .m-form-tip {
|
|
27
21
|
color: rgba(0, 0, 0, 0.45);
|
|
28
22
|
font-size: 12px;
|
|
29
23
|
transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
30
24
|
}
|
|
31
|
-
|
|
32
25
|
.m-form .m-form-schematic {
|
|
33
26
|
max-width: 50%;
|
|
34
27
|
height: 100%;
|
|
35
28
|
}
|
|
36
|
-
|
|
37
|
-
.el-table .cell > div.m-form-container {
|
|
29
|
+
.m-form .el-table .cell > div.m-form-container {
|
|
38
30
|
display: block;
|
|
39
31
|
}
|
|
32
|
+
.m-form .el-tabs {
|
|
33
|
+
margin-bottom: 10px;
|
|
34
|
+
}
|
|
35
|
+
.m-form .el-form-item.hidden .el-form-item__label {
|
|
36
|
+
display: none;
|
|
37
|
+
}
|
|
40
38
|
|
|
41
39
|
.magic-datetime-picker-popper .el-picker-panel__footer button:first-child {
|
|
42
40
|
display: none;
|
package/dist/tmagic-form.es.js
CHANGED
|
@@ -233,6 +233,7 @@ const _sfc_main$t = defineComponent({
|
|
|
233
233
|
}
|
|
234
234
|
return display(mForm, props.config.display, props);
|
|
235
235
|
});
|
|
236
|
+
const itemLabelWidth = computed(() => props.config.labelWidth || props.labelWidth);
|
|
236
237
|
watchEffect(() => {
|
|
237
238
|
expand.value = props.expandMore;
|
|
238
239
|
});
|
|
@@ -293,6 +294,7 @@ const _sfc_main$t = defineComponent({
|
|
|
293
294
|
itemProp,
|
|
294
295
|
items,
|
|
295
296
|
display: display$1,
|
|
297
|
+
itemLabelWidth,
|
|
296
298
|
tagName,
|
|
297
299
|
rule,
|
|
298
300
|
tooltip,
|
|
@@ -340,13 +342,14 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
340
342
|
prop: _ctx.itemProp,
|
|
341
343
|
"step-active": _ctx.stepActive,
|
|
342
344
|
"expand-more": _ctx.expand,
|
|
343
|
-
"label-width": _ctx.
|
|
345
|
+
"label-width": _ctx.itemLabelWidth,
|
|
344
346
|
onChange: _ctx.onChangeHandler
|
|
345
347
|
}, null, 8, ["size", "model", "config", "name", "prop", "step-active", "expand-more", "label-width", "onChange"])) : _ctx.type && _ctx.display ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
346
348
|
createVNode(_component_el_form_item, {
|
|
347
349
|
style: normalizeStyle(_ctx.config.tip ? "flex: 1" : ""),
|
|
350
|
+
class: normalizeClass({ hidden: _ctx.itemLabelWidth === 0 || !_ctx.config.text }),
|
|
348
351
|
prop: _ctx.itemProp,
|
|
349
|
-
"label-width": _ctx.
|
|
352
|
+
"label-width": _ctx.itemLabelWidth,
|
|
350
353
|
rules: _ctx.rule
|
|
351
354
|
}, {
|
|
352
355
|
label: withCtx(() => [
|
|
@@ -389,7 +392,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
389
392
|
}, null, 8, _hoisted_3$7)) : createCommentVNode("", true)
|
|
390
393
|
]),
|
|
391
394
|
_: 1
|
|
392
|
-
}, 8, ["style", "prop", "label-width", "rules"]),
|
|
395
|
+
}, 8, ["style", "class", "prop", "label-width", "rules"]),
|
|
393
396
|
_ctx.config.tip ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
394
397
|
key: 0,
|
|
395
398
|
placement: "left"
|
|
@@ -418,7 +421,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
418
421
|
size: _ctx.size,
|
|
419
422
|
"step-active": _ctx.stepActive,
|
|
420
423
|
"expand-more": _ctx.expand,
|
|
421
|
-
"label-width": _ctx.
|
|
424
|
+
"label-width": _ctx.itemLabelWidth,
|
|
422
425
|
prop: _ctx.itemProp,
|
|
423
426
|
onChange: _ctx.onChangeHandler
|
|
424
427
|
}, null, 8, ["model", "config", "size", "step-active", "expand-more", "label-width", "prop", "onChange"]);
|
|
@@ -1693,6 +1696,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1693
1696
|
createVNode(_component_el_button, {
|
|
1694
1697
|
plain: "",
|
|
1695
1698
|
size: "small",
|
|
1699
|
+
type: "primary",
|
|
1696
1700
|
icon: _ctx.ArrowUp,
|
|
1697
1701
|
text: "",
|
|
1698
1702
|
onClick: ($event) => _ctx.upHandler(scope.$index + 1 + _ctx.pagecontext * _ctx.pagesize - 1),
|
|
@@ -1710,6 +1714,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1710
1714
|
createVNode(_component_el_button, {
|
|
1711
1715
|
plain: "",
|
|
1712
1716
|
size: "small",
|
|
1717
|
+
type: "primary",
|
|
1713
1718
|
icon: _ctx.ArrowDown,
|
|
1714
1719
|
text: "",
|
|
1715
1720
|
onClick: ($event) => _ctx.downHandler(scope.$index + 1 + _ctx.pagecontext * _ctx.pagesize - 1),
|
|
@@ -1788,6 +1793,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1788
1793
|
key: 1,
|
|
1789
1794
|
icon: _ctx.Grid,
|
|
1790
1795
|
size: "small",
|
|
1796
|
+
type: "primary",
|
|
1791
1797
|
onClick: _ctx.toggleMode
|
|
1792
1798
|
}, {
|
|
1793
1799
|
default: withCtx(() => [
|
|
@@ -1799,6 +1805,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1799
1805
|
key: 2,
|
|
1800
1806
|
icon: _ctx.FullScreen,
|
|
1801
1807
|
size: "small",
|
|
1808
|
+
type: "primary",
|
|
1802
1809
|
onClick: _ctx.toggleFullscreen
|
|
1803
1810
|
}, {
|
|
1804
1811
|
default: withCtx(() => [
|
|
@@ -2699,6 +2706,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2699
2706
|
}, toDisplayString(_ctx.displayText), 5)) : (openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
2700
2707
|
createVNode(_component_el_button, {
|
|
2701
2708
|
text: "",
|
|
2709
|
+
type: "primary",
|
|
2702
2710
|
onClick: _ctx.editHandler
|
|
2703
2711
|
}, {
|
|
2704
2712
|
default: withCtx(() => [
|