tplus-components-touch 3.38.2 → 3.38.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -16
- package/dist/components/acCitySelect/CitySelect.js +18 -18
- package/dist/components/acCitySelect/CitySelect.js.map +1 -1
- package/dist/components/acCitySelect/CitySelect.less +9 -9
- package/dist/components/acCitySelect/citys.js.map +1 -1
- package/dist/components/acCitySelect/index.js.map +1 -1
- package/dist/components/acCitySelect/provinceData.js +7 -7
- package/dist/components/acCitySelect/provinceData.js.map +1 -1
- package/dist/components/addLog/AddLogProcessor.js +6 -6
- package/dist/components/addLog/AddLogProcessor.js.map +1 -1
- package/dist/components/addLog/OperationLogApi.js +3 -3
- package/dist/components/addLog/OperationLogApi.js.map +1 -1
- package/dist/components/autoComplete/index.js +14 -14
- package/dist/components/autoComplete/index.js.map +1 -1
- package/dist/components/autoComplete/index.less +89 -89
- package/dist/components/autoComplete/option.js.map +1 -1
- package/dist/components/autoCompleteWithKeyboard/index.js +45 -23
- package/dist/components/autoCompleteWithKeyboard/index.js.map +1 -1
- package/dist/components/autoCompleteWithKeyboard/index.less +18 -7
- package/dist/components/billSearch/api.js +29 -29
- package/dist/components/billSearch/api.js.map +1 -1
- package/dist/components/billSearch/index.js +19 -6
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/billSearch/index.less +384 -376
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +17 -17
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +1 -1
- package/dist/components/cloudPrint/api.js.map +1 -1
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +7 -7
- package/dist/components/cloudPrint/printDispatch.js.map +1 -1
- package/dist/components/commonForm/addressPicker/index.js +7 -7
- package/dist/components/commonForm/addressPicker/index.js.map +1 -1
- package/dist/components/commonForm/addressPicker/style.less +10 -10
- package/dist/components/commonForm/autoComplete/index.js +35 -16
- package/dist/components/commonForm/autoComplete/index.js.map +1 -1
- package/dist/components/commonForm/autoComplete/style.less +2 -2
- package/dist/components/commonForm/datePicker/index.js.map +1 -1
- package/dist/components/commonForm/datePicker/style.less +4 -4
- package/dist/components/commonForm/formControl/index.js.map +1 -1
- package/dist/components/commonForm/index.js +4 -4
- package/dist/components/commonForm/index.js.map +1 -1
- package/dist/components/commonForm/inputNumber/index.js.map +1 -1
- package/dist/components/commonForm/inputNumber/style.less +10 -10
- package/dist/components/commonForm/radio/index.js.map +1 -1
- package/dist/components/commonForm/style.less +1 -1
- package/dist/components/deliverySearch/api.js +21 -21
- package/dist/components/deliverySearch/api.js.map +1 -1
- package/dist/components/deliverySearch/index.js +6 -6
- package/dist/components/deliverySearch/index.js.map +1 -1
- package/dist/components/deliverySearch/index.less +553 -553
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/hardwareAPI/index.js.map +1 -1
- package/dist/components/hotKey/config.js +23 -23
- package/dist/components/hotKey/config.js.map +1 -1
- package/dist/components/hotKey/hotKeyModal.js.map +1 -1
- package/dist/components/hotKey/index.js +26 -26
- package/dist/components/hotKey/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/hotKey/style.less +96 -96
- package/dist/components/hotKey/utils.js.map +1 -1
- package/dist/components/input/index.js +6 -6
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/input/scanInput.js.map +1 -1
- package/dist/components/input/scanInput.less +30 -27
- package/dist/components/input/style.less +99 -99
- package/dist/components/input/tplusInput/index.js +30 -30
- package/dist/components/input/tplusInput/index.js.map +1 -1
- package/dist/components/input/tplusInput/inputContent.js.map +1 -1
- package/dist/components/input/tplusInput/inputs.js.map +1 -1
- package/dist/components/input/tplusInput/style.less +132 -132
- package/dist/components/input/utils/index.js.map +1 -1
- package/dist/components/inventorySearch/api.js +58 -58
- package/dist/components/inventorySearch/api.js.map +1 -1
- package/dist/components/inventorySearch/index.js +3 -3
- package/dist/components/inventorySearch/index.js.map +1 -1
- package/dist/components/inventorySearch/index.less +119 -119
- package/dist/components/inventorySearch/store.js.map +1 -1
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/keyboard/index.js +5 -1
- package/dist/components/keyboard/index.js.map +1 -1
- package/dist/components/keyboard/index.less +485 -469
- package/dist/components/keyboard/letterKeyboard.js +35 -18
- package/dist/components/keyboard/letterKeyboard.js.map +1 -1
- package/dist/components/keyboard/numKeyboard.js +27 -17
- package/dist/components/keyboard/numKeyboard.js.map +1 -1
- package/dist/components/keyboard/numKeyboardScan.js +32 -24
- package/dist/components/keyboard/numKeyboardScan.js.map +1 -1
- package/dist/components/keyboard/numberButton_input.js +5 -5
- package/dist/components/keyboard/numberButton_input.js.map +1 -1
- package/dist/components/keyboard/numkeyboardPassword.js +23 -13
- package/dist/components/keyboard/numkeyboardPassword.js.map +1 -1
- package/dist/components/keyboard/onlyKeyboard.js +7 -7
- package/dist/components/keyboard/onlyKeyboard.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton.js +2 -2
- package/dist/components/keyboard/onlyLetterButton.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton2.js +2 -2
- package/dist/components/keyboard/onlyLetterButton2.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton2.less +156 -156
- package/dist/components/keyboard/onlyNumberButton.js +2 -2
- package/dist/components/keyboard/onlyNumberButton.js.map +1 -1
- package/dist/components/keyboard/onlyNumberButton2.js +3 -3
- package/dist/components/keyboard/onlyNumberButton2.js.map +1 -1
- package/dist/components/keyboard/textKeyboard.js.map +1 -1
- package/dist/components/layout/hamburger.js.map +1 -1
- package/dist/components/layout/index.js +10 -10
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/layout.js.map +1 -1
- package/dist/components/layout/sider.js +15 -13
- package/dist/components/layout/sider.js.map +1 -1
- package/dist/components/layout/style.less +82 -82
- package/dist/components/loading/index.js +15 -15
- package/dist/components/loading/index.js.map +1 -1
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/loading/style.less +72 -72
- package/dist/components/loading/utils.js.map +1 -1
- package/dist/components/message/index.js +8 -8
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/message/index.less +101 -101
- package/dist/components/modal/index.js.map +1 -1
- package/dist/components/modal/index.less +19 -19
- package/dist/components/modalVertical/index.js +7 -7
- package/dist/components/modalVertical/index.js.map +1 -1
- package/dist/components/modalVertical/style.less +60 -60
- package/dist/components/modalWraper/index.js +15 -15
- package/dist/components/modalWraper/index.js.map +1 -1
- package/dist/components/modalWraper/style.less +257 -257
- package/dist/components/modalWraper/utils.js.map +1 -1
- package/dist/components/notification/index.js +4 -4
- package/dist/components/notification/index.js.map +1 -1
- package/dist/components/notification/index.less +51 -51
- package/dist/components/overflowTip/index.js +15 -15
- package/dist/components/overflowTip/index.js.map +1 -1
- package/dist/components/overflowTip/style.less +66 -66
- package/dist/components/page/index.js.map +1 -1
- package/dist/components/page/index.less +21 -21
- package/dist/components/product/detail.js +7 -7
- package/dist/components/product/detail.js.map +1 -1
- package/dist/components/product/getCard.js +5 -5
- package/dist/components/product/getCard.js.map +1 -1
- package/dist/components/product/index.less +128 -128
- package/dist/components/progressState/EmptyAndErrorView.js.map +1 -1
- package/dist/components/progressState/ProgressState.js +10 -10
- package/dist/components/progressState/ProgressState.js.map +1 -1
- package/dist/components/progressState/index.js.map +1 -1
- package/dist/components/progressState/style.less +65 -65
- package/dist/components/scan/index.js.map +1 -1
- package/dist/components/scan/index.less +33 -33
- package/dist/components/select/index.js.map +1 -1
- package/dist/components/select/index.less +11 -11
- package/dist/components/settlement/asyncModal.js.map +1 -1
- package/dist/components/settlement/index.js.map +1 -1
- package/dist/components/settlement/moreCzkTable/index.js.map +1 -1
- package/dist/components/settlement/moreCzkTable/style.less +6 -6
- package/dist/components/settlement/prototypeTable/index.js +3 -1
- package/dist/components/settlement/prototypeTable/index.js.map +1 -1
- package/dist/components/settlement/prototypeTable/style.less +58 -58
- package/dist/components/settlement/prototypeTable/utils.js.map +1 -1
- package/dist/components/settlement/settlement.js +78 -544
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +1690 -1686
- package/dist/components/settlement/settlementStore.js +95 -78
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/settlement/utils.js.map +1 -1
- package/dist/components/socket/index.js +11 -11
- package/dist/components/socket/index.js.map +1 -1
- package/dist/components/spin/index.js +6 -6
- package/dist/components/spin/index.js.map +1 -1
- package/dist/components/spin/spin-style.less +436 -436
- package/dist/components/test/index.js +3 -3
- package/dist/components/test/index.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +5248 -5248
- package/dist/components/ticon/iconfont/iconfont.css +895 -895
- package/dist/components/ticon/iconfont/iconfont.json +1549 -1549
- package/dist/components/ticon/iconfont/iconfont.svg +593 -593
- package/dist/components/ticon/index.js.map +1 -1
- package/dist/components/touchScroll/index.js +9 -9
- package/dist/components/touchScroll/index.js.map +1 -1
- package/dist/components/touchTable/AuthProcess.js.map +1 -1
- package/dist/components/touchTable/generateWater.js.map +1 -1
- package/dist/components/touchTable/index.js +20 -10
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/components/touchTable/index.less +376 -376
- package/dist/components/touchTable/utils.js.map +1 -1
- package/dist/demo/PopOverDemo.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/util/tools.js.map +1 -1
- package/locales/zh/tplus-components-touch.json +1 -1
- package/locales/zh-CN/tplus-components-touch.json +1 -1
- package/mocks/memberInfo.json +79 -79
- package/package.json +35 -35
- package/tsconfig.json +26 -26
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
@keyboard-active-color: rgba(255,140,37,0.6);
|
|
2
|
-
@keyboard-font-color: #333;
|
|
3
|
-
@themeColor: #FF8C25;
|
|
4
|
-
.product-keyboarde-botton.letters-box {
|
|
5
|
-
height: 100%;
|
|
6
|
-
display: flex;
|
|
7
|
-
justify-content: space-around;
|
|
8
|
-
min-width: 766px;
|
|
9
|
-
position: relative;
|
|
10
|
-
padding-top: 19px;
|
|
11
|
-
background: rgba(0, 0, 0, .6);
|
|
12
|
-
.letters {
|
|
13
|
-
max-width: 680px;
|
|
14
|
-
width:81%;
|
|
15
|
-
|
|
16
|
-
.letters-line {
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
width: 100%;
|
|
19
|
-
height: 90px;
|
|
20
|
-
|
|
21
|
-
.disabled {
|
|
22
|
-
background: #999;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.letter:last-child {
|
|
26
|
-
margin-right: 0;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.capslock {
|
|
32
|
-
max-width: 124px !important;
|
|
33
|
-
width: 18%!important;
|
|
34
|
-
font-weight: 700;
|
|
35
|
-
padding: 0 4px;
|
|
36
|
-
span {
|
|
37
|
-
display: flex;
|
|
38
|
-
height: 100%;
|
|
39
|
-
font-size: 20px !important;
|
|
40
|
-
border-radius: 6px;
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
justify-content: center;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.capslock-small {
|
|
47
|
-
font-size: 16px !important;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.nums {
|
|
51
|
-
max-width: 493px;
|
|
52
|
-
float: right;
|
|
53
|
-
width: 70%;
|
|
54
|
-
|
|
55
|
-
.nums-left {
|
|
56
|
-
float: left;
|
|
57
|
-
width: 100%;
|
|
58
|
-
|
|
59
|
-
.num {
|
|
60
|
-
height: 58px;
|
|
61
|
-
line-height: 58px;
|
|
62
|
-
max-width: 164px;
|
|
63
|
-
min-width: 33%;
|
|
64
|
-
margin: 0 0px 8px 0;
|
|
65
|
-
padding: 0 12px;
|
|
66
|
-
|
|
67
|
-
span{
|
|
68
|
-
font-size: 25px;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.nums-right {
|
|
74
|
-
float: right;
|
|
75
|
-
width: 60px;
|
|
76
|
-
|
|
77
|
-
.del {
|
|
78
|
-
height: 35px;
|
|
79
|
-
margin: 0 8px 8px 0;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.sure {
|
|
83
|
-
border-radius: 10px;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.key {
|
|
89
|
-
width: 9%;
|
|
90
|
-
max-width: 62px;
|
|
91
|
-
height: 72px;
|
|
92
|
-
box-sizing: border-box;
|
|
93
|
-
float: left;
|
|
94
|
-
text-align: center;
|
|
95
|
-
cursor: pointer;
|
|
96
|
-
user-select: none;
|
|
97
|
-
border-radius: 6px;
|
|
98
|
-
padding: 0 4px;
|
|
99
|
-
span {
|
|
100
|
-
height: 100%;
|
|
101
|
-
display: flex;
|
|
102
|
-
justify-content: center;
|
|
103
|
-
flex-direction: column;
|
|
104
|
-
border-radius: 6px;
|
|
105
|
-
font-size: 25px;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.handle {
|
|
110
|
-
width: 54px;
|
|
111
|
-
font-size: 20px;
|
|
112
|
-
.del {
|
|
113
|
-
width: 54px;
|
|
114
|
-
height: 72px;
|
|
115
|
-
line-height: 72px;
|
|
116
|
-
box-sizing: border-box;
|
|
117
|
-
float: left;
|
|
118
|
-
margin: 0 8px 18px 0;
|
|
119
|
-
text-align: center;
|
|
120
|
-
border-radius: 6px;
|
|
121
|
-
cursor: pointer;
|
|
122
|
-
user-select: none;
|
|
123
|
-
display: flex;
|
|
124
|
-
flex-direction: column;
|
|
125
|
-
justify-content: center;
|
|
126
|
-
border-radius: 6px;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
.is-number {
|
|
130
|
-
.delete {
|
|
131
|
-
height: 62px;
|
|
132
|
-
line-height: 62px;
|
|
133
|
-
margin: 0 8px 8px 0;
|
|
134
|
-
}
|
|
135
|
-
.clear {
|
|
136
|
-
height: 62px;
|
|
137
|
-
line-height: 62px;
|
|
138
|
-
margin: 0 8px 8px 0;
|
|
139
|
-
}
|
|
140
|
-
.sure {
|
|
141
|
-
height: 116px;
|
|
142
|
-
line-height: 116px;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
.bold {
|
|
146
|
-
font-weight: 700;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.icon-close {
|
|
150
|
-
width: 24px;
|
|
151
|
-
height: 24px;
|
|
152
|
-
position: absolute;
|
|
153
|
-
top: -12px;
|
|
154
|
-
right: 8px;
|
|
155
|
-
cursor: pointer;
|
|
156
|
-
}
|
|
1
|
+
@keyboard-active-color: rgba(255,140,37,0.6);
|
|
2
|
+
@keyboard-font-color: #333;
|
|
3
|
+
@themeColor: #FF8C25;
|
|
4
|
+
.product-keyboarde-botton.letters-box {
|
|
5
|
+
height: 100%;
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: space-around;
|
|
8
|
+
// min-width: 766px;
|
|
9
|
+
position: relative;
|
|
10
|
+
padding-top: 19px;
|
|
11
|
+
background: rgba(0, 0, 0, .6);
|
|
12
|
+
.letters {
|
|
13
|
+
max-width: 680px;
|
|
14
|
+
width:81%;
|
|
15
|
+
|
|
16
|
+
.letters-line {
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 90px;
|
|
20
|
+
|
|
21
|
+
.disabled {
|
|
22
|
+
background: #999;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.letter:last-child {
|
|
26
|
+
margin-right: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.capslock {
|
|
32
|
+
max-width: 124px !important;
|
|
33
|
+
width: 18%!important;
|
|
34
|
+
font-weight: 700;
|
|
35
|
+
padding: 0 4px;
|
|
36
|
+
span {
|
|
37
|
+
display: flex;
|
|
38
|
+
height: 100%;
|
|
39
|
+
font-size: 20px !important;
|
|
40
|
+
border-radius: 6px;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.capslock-small {
|
|
47
|
+
font-size: 16px !important;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.nums {
|
|
51
|
+
max-width: 493px;
|
|
52
|
+
float: right;
|
|
53
|
+
width: 70%;
|
|
54
|
+
|
|
55
|
+
.nums-left {
|
|
56
|
+
float: left;
|
|
57
|
+
width: 100%;
|
|
58
|
+
|
|
59
|
+
.num {
|
|
60
|
+
height: 58px;
|
|
61
|
+
line-height: 58px;
|
|
62
|
+
max-width: 164px;
|
|
63
|
+
min-width: 33%;
|
|
64
|
+
margin: 0 0px 8px 0;
|
|
65
|
+
padding: 0 12px;
|
|
66
|
+
|
|
67
|
+
span{
|
|
68
|
+
font-size: 25px;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.nums-right {
|
|
74
|
+
float: right;
|
|
75
|
+
width: 60px;
|
|
76
|
+
|
|
77
|
+
.del {
|
|
78
|
+
height: 35px;
|
|
79
|
+
margin: 0 8px 8px 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.sure {
|
|
83
|
+
border-radius: 10px;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.key {
|
|
89
|
+
width: 9%;
|
|
90
|
+
max-width: 62px;
|
|
91
|
+
height: 72px;
|
|
92
|
+
box-sizing: border-box;
|
|
93
|
+
float: left;
|
|
94
|
+
text-align: center;
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
user-select: none;
|
|
97
|
+
border-radius: 6px;
|
|
98
|
+
padding: 0 4px;
|
|
99
|
+
span {
|
|
100
|
+
height: 100%;
|
|
101
|
+
display: flex;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
flex-direction: column;
|
|
104
|
+
border-radius: 6px;
|
|
105
|
+
font-size: 25px;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.handle {
|
|
110
|
+
width: 54px;
|
|
111
|
+
font-size: 20px;
|
|
112
|
+
.del {
|
|
113
|
+
width: 54px;
|
|
114
|
+
height: 72px;
|
|
115
|
+
line-height: 72px;
|
|
116
|
+
box-sizing: border-box;
|
|
117
|
+
float: left;
|
|
118
|
+
margin: 0 8px 18px 0;
|
|
119
|
+
text-align: center;
|
|
120
|
+
border-radius: 6px;
|
|
121
|
+
cursor: pointer;
|
|
122
|
+
user-select: none;
|
|
123
|
+
display: flex;
|
|
124
|
+
flex-direction: column;
|
|
125
|
+
justify-content: center;
|
|
126
|
+
border-radius: 6px;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
.is-number {
|
|
130
|
+
.delete {
|
|
131
|
+
height: 62px;
|
|
132
|
+
line-height: 62px;
|
|
133
|
+
margin: 0 8px 8px 0;
|
|
134
|
+
}
|
|
135
|
+
.clear {
|
|
136
|
+
height: 62px;
|
|
137
|
+
line-height: 62px;
|
|
138
|
+
margin: 0 8px 8px 0;
|
|
139
|
+
}
|
|
140
|
+
.sure {
|
|
141
|
+
height: 116px;
|
|
142
|
+
line-height: 116px;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
.bold {
|
|
146
|
+
font-weight: 700;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.icon-close {
|
|
150
|
+
width: 24px;
|
|
151
|
+
height: 24px;
|
|
152
|
+
position: absolute;
|
|
153
|
+
top: -12px;
|
|
154
|
+
right: 8px;
|
|
155
|
+
cursor: pointer;
|
|
156
|
+
}
|
|
157
157
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/keyboard/onlyNumberButton.js"],"names":["OnlyNumberButton","props","numClick","key","onChange","nums","nums2","numsIndex","numsIndex2","numsKey","map","index","__html","fontSize","bind","numsKey2","e","preventDefault","Component","propTypes","PropTypes","func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YAAIA,UAAU,QAAd,EAAwB;AACtB,iBAAO;AAAA;AAAA,cAAK,WAAU,KAAf,EAAqB,KAAKA,KAA1B,EAAiC,SAAS,OAAKT,QAAL,CAAcY,IAAd,CAAmB,MAAnB,EAAyB,QAAzB,CAA1C;AAA8E,0CAAC,YAAD,IAAO,MAAK,OAAZ;AAA9E,WAAP;AACD;AACD,eAAO;AAAA;AAAA,YAAK,WAAU,KAAf,EAAqB,KAAKH,KAA1B,EAAiC,SAAS,OAAKT,QAAL,CAAcY,IAAd,CAAmB,MAAnB,EAAyBH,KAAzB,CAA1C;AAA4EN,eAAKM,KAAL;AAA5E,SAAP;AACD,OARa,CAAd;AASA,UAAII,WAAWP,WAAWE,GAAX,CAAe,iBAAS;AACrC,eAAO;AAAA;AAAA,YAAK,WAAU,KAAf,EAAqB,KAAKC,KAA1B,EAAiC,SAAS,OAAKT,QAAL,CAAcY,IAAd,CAAmB,MAAnB,EAAyBH,KAAzB,CAA1C;AAA4EL,gBAAMK,KAAN;AAA5E,SAAP;AACD,OAFc,CAAf;AAGA,aACE;AAAA;AAAA,UAAK,WAAU,4BAAf,EAA4C,aAAa;AAAA,mBAAKK,EAAEC,cAAF,EAAL;AAAA,WAAzD;AACKR,eADL;AAEI;AAAA;AAAA,YAAK,WAAU,kCAAf;AACGM;AADH;AAFJ,OADF;AAQD;;;EAxD2CG,gB,UAErCC,S,GAAY;AACjBf,YAAUgB,oBAAUC,IAAV,CAAeC;AADR,C;kBAFAtB,gB","file":"onlyNumberButton.js","sourcesContent":["/**\
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/keyboard/onlyNumberButton.js"],"names":["OnlyNumberButton","props","numClick","key","onChange","nums","nums2","numsIndex","numsIndex2","numsKey","map","index","__html","fontSize","bind","numsKey2","e","preventDefault","Component","propTypes","PropTypes","func","isRequired"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAA;;;;AAIA;;;;AACA;;AACA;;;;;;IAEqBA,gB;;;AAMnB,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AAKT,QAAL,CAAcY,IAAd,CAAmB,MAAnB,EAAyB,QAAzB,CAA1C;AAA8E,0CAAC,YAAD,IAAO,MAAK,OAAZ;AAA9E,WAAP;AACD;AACD,eAAO;AAAA;AAAA,YAAK,WAAU,KAAf,EAAqB,KAAKH,KAA1B,EAAiC,SAAS,OAAKT,QAAL,CAAcY,IAAd,CAAmB,MAAnB,EAAyBH,KAAzB,CAA1C;AAA4EN,eAAKM,KAAL;AAA5E,SAAP;AACD,OARa,CAAd;AASA,UAAII,WAAWP,WAAWE,GAAX,CAAe,iBAAS;AACrC,eAAO;AAAA;AAAA,YAAK,WAAU,KAAf,EAAqB,KAAKC,KAA1B,EAAiC,SAAS,OAAKT,QAAL,CAAcY,IAAd,CAAmB,MAAnB,EAAyBH,KAAzB,CAA1C;AAA4EL,gBAAMK,KAAN;AAA5E,SAAP;AACD,OAFc,CAAf;AAGA,aACE;AAAA;AAAA,UAAK,WAAU,4BAAf,EAA4C,aAAa;AAAA,mBAAKK,EAAEC,cAAF,EAAL;AAAA,WAAzD;AACKR,eADL;AAEI;AAAA;AAAA,YAAK,WAAU,kCAAf;AACGM;AADH;AAFJ,OADF;AAQD;;;EAxD2CG,gB,UAErCC,S,GAAY;AACjBf,YAAUgB,oBAAUC,IAAV,CAAeC;AADR,C;kBAFAtB,gB","file":"onlyNumberButton.js","sourcesContent":["/**\n * 结算使用的键盘\n */\n\nimport React, { Component } from 'react';\nimport { Ticon } from '../../index';\nimport PropTypes from 'prop-types'\n\nexport default class OnlyNumberButton extends Component {\n\n static propTypes = {\n onChange: PropTypes.func.isRequired\n }\n\n constructor(props) {\n super(props);\n }\n\n numClick = (key) => {\n this.props.onChange(key);\n }\n \n render() {\n let nums = {\n '1': '1',\n '2': '2',\n '3': '3',\n 'delete': '<--',\n '4': '4',\n '5': '5',\n '6': '6',\n '-': '-',\n '7': '7',\n '8': '8',\n '9': '9',\n 'clear': '清<br />空'\n }\n let nums2 = {\n '0': '0',\n '00': '00',\n '.': '.'\n }\n let numsIndex = ['1', '2', '3', 'delete', '4', '5', '6', '-', '7', '8', '9', 'clear']\n let numsIndex2 = ['0', '00', '.']\n let numsKey = numsIndex.map( index => {\n if (index === 'clear') {\n return <div className='key' dangerouslySetInnerHTML={{__html: index === 'clear' ? nums[index] : ''}} style={{fontSize: '18px', 'height': '126px'}} key={index} onClick={this.numClick.bind(this, index)}></div>\n }\n if (index === 'delete') {\n return <div className='key' key={index} onClick={this.numClick.bind(this, 'delete')}><Ticon type='tuige' /></div>\n }\n return <div className='key' key={index} onClick={this.numClick.bind(this, index)}>{nums[index]}</div>\n })\n let numsKey2 = numsIndex2.map(index => {\n return <div className='key' key={index} onClick={this.numClick.bind(this, index)}>{nums2[index]}</div>\n })\n return (\n <div className='only-number-button-content' onMouseDown={e => e.preventDefault()}>\n {numsKey}\n <div className='only-number-button-content-inner'>\n {numsKey2}\n </div>\n </div>\n )\n }\n}"]}
|
|
@@ -25,9 +25,9 @@ var _inherits2 = require('babel-runtime/helpers/inherits');
|
|
|
25
25
|
|
|
26
26
|
var _inherits3 = _interopRequireDefault(_inherits2);
|
|
27
27
|
|
|
28
|
-
var _class, _temp; /**
|
|
29
|
-
* 弹出框使用的小键盘
|
|
30
|
-
* positive='positive' 没有负号,不传,就有负号
|
|
28
|
+
var _class, _temp; /**
|
|
29
|
+
* 弹出框使用的小键盘
|
|
30
|
+
* positive='positive' 没有负号,不传,就有负号
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
var _react = require('react');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/keyboard/onlyNumberButton2.js"],"names":["OnlyNumberButton2","props","numClick","key","onChange","nums","numsKey","map","item","bind","e","preventDefault","positive","Component","propTypes","PropTypes","func","isRequired"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAA;;;;;AAKA;;;;AACA;;AACA;;;;;;IAEqBA,iB;;;AAMnB,6BAAYC,KAAZ,EAAmB;AAAA;;AAAA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AzB,CAAlC;AAAA;AAAA,WAZN;AAeI;AAAA;AAAA,cAAK,8BAA2B,KAAKR,KAAL,CAAWW,QAAX,GAAqB,EAArB,GAA0B,kBAArD,CAAL,EAAgF,SAAS,KAAKV,QAAL,CAAcO,IAAd,CAAmB,IAAnB,EAAyB,MAAzB,CAAzF;AAAA;AAAA;AAfJ;AAJF,OADF;AAwBD;;;EAzC4CI,gB,UAEtCC,S,GAAY;AACjBV,YAAUW,oBAAUC,IAAV,CAAeC;AADR,C;kBAFAjB,iB","file":"onlyNumberButton2.js","sourcesContent":["/**\
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/keyboard/onlyNumberButton2.js"],"names":["OnlyNumberButton2","props","numClick","key","onChange","nums","numsKey","map","item","bind","e","preventDefault","positive","Component","propTypes","PropTypes","func","isRequired"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAA;;;;;AAKA;;;;AACA;;AACA;;;;;;IAEqBA,iB;;;AAMnB,6BAAYC,KAAZ,EAAmB;AAAA;;AAAA,4JACXA,KADW;;AAAA,UAInBC,QAJmB,GAIR,UAACC,GAAD,EAAS;AAClB,YAAKF,KAAL,CAAWG,QAAX,CAAoBD,GAApB;AACD,KANkB;;AAAA;AAElB;;;;6BAMQ;AAAA;;AACP,UAAIE,OAAO,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,EAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,GAA/B,EAAoC,GAApC,EAAyC,GAAzC,EAA8C,GAA9C,EAAmD,IAAnD,EAAyD,GAAzD,CAAX;AACA,UAAIC,UAAUD,KAAKE,GAAL,CAAS,UAACC,IAAD;AAAA,eAAU;AAAA;AAAA,YAAK,yBAAsBA,QAAQ,GAAR,GAAc,cAAd,GAA+B,EAArD,CAAL,EAAgE,KAAKA,IAArE,EAA2E,SAAS,OAAKN,QAAL,CAAcO,IAAd,CAAmB,MAAnB,EAAyBD,IAAzB,CAApF;AAAqHA;AAArH,SAAV;AAAA,OAAT,CAAd;AACA,aACE;AAAA;AAAA,UAAK,WAAU,wBAAf,EAAwC,aAAa;AAAA,mBAAKE,EAAEC,cAAF,EAAL;AAAA,WAArD;AACE;AAAA;AAAA,YAAK,WAAU,eAAf;AACGL;AADH,SADF;AAIE;AAAA;AAAA,YAAK,WAAU,eAAf;AACE;AAAA;AAAA,cAAK,WAAU,SAAf,EAAyB,SAAS,KAAKJ,QAAL,CAAcO,IAAd,CAAmB,IAAnB,EAAyB,QAAzB,CAAlC;AACE,0CAAC,YAAD,IAAO,MAAK,OAAZ;AADF,WADF;AAOI;AAAA;AAAA,cAAK,oBAAL,EAA2B,SAAS,KAAKP,QAAL,CAAcO,IAAd,CAAmB,IAAnB,EAAyB,OAAzB,CAApC;AAAA;AAAA,WAPJ;AASI,eAAKR,KAAL,CAAWW,QAAX,IAAuB,UAAvB,GACE,IADF,GAGE;AAAA;AAAA,cAAK,WAAU,SAAf,EAAyB,SAAS,KAAKV,QAAL,CAAcO,IAAd,CAAmB,IAAnB,EAAyB,GAAzB,CAAlC;AAAA;AAAA,WAZN;AAeI;AAAA;AAAA,cAAK,8BAA2B,KAAKR,KAAL,CAAWW,QAAX,GAAqB,EAArB,GAA0B,kBAArD,CAAL,EAAgF,SAAS,KAAKV,QAAL,CAAcO,IAAd,CAAmB,IAAnB,EAAyB,MAAzB,CAAzF;AAAA;AAAA;AAfJ;AAJF,OADF;AAwBD;;;EAzC4CI,gB,UAEtCC,S,GAAY;AACjBV,YAAUW,oBAAUC,IAAV,CAAeC;AADR,C;kBAFAjB,iB","file":"onlyNumberButton2.js","sourcesContent":["/**\n * 弹出框使用的小键盘\n * positive='positive' 没有负号,不传,就有负号\n */\n\nimport React, { Component } from 'react';\nimport { Ticon } from '../../index';\nimport PropTypes from 'prop-types'\n\nexport default class OnlyNumberButton2 extends Component {\n\n static propTypes = {\n onChange: PropTypes.func.isRequired\n }\n\n constructor(props) {\n super(props);\n }\n\n numClick = (key) => {\n this.props.onChange(key);\n }\n\n render() {\n let nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '00', '.'];\n let numsKey = nums.map((item) => <div className={`num key ${item == '.' ? 'number-point' : ''}`} key={item} onClick={this.numClick.bind(this, item)}>{item}</div>)\n return (\n <div className='clearfix text-keyboard' onMouseDown={e => e.preventDefault()}>\n <div className='nums clearfix'>\n {numsKey}\n </div>\n <div className='dels clearfix'>\n <div className='del key' onClick={this.numClick.bind(this, 'delete')}>\n <Ticon type='tuige' />\n </div>\n {/* <div className='del key' onClick={this.numClick.bind(this, 'clear')}>清空</div> */}\n {/* <div className='del key' onClick={this.numClick.bind(this, '100')}>100</div> */}\n \n <div className={`del key`} onClick={this.numClick.bind(this, 'clear')}>清空</div>\n {\n this.props.positive == 'positive' ?\n null\n :\n <div className='del key' onClick={this.numClick.bind(this, '-')}>—</div>\n }\n \n <div className={`del key sure ${this.props.positive? '' : 'sure-no-positive'}`} onClick={this.numClick.bind(this, 'sure')}>确定</div> \n </div>\n </div>\n )\n }\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/keyboard/textKeyboard.js"],"names":[],"mappings":"AAAA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"textKeyboard.js","sourcesContent":["// import React, { Component } from 'react';\
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/keyboard/textKeyboard.js"],"names":[],"mappings":"AAAA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"textKeyboard.js","sourcesContent":["// import React, { Component } from 'react';\n// import { Keyboard } from '../../index';\n\n// export default class NumKeyboard extends Component {\n// constructor() {\n// super();\n// this.state = {\n// visible: false,\n// value: ''\n// }\n// }\n\n// showModal = () => {\n// this.setState({\n// visible: true,\n// value: this.props.value + ''\n// });\n// }\n\n// handleOk = (value) => {\n// this.props.handleOk && this.props.handleOk(value);\n// this.setState({\n// visible: false,\n// });\n// }\n\n// handleCancel = (value) => {\n// this.props.handleCancel && this.props.handleCancel(value)\n// this.setState({\n// visible: false,\n// });\n// }\n\n// render() {\n// return (\n// <div className='keyboard'>\n// <div onClick={this.showModal} className='keyboard-input keyboard-text'>{this.props.value}</div>\n// <Keyboard \n// type='number+modal' \n// title={this.props.title || 'title'} \n// visible={this.state.visible} \n// value={this.state.value} \n// handleOk={this.handleOk} \n// handleCancel={this.handleCancel} />\n// </div>\n// )\n// }\n// }"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/layout/hamburger.js"],"names":["Hamburger","props","close","toggleAnimate"],"mappings":";;;;;kBAGwBA,S;;AAHxB;;;;AACA;;;;AAEe,SAASA,SAAT,CAAmBC,KAAnB,EAA0B;AAAA,MAChCC,KADgC,GACDD,KADC,CAChCC,KADgC;AAAA,6BACDD,KADC,CACzBE,aADyB;AAAA,MACzBA,aADyB,wCACT,IADS;;AAEvC,SAAQ;AAAA;AAAA,MAAK,6BAA2B,CAACD,KAAD,IAAUC,aAAX,GAA4B,mBAA5B,GAAkD,EAA5E,CAAL;AACN,4CAAM,WAAU,kBAAhB,GADM;AAEN,4CAAM,WAAU,kBAAhB,GAFM;AAGN,4CAAM,WAAU,kBAAhB;AAHM,GAAR;AAKD","file":"hamburger.js","sourcesContent":["import React from 'react';\
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/layout/hamburger.js"],"names":["Hamburger","props","close","toggleAnimate"],"mappings":";;;;;kBAGwBA,S;;AAHxB;;;;AACA;;;;AAEe,SAASA,SAAT,CAAmBC,KAAnB,EAA0B;AAAA,MAChCC,KADgC,GACDD,KADC,CAChCC,KADgC;AAAA,6BACDD,KADC,CACzBE,aADyB;AAAA,MACzBA,aADyB,wCACT,IADS;;AAEvC,SAAQ;AAAA;AAAA,MAAK,6BAA2B,CAACD,KAAD,IAAUC,aAAX,GAA4B,mBAA5B,GAAkD,EAA5E,CAAL;AACN,4CAAM,WAAU,kBAAhB,GADM;AAEN,4CAAM,WAAU,kBAAhB,GAFM;AAGN,4CAAM,WAAU,kBAAhB;AAHM,GAAR;AAKD","file":"hamburger.js","sourcesContent":["import React from 'react';\nimport './style.less';\n\nexport default function Hamburger(props) {\n const {close, toggleAnimate = true} = props;\n return (<div className={`_hamburger_ ${(!close && toggleAnimate) ? '_hamburger-active' : ''}`} >\n <span className=\"_hamburger_-line\" />\n <span className=\"_hamburger_-line\" />\n <span className=\"_hamburger_-line\" />\n </div>);\n}\n"]}
|
|
@@ -14,17 +14,17 @@ var _sider2 = _interopRequireDefault(_sider);
|
|
|
14
14
|
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* Created by hzy on 2019/4/3.
|
|
17
|
+
/**
|
|
18
|
+
* Created by hzy on 2019/4/3.
|
|
19
19
|
*/
|
|
20
|
-
/**
|
|
21
|
-
* @Layout 布局组件,以下用法类似antd
|
|
22
|
-
* Layout props: directionChange(direction) {function 类型} 布局方向触发改变时的回调函数, 参数`direction`为当前的方向
|
|
23
|
-
*
|
|
24
|
-
* @Sider 侧边栏组件
|
|
25
|
-
* @Header header
|
|
26
|
-
* @Footer footer
|
|
27
|
-
* @Content content
|
|
20
|
+
/**
|
|
21
|
+
* @Layout 布局组件,以下用法类似antd
|
|
22
|
+
* Layout props: directionChange(direction) {function 类型} 布局方向触发改变时的回调函数, 参数`direction`为当前的方向
|
|
23
|
+
*
|
|
24
|
+
* @Sider 侧边栏组件
|
|
25
|
+
* @Header header
|
|
26
|
+
* @Footer footer
|
|
27
|
+
* @Content content
|
|
28
28
|
*/
|
|
29
29
|
_layout2.default.Sider = _sider2.default;
|
|
30
30
|
exports.default = _layout2.default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/layout/index.js"],"names":["Layout","Sider"],"mappings":";;;;;;AAYA;;;;AACA;;;;;;AAbA;;;AAGA;;;;;;;;;AAYAA,iBAAOC,KAAP,GAAeA,eAAf;kBACeD,gB","file":"index.js","sourcesContent":["/**\
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/layout/index.js"],"names":["Layout","Sider"],"mappings":";;;;;;AAYA;;;;AACA;;;;;;AAbA;;;AAGA;;;;;;;;;AAYAA,iBAAOC,KAAP,GAAeA,eAAf;kBACeD,gB","file":"index.js","sourcesContent":["/**\n * Created by hzy on 2019/4/3.\n */\n/**\n * @Layout 布局组件,以下用法类似antd\n * Layout props: directionChange(direction) {function 类型} 布局方向触发改变时的回调函数, 参数`direction`为当前的方向\n *\n * @Sider 侧边栏组件\n * @Header header\n * @Footer footer\n * @Content content\n */\nimport Layout from './layout';\nimport Sider from './sider';\n\nLayout.Sider = Sider;\nexport default Layout;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/layout/layout.js"],"names":["generatorClass","className","addClassName","join","trim","Layout","state","siders","directionChange","direction","props","siderHook","addSider","id","setState","removeSider","filter","currentId","style","children","hasSider","isHasSider","length","classes","Component","childContextTypes","PropTypes","object","propTypes","func","string","Content","Header","Footer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;;;AACA;;;;AAEA,SAASA,cAAT,CAAwBC,SAAxB,EAAsD;AAAA,MAAnBC,YAAmB,uEAAJ,EAAI;;AACpD,MAAI,OAAOA,YAAP,KAAwB,QAA5B,EAAsC;AACp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kB,QADT,GACqBT,KADrB,CACSS,QADT;;AAErB,MAAMI,UAAUvB,eAAe,qBAAf,EAAsCC,SAAtC,CAAhB;AACA,SAAQ;AAAA;AAAA,MAAQ,WAAWsB,OAAnB,EAA4B,OAAOL,KAAnC;AAA2CC;AAA3C,GAAR;AACD;;AAEDd,OAAO2B,MAAP,GAAgBA,MAAhB;AACA3B,OAAO4B,MAAP,GAAgBA,MAAhB;AACA5B,OAAO0B,OAAP,GAAiBA,OAAjB","file":"layout.js","sourcesContent":["import React, {Component} from 'react';\
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/layout/layout.js"],"names":["generatorClass","className","addClassName","join","trim","Layout","state","siders","directionChange","direction","props","siderHook","addSider","id","setState","removeSider","filter","currentId","style","children","hasSider","isHasSider","length","classes","Component","childContextTypes","PropTypes","object","propTypes","func","string","Content","Header","Footer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;;;AACA;;;;AAEA,SAASA,cAAT,CAAwBC,SAAxB,EAAsD;AAAA,MAAnBC,YAAmB,uEAAJ,EAAI;;AACpD,MAAI,OAAOA,YAAP,KAAwB,QAA5B,EAAsC;AACpC,WAAO,CAACD,SAAD,EAAYC,YAAZ,EAA0BC,IAA1B,CAA+B,GAA/B,EAAoCC,IAApC,EAAP;AACD;AACD,SAAO,CAACH,SAAD,0CAAeC,YAAf,GAA6BC,IAA7B,CAAkC,GAAlC,EAAuCC,IAAvC,EAAP;AACD;;IAEoBC,M;;;;;;;;;;;;;;4MAyBnBC,K,GAAQ;AACNC,cAAQ;AADF,K,QAGRC,e,GAAkB,UAACC,SAAD,EAAe;AAAA,UACxBD,eADwB,GACL,MAAKE,KADA,CACxBF,eADwB;;AAE/BA,yBAAmBA,gBAAgBC,SAAhB,CAAnB;AACD,K;;;;;sCAtBiB;AAAA;;AAChB,aAAO;AACLE,mBAAW;AACTC,oBAAU,kBAACC,EAAD,EAAQ;AAChB,mBAAKC,QAAL,CAAc;A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ADO;AAAA,MACHjB,SADG,GACoBS,KADpB,CACHT,SADG;AAAA,MACQkB,QADR,GACoBT,KADpB,CACQS,QADR;;AAEtB,MAAMI,UAAUvB,eAAe,sBAAf,EAAuCC,SAAvC,CAAhB;AACA,SAAQ;AAAA;AAAA,MAAM,WAAWsB,OAAjB,EAA0B,OAAOL,KAAjC;AAAyCC;AAAzC,GAAR;AACD;;AAED,SAASa,MAAT,CAAgBtB,KAAhB,EAAuB;AAAA,sBACqBA,KADrB,CACdQ,KADc;AAAA,MACdA,KADc,iCACN,EADM;AAAA,MACFjB,SADE,GACqBS,KADrB,CACFT,SADE;AAAA,MACSkB,QADT,GACqBT,KADrB,CACSS,QADT;;AAErB,MAAMI,UAAUvB,eAAe,qBAAf,EAAsCC,SAAtC,CAAhB;AACA,SAAQ;AAAA;AAAA,MAAQ,WAAWsB,OAAnB,EAA4B,OAAOL,KAAnC;AAA2CC;AAA3C,GAAR;AACD;;AAED,SAASc,MAAT,CAAgBvB,KAAhB,EAAuB;AAAA,sBACqBA,KADrB,CACdQ,KADc;AAAA,MACdA,KADc,iCACN,EADM;AAAA,MACFjB,SADE,GACqBS,KADrB,CACFT,SADE;AAAA,MACSkB,QADT,GACqBT,KADrB,CACSS,QADT;;AAErB,MAAMI,UAAUvB,eAAe,qBAAf,EAAsCC,SAAtC,CAAhB;AACA,SAAQ;AAAA;AAAA,MAAQ,WAAWsB,OAAnB,EAA4B,OAAOL,KAAnC;AAA2CC;AAA3C,GAAR;AACD;;AAEDd,OAAO2B,MAAP,GAAgBA,MAAhB;AACA3B,OAAO4B,MAAP,GAAgBA,MAAhB;AACA5B,OAAO0B,OAAP,GAAiBA,OAAjB","file":"layout.js","sourcesContent":["import React, {Component} from 'react';\nimport PropTypes from 'prop-types'\nimport './style.less';\n\nfunction generatorClass(className, addClassName = '') {\n if (typeof addClassName === 'string') {\n return [className, addClassName].join(' ').trim();\n }\n return [className, ...addClassName].join(' ').trim();\n}\n\nexport default class Layout extends Component {\n static childContextTypes = {\n siderHook: PropTypes.object\n }\n static propTypes = {\n directionChange: PropTypes.func,\n style: PropTypes.object,\n className: PropTypes.string,\n };\n getChildContext() {\n return {\n siderHook: {\n addSider: (id) => {\n this.setState(state => ({\n siders: [...state.siders, id],\n }), () => this.directionChange('row'));\n },\n removeSider: (id) => {\n this.setState(state => ({\n siders: state.siders.filter(currentId => currentId !== id),\n }), () => this.directionChange('column'));\n }\n }\n };\n }\n state = {\n siders: []\n }\n directionChange = (direction) => {\n const {directionChange} = this.props;\n directionChange && directionChange(direction);\n }\n render() {\n const {style, className, children, hasSider} = this.props;\n const isHasSider = typeof hasSider === 'boolean' ? hasSider : !!this.state.siders.length;\n const classes = generatorClass('tplus-layout', [`${isHasSider ? 'tplus-layout-has-sider' : ''}`, className]);\n return (<section className={classes} style={style}>{children}</section>);\n }\n}\n\nfunction Content(props) {\n const {style = {}, className, children} = props;\n const classes = generatorClass('tplus-layout-content', className);\n return (<main className={classes} style={style}>{children}</main>);\n}\n\nfunction Header(props) {\n const {style = {}, className, children} = props;\n const classes = generatorClass('tplus-layout-header', className);\n return (<header className={classes} style={style}>{children}</header>);\n}\n\nfunction Footer(props) {\n const {style = {}, className, children} = props;\n const classes = generatorClass('tplus-layout-footer', className);\n return (<footer className={classes} style={style}>{children}</footer>);\n}\n\nLayout.Header = Header;\nLayout.Footer = Footer;\nLayout.Content = Content;\n"]}
|
|
@@ -29,19 +29,19 @@ var _inherits2 = require('babel-runtime/helpers/inherits');
|
|
|
29
29
|
|
|
30
30
|
var _inherits3 = _interopRequireDefault(_inherits2);
|
|
31
31
|
|
|
32
|
-
var _class, _temp; /**
|
|
33
|
-
* Created by hzy on 2019/4/17.
|
|
32
|
+
var _class, _temp; /**
|
|
33
|
+
* Created by hzy on 2019/4/17.
|
|
34
34
|
*/
|
|
35
|
-
/**
|
|
36
|
-
* @className sider class名
|
|
37
|
-
* @style style
|
|
38
|
-
* @collapsible 是否可收起
|
|
39
|
-
* @collapsed 是否折叠状态
|
|
40
|
-
* @onCollapse 监听折叠事件
|
|
41
|
-
* @trigger trigger Node
|
|
42
|
-
* @triggerStyle 默认trigger Node 样式
|
|
43
|
-
* @width 折叠展开宽度
|
|
44
|
-
* @collapsedWidth 折叠关闭时的宽度
|
|
35
|
+
/**
|
|
36
|
+
* @className sider class名
|
|
37
|
+
* @style style
|
|
38
|
+
* @collapsible 是否可收起
|
|
39
|
+
* @collapsed 是否折叠状态
|
|
40
|
+
* @onCollapse 监听折叠事件
|
|
41
|
+
* @trigger trigger Node
|
|
42
|
+
* @triggerStyle 默认trigger Node 样式
|
|
43
|
+
* @width 折叠展开宽度
|
|
44
|
+
* @collapsedWidth 折叠关闭时的宽度
|
|
45
45
|
*/
|
|
46
46
|
|
|
47
47
|
|
|
@@ -111,6 +111,7 @@ var Sider = (_temp = _class = function (_Component) {
|
|
|
111
111
|
collapsedWidth = _props$collapsedWidth === undefined ? 100 : _props$collapsedWidth,
|
|
112
112
|
_props$width = _props.width,
|
|
113
113
|
width = _props$width === undefined ? 200 : _props$width,
|
|
114
|
+
noWith = _props.noWith,
|
|
114
115
|
collapsed = _props.collapsed,
|
|
115
116
|
onCollapse = _props.onCollapse,
|
|
116
117
|
collapsible = _props.collapsible,
|
|
@@ -125,11 +126,12 @@ var Sider = (_temp = _class = function (_Component) {
|
|
|
125
126
|
|
|
126
127
|
var asideWidth = (siderState ? collapsedWidth : width) + 'px';
|
|
127
128
|
var triggerNode = trigger || _react2.default.createElement(_hamburger2.default, { close: siderState, toggleAnimate: toggleAnimate, style: triggerStyle });
|
|
129
|
+
var lineStyle = !noWith ? { flex: '0 0 ' + asideWidth, maxWidth: asideWidth, minWidth: asideWidth, width: asideWidth } : {};
|
|
128
130
|
return _react2.default.createElement(
|
|
129
131
|
'aside',
|
|
130
132
|
{
|
|
131
133
|
className: 'tplus-layout-sider _tplus-animation-ease_ ' + (collapsed ? 'tplus-sider-collapsed' : '') + ' ' + className,
|
|
132
|
-
style: (0, _extends3.default)({
|
|
134
|
+
style: (0, _extends3.default)({}, lineStyle, style)
|
|
133
135
|
},
|
|
134
136
|
_react2.default.createElement(
|
|
135
137
|
'div',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/layout/sider.js"],"names":["Sider","props","toggleSider","siderState","state","onCollapse","setState","id","Date","now","collapsed","context","siderHook","addSider","removeSider","className","collapsedWidth","width","collapsible","trigger","style","children","triggerStyle","toggleAnimate","asideWidth","triggerNode","flex","maxWidth","minWidth","Component","contextTypes","PropTypes","object","defaultProps","propTypes","bool","any","func","number","string"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAA;;;AAGA;;;;;;;;;;;;;AAWA;;;;AACA;;;;AACA;;;;AACA;;;;IAEqBA,K;;;AAmBnB,iBAAYC,KAAZ,EAAkB;AAAA;;AAAA,oIACVA,KADU;;AAAA,UAelBC,WAfkB,GAeJ,YAAM;AAAA,UACXC,UADW,GACG,MAAKC,KADR,CACXD,UADW;AAAA,UAEXE,UAFW,GAEG,MAAKJ,KAFR,CAEXI,UAFW;;AAGlB,YAAKC,QAAL,CAAc,EAACH,YAAY,CAACA,UAAd,EAAd;AACAE,oBAAcA,WAAW,CAACF,UAAZ,CAAd;AACD,KApBiB;;AAEhB,UAAKC,KAAL,GAAa;AACXG,UAAIC,KAAKC,GAAL,EADO;AAEXN,kBAAY,MAAKF,KAAL,CAAWS;AAFZ,KAAb;AAFgB;AAMjB;;;;wCACmB;AAAA,+BACmB,KAAKC,OADxB,CACXC,SADW;AAAA,8DACa,EADb;AAAA,UACCC,QADD,sBACCA,QADD;;AAElBA,eAAS,KAAKT,KAAL,CAAWG,EAApB;AACD;;;yCACoB;AAAA,gCACqB,KAAKI,OAD1B,CACZC,SADY;AAAA,gEACe,EADf;AAAA,UACAE,WADA,uBACAA,WADA;;AAEnBA,kBAAY,KAAKV,KAAL,CAAWG,EAAvB;AACD;;;6BAOQ;AAAA,
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/layout/sider.js"],"names":["Sider","props","toggleSider","siderState","state","onCollapse","setState","id","Date","now","collapsed","context","siderHook","addSider","removeSider","className","collapsedWidth","width","noWith","collapsible","trigger","style","children","triggerStyle","toggleAnimate","asideWidth","triggerNode","lineStyle","flex","maxWidth","minWidth","Component","contextTypes","PropTypes","object","defaultProps","propTypes","bool","any","func","number","string"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAA;;;AAGA;;;;;;;;;;;;;AAWA;;;;AACA;;;;AACA;;;;AACA;;;;IAEqBA,K;;;AAmBnB,iBAAYC,KAAZ,EAAkB;AAAA;;AAAA,oIACVA,KADU;;AAAA,UAelBC,WAfkB,GAeJ,YAAM;AAAA,UACXC,UADW,GACG,MAAKC,KADR,CACXD,UADW;AAAA,UAEXE,UAFW,GAEG,MAAKJ,KAFR,CAEXI,UAFW;;AAGlB,YAAKC,QAAL,CAAc,EAACH,YAAY,CAACA,UAAd,EAAd;AACAE,oBAAcA,WAAW,CAACF,UAAZ,CAAd;AACD,KApBiB;;AAEhB,UAAKC,KAAL,GAAa;AACXG,UAAIC,KAAKC,GAAL,EADO;AAEXN,kBAAY,MAAKF,KAAL,CAAWS;AAFZ,KAAb;AAFgB;AAMjB;;;;wCACmB;AAAA,+BACmB,KAAKC,OADxB,CACXC,SADW;AAAA,8DACa,EADb;AAAA,UACCC,QADD,sBACCA,QADD;;AAElBA,eAAS,KAAKT,KAAL,CAAWG,EAApB;AACD;;;yCACoB;AAAA,gCACqB,KAAKI,OAD1B,CACZC,SADY;AAAA,gEACe,EADf;AAAA,UACAE,WADA,uBACAA,WADA;;AAEnBA,kBAAY,KAAKV,KAAL,CAAWG,EAAvB;AACD;;;6BAOQ;AAAA,mBAC6J,KAAKN,KADlK;AAAA,UACAc,SADA,UACAA,SADA;AAAA,yCACWC,cADX;AAAA,UACWA,cADX,yCAC4B,GAD5B;AAAA,gCACiCC,KADjC;AAAA,UACiCA,KADjC,gCACyC,GADzC;AAAA,UAC8CC,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B3B,aAAWuB,oBAAUI,IAFJ;AAGjBhB,SAAOY,oBAAUC,MAHA;AAIjBX,gBAAcU,oBAAUC,MAJP;AAKjBd,WAASa,oBAAUK,GALF;AAMjBjC,cAAY4B,oBAAUM,IANL;AAOjBtB,SAAOgB,oBAAUO,MAPA;AAQjBxB,kBAAgBiB,oBAAUO,MART;AASjBzB,aAAWkB,oBAAUQ;AATJ,C;kBARAzC,K","file":"sider.js","sourcesContent":["/**\n * Created by hzy on 2019/4/17.\n */\n/**\n * @className sider class名\n * @style style\n * @collapsible 是否可收起\n * @collapsed 是否折叠状态\n * @onCollapse 监听折叠事件\n * @trigger trigger Node\n * @triggerStyle 默认trigger Node 样式\n * @width 折叠展开宽度\n * @collapsedWidth 折叠关闭时的宽度\n */\nimport React, {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport Hamburger from './hamburger';\nimport './style.less';\n\nexport default class Sider extends Component {\n static contextTypes = {\n siderHook: PropTypes.object\n }\n static defaultProps = {\n collapsible: false,\n collapsed: false\n }\n static propTypes = {\n collapsible: PropTypes.bool,\n collapsed: PropTypes.bool,\n style: PropTypes.object,\n triggerStyle: PropTypes.object,\n trigger: PropTypes.any,\n onCollapse: PropTypes.func,\n width: PropTypes.number,\n collapsedWidth: PropTypes.number,\n className: PropTypes.string,\n };\n constructor(props){\n super(props);\n this.state = {\n id: Date.now(),\n siderState: this.props.collapsed\n };\n }\n componentDidMount() {\n const {siderHook: {addSider} = {}} = this.context;\n addSider(this.state.id);\n }\n componentWillMount() {\n const {siderHook: {removeSider} = {}} = this.context;\n removeSider(this.state.id);\n }\n toggleSider = () => {\n const {siderState} = this.state;\n const {onCollapse} = this.props;\n this.setState({siderState: !siderState});\n onCollapse && onCollapse(!siderState);\n }\n render() {\n const {className, collapsedWidth = 100, width = 200, noWith, collapsed, onCollapse, collapsible, trigger, style = {}, children, triggerStyle = {}, toggleAnimate} = this.props;\n const {siderState} = this.state;\n const asideWidth = (siderState ? collapsedWidth : width) + 'px';\n const triggerNode = trigger || <Hamburger close={siderState} toggleAnimate={toggleAnimate} style={triggerStyle} />;\n const lineStyle = !noWith ? {flex: `0 0 ${asideWidth}`, maxWidth: asideWidth, minWidth: asideWidth, width: asideWidth} : {};\n return (<aside\n className={`tplus-layout-sider _tplus-animation-ease_ ${collapsed ? 'tplus-sider-collapsed' : ''} ${className}`}\n style={{...lineStyle, ...style}}\n >\n <div className='tplus-layout-sider-children'>{children}</div>\n {collapsible && <div onClick={this.toggleSider} className='tplus-sider-trigger _tplus-animation-ease_' style={{width: asideWidth}}>\n {triggerNode}\n </div>}\n </aside>);\n }\n}\n"]}
|