| | |
| | | class="u-text" |
| | | :class="[customClass]" |
| | | v-if="show" |
| | | :style="{ |
| | | margin: margin, |
| | | justifyContent: align === 'left' ? 'flex-start' : align === 'center' ? 'center' : 'flex-end' |
| | | }" |
| | | :style="wrapStyle" |
| | | @tap="clickHandler" |
| | | > |
| | | <text |
| | |
| | | ></u-icon> |
| | | </view> |
| | | <u-link |
| | | v-if="mode === 'link'" class="u-text__value" |
| | | :style="{fontWeight: valueStyle.fontWeight, wordWrap: valueStyle.wordWrap, fontSize: valueStyle.fontSize}" :class="[ type && `u-text__value--${type}`, lines && `u-line-${lines}` ]" :text="value" |
| | | v-if="mode === 'link'" class="u-text__value" |
| | | :style="{fontWeight: valueStyle.fontWeight, wordWrap: valueStyle.wordWrap, fontSize: valueStyle.fontSize}" |
| | | :class="[type && `u-text__value--${type}`,lines && `u-line-${lines}`]" :text="value" |
| | | :href="href" |
| | | underLine |
| | | ></u-link> |
| | |
| | | // #endif |
| | | emits: ['click'], |
| | | computed: { |
| | | wrapStyle() { |
| | | let style = { |
| | | margin: this.margin, |
| | | justifyContent: this.align === 'left' ? 'flex-start' : this.align === 'center' ? 'center' : 'flex-end' |
| | | } |
| | | // 占满剩余空间 |
| | | if (this.flex1) { |
| | | style.flex = 1; |
| | | // #ifndef APP-NVUE |
| | | style.width = '100%'; |
| | | // #endif |
| | | } |
| | | return style; |
| | | }, |
| | | valueStyle() { |
| | | const style = { |
| | | textDecoration: this.decoration, |
| | |
| | | }, |
| | | methods: { |
| | | addStyle, |
| | | clickHandler() { |
| | | clickHandler(e) { |
| | | // 如果为手机号模式,拨打电话 |
| | | if (this.call && this.mode === 'phone') { |
| | | uni.makePhoneCall({ |
| | | phoneNumber: this.text |
| | | }) |
| | | } |
| | | this.$emit('click') |
| | | this.$emit('click', e) |
| | | } |
| | | } |
| | | } |
| | |
| | | @include flex(row); |
| | | align-items: center; |
| | | flex-wrap: nowrap; |
| | | flex: 1; |
| | | /* #ifndef APP-NVUE */ |
| | | width: 100%; |
| | | /* #endif */ |
| | | |
| | | &__price { |
| | | font-size: 14px; |