diff --git a/src/button/button.less b/src/button/button.less index 3c177ed8c..40c729ed9 100644 --- a/src/button/button.less +++ b/src/button/button.less @@ -209,6 +209,7 @@ font-family: PingFang SC, Microsoft YaHei, Arial Regular; font-weight: @button-font-weight; vertical-align: top; + box-sizing: border-box; .cursor-pointer(); @@ -572,7 +573,6 @@ &--block { display: flex; - box-sizing: border-box; width: 100%; } diff --git a/src/checkbox/checkbox.wxml b/src/checkbox/checkbox.wxml index 812a9f54e..eb9db8a22 100644 --- a/src/checkbox/checkbox.wxml +++ b/src/checkbox/checkbox.wxml @@ -44,15 +44,17 @@ class="{{_.cls(classPrefix + '__title', [['disabled', _disabled], ['checked', checked]])}} {{prefix}}-class-label" style="-webkit-line-clamp:{{maxLabelRow}}" > - {{label}} + {{label}} {{content}} + > + {{content}} + + - - 选项一 - + 选项一 - - + /> - - 选项二 - + 选项二 - - + /> - - 选项三 - + 选项三 - - + /> - - 选项四 - + 选项四 - - + /> - - 选项五 - + 选项五 - - + /> - - 选项六 - + 选项六 - - + /> - - 选项七 - + 选项七 - - + /> - - 选项八 - + 选项八 - - + /> - - 禁用选项 - + 禁用选项 - - + /> - {{label}} + {{label}} @@ -50,8 +50,10 @@ {{content}} + > + {{content}} + + diff --git a/src/textarea/__test__/__snapshots__/demo.test.js.snap b/src/textarea/__test__/__snapshots__/demo.test.js.snap index f88f314d6..f85ac48ac 100644 --- a/src/textarea/__test__/__snapshots__/demo.test.js.snap +++ b/src/textarea/__test__/__snapshots__/demo.test.js.snap @@ -12,7 +12,6 @@ exports[`Textarea Textarea autosize demo works fine 1`] = ` disableDefaultPadding="{{true}}" label="标签文字" placeholder="请输入文字" - tClassLabel="" bind:line-change="onLineChange" /> @@ -41,8 +40,6 @@ exports[`Textarea Textarea card demo works fine 1`] = ` placeholder="请输入文字" style="border-radius: 18rpx;" tClass="external-class" - tClassIndicator="" - tClassLabel="" /> @@ -66,7 +63,6 @@ exports[`Textarea Textarea custom demo works fine 1`] = ` placeholder="请输入文字" style="height: 248rpx" tClass="external-class" - tClassIndicator="" /> @@ -80,7 +76,6 @@ exports[`Textarea Textarea disabled demo works fine 1`] = ` label="标签文字" placeholder="请输入文字" tClass="external-class" - tClassLabel="" value="不可编辑文字" /> @@ -93,7 +88,6 @@ exports[`Textarea Textarea label demo works fine 1`] = ` label="标签文字" placeholder="请输入文字" tClass="external-class" - tClassLabel="" /> `; @@ -107,8 +101,6 @@ exports[`Textarea Textarea maxcharacter demo works fine 1`] = ` maxcharacter="200" placeholder="设置最大字符个数,一个汉字表示两个字符" tClass="external-class" - tClassIndicator="" - tClassLabel="" /> `; @@ -122,8 +114,6 @@ exports[`Textarea Textarea maxlength demo works fine 1`] = ` maxlength="200" placeholder="设置最大字符个数" tClass="external-class" - tClassIndicator="" - tClassLabel="" /> `; diff --git a/src/textarea/_example/autosize/index.js b/src/textarea/_example/autosize/index.js index 799c7a118..16c5e08f9 100644 --- a/src/textarea/_example/autosize/index.js +++ b/src/textarea/_example/autosize/index.js @@ -1,7 +1,4 @@ -import SkylineBehavior from '@behaviors/skyline.js'; - Component({ - behaviors: [SkylineBehavior], data: { autosize: { maxHeight: 120, diff --git a/src/textarea/_example/autosize/index.wxml b/src/textarea/_example/autosize/index.wxml index 3c7f9be9a..f37e627d7 100644 --- a/src/textarea/_example/autosize/index.wxml +++ b/src/textarea/_example/autosize/index.wxml @@ -1,6 +1,5 @@ 标签文字 + diff --git a/src/textarea/_example/label/index.wxss b/src/textarea/_example/label/index.wxss index c66849033..40db6e5f5 100644 --- a/src/textarea/_example/label/index.wxss +++ b/src/textarea/_example/label/index.wxss @@ -1,14 +1,3 @@ .external-class { height: 256rpx; } - -.skyline-label { - font-size: 28rpx; - color: rgba(0, 0, 0, 0.9); - flex-shrink: 0; - line-height: 44rpx; - padding-bottom: 16rpx; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} diff --git a/src/textarea/_example/maxcharacter/index.js b/src/textarea/_example/maxcharacter/index.js index 8e8f5e1c1..b79c5124b 100644 --- a/src/textarea/_example/maxcharacter/index.js +++ b/src/textarea/_example/maxcharacter/index.js @@ -1,3 +1 @@ -import SkylineBehavior from '@behaviors/skyline.js'; - -Component({ behaviors: [SkylineBehavior] }); +Component({}); diff --git a/src/textarea/_example/maxcharacter/index.wxml b/src/textarea/_example/maxcharacter/index.wxml index d94458ffb..67bf5a702 100644 --- a/src/textarea/_example/maxcharacter/index.wxml +++ b/src/textarea/_example/maxcharacter/index.wxml @@ -1,7 +1,5 @@ - - - - Textarea 多行文本框 - 用于多行文本信息输入。 - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/src/textarea/_example/textarea.wxml b/src/textarea/_example/textarea.wxml index 6b204992a..51a36e9e5 100644 --- a/src/textarea/_example/textarea.wxml +++ b/src/textarea/_example/textarea.wxml @@ -1,29 +1,33 @@ - - - Textarea 多行文本框 - 用于多行文本信息输入。 - - - - - - - - - - - - - - - - - - - - - - - + + + + + Textarea 多行文本框 + 用于多行文本信息输入。 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/textarea/textarea.less b/src/textarea/textarea.less index f685ef596..499dee3e5 100644 --- a/src/textarea/textarea.less +++ b/src/textarea/textarea.less @@ -80,6 +80,7 @@ } &__indicator:not(:empty) { + flex-shrink: 0; color: @textarea-indicator-text-color; font-size: @textarea-indicator-text-font-size; text-align: @textarea-indicator-text-align;