|
@@ -1,15 +1,18 @@
|
|
|
<template>
|
|
|
- <el-radio-group class="c-radio-group" :value="value" @input="onRadioInput">
|
|
|
- <el-radio
|
|
|
- v-for="item in calcOptions"
|
|
|
- v-show="calcShow(item)"
|
|
|
- :disabled="item.disabled || disabled"
|
|
|
- :key="item.value"
|
|
|
- @click.native="handleRadioClick(item)"
|
|
|
- :label="item.value">
|
|
|
- <span v-html="item.label"></span>
|
|
|
- </el-radio>
|
|
|
- </el-radio-group>
|
|
|
+ <div class="radio-group-container">
|
|
|
+ <el-radio-group class="c-radio-group" :value="value" @input="onRadioInput">
|
|
|
+ <el-radio
|
|
|
+ v-for="item in calcOptions"
|
|
|
+ v-show="calcShow(item)"
|
|
|
+ :disabled="item.disabled || disabled"
|
|
|
+ :key="item.value"
|
|
|
+ @click.native="handleRadioClick(item)"
|
|
|
+ :label="item.value">
|
|
|
+ <span v-html="item.label"></span>
|
|
|
+ </el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <div class="message-tip" v-if="canShowMessageTip">{{ messageTipText }}</div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -32,6 +35,14 @@ export default {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
},
|
|
|
+ messageTipText: {
|
|
|
+ type: String,
|
|
|
+ default: '注:升级后最终的产品规格'
|
|
|
+ },
|
|
|
+ showMessageTip: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ },
|
|
|
options: {
|
|
|
type: Array,
|
|
|
default() {
|
|
@@ -51,6 +62,9 @@ export default {
|
|
|
computed: {
|
|
|
calcOptions() {
|
|
|
return this.options.filter(r => !r.hide)
|
|
|
+ },
|
|
|
+ canShowMessageTip() {
|
|
|
+ return this.showMessageTip && this.messageTipText
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -98,4 +112,11 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.message-tip {
|
|
|
+ color: $red_deep;
|
|
|
+ margin-top: -6px;
|
|
|
+ line-height: 22px;
|
|
|
+ font-size: 13px;
|
|
|
+}
|
|
|
</style>
|