chore: fui-preview 增加tag右边位置模式
This commit is contained in:
@ -154,15 +154,26 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
// tag上下padding
|
||||||
tagPadding: {
|
tagPadding: {
|
||||||
type: [Number, String],
|
type: [Number, String],
|
||||||
default: 8,
|
default: 8,
|
||||||
},
|
},
|
||||||
|
// 标题是否显示蓝色竖线条
|
||||||
isSection: {
|
isSection: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
// tag是否在右边
|
||||||
|
isTagRight: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
// 组件上边距
|
||||||
|
topPadding: {
|
||||||
|
type: [Number, String],
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
emits: ['click', 'valueClick'],
|
emits: ['click', 'valueClick'],
|
||||||
data() {
|
data() {
|
||||||
@ -254,10 +265,10 @@ export default {
|
|||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
v-if="pvd[label] || pvd[value]" class="fui-preview__hd"
|
v-if="pvd[label] || pvd[value]" class="fui-preview__hd"
|
||||||
:style="{ paddingLeft: `${padding}rpx`, paddingRight: `${padding}rpx` }"
|
:style="{ paddingLeft: `${padding}rpx`, paddingRight: `${padding}rpx`,paddingTop: `${topPadding}rpx`}"
|
||||||
>
|
>
|
||||||
<view class="fui-preview__item">
|
<view class="fui-preview__item">
|
||||||
<fui-section v-if="isSection" :title="pvd[label] || ''" is-line line-width="8rpx" :padding="['0','0']" line-color="#0082ff" />
|
<fui-section v-if="isSection" :title="pvd[label] || ''" is-line line-width="8rpx" :padding="['0','0']" :line-color="fuiColor.primary" />
|
||||||
<text
|
<text
|
||||||
v-else
|
v-else
|
||||||
class="fui-preview__label" style="color: #333;font-weight:600"
|
class="fui-preview__label" style="color: #333;font-weight:600"
|
||||||
@ -279,7 +290,7 @@ export default {
|
|||||||
:class="{ 'fui-preview__border-color': !borderColor }"
|
:class="{ 'fui-preview__border-color': !borderColor }"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view :style="{ paddingLeft: `${padding}rpx`, paddingRight: `${padding}rpx`,paddingTop: `${tagPadding}rpx`,paddingBottom: `${tagPadding}rpx`}">
|
<view :style="{ paddingLeft: `${padding}rpx`, paddingRight: `${padding}rpx`,paddingTop: `${tagPadding}rpx`,paddingBottom: `${tagPadding}rpx`}" :class="{'tag-right':isTagRight}">
|
||||||
<slot name="tag" />
|
<slot name="tag" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -607,6 +618,11 @@ export default {
|
|||||||
transform-origin: 100% 0;
|
transform-origin: 100% 0;
|
||||||
transform: scaleX(.5)
|
transform: scaleX(.5)
|
||||||
}
|
}
|
||||||
|
.tag-right{
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* #endif */
|
/* #endif */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user