huangyw 2 jaren geleden
bovenliggende
commit
cdbbaec869

+ 54 - 0
src/xt_pages/outpatientDoctorStation/zujian/checkbox.vue Bestand weergeven

@@ -0,0 +1,54 @@
1
+<template>
2
+    <label class="option_panel">
3
+        <span class="check_box_panel">
4
+            <span class="check_box" :class="{ 'did_checked': checked, }"></span>
5
+        </span>
6
+        <span>{{ text }}</span>
7
+    </label>
8
+</template>
9
+
10
+<script>
11
+export default {
12
+    name: "OptionCheckBox",
13
+    props: {
14
+        text: {
15
+            type: String,
16
+        },
17
+        checked: {
18
+            type: Boolean,
19
+            default: false,
20
+        }
21
+    }
22
+}
23
+</script>
24
+
25
+
26
+<style scoped>
27
+.option_panel {
28
+    margin: 0 5px 0 0;
29
+    /* font-size: 16px; */
30
+}
31
+.option_panel .check_box_panel {
32
+    white-space: nowrap;
33
+    outline: none;
34
+    display: inline-block;
35
+    line-height: 1;
36
+    position: relative;
37
+    vertical-align: middle;
38
+}
39
+.option_panel .check_box_panel .check_box {
40
+    display: inline-block;
41
+    position: relative;
42
+    border: 1px solid #000;
43
+    box-sizing: border-box;
44
+    width: 14px;
45
+    height: 14px;
46
+    background-color: #fff;
47
+}
48
+.check_box_panel .did_checked::after {
49
+    content: "√";
50
+    font-size: 10px;
51
+    margin-left: 2px;
52
+    position: absolute;
53
+}
54
+</style>

+ 73 - 0
src/xt_pages/outpatientDoctorStation/zujian/labelbox.vue Bestand weergeven

@@ -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>