aaa-ui-test 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of aaa-ui-test might be problematic. Click here for more details.
- package/README.md +62 -0
- package/babel-plugin-on-demand-load/index.js +74 -0
- package/babel-plugin-on-demand-load/report.js +49 -0
- package/lib/index.css +2213 -0
- package/lib/index.js +10083 -0
- package/package.json +73 -0
- package/src/assets/css/common/_mixin.scss +130 -0
- package/src/assets/css/common/_var.scss +69 -0
- package/src/components/address/index.js +8 -0
- package/src/components/address/index.scss +72 -0
- package/src/components/address/src/address.vue +238 -0
- package/src/components/amount/index.js +6 -0
- package/src/components/amount/index.scss +88 -0
- package/src/components/amount/src/amount.vue +143 -0
- package/src/components/button/__tests__/__snapshots__/index.test.js.snap +7 -0
- package/src/components/button/__tests__/index.test.js +39 -0
- package/src/components/button/index.js +7 -0
- package/src/components/button/index.scss +83 -0
- package/src/components/button/src/button.vue +39 -0
- package/src/components/button-group/index.js +8 -0
- package/src/components/button-group/index.scss +37 -0
- package/src/components/button-group/src/button-group.vue +21 -0
- package/src/components/checkbox/index.js +8 -0
- package/src/components/checkbox/index.scss +47 -0
- package/src/components/checkbox/src/checkbox-group.vue +53 -0
- package/src/components/checkbox/src/checkbox.vue +153 -0
- package/src/components/date-selecter/index.js +6 -0
- package/src/components/date-selecter/index.scss +190 -0
- package/src/components/date-selecter/src/dateselecter.vue +387 -0
- package/src/components/default/index.js +6 -0
- package/src/components/default/index.scss +25 -0
- package/src/components/default/src/default.vue +23 -0
- package/src/components/dialog/index.js +146 -0
- package/src/components/dialog/index.scss +250 -0
- package/src/components/dialog/src/dialog.vue +153 -0
- package/src/components/field/index.js +8 -0
- package/src/components/field/index.scss +93 -0
- package/src/components/field/src/field.vue +57 -0
- package/src/components/input/__tests__/__snapshots__/index.test.js.snap +10 -0
- package/src/components/input/__tests__/index.test.js +63 -0
- package/src/components/input/index.js +8 -0
- package/src/components/input/index.scss +91 -0
- package/src/components/input/src/input.vue +214 -0
- package/src/components/list/index.js +8 -0
- package/src/components/list/index.scss +21 -0
- package/src/components/list/src/list.vue +16 -0
- package/src/components/list-item/index.js +8 -0
- package/src/components/list-item/index.scss +126 -0
- package/src/components/list-item/src/list-item.vue +59 -0
- package/src/components/loading/__tests__/__snapshots__/index.test.js.snap +9 -0
- package/src/components/loading/__tests__/index.test.js +30 -0
- package/src/components/loading/index.js +128 -0
- package/src/components/loading/index.scss +33 -0
- package/src/components/loading/src/loading.vue +23 -0
- package/src/components/mask/index.js +9 -0
- package/src/components/mask/index.scss +16 -0
- package/src/components/mask/src/mask.vue +52 -0
- package/src/components/notice/index.js +6 -0
- package/src/components/notice/index.scss +81 -0
- package/src/components/notice/src/notice.vue +128 -0
- package/src/components/overlay/index.js +8 -0
- package/src/components/overlay/index.scss +119 -0
- package/src/components/overlay/src/overlay.vue +72 -0
- package/src/components/picker/index.js +7 -0
- package/src/components/picker/index.scss +49 -0
- package/src/components/picker/src/picker.vue +205 -0
- package/src/components/popup/index.js +8 -0
- package/src/components/popup/index.scss +79 -0
- package/src/components/popup/src/popup.vue +88 -0
- package/src/components/popup-header/index.js +8 -0
- package/src/components/popup-header/index.scss +45 -0
- package/src/components/popup-header/src/popup-header.vue +41 -0
- package/src/components/radio/index.js +8 -0
- package/src/components/radio/index.scss +19 -0
- package/src/components/radio/src/radio.vue +51 -0
- package/src/components/select/index.js +8 -0
- package/src/components/select/index.scss +51 -0
- package/src/components/select/src/select.vue +86 -0
- package/src/components/swiper/index.js +6 -0
- package/src/components/swiper/index.scss +49 -0
- package/src/components/swiper/src/swiper.vue +211 -0
- package/src/components/switch/__tests__/__snapshots__/index.test.js.snap +15 -0
- package/src/components/switch/__tests__/index.test.js +44 -0
- package/src/components/switch/index.js +8 -0
- package/src/components/switch/index.scss +85 -0
- package/src/components/switch/src/switch.vue +60 -0
- package/src/components/tabs/index.js +8 -0
- package/src/components/tabs/index.scss +73 -0
- package/src/components/tabs/src/tab-item.vue +40 -0
- package/src/components/tabs/src/tabs.vue +121 -0
- package/src/components/textarea/index.js +8 -0
- package/src/components/textarea/index.scss +41 -0
- package/src/components/textarea/src/textarea.vue +140 -0
- package/src/components/toast/__tests__/__snapshots__/index.test.js.snap +3 -0
- package/src/components/toast/__tests__/index.test.js +25 -0
- package/src/components/toast/index.js +53 -0
- package/src/components/toast/index.scss +102 -0
- package/src/components/toast/src/toast.vue +19 -0
- package/src/index.js +87 -0
- package/src/mixins/emitter.js +33 -0
- package/src/mixins/visible.js +23 -0
- package/src/utils/clickoutside.js +42 -0
- package/src/utils/fix-body.js +46 -0
- package/src/utils/utils.js +71 -0
@@ -0,0 +1,49 @@
|
|
1
|
+
@charset "utf-8";
|
2
|
+
@import "~@/assets/css/common/var";
|
3
|
+
@import "~@/assets/css/common/mixin";
|
4
|
+
|
5
|
+
.jdd-select-date-scroller dl {
|
6
|
+
margin-top: 45px;
|
7
|
+
width: 100%
|
8
|
+
}
|
9
|
+
|
10
|
+
.jdd-select-date-scroller dl dd.focus {
|
11
|
+
font-size: 18px;
|
12
|
+
color: #4D7BFE;
|
13
|
+
}
|
14
|
+
|
15
|
+
.jdd-select-date-scroller dd {
|
16
|
+
font-family: PingFangSC-Medium;
|
17
|
+
width: 100%;
|
18
|
+
height: 45px;
|
19
|
+
line-height: 45px
|
20
|
+
}
|
21
|
+
|
22
|
+
.jdd-select-date-btns li {
|
23
|
+
height: 50px;
|
24
|
+
line-height: 50px
|
25
|
+
}
|
26
|
+
|
27
|
+
.jdd-select-date-scroller-n dl {
|
28
|
+
margin-top: 100px;
|
29
|
+
width: 100%;
|
30
|
+
}
|
31
|
+
|
32
|
+
.jdd-select-date-scroller-n dl dd.focus {
|
33
|
+
font-size: 18px;
|
34
|
+
color: #4D7BFE;
|
35
|
+
}
|
36
|
+
|
37
|
+
.jdd-select-date-scroller-n dd {
|
38
|
+
font-family: PingFangSC-Medium;
|
39
|
+
width: 100%;
|
40
|
+
height: 50px;
|
41
|
+
line-height: 50px;
|
42
|
+
color: #999;
|
43
|
+
transition: all .2s ease;
|
44
|
+
}
|
45
|
+
|
46
|
+
.jdd-select-date-btns-n li {
|
47
|
+
height: 60px;
|
48
|
+
line-height: 60px
|
49
|
+
}
|
@@ -0,0 +1,205 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<dl
|
4
|
+
ref="dl"
|
5
|
+
@touchstart.stop.prevent="touchstart"
|
6
|
+
@touchmove.stop.prevent="touchmove"
|
7
|
+
@touchend.stop.prevent="touchend"
|
8
|
+
>
|
9
|
+
<dd v-for="(item,ind) in data" :key="ind" :class="{focus:index == ind}">{{item}}</dd>
|
10
|
+
</dl>
|
11
|
+
</div>
|
12
|
+
</template>
|
13
|
+
|
14
|
+
<script>
|
15
|
+
export default {
|
16
|
+
name: "JddPicker",
|
17
|
+
props: {
|
18
|
+
type: {
|
19
|
+
type: String
|
20
|
+
},
|
21
|
+
// change:{
|
22
|
+
// type:Function
|
23
|
+
// },
|
24
|
+
outindex: {
|
25
|
+
type: Number,
|
26
|
+
default: 2
|
27
|
+
},
|
28
|
+
data: {
|
29
|
+
type: Array,
|
30
|
+
default() {
|
31
|
+
return [];
|
32
|
+
}
|
33
|
+
}
|
34
|
+
},
|
35
|
+
data() {
|
36
|
+
return {
|
37
|
+
currentTop: 0,
|
38
|
+
moveTop: 0,
|
39
|
+
moveDis: 0,
|
40
|
+
index: this.outindex,
|
41
|
+
height: 50,
|
42
|
+
childrenLength: 0
|
43
|
+
};
|
44
|
+
},
|
45
|
+
mounted() {
|
46
|
+
// debugger;
|
47
|
+
// this.renderPosition(this.index);
|
48
|
+
|
49
|
+
var top = -(this.index * this.height);
|
50
|
+
var style =
|
51
|
+
"-webkit-transition-timing-function: cubic-bezier(0.1, 0.57, 0.1, 1); -webkit-transition-duration: 300ms; transition-timing-function: cubic-bezier(0.1, 0.57, 0.1, 1); transition-duration: 300ms; transform: translate3d(0px, " +
|
52
|
+
top +
|
53
|
+
"px,0px);-webkit-transform: translate3d(0px, " +
|
54
|
+
top +
|
55
|
+
"px,0px)";
|
56
|
+
// this.$refs.dl.style = style;
|
57
|
+
// this.$refs.dl.style.transform = "translate3d(0px, " +
|
58
|
+
// top +
|
59
|
+
// "px,0px)";
|
60
|
+
this.setPos(this.$refs.dl,top);
|
61
|
+
|
62
|
+
//var childrenes = this.$refs.dl.parentNode.parentNode.children;
|
63
|
+
|
64
|
+
// for(var i=0; i<childrenes.length; i++){
|
65
|
+
|
66
|
+
// childrenes[i].style.width = 100/childrenes.length + '%';
|
67
|
+
// }
|
68
|
+
|
69
|
+
// this.$nextTick(()=>{
|
70
|
+
// this.setIndex(this.$refs.dl);
|
71
|
+
// })
|
72
|
+
},
|
73
|
+
updated() {
|
74
|
+
this.renderPosition(this.outindex);
|
75
|
+
},
|
76
|
+
watch: {
|
77
|
+
data(newVal) {
|
78
|
+
this.index = Math.min(this.index, newVal.length - 1);
|
79
|
+
this.$emit("update:outindex", this.index);
|
80
|
+
}
|
81
|
+
},
|
82
|
+
methods: {
|
83
|
+
setPos(dom,top) {
|
84
|
+
dom.style["-webkit-transition-timing-function"] = "cubic-bezier(0.1, 0.57, 0.1, 1)";
|
85
|
+
dom.style["-webkit-transition-duration"] = "300ms";
|
86
|
+
dom.style["transition-timing-function"] = "cubic-bezier(0.1, 0.57, 0.1, 1)";
|
87
|
+
dom.style["transition-duration"] = "300ms";
|
88
|
+
dom.style["-webkit-transform"] = "translate3d(0px, " +top +"px,0px)";
|
89
|
+
dom.style["transform"] = "translate3d(0px, " +top +"px,0px)";
|
90
|
+
//dom.style
|
91
|
+
},
|
92
|
+
renderPosition: function() {
|
93
|
+
this.index =
|
94
|
+
this.index >= this.data.length ? this.data.length - 1 : this.index;
|
95
|
+
var top = -(this.index * this.height);
|
96
|
+
var style =
|
97
|
+
"-webkit-transition-timing-function: cubic-bezier(0.1, 0.57, 0.1, 1); -webkit-transition-duration: 300ms; transition-timing-function: cubic-bezier(0.1, 0.57, 0.1, 1); transition-duration: 300ms; transform: translate3d(0px, " +
|
98
|
+
top +
|
99
|
+
"px,0px);-webkit-transform: translate3d(0px, " +
|
100
|
+
top +
|
101
|
+
"px,0px)";
|
102
|
+
//this.$refs.dl.style = style;
|
103
|
+
// this.$refs.dl.style.transform = "translate3d(0px, " +
|
104
|
+
// top +
|
105
|
+
// "px,0px)";
|
106
|
+
this.setPos(this.$refs.dl,top)
|
107
|
+
|
108
|
+
// var childrenes = this.$refs.dl.parentNode.parentNode.children;
|
109
|
+
|
110
|
+
// for(var i=0; i<childrenes.length; i++){
|
111
|
+
|
112
|
+
// childrenes[i].style.width = 100/childrenes.length + '%';
|
113
|
+
// }
|
114
|
+
|
115
|
+
// this.$nextTick(()=>{
|
116
|
+
// this.setIndex(this.$refs.dl);
|
117
|
+
// })
|
118
|
+
},
|
119
|
+
touchstart: function(ev) {
|
120
|
+
this.childrenLength = ev.target.parentNode.children.length;
|
121
|
+
this.currentTop = ev.targetTouches[0].clientY;
|
122
|
+
// console.log( 'currentTop:' + this.currentTop );
|
123
|
+
},
|
124
|
+
touchmove: function(ev) {
|
125
|
+
this.moveTop = ev.targetTouches[0].clientY;
|
126
|
+
this.moveDis = Number(this.moveTop) - Number(this.currentTop);
|
127
|
+
|
128
|
+
var top = -(this.index * this.height) + this.moveDis;
|
129
|
+
|
130
|
+
var style =
|
131
|
+
"-webkit-transition-timing-function: cubic-bezier(0.1, 0.57, 0.1, 1); -webkit-transition-duration: 300ms; transition-timing-function: cubic-bezier(0.1, 0.57, 0.1, 1); transition-duration: 300ms; transform: translate3d(0px, " +
|
132
|
+
top +
|
133
|
+
"px,0px);-webkit-transform: translate3d(0px, " +
|
134
|
+
top +
|
135
|
+
"px,0px)";
|
136
|
+
// ev.target.parentNode.style = style;
|
137
|
+
// ev.target.parentNode.style.transform = "translate3d(0px, " +
|
138
|
+
// top +
|
139
|
+
// "px,0px)";
|
140
|
+
this.setPos(ev.target.parentNode,top)
|
141
|
+
|
142
|
+
// console.log('moveTop:' + this.moveTop);
|
143
|
+
// console.log('moveDis:' + this.moveDis);
|
144
|
+
},
|
145
|
+
touchend: function(ev) {
|
146
|
+
if (this.moveDis >= this.height / 2) {
|
147
|
+
let num = Math.floor(this.moveDis / this.height) || 1;
|
148
|
+
this.index = this.index - num;
|
149
|
+
|
150
|
+
if (this.index < 1) {
|
151
|
+
this.index = 0;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
if (this.moveDis <= -this.height / 2) {
|
156
|
+
let num = -Math.floor(this.moveDis / this.height) || 1;
|
157
|
+
|
158
|
+
this.index = this.index + num;
|
159
|
+
if (this.index > this.childrenLength - 1) {
|
160
|
+
this.index = this.childrenLength - 1;
|
161
|
+
}
|
162
|
+
}
|
163
|
+
|
164
|
+
var top = -(this.index * this.height);
|
165
|
+
|
166
|
+
var style =
|
167
|
+
"-webkit-transition-timing-function: cubic-bezier(0.1, 0.57, 0.1, 1); -webkit-transition-duration: 300ms; transition-timing-function: cubic-bezier(0.1, 0.57, 0.1, 1); transition-duration: 300ms; transform: translate3d(0px, " +
|
168
|
+
top +
|
169
|
+
"px,0px);-webkit-transform: translate3d(0px, " +
|
170
|
+
top +
|
171
|
+
"px,0px)";
|
172
|
+
|
173
|
+
//ev.target.parentNode.style = style;
|
174
|
+
// ev.target.parentNode.style.transform = "translate3d(0px, " +
|
175
|
+
// top +
|
176
|
+
// "px,0px)";
|
177
|
+
this.setPos(ev.target.parentNode,top)
|
178
|
+
//this.setIndex(ev.target.parentNode);
|
179
|
+
|
180
|
+
// debugger;
|
181
|
+
this.$emit("update:outindex", this.index);
|
182
|
+
var changeObj = {};
|
183
|
+
changeObj["type"] = this.type;
|
184
|
+
changeObj["index"] = this.index;
|
185
|
+
this.$emit("change", changeObj);
|
186
|
+
// this.$props.change && this.$props.change(changeObj);
|
187
|
+
}
|
188
|
+
// setIndex: function(scrollBox){
|
189
|
+
// var childrens = scrollBox.children;
|
190
|
+
// // let exist = false;
|
191
|
+
// for(var i=0;i<childrens.length;i++)
|
192
|
+
// {
|
193
|
+
// if(i == this.index){
|
194
|
+
// exist = true;
|
195
|
+
// childrens[i].className = 'focus';
|
196
|
+
// }
|
197
|
+
// else{
|
198
|
+
// childrens[i].className = '';
|
199
|
+
// }
|
200
|
+
|
201
|
+
// }
|
202
|
+
// }
|
203
|
+
}
|
204
|
+
};
|
205
|
+
</script>
|
@@ -0,0 +1,79 @@
|
|
1
|
+
.jdd-popup {
|
2
|
+
display: flex;
|
3
|
+
flex-direction: column;
|
4
|
+
position: absolute;
|
5
|
+
left: 0;
|
6
|
+
bottom: 0;
|
7
|
+
width: 100%;
|
8
|
+
// transition: transform .3s ease;
|
9
|
+
z-index: 1001;
|
10
|
+
background: #ffffff;
|
11
|
+
border-radius: 8px 8px 0px 0px;
|
12
|
+
max-height: 80%;
|
13
|
+
padding-bottom: constant(safe-area-inset-bottom) !important;
|
14
|
+
padding-bottom: env(safe-area-inset-bottom) !important;
|
15
|
+
|
16
|
+
.jdd-popup-content {
|
17
|
+
overflow-y: auto;
|
18
|
+
-webkit-overflow-scrolling: touch;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
.jdd-popup-wrap {
|
22
|
+
position: fixed;
|
23
|
+
left: 0;
|
24
|
+
bottom: 0;
|
25
|
+
width: 100%;
|
26
|
+
height: 100%;
|
27
|
+
z-index: 1001;
|
28
|
+
}
|
29
|
+
.jdd-fade-bottom-enter-active {
|
30
|
+
animation-delay: .3s;
|
31
|
+
.jdd-popup {
|
32
|
+
//animation: jdd-popup-leave .3s ease-in both;
|
33
|
+
animation: jdd-popup-enter .3s;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
@keyframes jdd-popup-enter {
|
37
|
+
0% {
|
38
|
+
opacity: 1;
|
39
|
+
transform: translate3d(0, 100%, 0);
|
40
|
+
}
|
41
|
+
|
42
|
+
100% {
|
43
|
+
transform: translate3d(0, 0, 0);
|
44
|
+
opacity: 1;
|
45
|
+
}
|
46
|
+
|
47
|
+
}
|
48
|
+
|
49
|
+
// .jdd-fade-bottom-enter{
|
50
|
+
// // transition-duration: 300ms;
|
51
|
+
|
52
|
+
// .jdd-popup {
|
53
|
+
// //animation: jdd-popup-leave .3s ease-in both;
|
54
|
+
// transform: translate3d(0, 100%, 0);
|
55
|
+
// opacity: 0;
|
56
|
+
// }
|
57
|
+
// }
|
58
|
+
|
59
|
+
.jdd-fade-bottom-leave-active {
|
60
|
+
// transition-duration: 300ms;
|
61
|
+
animation-delay: .3s;
|
62
|
+
|
63
|
+
.jdd-popup {
|
64
|
+
animation: jdd-popup-leave .3s ease-in both;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
@keyframes jdd-popup-leave {
|
69
|
+
0% {
|
70
|
+
transform: translate3d(0, 0, 0);
|
71
|
+
opacity: 1;
|
72
|
+
}
|
73
|
+
|
74
|
+
100% {
|
75
|
+
transform: translate3d(0, 100%, 0);
|
76
|
+
opacity: 0;
|
77
|
+
}
|
78
|
+
|
79
|
+
}
|
@@ -0,0 +1,88 @@
|
|
1
|
+
<template>
|
2
|
+
<transition name="jdd-fade-bottom" appear>
|
3
|
+
<div class="jdd-popup-wrap" v-show="visible">
|
4
|
+
<jdd-mask v-model="getMask" @onClick="maskClick"></jdd-mask>
|
5
|
+
<div class="jdd-popup" :style="{height:popHeight}">
|
6
|
+
<slot name="popup-header">
|
7
|
+
<div class="jdd-popup-header" v-show="mainTitle">
|
8
|
+
<div class="jdd-popup-main-title">
|
9
|
+
<p>{{mainTitle}}</p>
|
10
|
+
<span @click.stop="handleClose"></span>
|
11
|
+
</div>
|
12
|
+
<p v-show="subTitle" class="jdd-popup-sub-title">{{subTitle}}</p>
|
13
|
+
</div>
|
14
|
+
</slot>
|
15
|
+
<div class="jdd-popup-content">
|
16
|
+
<slot></slot>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</transition>
|
21
|
+
</template>
|
22
|
+
<script>
|
23
|
+
import JddMask from "../../mask";
|
24
|
+
|
25
|
+
export default {
|
26
|
+
name: "JddPopup",
|
27
|
+
props: {
|
28
|
+
visible: {
|
29
|
+
type: Boolean,
|
30
|
+
default: false
|
31
|
+
},
|
32
|
+
popHeight: {
|
33
|
+
type: String,
|
34
|
+
default: ""
|
35
|
+
},
|
36
|
+
mainTitle: {
|
37
|
+
type: String,
|
38
|
+
default: ""
|
39
|
+
},
|
40
|
+
subTitle: {
|
41
|
+
type: String,
|
42
|
+
default: ""
|
43
|
+
},
|
44
|
+
showMask: {
|
45
|
+
type: Boolean,
|
46
|
+
default: true
|
47
|
+
}
|
48
|
+
},
|
49
|
+
data() {
|
50
|
+
return {};
|
51
|
+
},
|
52
|
+
components: {
|
53
|
+
JddMask
|
54
|
+
},
|
55
|
+
mounted() {
|
56
|
+
// const body = document.querySelector("body");
|
57
|
+
//将body放在
|
58
|
+
document.querySelector("body").appendChild(this.$el);
|
59
|
+
},
|
60
|
+
provide: function() {
|
61
|
+
return {
|
62
|
+
closeMask: this.handleClose
|
63
|
+
};
|
64
|
+
},
|
65
|
+
computed: {
|
66
|
+
getMask(){
|
67
|
+
return this.visible && this.showMask;
|
68
|
+
}
|
69
|
+
},
|
70
|
+
methods: {
|
71
|
+
maskClick() {
|
72
|
+
this.$emit("update:visible", false);
|
73
|
+
// this.showModal = false;
|
74
|
+
},
|
75
|
+
handleClose() {
|
76
|
+
this.$emit("update:visible", false);
|
77
|
+
}
|
78
|
+
},
|
79
|
+
destroyed() {
|
80
|
+
//remove child when components destroyed
|
81
|
+
if (this.$el && this.$el.parentNode) {
|
82
|
+
this.$el.parentNode.removeChild(this.$el);
|
83
|
+
}
|
84
|
+
}
|
85
|
+
};
|
86
|
+
</script>
|
87
|
+
|
88
|
+
|
@@ -0,0 +1,45 @@
|
|
1
|
+
@charset "utf-8";
|
2
|
+
@import "~@/assets/css/common/_mixin.scss";
|
3
|
+
.jdd-popup-header {
|
4
|
+
@include jdd-border-bottom();
|
5
|
+
flex-shrink: 0;
|
6
|
+
|
7
|
+
display: flex;
|
8
|
+
flex-direction: column;
|
9
|
+
padding: 20px 16px;
|
10
|
+
position: relative;
|
11
|
+
.jdd-popup-main-title {
|
12
|
+
display: flex;
|
13
|
+
line-height: 25px;
|
14
|
+
p {
|
15
|
+
font-family: PingFangSC-Medium;
|
16
|
+
font-size: 18px;
|
17
|
+
color: #333333;
|
18
|
+
letter-spacing: 0;
|
19
|
+
text-align: center;
|
20
|
+
flex: 1;
|
21
|
+
}
|
22
|
+
span {
|
23
|
+
position: absolute;
|
24
|
+
right: 0px;
|
25
|
+
top: 0;
|
26
|
+
bottom: 0;
|
27
|
+
margin: auto 0;
|
28
|
+
display: block;
|
29
|
+
width: 44px;
|
30
|
+
height: 44px;
|
31
|
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAABYCAYAAABxlTA0AAAAAXNSR0IArs4c6QAAAu9JREFUeAHt2r+LE0EUwPHLXqWlRQohhYWFIASSf+C82s5CQWut7QX9F+xTKni9licWlvlhQBRsUxmuucoiv3wPMse47ia3k7mdF+67EHay2X0788nL290hBwcsCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAALGBMbj8f3YXZKYdyaTyY3YcavGy6oeEHv/wWDwZjabfRsOh09ixR6NRnfn8/nX6XT6MTVyI9agQuIo7mq1er0+dpFl2bNOp/MhJJY7RnGXy+UXiXtbtzUajc/NZvNhq9X64/apc50sg7UsCMIrb7CHAvNul0zO42psOcexZPIL7zy1NpMBt9vt75qxMtqFN+Jg5CLcddye/CreeueotZm0ROhINWM1c6V56I28UrnYhNvtdp9LmVh5sWttJgfW0e6CbBlXx2YCOBTZOq4p4KrI+4BrDviyyPuCaxJ4G7JcsAb+fa7uv156qS9oriP+2kwN9jul7Q0XvnMBvpXb3ySu9tEssHauBFk/8hezuNpJ08DawS3IpnG1/8me5PTkl1m05soT33l+X9m+lO2nKR8i8n0qem8a2N0tFNRcnWPI9AlQM7xoYFa2mQV2uG5WzIFp5rq2rIPnLrwYV9o0CVyGKxI9AX4q6/8miGTq8/GVSgUGNwe8CVfvc3W+uGgWTjL9vUVkU3cR23D9C1rJ3cVCM1y+iJPAhIt+mBngKrhOYR+QTZSIEFxF1nJRVJMtlYvkGRyK67JY11p7FVWa/0zaWygXSYFj4Dpoq8jJSoT+byHmrJhe2MrKhdTqR+6LqHudDFj+C/Fbfta/cgPeaW6hBPlMzvMjd57a3iYtEf1+/6aM9JO8juS1E64cf7F45eJMsvqBwP+8+PC6NRRZQF5KlkX9srUsSNx7182T8SKAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAK2Bf4CoKj4d3I8GvAAAAAASUVORK5CYII=);
|
32
|
+
background-size: 100% auto;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
.jdd-popup-sub-title {
|
36
|
+
font-family: PingFangSC-Regular;
|
37
|
+
font-size: 13px;
|
38
|
+
color: #999999;
|
39
|
+
text-align: center;
|
40
|
+
line-height: 18px;
|
41
|
+
margin-bottom: 3px;
|
42
|
+
padding-right: 18px;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="jdd-popup-header">
|
3
|
+
<div class="jdd-popup-main-title">
|
4
|
+
<p :style="{'text-align':textAlign}">{{mainTitle}}</p>
|
5
|
+
<span @click.stop="closePopup"></span>
|
6
|
+
</div>
|
7
|
+
<p v-show="subTitle" class="jdd-popup-sub-title" :style="{'text-align':textAlign}">{{subTitle}}</p>
|
8
|
+
</div>
|
9
|
+
</template>
|
10
|
+
<script>
|
11
|
+
export default {
|
12
|
+
name: "JddPopupHeader",
|
13
|
+
inject:['closeMask'],
|
14
|
+
props: {
|
15
|
+
mainTitle: {
|
16
|
+
type: String,
|
17
|
+
default: ""
|
18
|
+
},
|
19
|
+
subTitle: {
|
20
|
+
type: String,
|
21
|
+
default: ""
|
22
|
+
},
|
23
|
+
textAlign:{
|
24
|
+
type: String,
|
25
|
+
default: "center"
|
26
|
+
}
|
27
|
+
},
|
28
|
+
data() {
|
29
|
+
return {
|
30
|
+
};
|
31
|
+
},
|
32
|
+
methods: {
|
33
|
+
closePopup(){
|
34
|
+
this.closeMask();
|
35
|
+
this.$emit("close-pop");
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
</script>
|
40
|
+
|
41
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
.jdd-radio-item {
|
2
|
+
position: relative;
|
3
|
+
.jdd-radio-check {
|
4
|
+
position: absolute;
|
5
|
+
top: 0;
|
6
|
+
bottom: 0;
|
7
|
+
right: 16px;
|
8
|
+
width: 16px;
|
9
|
+
height: 16px;
|
10
|
+
margin: auto 0;
|
11
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEUAAABPif9NfP9Qf/9NfP9NfP9NfP9Ne/9Ne/9Tf/9Qgf9ZgP9ohf9OfP9Ne/9Oe/9Ne/9NfP9NfP9Nff9Nff9NfP9Off9Off9NfP9Rff9QgP9Oe/9OfP9Pe/9OfP9Ne/8dQQxFAAAAH3RSTlMADcYf4vik9N4nGhQJ7+rVza+Yi3BjWExCOTC6jH59kbkAigAAAKZJREFUOMvV0EkOgzAMQFEgATIwz9DB979l66hWFUfJuvUGrPeFQrK/n1yn3Q5SpNz0AMrEXSh4TxV1LdFvTcyvDn2M+tmmv3/U6BOdJue+l+gzuSxYsTl/kEsAv1gBZ6G1AvCLxfn6ve/CL564lhutQTE73wmDYsLX+iBixedA7UnACzvio7sCp8Jdn9QhU4GjhA+86A0Hvxhs1LFwP5Iq7k32m/MCVqERH4/NPOsAAAAASUVORK5CYII=) 0 0 no-repeat;
|
12
|
+
background-size: 100% auto;
|
13
|
+
}
|
14
|
+
.jdd-list-item {
|
15
|
+
&:active {
|
16
|
+
background-color: #F2F2F2;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="jdd-radio">
|
3
|
+
<div v-for="item in options" class="jdd-radio-item" :class="{'jdd-radio-item-active':item[selectField]===value}" @click="updateValue(item)" :key="item[selectField]">
|
4
|
+
<slot :slot-props="item"></slot>
|
5
|
+
<span class="jdd-radio-check" v-show="item[selectField]===value"></span>
|
6
|
+
</div>
|
7
|
+
</div>
|
8
|
+
</template>
|
9
|
+
<script>
|
10
|
+
export default {
|
11
|
+
name: "JddRadio",
|
12
|
+
props: {
|
13
|
+
mainTitle: {
|
14
|
+
type: String,
|
15
|
+
default: ""
|
16
|
+
},
|
17
|
+
subTitle: {
|
18
|
+
type: String,
|
19
|
+
default: ""
|
20
|
+
},
|
21
|
+
options: {
|
22
|
+
type: Array,
|
23
|
+
default: function(){
|
24
|
+
return []
|
25
|
+
}
|
26
|
+
},
|
27
|
+
value:{
|
28
|
+
default: ""
|
29
|
+
},
|
30
|
+
selectField:{
|
31
|
+
type: String,
|
32
|
+
default: "value"
|
33
|
+
}
|
34
|
+
},
|
35
|
+
data() {
|
36
|
+
return {
|
37
|
+
validateStatus: true,
|
38
|
+
label: this.title
|
39
|
+
};
|
40
|
+
},
|
41
|
+
methods: {
|
42
|
+
updateValue(item){
|
43
|
+
this.$emit("input",item[this.selectField]);
|
44
|
+
this.$emit("select-item",item);
|
45
|
+
|
46
|
+
}
|
47
|
+
}
|
48
|
+
};
|
49
|
+
</script>
|
50
|
+
|
51
|
+
|
@@ -0,0 +1,51 @@
|
|
1
|
+
.jdd-select-icon {
|
2
|
+
&:after {
|
3
|
+
content: "";
|
4
|
+
display: block;
|
5
|
+
height: 12px;
|
6
|
+
width: 12px;
|
7
|
+
right: 16px;
|
8
|
+
position: absolute;
|
9
|
+
top: 0;
|
10
|
+
bottom: 0;
|
11
|
+
margin: auto 0;
|
12
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAANZJREFUSA3N1LEVwiAQgOFAJnAiW0vr9NDoCnaOEAugs2QKt3AMNwDvChqfXA64IjR5L/D+j+SFTNMeh/f+yN2X5i4s65xza875FUK4lHvUtRnQWr8xmFJaOYii9NochhHAeQCvxphHbW0XgDEu0g1wkSGAgwwDW4gIQCFiQA0RBf4hzQcNI9SA8/GB+YRr4MQfRAH4jSxKqSe0NVxv1tq72Csqcdj1XOL4FCJALS4CUPFhYCs+BHDi3QA33gW0xBFoPgfwCZ5+P0UMiY0Y4wxPcRYLjoa+872d9nrgfKMAAAAASUVORK5CYII=)
|
13
|
+
no-repeat;
|
14
|
+
background-size: cover;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
.jdd-field {
|
18
|
+
.jdd-select-show {
|
19
|
+
position: absolute;
|
20
|
+
top: 0;
|
21
|
+
bottom: 0;
|
22
|
+
margin: auto 0;
|
23
|
+
right: 30px;
|
24
|
+
display: flex;
|
25
|
+
align-items: center;
|
26
|
+
font-size: 18px;
|
27
|
+
font-family: PingFangSC-Medium;
|
28
|
+
line-height: 22px;
|
29
|
+
padding-bottom: 14px;
|
30
|
+
letter-spacing: 0;
|
31
|
+
padding-right: 12px;
|
32
|
+
}
|
33
|
+
.jdd-field-hasvalue {
|
34
|
+
position: relative;
|
35
|
+
right: 0;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
.jdd-field-inline {
|
40
|
+
.jdd-field-select {
|
41
|
+
display: flex;
|
42
|
+
align-items: center;
|
43
|
+
}
|
44
|
+
.jdd-select-show {
|
45
|
+
flex: 1;
|
46
|
+
padding: 16px 16px 16px 0;
|
47
|
+
font-size: 16px;
|
48
|
+
text-align: right;
|
49
|
+
font-family: PingFangSC-Regular;
|
50
|
+
}
|
51
|
+
}
|