diff --git a/STD-COMP.md b/STD-COMP.md index 0d0be55..c200b45 100755 --- a/STD-COMP.md +++ b/STD-COMP.md @@ -21,6 +21,7 @@ If you don't like the cold text description, click on the [interactive version]( ```js { + inVLayout: false, // is in a vertical layout or not (when in a vertical layout, the distance to the label can be corrected by setting it to true) multiLine: false, // Whether to display multiple lines (if false, display with "..." when the content overflows, user can move the mouse up to display the complete content) } ``` diff --git a/STD-COMP_CN.md b/STD-COMP_CN.md index ffbd305..7ba55af 100644 --- a/STD-COMP_CN.md +++ b/STD-COMP_CN.md @@ -21,6 +21,7 @@ ```js { + inVLayout: false, // 是否处于垂直布局中(当处于垂直布局中时,通过设置为true可以修正与label的距离) multiLine: false, // 是否多行显示 (当为false时,内容溢出时用...显示,然后鼠标移上去可显示完整的内容) } ``` diff --git a/packages/ncform-theme-elementui/examples/control-comps/label.html b/packages/ncform-theme-elementui/examples/control-comps/label.html index ff27c74..6e88bab 100755 --- a/packages/ncform-theme-elementui/examples/control-comps/label.html +++ b/packages/ncform-theme-elementui/examples/control-comps/label.html @@ -72,7 +72,10 @@ type: 'string', default: 'ncform', ui: { - widget: 'label' + widget: 'label', + widgetConfig: { + inVLayout: true + } } } } @@ -120,6 +123,11 @@ } } } + }, + ui: { + widgetConfig: { + layout: 'h' + } } } } diff --git a/packages/ncform-theme-elementui/src/components/control-comps/label.vue b/packages/ncform-theme-elementui/src/components/control-comps/label.vue index 07f0b6d..9a6e8f4 100755 --- a/packages/ncform-theme-elementui/src/components/control-comps/label.vue +++ b/packages/ncform-theme-elementui/src/components/control-comps/label.vue @@ -1,6 +1,7 @@ @@ -10,7 +11,6 @@ font-size: 14px; &:not(.multi-line) { - line-height: 40px; text-overflow:ellipsis; overflow:hidden; white-space:nowrap; @@ -37,7 +37,8 @@ return { // 组件特有的配置属性 defaultConfig: { - multiLine: false // 是否多行显示 (当为false时,内容溢出时用...显示,然后鼠标移上去可显示完整的内容) + multiLine: false, // 是否多行显示 (当为false时,内容溢出时用...显示,然后鼠标移上去可显示完整的内容) + inVLayout: false, // 是否处于垂直布局中 }, val: '', // modelVal:请使用该值来绑定实际的组件的model