|
@@ -0,0 +1,73 @@
|
|
1
|
+<template >
|
|
2
|
+ <label class="radio-lebel-box">
|
|
3
|
+ <span class="radio-inner">
|
|
4
|
+ <span class="radio-fang " :class="{'is-checked-radio':isChecked}"></span>
|
|
5
|
+ <input type="radio" class="radio-no" :checked='isChecked' >
|
|
6
|
+ </span>
|
|
7
|
+ <span v-html="showValue"> </span>
|
|
8
|
+ </label>
|
|
9
|
+</template>
|
|
10
|
+
|
|
11
|
+<script>
|
|
12
|
+ export default {
|
|
13
|
+
|
|
14
|
+ name: "labelBox",
|
|
15
|
+ props: {
|
|
16
|
+ isChecked:{
|
|
17
|
+ type:Boolean,
|
|
18
|
+ default:false,
|
|
19
|
+ },
|
|
20
|
+ showValue:{
|
|
21
|
+ type:String,
|
|
22
|
+ default:'',
|
|
23
|
+ },
|
|
24
|
+ },
|
|
25
|
+ data() {
|
|
26
|
+ return {
|
|
27
|
+ }
|
|
28
|
+ },
|
|
29
|
+ methods:{
|
|
30
|
+
|
|
31
|
+ }
|
|
32
|
+ }
|
|
33
|
+</script>
|
|
34
|
+
|
|
35
|
+<style scoped>
|
|
36
|
+.radio-lebel-box {
|
|
37
|
+ font-weight: 400;
|
|
38
|
+ cursor: pointer;
|
|
39
|
+}
|
|
40
|
+.radio-inner {
|
|
41
|
+ white-space: nowrap;
|
|
42
|
+ cursor: pointer;
|
|
43
|
+ outline: none;
|
|
44
|
+ display: inline-block;
|
|
45
|
+ line-height: 1;
|
|
46
|
+ position: relative;
|
|
47
|
+ vertical-align: middle;
|
|
48
|
+}
|
|
49
|
+.radio-fang {
|
|
50
|
+ display: inline-block;
|
|
51
|
+ position: relative;
|
|
52
|
+ border: 1px solid #000;
|
|
53
|
+ box-sizing: border-box;
|
|
54
|
+ width: 14px;
|
|
55
|
+ height: 14px;
|
|
56
|
+ background-color: #fff;
|
|
57
|
+ z-index: 1;
|
|
58
|
+ transition: border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46);
|
|
59
|
+}
|
|
60
|
+.is-checked-radio::after {
|
|
61
|
+ content: "√";
|
|
62
|
+ font-size: 15px;
|
|
63
|
+}
|
|
64
|
+.radio-no {
|
|
65
|
+ opacity: 0;
|
|
66
|
+ outline: none;
|
|
67
|
+ position: absolute;
|
|
68
|
+ margin: 0;
|
|
69
|
+ width: 0;
|
|
70
|
+ height: 0;
|
|
71
|
+ z-index: -1;
|
|
72
|
+}
|
|
73
|
+</style>
|