tplus-components-touch 3.45.1 → 3.46.1
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/dist/components/billSearch/index.js +2 -2
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +2 -2
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +1 -1
- package/dist/components/cloudPrint/index.js +893 -608
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +184 -48
- package/dist/components/cloudPrint/printDispatch.js.map +1 -1
- package/dist/components/cloudPrint/printTemplate/dialy_one.json +239 -0
- package/dist/components/cloudPrint/printTemplate/duty_one.json +239 -0
- package/dist/components/cloudPrint/printTemplate/retail_one.json +204 -0
- package/dist/components/cloudPrint/printTemplate/retail_two.json +220 -0
- package/dist/components/cloudPrint/printTemplate/storage_one.json +129 -0
- package/dist/components/cloudPrint/printTemplate/template.js +52 -0
- package/dist/components/cloudPrint/printTemplate/template.js.map +1 -0
- package/dist/components/commonForm/addressPicker/index.js +241 -0
- package/dist/components/commonForm/addressPicker/index.js.map +1 -0
- package/dist/components/commonForm/autoComplete/index.js +260 -0
- package/dist/components/commonForm/autoComplete/index.js.map +1 -0
- package/dist/components/commonForm/datePicker/index.js +92 -0
- package/dist/components/commonForm/datePicker/index.js.map +1 -0
- package/dist/components/commonForm/formControl/index.js +144 -0
- package/dist/components/commonForm/formControl/index.js.map +1 -0
- package/dist/components/commonForm/inputNumber/index.js +272 -0
- package/dist/components/commonForm/inputNumber/index.js.map +1 -0
- package/dist/components/commonForm/radio/index.js +132 -0
- package/dist/components/commonForm/radio/index.js.map +1 -0
- package/dist/components/hardwareAPI/index.js +46 -12
- package/dist/components/hardwareAPI/index.js.map +1 -1
- package/dist/components/input/tplusInput/index.js +81 -0
- package/dist/components/input/tplusInput/index.js.map +1 -0
- package/dist/components/input/tplusInput/inputContent.js +128 -0
- package/dist/components/input/tplusInput/inputContent.js.map +1 -0
- package/dist/components/input/tplusInput/inputs.js +151 -0
- package/dist/components/input/tplusInput/inputs.js.map +1 -0
- package/dist/components/input/utils/index.js +26 -0
- package/dist/components/input/utils/index.js.map +1 -0
- package/dist/components/message/index.js +4 -3
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/modalWraper/index.js +1 -16
- package/dist/components/modalWraper/index.js.map +1 -1
- package/dist/components/modalWraper/style.less +0 -6
- package/dist/components/settlement/asyncModal.js +1 -4
- package/dist/components/settlement/asyncModal.js.map +1 -1
- package/dist/components/settlement/moreCzkTable/index.js +156 -0
- package/dist/components/settlement/moreCzkTable/index.js.map +1 -0
- package/dist/components/settlement/prototypeTable/index.js +353 -0
- package/dist/components/settlement/prototypeTable/index.js.map +1 -0
- package/dist/components/settlement/prototypeTable/utils.js +14 -0
- package/dist/components/settlement/prototypeTable/utils.js.map +1 -0
- package/dist/components/settlement/settlement.js +225 -292
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +0 -3
- package/dist/components/settlement/settlementStore.js +2820 -0
- package/dist/components/settlement/settlementStore.js.map +1 -0
- package/dist/components/settlement/utils.js +249 -0
- package/dist/components/settlement/utils.js.map +1 -0
- package/dist/components/socket/index.js +221 -0
- package/dist/components/socket/index.js.map +1 -0
- package/dist/components/spin/index.js +95 -0
- package/dist/components/spin/index.js.map +1 -0
- package/dist/components/test/index.js +330 -0
- package/dist/components/test/index.js.map +1 -0
- package/dist/components/ticon/iconfont/iconfont.js +35 -0
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -0
- package/dist/components/ticon/index.js +60 -0
- package/dist/components/ticon/index.js.map +1 -0
- package/dist/components/touchScroll/index.js +186 -0
- package/dist/components/touchScroll/index.js.map +1 -0
- package/dist/components/touchTable/AuthProcess.js +42 -0
- package/dist/components/touchTable/AuthProcess.js.map +1 -0
- package/dist/components/touchTable/generateWater.js +59 -0
- package/dist/components/touchTable/generateWater.js.map +1 -0
- package/dist/components/touchTable/index.js +1135 -0
- package/dist/components/touchTable/index.js.map +1 -0
- package/dist/components/touchTable/utils.js +14 -0
- package/dist/components/touchTable/utils.js.map +1 -0
- package/dist/index.js +3 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/settlement/settlementApi.js +0 -512
- package/dist/components/settlement/settlementApi.js.map +0 -1
@@ -0,0 +1,60 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
|
7
|
+
var _extends2 = require('babel-runtime/helpers/extends');
|
8
|
+
|
9
|
+
var _extends3 = _interopRequireDefault(_extends2);
|
10
|
+
|
11
|
+
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
12
|
+
|
13
|
+
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
14
|
+
|
15
|
+
var _react = require('react');
|
16
|
+
|
17
|
+
var React = _interopRequireWildcard(_react);
|
18
|
+
|
19
|
+
require('./iconfont/iconfont.css');
|
20
|
+
|
21
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
22
|
+
|
23
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
24
|
+
|
25
|
+
exports.default = function (props) {
|
26
|
+
var type = props.type,
|
27
|
+
icon = props.icon,
|
28
|
+
className = props.className,
|
29
|
+
title = props.title,
|
30
|
+
others = (0, _objectWithoutProperties3.default)(props, ['type', 'icon', 'className', 'title']);
|
31
|
+
|
32
|
+
return React.createElement('i', (0, _extends3.default)({
|
33
|
+
title: title,
|
34
|
+
className: (type || icon ? 'iconfont icon-' + (type || icon) : '') + (className ? ' ' + className : '')
|
35
|
+
}, others));
|
36
|
+
};
|
37
|
+
|
38
|
+
// interface ITicon {
|
39
|
+
// type?:string,
|
40
|
+
// icon:string,
|
41
|
+
// className?:string,
|
42
|
+
// title?:string,
|
43
|
+
// [propName: string]: any
|
44
|
+
// }
|
45
|
+
|
46
|
+
// const Ticon : React.FC<ITicon> = ({type, icon, className, title, ...others}) => (
|
47
|
+
// <i
|
48
|
+
// title={title}
|
49
|
+
// className={((type || icon)?'iconfont icon-'+(type || icon):'')+ (className?' '+className:'')}
|
50
|
+
// {...others}
|
51
|
+
// />
|
52
|
+
// );
|
53
|
+
|
54
|
+
// export default Ticon;
|
55
|
+
|
56
|
+
// export default (props) => {
|
57
|
+
// const {type, icon, className, title, ...others} = props;
|
58
|
+
// return
|
59
|
+
// }
|
60
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/ticon/index.js"],"names":["React","props","type","icon","className","title","others"],"mappings":";;;;;;;;;;;;;;AAAA;;IAAYA,K;;AACZ;;;;;;kBAEe,UAACC,KAAD,EAAW;AAAA,YACjBC,IADiB,GAC0BD,KAD1B,CACjBC,IADiB;AAAA,YACXC,IADW,GAC0BF,KAD1B,CACXE,IADW;AAAA,YACLC,SADK,GAC0BH,KAD1B,CACLG,SADK;AAAA,YACMC,KADN,GAC0BJ,KAD1B,CACMI,KADN;AAAA,YACgBC,MADhB,0CAC0BL,KAD1B;;AAExB,eAAO;AACC,uBAAOI,KADR;AAEC,2BAAW,CAAEH,QAAQC,IAAT,GAAe,oBAAkBD,QAAQC,IAA1B,CAAf,GAA+C,EAAhD,KAAsDC,YAAU,MAAIA,SAAd,GAAwB,EAA9E;AAFZ,WAGKE,MAHL,EAAP;AAKD,C;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA","file":"index.js","sourcesContent":["import * as React from 'react';\r\nimport './iconfont/iconfont.css';\r\n\r\nexport default (props) => {\r\n const {type, icon, className, title, ...others} = props;\r\n return <i \r\n title={title} \r\n className={((type || icon)?'iconfont icon-'+(type || icon):'')+ (className?' '+className:'')} \r\n {...others} \r\n />\r\n}\r\n\r\n// interface ITicon { \r\n// type?:string, \r\n// icon:string, \r\n// className?:string, \r\n// title?:string, \r\n// [propName: string]: any\r\n// } \r\n\r\n// const Ticon : React.FC<ITicon> = ({type, icon, className, title, ...others}) => (\r\n// <i \r\n// title={title} \r\n// className={((type || icon)?'iconfont icon-'+(type || icon):'')+ (className?' '+className:'')} \r\n// {...others} \r\n// />\r\n// );\r\n\r\n// export default Ticon;\r\n\r\n// export default (props) => {\r\n// const {type, icon, className, title, ...others} = props;\r\n// return \r\n// }\r\n"]}
|
@@ -0,0 +1,186 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = undefined;
|
7
|
+
|
8
|
+
var _extends2 = require('babel-runtime/helpers/extends');
|
9
|
+
|
10
|
+
var _extends3 = _interopRequireDefault(_extends2);
|
11
|
+
|
12
|
+
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
|
13
|
+
|
14
|
+
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
|
15
|
+
|
16
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
17
|
+
|
18
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
19
|
+
|
20
|
+
var _createClass2 = require('babel-runtime/helpers/createClass');
|
21
|
+
|
22
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
23
|
+
|
24
|
+
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
25
|
+
|
26
|
+
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
27
|
+
|
28
|
+
var _inherits2 = require('babel-runtime/helpers/inherits');
|
29
|
+
|
30
|
+
var _inherits3 = _interopRequireDefault(_inherits2);
|
31
|
+
|
32
|
+
var _class, _temp, _initialiseProps; /**
|
33
|
+
* Created by hzy on 2019/7/30.
|
34
|
+
*
|
35
|
+
* @className className
|
36
|
+
* @isElectron 设置为isElectron环境
|
37
|
+
* @height 滚动区高度
|
38
|
+
* @width 滚动区宽度
|
39
|
+
* @direction horizontal or undefined
|
40
|
+
* @scrollProgress 滚动进度
|
41
|
+
*/
|
42
|
+
|
43
|
+
|
44
|
+
var _react = require('react');
|
45
|
+
|
46
|
+
var _react2 = _interopRequireDefault(_react);
|
47
|
+
|
48
|
+
var _propTypes = require('prop-types');
|
49
|
+
|
50
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
51
|
+
|
52
|
+
var _swiper = require('swiper/dist/js/swiper.js');
|
53
|
+
|
54
|
+
var _swiper2 = _interopRequireDefault(_swiper);
|
55
|
+
|
56
|
+
var _mutantsMicrofx = require('mutants-microfx');
|
57
|
+
|
58
|
+
require('swiper/dist/css/swiper.min.css');
|
59
|
+
|
60
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
61
|
+
|
62
|
+
var envIsElectron = _mutantsMicrofx.env.platform === 'electron';
|
63
|
+
|
64
|
+
var TouchScroll = (_temp = _class = function (_Component) {
|
65
|
+
(0, _inherits3.default)(TouchScroll, _Component);
|
66
|
+
|
67
|
+
function TouchScroll(props) {
|
68
|
+
(0, _classCallCheck3.default)(this, TouchScroll);
|
69
|
+
|
70
|
+
var _this = (0, _possibleConstructorReturn3.default)(this, (TouchScroll.__proto__ || (0, _getPrototypeOf2.default)(TouchScroll)).call(this, props));
|
71
|
+
|
72
|
+
_initialiseProps.call(_this);
|
73
|
+
|
74
|
+
var _this$props = _this.props,
|
75
|
+
isElectron = _this$props.isElectron,
|
76
|
+
width = _this$props.width,
|
77
|
+
height = _this$props.height;
|
78
|
+
|
79
|
+
_this.isElectron = isElectron || envIsElectron;
|
80
|
+
return _this;
|
81
|
+
}
|
82
|
+
|
83
|
+
(0, _createClass3.default)(TouchScroll, [{
|
84
|
+
key: 'componentDidMount',
|
85
|
+
value: function componentDidMount() {
|
86
|
+
if (!this.isElectron) return;
|
87
|
+
|
88
|
+
this.createScroll();
|
89
|
+
}
|
90
|
+
}, {
|
91
|
+
key: 'componentDidUpdate',
|
92
|
+
value: function componentDidUpdate() {
|
93
|
+
if (!this.isElectron) return;
|
94
|
+
|
95
|
+
if (this.touchScroll) {
|
96
|
+
this.touchScroll.update();
|
97
|
+
} else {
|
98
|
+
this.createScroll();
|
99
|
+
}
|
100
|
+
}
|
101
|
+
}, {
|
102
|
+
key: 'componentWillUnmount',
|
103
|
+
value: function componentWillUnmount() {
|
104
|
+
if (!this.isElectron) return;
|
105
|
+
|
106
|
+
this.touchScroll && this.touchScroll.destroy(false);
|
107
|
+
this.touchScroll = undefined;
|
108
|
+
}
|
109
|
+
}, {
|
110
|
+
key: 'render',
|
111
|
+
value: function render() {
|
112
|
+
var _this2 = this;
|
113
|
+
|
114
|
+
var _props = this.props,
|
115
|
+
children = _props.children,
|
116
|
+
_props$className = _props.className,
|
117
|
+
className = _props$className === undefined ? '' : _props$className;
|
118
|
+
|
119
|
+
if (!this.isElectron) return children;
|
120
|
+
|
121
|
+
return _react2.default.createElement(
|
122
|
+
'div',
|
123
|
+
{ className: className, ref: function ref(_ref) {
|
124
|
+
return _this2.container = _ref;
|
125
|
+
} },
|
126
|
+
_react2.default.createElement(
|
127
|
+
'div',
|
128
|
+
{ className: 'swiper-wrapper' },
|
129
|
+
_react2.default.createElement(
|
130
|
+
'div',
|
131
|
+
{ className: 'swiper-slide' },
|
132
|
+
children
|
133
|
+
)
|
134
|
+
),
|
135
|
+
_react2.default.createElement('div', { className: 'swiper-scrollbar' })
|
136
|
+
);
|
137
|
+
}
|
138
|
+
}]);
|
139
|
+
return TouchScroll;
|
140
|
+
}(_react.Component), _class.propTypes = {
|
141
|
+
isElectron: _propTypes2.default.bool,
|
142
|
+
height: (0, _propTypes.oneOfType)([_propTypes2.default.string, _propTypes2.default.number]),
|
143
|
+
width: (0, _propTypes.oneOfType)([_propTypes2.default.string, _propTypes2.default.number]),
|
144
|
+
direction: _propTypes2.default.string,
|
145
|
+
scrollProgress: _propTypes2.default.func
|
146
|
+
}, _initialiseProps = function _initialiseProps() {
|
147
|
+
var _this3 = this;
|
148
|
+
|
149
|
+
this.createScroll = function () {
|
150
|
+
var _props2 = _this3.props,
|
151
|
+
height = _props2.height,
|
152
|
+
width = _props2.width,
|
153
|
+
direction = _props2.direction,
|
154
|
+
scrollProgress = _props2.scrollProgress;
|
155
|
+
|
156
|
+
var parentElement = _this3.container.parentElement || {};
|
157
|
+
var clientHeight = parentElement.clientHeight;
|
158
|
+
var clientWidth = parentElement.clientWidth;
|
159
|
+
|
160
|
+
if (typeof height !== 'undefined' || typeof width !== 'undefined') {
|
161
|
+
height = typeof height === 'string' ? parseInt(height) : height;
|
162
|
+
width = typeof width === 'string' ? parseInt(width) : width;
|
163
|
+
} else if (!direction && clientHeight) {
|
164
|
+
height = clientHeight;
|
165
|
+
} else if (direction && clientWidth) {
|
166
|
+
width = clientWidth;
|
167
|
+
}
|
168
|
+
|
169
|
+
if (height < 10 || width < 10) return;
|
170
|
+
(parentElement.style || {}).overflow = 'hidden';
|
171
|
+
|
172
|
+
var onScrollProgress = scrollProgress ? { mousewheel: true, scrollbar: {
|
173
|
+
el: '.swiper-scrollbar',
|
174
|
+
hide: true
|
175
|
+
}, watchSlidesProgress: true, on: { progress: scrollProgress } } : {};
|
176
|
+
_this3.touchScroll = new _swiper2.default(_this3.container, (0, _extends3.default)({
|
177
|
+
height: height,
|
178
|
+
width: width,
|
179
|
+
direction: direction || 'vertical',
|
180
|
+
slidesPerView: 'auto',
|
181
|
+
freeMode: true
|
182
|
+
}, onScrollProgress));
|
183
|
+
};
|
184
|
+
}, _temp);
|
185
|
+
exports.default = TouchScroll;
|
186
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/touchScroll/index.js"],"names":["envIsElectron","env","platform","TouchScroll","props","isElectron","width","height","createScroll","touchScroll","update","destroy","undefined","children","className","container","ref","Component","propTypes","PropTypes","bool","string","number","direction","scrollProgress","func","parentElement","clientHeight","clientWidth","parseInt","style","overflow","onScrollProgress","mousewheel","scrollbar","el","hide","watchSlidesProgress","on","progress","Swiper","slidesPerView","freeMode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAAA;;;;;;;;;;;;AAUA;;;;AACA;;;;AACA;;;;AACA;;AACA;;;;AAEA,IAAMA,gBAAgBC,oBAAIC,QAAJ,KAAiB,UAAvC;;IAEqBC,W;;;AAcnB,uBAAYC,KAAZ,EAAkB;AAAA;;AAAA,gJACVA,KADU;;AAAA;;AAAA,sBAEoB,MAAKA,KAFzB;AAAA,QAETC,UAFS,eAETA,UAFS;AAAA,QAEGC,KAFH,eAEGA,KAFH;AAAA,QAEUC,MAFV,eAEUA,MAFV;;AAGhB,UAAKF,UAAL,GAAkBA,cAAcL,aAAhC;AAHgB;AAIjB;;;;wCAEmB;AAClB,UAAI,CAAC,KAAKK,UAAV,EAAsB;;AAEtB,WAAKG,YAAL;AACD;;;yCAEoB;AACnB,UAAI,CAAC,KAAKH,UAAV,EAAsB;;AAEtB,UAAI,KAAKI,WAAT,EAAsB;AACpB,aAAKA,WAAL,CAAiBC,MAAjB;AACD,OAFD,MAEO;AACL,aAAKF,YAAL;AACD;AACF;;;2CAEsB;AACrB,UAAI,CAAC,KAAKH,UAAV,EAAsB;;AAEtB,WAAKI,WAAL,IAAoB,KAAKA,WAAL,CAAiBE,OAAjB,CAAyB,KAAzB,CAApB;AACA,WAAKF,WAAL,GAAmBG,SAAnB;AACD;;;6BAkCQ;AAAA;;AAAA,mBAC4B,KAAKR,KADjC;AAAA,UACAS,QADA,UACAA,QADA;AAAA,oCACUC,SADV;AAAA,UACUA,SADV,oCACsB,EADtB;;AAEP,UAAI,CAAC,KAAKT,UAAV,EAAsB,OAAOQ,QAAP;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AQsB,WAAR;AACD;;AAED,QAAIrB,SAAS,EAAT,IAAeD,QAAQ,EAA3B,EAA+B;AAC/B,KAACoB,cAAcI,KAAd,IAAuB,EAAxB,EAA4BC,QAA5B,GAAuC,QAAvC;;AAEA,QAAMC,mBAAmBR,iBAAiB,EAACS,YAAY,IAAb,EAAmBC,WAAW;AACtEC,YAAI,mBADkE;AAEtEC,cAAM;AAFgE,OAA9B,EAGvCC,qBAAsB,IAHiB,EAGXC,IAAI,EAACC,UAAUf,cAAX,EAHO,EAAjB,GAGwC,EAHjE;AAIA,WAAKf,WAAL,GAAmB,IAAI+B,gBAAJ,CAAW,OAAKzB,SAAhB;AACjBR,oBADiB;AAEjBD,kBAFiB;AAGjBiB,iBAAWA,aAAa,UAHP;AAIjBkB,qBAAe,MAJE;AAKjBC,gBAAU;AALO,OAMdV,gBANc,EAAnB;AAQD,G;;kBAzEkB7B,W","file":"index.js","sourcesContent":["/**\r\n * Created by hzy on 2019/7/30.\r\n *\r\n * @className className\r\n * @isElectron 设置为isElectron环境\r\n * @height 滚动区高度\r\n * @width 滚动区宽度\r\n * @direction horizontal or undefined\r\n * @scrollProgress 滚动进度\r\n */\r\nimport React, { Component } from 'react';\r\nimport PropTypes, {oneOfType} from 'prop-types';\r\nimport Swiper from 'swiper/dist/js/swiper.js';\r\nimport {env} from 'mutants-microfx';\r\nimport 'swiper/dist/css/swiper.min.css';\r\n\r\nconst envIsElectron = env.platform === 'electron';\r\n\r\nexport default class TouchScroll extends Component {\r\n static propTypes = {\r\n isElectron: PropTypes.bool,\r\n height: oneOfType([\r\n PropTypes.string,\r\n PropTypes.number\r\n ]),\r\n width: oneOfType([\r\n PropTypes.string,\r\n PropTypes.number\r\n ]),\r\n direction: PropTypes.string,\r\n scrollProgress: PropTypes.func,\r\n };\r\n constructor(props){\r\n super(props);\r\n const {isElectron, width, height} = this.props;\r\n this.isElectron = isElectron || envIsElectron;\r\n }\r\n\r\n componentDidMount() {\r\n if (!this.isElectron) return;\r\n\r\n this.createScroll();\r\n }\r\n\r\n componentDidUpdate() {\r\n if (!this.isElectron) return;\r\n\r\n if (this.touchScroll) {\r\n this.touchScroll.update();\r\n } else {\r\n this.createScroll();\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n if (!this.isElectron) return;\r\n\r\n this.touchScroll && this.touchScroll.destroy(false);\r\n this.touchScroll = undefined;\r\n }\r\n\r\n createScroll = () => {\r\n let {height, width, direction, scrollProgress} = this.props;\r\n const parentElement = this.container.parentElement || {};\r\n const clientHeight = parentElement.clientHeight;\r\n const clientWidth = parentElement.clientWidth;\r\n\r\n if (typeof height !== 'undefined' || typeof width !== 'undefined') {\r\n height = typeof height === 'string' ? parseInt(height) : height;\r\n width = typeof width === 'string' ? parseInt(width) : width;\r\n } else if (!direction && clientHeight) {\r\n height = clientHeight;\r\n } else if (direction && clientWidth) {\r\n width = clientWidth;\r\n }\r\n\r\n if (height < 10 || width < 10) return;\r\n (parentElement.style || {}).overflow = 'hidden';\r\n\r\n const onScrollProgress = scrollProgress ? {mousewheel: true, scrollbar: {\r\n el: '.swiper-scrollbar',\r\n hide: true,\r\n }, watchSlidesProgress : true, on: {progress: scrollProgress}} : {};\r\n this.touchScroll = new Swiper(this.container, {\r\n height,\r\n width,\r\n direction: direction || 'vertical',\r\n slidesPerView: 'auto',\r\n freeMode: true,\r\n ...onScrollProgress\r\n });\r\n }\r\n\r\n render() {\r\n const {children, className = ''} = this.props;\r\n if (!this.isElectron) return children;\r\n\r\n return (<div className={className} ref={ref => this.container = ref}>\r\n <div className=\"swiper-wrapper\">\r\n <div className=\"swiper-slide\">{children}</div>\r\n </div>\r\n <div className=\"swiper-scrollbar\" />\r\n </div>);\r\n }\r\n}\r\n"]}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.AuthProcess = undefined;
|
7
|
+
|
8
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
9
|
+
|
10
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
11
|
+
|
12
|
+
var _createClass2 = require('babel-runtime/helpers/createClass');
|
13
|
+
|
14
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
15
|
+
|
16
|
+
var _tplusPoslogin = require('tplus-poslogin');
|
17
|
+
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
|
+
|
20
|
+
var AuthProcess = exports.AuthProcess = function () {
|
21
|
+
function AuthProcess() {
|
22
|
+
(0, _classCallCheck3.default)(this, AuthProcess);
|
23
|
+
}
|
24
|
+
|
25
|
+
(0, _createClass3.default)(AuthProcess, null, [{
|
26
|
+
key: 'execute',
|
27
|
+
value: function execute(name) {
|
28
|
+
var operations = (0, _tplusPoslogin.PosInitData)('FunctionAuth');
|
29
|
+
if (operations) {
|
30
|
+
for (var index = 0; index < operations.length; index++) {
|
31
|
+
var operation = operations[index];
|
32
|
+
if (name + '' == operation + '') {
|
33
|
+
return true;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
return false;
|
38
|
+
}
|
39
|
+
}]);
|
40
|
+
return AuthProcess;
|
41
|
+
}();
|
42
|
+
//# sourceMappingURL=AuthProcess.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/touchTable/AuthProcess.js"],"names":["AuthProcess","name","operations","index","length","operation"],"mappings":";;;;;;;;;;;;;;;AAAA;;;;IACaA,W,WAAAA,W;;;;;;;gCACMC,I,EAAM;AACjB,gBAAIC,aAAa,gCAAY,cAAZ,CAAjB;AACA,gBAAIA,UAAJ,EAAgB;AACZ,qBAAK,IAAIC,QAAQ,CAAjB,EAAoBA,QAAQD,WAAWE,MAAvC,EAA+CD,OAA/C,EAAwD;AACpD,wBAAME,YAAYH,WAAWC,KAAX,CAAlB;AACA,wBAAKF,OAAO,EAAR,IAAgBI,YAAY,EAAhC,EAAqC;AACjC,+BAAO,IAAP;AACH;AACJ;AACJ;AACD,mBAAO,KAAP;AACH","file":"AuthProcess.js","sourcesContent":["import { PosInitData } from 'tplus-poslogin';\r\nexport class AuthProcess {\r\n static execute(name) {\r\n let operations = PosInitData('FunctionAuth');\r\n if (operations) {\r\n for (let index = 0; index < operations.length; index++) {\r\n const operation = operations[index];\r\n if ((name + '') == (operation + '')) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false\r\n }\r\n}"]}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.generateWaterMark = generateWaterMark;
|
7
|
+
function generateWaterMark() {
|
8
|
+
var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
9
|
+
|
10
|
+
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
11
|
+
_ref$width = _ref.width,
|
12
|
+
width = _ref$width === undefined ? '150px' : _ref$width,
|
13
|
+
_ref$height = _ref.height,
|
14
|
+
height = _ref$height === undefined ? '120px' : _ref$height,
|
15
|
+
_ref$font = _ref.font,
|
16
|
+
font = _ref$font === undefined ? '12px' : _ref$font,
|
17
|
+
_ref$color = _ref.color,
|
18
|
+
color = _ref$color === undefined ? 'rgba(244, 244, 244, 1)' : _ref$color,
|
19
|
+
_ref$text = _ref.text,
|
20
|
+
text = _ref$text === undefined ? '' : _ref$text,
|
21
|
+
_ref$rotate = _ref.rotate,
|
22
|
+
rotate = _ref$rotate === undefined ? '-30' : _ref$rotate,
|
23
|
+
_ref$only = _ref.only,
|
24
|
+
only = _ref$only === undefined ? false : _ref$only;
|
25
|
+
|
26
|
+
var contentTable = element.contentTable;
|
27
|
+
|
28
|
+
if (!contentTable) return;
|
29
|
+
var tablebodyEle = contentTable;
|
30
|
+
|
31
|
+
/* 制作水印背景 */
|
32
|
+
if (text.length) {
|
33
|
+
var base64Url; //水印背景
|
34
|
+
|
35
|
+
var canvas = document.createElement('canvas');
|
36
|
+
canvas.setAttribute('width', width);
|
37
|
+
canvas.setAttribute('height', height);
|
38
|
+
var w = parseInt((width + "").replace('px', ''));
|
39
|
+
var h = parseInt((height + "").replace('px', ''));
|
40
|
+
|
41
|
+
var ctx = canvas.getContext('2d');
|
42
|
+
ctx.font = font;
|
43
|
+
ctx.fillStyle = color;
|
44
|
+
ctx.rotate(Math.PI / 180 * rotate);
|
45
|
+
|
46
|
+
if (!only) {
|
47
|
+
ctx.fillText(text, 0, parseInt(h / 4));
|
48
|
+
ctx.fillText(text, parseInt(w / 4), h);
|
49
|
+
} else {
|
50
|
+
ctx.fillText(text, 0, h);
|
51
|
+
}
|
52
|
+
base64Url = canvas.toDataURL();
|
53
|
+
/* 元素上背景水印 */
|
54
|
+
tablebodyEle && (tablebodyEle.style['background-image'] = 'url(' + base64Url + ')');
|
55
|
+
return;
|
56
|
+
}
|
57
|
+
tablebodyEle && (tablebodyEle.style['background-image'] = 'none');
|
58
|
+
}
|
59
|
+
//# sourceMappingURL=generateWater.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/touchTable/generateWater.js"],"names":["generateWaterMark","element","width","height","font","color","text","rotate","only","contentTable","tablebodyEle","length","base64Url","canvas","document","createElement","setAttribute","w","parseInt","replace","h","ctx","getContext","fillStyle","Math","PI","fillText","toDataURL","style"],"mappings":";;;;;QAAgBA,iB,GAAAA,iB;AAAT,SAASA,iBAAT,GAGL;AAAA,MAFAC,OAEA,uEAFU,EAEV;;AAAA,iFAD6H,EAC7H;AAAA,wBADCC,KACD;AAAA,MADCA,KACD,8BADS,OACT;AAAA,yBADkBC,MAClB;AAAA,MADkBA,MAClB,+BAD2B,OAC3B;AAAA,uBADoCC,IACpC;AAAA,MADoCA,IACpC,6BAD2C,MAC3C;AAAA,wBADmDC,KACnD;AAAA,MADmDA,KACnD,8BAD2D,wBAC3D;AAAA,uBAD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B,kBAAnB,aAA8ChB,SAA9C,MAAjB;AACA;AACH;AACAF,mBAAiBA,aAAakB,KAAb,CAAmB,kBAAnB,UAAjB;AACD","file":"generateWater.js","sourcesContent":["export function generateWaterMark(\r\n element = {}, \r\n {width = '150px', height = '120px', font = '12px', color = 'rgba(244, 244, 244, 1)', text = '', rotate = '-30',only=false} = {}\r\n) {\r\n const {contentTable} = element;\r\n if (!contentTable) return;\r\n const tablebodyEle = contentTable\r\n \r\n /* 制作水印背景 */\r\n if(text.length){\r\n var base64Url;//水印背景\r\n \r\n const canvas = document.createElement('canvas');\r\n canvas.setAttribute('width', width);\r\n canvas.setAttribute('height', height);\r\n const w = parseInt((width + \"\").replace('px', ''));\r\n const h = parseInt((height + \"\").replace('px', ''));\r\n\r\n const ctx = canvas.getContext('2d');\r\n ctx.font = font;\r\n ctx.fillStyle = color;\r\n ctx.rotate(Math.PI / 180 * rotate);\r\n\r\n if (!only) {\r\n ctx.fillText(text, 0, parseInt(h / 4));\r\n ctx.fillText(text, parseInt(w / 4), h);\r\n } else {\r\n ctx.fillText(text, 0, h);\r\n }\r\n base64Url = canvas.toDataURL();\r\n /* 元素上背景水印 */\r\n tablebodyEle && (tablebodyEle.style['background-image']=`url(${base64Url})`);\r\n return \r\n }\r\n tablebodyEle && (tablebodyEle.style['background-image']=`none`)\r\n}\r\n"]}
|