Browse Source

修改泡沫点检

master
lijuncheng 8 months ago
parent
commit
45a58ddc0d
  1. 5
      src/mycomponents/common/showModal.vue
  2. 176
      src/mycomponents/form/customerFrom.vue
  3. 25
      src/pages/foam/check.vue
  4. 491
      src/uni_modules/vk-uview-ui/components/u-radio/u-radio.vue

5
src/mycomponents/common/showModal.vue

@ -71,15 +71,16 @@
height: 400rpx; height: 400rpx;
border-radius: 8rpx; border-radius: 8rpx;
position: relative; position: relative;
text-align: center;
//modal-contentview //modal-contentview
view:first-child{ view:first-child{
padding: 10rpx; padding: 10rpx;
font-size:30rpx; font-size:35rpx;
font-weight:bold; font-weight:bold;
} }
//modal-contentview //modal-contentview
view:nth-child(2){ view:nth-child(2){
font-size:30rpx; font-size:32rpx;
padding-left: 10rpx; padding-left: 10rpx;
color:red color:red
} }

176
src/mycomponents/form/customerFrom.vue

@ -22,21 +22,24 @@
</view> </view>
<view class=""> <view class="">
<view class="" style="margin-left: 50rpx;"> <view class="" style="margin-left: 50rpx;">
<text style="font-size: 32rpx; font-weight:550">点检状态</text> <view class="">
<text style="font-size: 30rpx; color: #9e9e9e;">(单选)</text> <text style="font-size: 32rpx; font-weight:550">点检状态</text>
<u-radio-group v-model="item.name" @change="radioGroupChange"> <text style="font-size: 30rpx; color: #9e9e9e;">(单选)</text>
</view>
<u-radio-group v-if="isRefresh" v-model="item.name" @change="radioGroupChange(item)">
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;" <view class="uni-flex" style="width: 50%; margin-left: 0rpx;"
v-for="(radio, index) in dataList" :key="index" @change="radioChange"> v-for="(radio, index) in dataList" :key="index">
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;"> <view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;">
<u-radio :name="radio.name"> <u-radio :name="radio.name" @change="radioChange(radio)">
{{radio.name}} {{radio.name}}
</u-radio> </u-radio>
</view> </view>
</view> </view>
</u-radio-group> </u-radio-group>
</view> </view>
<input class="input" :disabled="false" style="margin-left: 50rpx;" <input class="input" disabled style="margin-left: 50rpx;" :placeholder="item.placeholder"
:placeholder="item.placeholder" v-model="item.name" /> v-model="item.name" />
</view> </view>
</view> </view>
@ -61,21 +64,23 @@
<view class=""> <view class="">
<view class="" style="margin-left: 50rpx;"> <view class="" style="margin-left: 50rpx;">
<text style="font-size: 32rpx; font-weight:550">点检状态</text> <view class="">
<text style="font-size: 30rpx; color: #9e9e9e;">(单选)</text> <text style="font-size: 32rpx; font-weight:550">点检状态</text>
<u-radio-group v-model="item.name" @change="radioGroupChange"> <text style="font-size: 30rpx; color: #9e9e9e;">(单选)</text>
</view>
<u-radio-group v-if="isRefresh" v-model="item.name" @change="radioGroupChange(item)">
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;" <view class="uni-flex" style="width: 50%; margin-left: 0rpx;"
v-for="(radio, index) in dataList" :key="index" @change="radioChange"> v-for="(radio, index) in dataInputList" :key="index">
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;"> <view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;">
<u-radio :name="radio.name"> <u-radio :name="radio.name" @change="radioChange(radio)">
{{radio.name}} {{radio.name}}
</u-radio> </u-radio>
</view> </view>
</view> </view>
</u-radio-group> </u-radio-group>
</view> </view>
<input class="input" :disabled="false" style="margin-left: 50rpx;" <input class="input" style="margin-left: 50rpx;" :placeholder="item.placeholder"
:placeholder="item.placeholder" v-model="item.name" /> v-model="item.name" />
</view> </view>
<view class="" v-if="item.main"> <view class="" v-if="item.main">
@ -109,19 +114,19 @@
<view class=""> <view class="">
<view class="" style="margin-left: 50rpx;"> <view class="" style="margin-left: 50rpx;">
<view style="font-size: 30rpx; color: #9e9e9e;">(单选)</view> <view style="font-size: 30rpx; color: #9e9e9e;">(单选)</view>
<u-radio-group v-model="item.name" @change="radioGroupChange"> <u-radio-group v-if="isRefresh" v-model="item.name" @change="radioGroupChange(item)">
<view class="uni-flex" style="width: 50%; margin-left: 0rpx;" <view class="uni-flex" style="width: 50%; margin-left: 0rpx;"
v-for="(radio, index) in dataClassList" :key="index" @change="radioChange"> v-for="(radio, index) in dataClassList" :key="index">
<view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;"> <view class="uni-flex " style="margin-top: 10rpx; justify-content: flex-start;">
<u-radio :name="radio.name"> <u-radio :name="radio.name" @change="radioChange(radio)">
{{radio.name}} {{radio.name}}
</u-radio> </u-radio>
</view> </view>
</view> </view>
</u-radio-group> </u-radio-group>
</view> </view>
<input class="input" :disabled="false" style="margin-left: 50rpx;" <input class="input" :disabled="false" style="margin-left: 50rpx;" :placeholder="item.placeholder"
:placeholder="item.placeholder" v-model="item.name" /> v-model="item.name" />
</view> </view>
</view> </view>
@ -165,7 +170,9 @@
<script> <script>
import showModal from '../../mycomponents/common/showModal.vue' import showModal from '../../mycomponents/common/showModal.vue'
import {
deepCopyData
} from "@/common/basic.js"
export default { export default {
components: { components: {
@ -200,55 +207,44 @@
name: "停机状态", name: "停机状态",
} }
], ],
dataInputList: [{
value: 4,
name: "停机状态",
}],
dataClassList: [{ dataClassList: [{
value: 1, value: 1,
name: "白班", name: "班",
}, },
{ {
value: 2, value: 2,
name: "班", name: "班",
}, },
{ {
value: 3, value: 3,
name: "班", name: "班",
} }
], ],
testName: null,
// formData: [{
// content: "",
// methond: "",
// placeholder: "1",
// name: '',
// value:"",
// },
// {
// content: "",
// methond: "",
// placeholder: "2",
// name: '',
// value:"",
// }],
selectStateItem: {},
selectClassItem: {},
current: 0, current: 0,
isRefresh: true
}; };
}, },
methods: { methods: {
radioChange(e) { radioChange(radio) {
console.log(e) console.log("radioChange")
},
radioGroupChange(item) {
console.log("radioGroupChange", item)
// for (let i = 0; i < this.dataList.length; i++) { // for (let i = 0; i < this.dataList.length; i++) {
// if (this.dataList[i].value === evt.detail.value) { // if (this.dataList[i].name === item.name) {
// this.current = i; // this.current = i;
// break; // break;
// } // }
// } // }
}, },
radioGroupChange(e) {
console.log(e)
},
inputMain(item) { inputMain(item) {
item.name = item.minor.name + "~" + item.main.name; item.name = item.minor.name + "~" + item.main.name;
if (item.minor.name == "" && item.main.name == "") { if (item.minor.name == "" && item.main.name == "") {
@ -308,42 +304,44 @@
break break
} else { } else {
if (!this.isExitList(item.name)) { if (!this.isExitList(item.name)) {
if (item.main) { if (item.main) {
if (item.main.name == "") {
this.showHint(hintIndex + ".点检内容 : " + item.content, item.main.placeholder)
isCheckPass = false; if (item.minor.name == "") {
break this.showHint(hintIndex + ".点检内容 : " + item.content, item.minor.placeholder)
} isCheckPass = false;
break
if (item.minor.name == "") { }
this.showHint(hintIndex + ".点检内容 : " + item.content, item.minor.placeholder)
isCheckPass = false; if (!this.isWithinInterval(item.minor.name, item.minor.lower, item.minor.upper)) {
break this.showHint(hintIndex + ".点检内容 : " + item.content, "输入数量【" + item.minor
} .name + "】不在" + item.minor.hint)
isCheckPass = false;
if (!this.isWithinInterval(item.minor.name, item.minor.lower, item.minor.upper)) { break
this.showHint(hintIndex + ".点检内容 : " + item.content, "输入数量【" + item.minor }
.name + "】不在【" + item.minor.lower + "】和【" + item.minor.upper + "】之间")
isCheckPass = false; if (item.main.name == "") {
break this.showHint(hintIndex + ".点检内容 : " + item.content, item.main.placeholder)
} isCheckPass = false;
break
if (!this.isWithinInterval(item.main.name, item.main.lower, item.main.upper)) { }
this.showHint(hintIndex + ".点检内容 : " + item.content, "输入数量【" + item.main.name +
"】不在【" + item.main.lower + "】和【" + item.main.upper + "】之间") if (!this.isWithinInterval(item.main.name, item.main.lower, item.main.upper)) {
isCheckPass = false; this.showHint(hintIndex + ".点检内容 : " + item.content, "输入数量【" + item.main.name +
break "】不在" + item.main.hint)
} isCheckPass = false;
break
} else {
if (!this.isWithinInterval(item.name, item.lower, item.upper)) {
this.showHint(hintIndex + ".点检内容 : " + item.content, "输入数量【" + item.name +
"】不在【" + item.lower + "】和【" + item.upper + "】之间")
isCheckPass = false;
break
}
} }
} else {
if (!this.isWithinInterval(item.name, item.lower, item.upper)) {
this.showHint(hintIndex + ".点检内容 : " + item.content, "输入数量【" + item.name +
"】不在【" + item.lower + "】和【" + item.upper + "】之间")
isCheckPass = false;
break
}
}
} }
} }
@ -354,7 +352,6 @@
break break
} }
} }
} }
if (isCheckPass) { if (isCheckPass) {
callBack(this.formData) callBack(this.formData)
@ -372,7 +369,7 @@
}, },
isExitList(name) { isExitList(name) {
var isExit = this.dataList.filter(res => res.name == name) var isExit = this.dataList.filter(res => res.name == name)
if(isExit.length==0){ if (isExit.length == 0) {
return false return false
} }
return true; return true;
@ -409,10 +406,21 @@
item.name = "" item.name = ""
item.value = "" item.value = ""
} }
} }
// var testList =deepCopyData(this.dataList)
// this.dataList =[];
// this.dataList=testList
this.reload();
this.$emit("reset", this.formData) this.$emit("reset", this.formData)
console.log(this.formData)
console.log("重置", this.formData)
}
,
reload(){
this.isRefresh = false
this.$nextTick(() => {
this.isRefresh = true
})
} }

25
src/pages/foam/check.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class="page-header flex" <view class="page-header flex"
style="font-size: 35rpx; padding-left: 10rpx; padding-top: 20rpx; flex-direction: column;"> style="font-size: 32rpx; padding-left: 10rpx; padding-top: 10rpx; flex-direction: column;">
<view class="flex u-col-center space-between"> <view class="flex u-col-center space-between">
<view class=""> <view class="">
设备编号 : {{deviceCode}} 设备编号 : {{deviceCode}}
@ -11,10 +11,10 @@
<button type="primary" size="mini" @click="openScanPopup">扫描</button> <button type="primary" size="mini" @click="openScanPopup">扫描</button>
</view> </view>
</view> </view>
<view class=""> <view class="" v-if="deviceName!=''">
点检日期 : {{dateTime}} 点检日期 : {{dateTime}}
</view> </view>
<view class="" style="width: 100%;background-color: gray;height: 2rpx;" /> <view class="" style="width: 100%;background-color: gray;height: 2rpx; margin-top: 10rpx;" />
</view> </view>
<view class="page-main"> <view class="page-main">
@ -36,20 +36,24 @@
</view> </view>
</view> </view>
<winScanNormal ref="scanPopup" title="设备编号" @getResult='getScanResult'></winScanNormal> <winScanNormal ref="scanPopup" title="设备编号" @getResult='getScanResult'></winScanNormal>
<showModal ref="comMessage"></showModal>
</view> </view>
</template> </template>
<script> <script>
import showModal from '../../mycomponents/common/showModal.vue'
import customerFrom from "@/mycomponents/form/customerFrom.vue" import customerFrom from "@/mycomponents/form/customerFrom.vue"
import winScanNormal from "@/mycomponents/scan/winScanNormal.vue" import winScanNormal from "@/mycomponents/scan/winScanNormal.vue"
import date from "@/mycomponents/scan/winScanNormal.vue" import date from "@/mycomponents/scan/winScanNormal.vue"
import {getCurrDateTime} from "@/common/basic.js" import {getCurrDateTime,
deepCopyData} from "@/common/basic.js"
export default { export default {
components: { components: {
customerFrom, customerFrom,
winScanNormal winScanNormal,
showModal
}, },
data() { data() {
return { return {
@ -63,7 +67,7 @@
content: "检查各个管路及接头", content: "检查各个管路及接头",
methond: "目视野无液体渗出", methond: "目视野无液体渗出",
placeholder: "请输入点检状态", placeholder: "请输入点检状态",
name: '', name: "正在处理",
value: "", value: "",
}, },
{ {
@ -75,7 +79,7 @@
lower: 80, lower: 80,
upper: 100, upper: 100,
placeholder: "请输入点检状态", placeholder: "请输入点检状态",
name: '', name: '停机状态',
value: "", value: "",
}, },
{ {
@ -86,7 +90,7 @@
lower: 0, lower: 0,
upper: 6, upper: 6,
placeholder: "请输入待机状态下真空度", placeholder: "请输入待机状态下真空度",
name: '', name: '5',
value: "", value: "",
}, },
{ {
@ -193,7 +197,12 @@
this.dateTime =getCurrDateTime() this.dateTime =getCurrDateTime()
}, },
submit() { submit() {
if(this.deviceCode==""){
this.$refs.comMessage.showMessage("提示", "请先扫描设备编号")
return
}
this.$refs.customerFrom.submit(callBack => { this.$refs.customerFrom.submit(callBack => {
console.log("提交", JSON.stringify(callBack)) console.log("提交", JSON.stringify(callBack))
}) })

491
src/uni_modules/vk-uview-ui/components/u-radio/u-radio.vue

@ -1,12 +1,7 @@
<template> <template>
<view class="u-radio" :style="[radioStyle]"> <view class="u-radio" :style="[radioStyle]">
<view class="u-radio__icon-wrap" @tap="toggle" :class="[iconClass]" :style="[iconStyle]"> <view class="u-radio__icon-wrap" @tap="toggle" :class="[iconClass]" :style="[iconStyle]">
<u-icon <u-icon class="u-radio__icon-wrap__icon" name="checkbox-mark" :size="elIconSize" :color="iconColor" />
class="u-radio__icon-wrap__icon"
name="checkbox-mark"
:size="elIconSize"
:color="iconColor"
/>
</view> </view>
<view class="u-radio__label" @tap="onClickLabel" :style="{ fontSize: $u.addUnit(labelSize) }"> <view class="u-radio__label" @tap="onClickLabel" :style="{ fontSize: $u.addUnit(labelSize) }">
<slot /> <slot />
@ -15,262 +10,276 @@
</template> </template>
<script> <script>
/** /**
* radio 单选框 * radio 单选框
* @description 单选框用于有一个选择用户只能选择其中一个的场景搭配u-radio-group使用 * @description 单选框用于有一个选择用户只能选择其中一个的场景搭配u-radio-group使用
* @tutorial https://www.uviewui.com/components/radio.html * @tutorial https://www.uviewui.com/components/radio.html
* @property {String Number} icon-size 图标大小单位rpx默认24 * @property {String Number} icon-size 图标大小单位rpx默认24
* @property {String Number} label-size label字体大小单位rpx默认28 * @property {String Number} label-size label字体大小单位rpx默认28
* @property {String Number} name radio组件的标示符 * @property {String Number} name radio组件的标示符
* @property {String} shape 形状见上方说明默认circle * @property {String} shape 形状见上方说明默认circle
* @property {Boolean} disabled 是否禁用默认false * @property {Boolean} disabled 是否禁用默认false
* @property {Boolean} label-disabled 点击文本是否可以操作radio默认true * @property {Boolean} label-disabled 点击文本是否可以操作radio默认true
* @property {String} active-color 选中时的颜色如设置parent的active-color将失效 * @property {String} active-color 选中时的颜色如设置parent的active-color将失效
* @event {Function} change 某个radio状态发生变化时触发(选中状态) * @event {Function} change 某个radio状态发生变化时触发(选中状态)
* @example <u-radio :label-disabled="false">门掩黄昏无计留春住</u-radio> * @example <u-radio :label-disabled="false">门掩黄昏无计留春住</u-radio>
*/ */
export default { export default {
name: "u-radio", name: "u-radio",
emits: ["change"], emits: ["change"],
props: { props: {
// radio // radio
name: { name: {
type: [String, Number], type: [String, Number],
default: "" default: ""
}, },
// //
size: { size: {
type: [String, Number], type: [String, Number],
default: 34 default: 34
}, },
// squarecircle // squarecircle
shape: { shape: {
type: String, type: String,
default: "" default: ""
}, },
// //
disabled: { disabled: {
type: [String, Boolean], type: [String, Boolean],
default: "" default: ""
}, },
// //
labelDisabled: { labelDisabled: {
type: [String, Boolean], type: [String, Boolean],
default: "" default: ""
}, },
// parentactiveColor // parentactiveColor
activeColor: { activeColor: {
type: String, type: String,
default: "" default: ""
}, },
// rpx // rpx
iconSize: { iconSize: {
type: [String, Number], type: [String, Number],
default: "" default: ""
}, },
// labelrpx // labelrpx
labelSize: { labelSize: {
type: [String, Number], type: [String, Number],
default: "" default: ""
}
},
data() {
return {
// computed使this.parent.shape
// 使
parentData: {
iconSize: null,
labelDisabled: null,
disabled: null,
shape: null,
activeColor: null,
size: null,
width: null,
height: null,
value: null,
wrap: null
} }
};
},
created() {
this.parent = false;
// provide/inject使created
this.updateParentData();
this.parent.children.push(this);
},
computed: {
// u-raios-group
elDisabled() {
return this.disabled !== ""? this.disabled: this.parentData.disabled !== null? this.parentData.disabled: false;
},
// label
elLabelDisabled() {
return this.labelDisabled !== ""? this.labelDisabled: this.parentData.labelDisabled !== null? this.parentData.labelDisabled: false;
},
// size34rpx
elSize() {
return this.size ? this.size : this.parentData.size ? this.parentData.size : 34;
},
// 20
elIconSize() {
return this.iconSize? this.iconSize: this.parentData.iconSize? this.parentData.iconSize: 20;
}, },
// data() {
elActiveColor() { return {
return this.activeColor? this.activeColor: this.parentData.activeColor? this.parentData.activeColor: "primary"; // computed使this.parent.shape
// 使
parentData: {
iconSize: null,
labelDisabled: null,
disabled: null,
shape: null,
activeColor: null,
size: null,
width: null,
height: null,
value: null,
wrap: null
},
select: false
};
}, },
// created() {
elShape() { this.parent = false;
return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle"; // provide/inject使created
this.updateParentData();
this.parent.children.push(this);
}, },
// radioradionameparentvalue computed: {
iconStyle() { // u-raios-group
let style = {}; elDisabled() {
if (this.elActiveColor && this.parentData.value === this.name && !this.elDisabled) { return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData
style.borderColor = this.elActiveColor; .disabled : false;
style.backgroundColor = this.elActiveColor; },
// label
elLabelDisabled() {
return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this
.parentData.labelDisabled : false;
},
// size34rpx
elSize() {
return this.size ? this.size : this.parentData.size ? this.parentData.size : 34;
},
// 20
elIconSize() {
return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 20;
},
//
elActiveColor() {
return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor :
"primary";
},
//
elShape() {
return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
},
// radioradionameparentvalue
iconStyle() {
let style = {};
if (this.elActiveColor && this.parentData.value === this.name && !this.elDisabled) {
style.borderColor = this.elActiveColor;
style.backgroundColor = this.elActiveColor;
}
style.width = this.$u.addUnit(this.elSize);
style.height = this.$u.addUnit(this.elSize);
return style;
},
iconColor() {
return this.name === this.parentData.value ? "#ffffff" : "transparent";
},
iconClass() {
let classes = [];
classes.push("u-radio__icon-wrap--" + this.elShape);
if (this.name === this.parentData.value) classes.push("u-radio__icon-wrap--checked");
if (this.elDisabled) classes.push("u-radio__icon-wrap--disabled");
if (this.name === this.parentData.value && this.elDisabled)
classes.push("u-radio__icon-wrap--disabled--checked");
// ","
return classes.join(" ");
},
radioStyle() {
let style = {};
if (this.parentData.width) {
style.width = this.$u.addUnit(this.parentData.width);
// #ifdef MP
// 使float
style.float = "left";
// #endif
// #ifndef MP
// H5APP使flex
style.flex = `0 0 ${this.$u.addUnit(this.parentData.width)}`;
// #endif
}
if (this.parentData.wrap) {
style.width = "100%";
// #ifndef MP
// H5APP使flex100%
style.flex = "0 0 100%";
// #endif
}
return style;
} }
style.width = this.$u.addUnit(this.elSize);
style.height = this.$u.addUnit(this.elSize);
return style;
}, },
iconColor() { methods: {
return this.name === this.parentData.value ? "#ffffff" : "transparent"; updateParentData() {
}, this.getParentData("u-radio-group");
iconClass() { },
let classes = []; onClickLabel() {
classes.push("u-radio__icon-wrap--" + this.elShape); if (!this.elLabelDisabled && !this.elDisabled) {
if (this.name === this.parentData.value) classes.push("u-radio__icon-wrap--checked"); this.setRadioCheckedStatus();
if (this.elDisabled) classes.push("u-radio__icon-wrap--disabled"); }
if (this.name === this.parentData.value && this.elDisabled) },
classes.push("u-radio__icon-wrap--disabled--checked"); toggle() {
// "," if (!this.elDisabled) {
return classes.join(" "); this.setRadioCheckedStatus();
}, }
radioStyle() { },
let style = {}; emitEvent() {
if (this.parentData.width) { // u-radionamev-model()
style.width = this.$u.addUnit(this.parentData.width); if (this.parentData.value != this.name) this.$emit("change", this.name);
// #ifdef MP },
// 使float //
style.float = "left"; // parentData.valuenameu-radio
// #endif // u-radioparentData.value(computed)
// #ifndef MP setRadioCheckedStatus() {
// H5APP使flex this.emitEvent();
style.flex = `0 0 ${this.$u.addUnit(this.parentData.width)}`; // if (this.parent) {
// #endif // this.parent.setValue(this.name);
} // this.parentData.value = this.name;
if (this.parentData.wrap) { // }
style.width = "100%"; if (this.parent) {
// #ifndef MP if (this.parentData.value !== this.name) {
// H5APP使flex100% this.parent.setValue(this.name);
style.flex = "0 0 100%"; this.parentData.value = this.name;
// #endif } else {
this.parent.setValue('');
this.parentData.value = '';
}
}
} }
return style;
} }
}, };
methods: {
updateParentData() {
this.getParentData("u-radio-group");
},
onClickLabel() {
if (!this.elLabelDisabled && !this.elDisabled) {
this.setRadioCheckedStatus();
}
},
toggle() {
if (!this.elDisabled) {
this.setRadioCheckedStatus();
}
},
emitEvent() {
// u-radionamev-model()
if (this.parentData.value != this.name) this.$emit("change", this.name);
},
//
// parentData.valuenameu-radio
// u-radioparentData.value(computed)
setRadioCheckedStatus() {
this.emitEvent();
if (this.parent) {
this.parent.setValue(this.name);
this.parentData.value = this.name;
}
}
}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "../../libs/css/style.components.scss"; @import "../../libs/css/style.components.scss";
.u-radio {
/* #ifndef APP-NVUE */
display: inline-flex;
/* #endif */
align-items: center;
overflow: hidden;
user-select: none;
line-height: 1.8;
&__icon-wrap { .u-radio {
color: $u-content-color; /* #ifndef APP-NVUE */
@include vue-flex; display: inline-flex;
flex: none; /* #endif */
align-items: center; align-items: center;
justify-content: center; overflow: hidden;
box-sizing: border-box; user-select: none;
width: 42rpx; line-height: 1.8;
height: 42rpx;
color: transparent;
text-align: center;
transition-property: color, border-color, background-color;
font-size: 20px;
border: 1px solid #c8c9cc;
transition-duration: 0.2s;
/* #ifdef MP-TOUTIAO */ &__icon-wrap {
// 0 color: $u-content-color;
&__icon { @include vue-flex;
line-height: 0; flex: none;
} align-items: center;
/* #endif */ justify-content: center;
box-sizing: border-box;
width: 42rpx;
height: 42rpx;
color: transparent;
text-align: center;
transition-property: color, border-color, background-color;
font-size: 20px;
border: 1px solid #c8c9cc;
transition-duration: 0.2s;
&--circle { /* #ifdef MP-TOUTIAO */
border-radius: 100%; // 0
} &__icon {
line-height: 0;
}
&--square { /* #endif */
border-radius: 3px;
}
&--checked { &--circle {
color: #fff; border-radius: 100%;
background-color: #2979ff; }
border-color: #2979ff;
}
&--disabled { &--square {
background-color: #ebedf0; border-radius: 3px;
border-color: #c8c9cc; }
}
&--checked {
color: #fff;
background-color: #2979ff;
border-color: #2979ff;
}
&--disabled--checked { &--disabled {
color: #c8c9cc !important; background-color: #ebedf0;
border-color: #c8c9cc;
}
&--disabled--checked {
color: #c8c9cc !important;
}
} }
}
&__label { &__label {
word-wrap: break-word; word-wrap: break-word;
margin-left: 10rpx; margin-left: 10rpx;
margin-right: 24rpx; margin-right: 24rpx;
color: $u-content-color; color: $u-content-color;
font-size: 30rpx; font-size: 30rpx;
&--disabled { &--disabled {
color: #c8c9cc; color: #c8c9cc;
}
} }
} }
} </style>
</style>
Loading…
Cancel
Save