tplus-components-touch 3.54.1 → 3.55.1
Sign up to get free protection for your applications and to get access to all the features.
- 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 +255 -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/index.js +231 -0
- package/dist/components/commonForm/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/deliverySearch/api.js +355 -0
- package/dist/components/deliverySearch/api.js.map +1 -0
- package/dist/components/deliverySearch/index.js +1222 -0
- package/dist/components/deliverySearch/index.js.map +1 -0
- package/dist/components/form/index.js +310 -0
- package/dist/components/form/index.js.map +1 -0
- package/dist/components/hardwareAPI/index.js +215 -0
- package/dist/components/hardwareAPI/index.js.map +1 -0
- package/dist/components/hotKey/config.js +306 -0
- package/dist/components/hotKey/config.js.map +1 -0
- package/dist/components/hotKey/hotKeyModal.js +479 -0
- package/dist/components/hotKey/hotKeyModal.js.map +1 -0
- package/dist/components/hotKey/index.js +795 -0
- package/dist/components/hotKey/index.js.map +1 -0
- package/dist/components/hotKey/localConfig.js +1216 -0
- package/dist/components/hotKey/localConfig.js.map +1 -0
- package/dist/components/hotKey/utils.js +135 -0
- package/dist/components/hotKey/utils.js.map +1 -0
- package/dist/components/input/index.js +254 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/input/scanInput.js +98 -0
- package/dist/components/input/scanInput.js.map +1 -0
- 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/inventorySearch/api.js +214 -0
- package/dist/components/inventorySearch/api.js.map +1 -0
- package/dist/components/inventorySearch/index.js +303 -0
- package/dist/components/inventorySearch/index.js.map +1 -0
- package/dist/components/inventorySearch/store.js +363 -0
- package/dist/components/inventorySearch/store.js.map +1 -0
- package/dist/components/inventorySearch/tab.js +280 -0
- package/dist/components/inventorySearch/tab.js.map +1 -0
- package/dist/components/keyboard/index.js +259 -0
- package/dist/components/keyboard/index.js.map +1 -0
- package/dist/components/keyboard/letterKeyboard.js +227 -0
- package/dist/components/keyboard/letterKeyboard.js.map +1 -0
- package/dist/components/keyboard/numKeyboard.js +469 -0
- package/dist/components/keyboard/numKeyboard.js.map +1 -0
- package/dist/components/keyboard/numKeyboardScan.js +208 -0
- package/dist/components/keyboard/numKeyboardScan.js.map +1 -0
- package/dist/components/keyboard/numberButton_input.js +305 -0
- package/dist/components/keyboard/numberButton_input.js.map +1 -0
- package/dist/components/keyboard/numkeyboardPassword.js +477 -0
- package/dist/components/keyboard/numkeyboardPassword.js.map +1 -0
- package/dist/components/keyboard/onlyKeyboard.js +90 -0
- package/dist/components/keyboard/onlyKeyboard.js.map +1 -0
- package/dist/components/keyboard/onlyLetterButton.js +187 -0
- package/dist/components/keyboard/onlyLetterButton.js.map +1 -0
- package/dist/components/keyboard/onlyLetterButton2.js +235 -0
- package/dist/components/keyboard/onlyLetterButton2.js.map +1 -0
- package/dist/components/keyboard/onlyNumberButton.js +128 -0
- package/dist/components/keyboard/onlyNumberButton.js.map +1 -0
- package/dist/components/keyboard/onlyNumberButton2.js +115 -0
- package/dist/components/keyboard/onlyNumberButton2.js.map +1 -0
- package/dist/components/keyboard/textKeyboard.js +50 -0
- package/dist/components/keyboard/textKeyboard.js.map +1 -0
- package/dist/components/layout/hamburger.js +29 -0
- package/dist/components/layout/hamburger.js.map +1 -0
- package/dist/components/layout/index.js +31 -0
- package/dist/components/layout/index.js.map +1 -0
- package/dist/components/layout/layout.js +182 -0
- package/dist/components/layout/layout.js.map +1 -0
- package/dist/components/layout/sider.js +167 -0
- package/dist/components/layout/sider.js.map +1 -0
- package/dist/components/loading/index.js +198 -0
- package/dist/components/loading/index.js.map +1 -0
- package/dist/components/loading/loadingContent.js +188 -0
- package/dist/components/loading/loadingContent.js.map +1 -0
- package/dist/components/loading/utils.js +29 -0
- package/dist/components/loading/utils.js.map +1 -0
- package/dist/components/message/index.js +309 -0
- package/dist/components/message/index.js.map +1 -0
- package/dist/components/modal/index.js +93 -0
- package/dist/components/modal/index.js.map +1 -0
- package/dist/components/modalVertical/index.js +325 -0
- package/dist/components/modalVertical/index.js.map +1 -0
- package/dist/components/modalWraper/index.js +485 -0
- package/dist/components/modalWraper/index.js.map +1 -0
- package/dist/components/modalWraper/utils.js +48 -0
- package/dist/components/modalWraper/utils.js.map +1 -0
- package/dist/components/notification/index.js +118 -0
- package/dist/components/notification/index.js.map +1 -0
- package/dist/components/overflowTip/index.js +269 -0
- package/dist/components/overflowTip/index.js.map +1 -0
- package/dist/components/page/index.js +49 -0
- package/dist/components/page/index.js.map +1 -0
- package/dist/components/presale/pickup.js +479 -0
- package/dist/components/presale/pickup.js.map +1 -0
- package/dist/components/product/detail.js +148 -0
- package/dist/components/product/detail.js.map +1 -0
- package/dist/components/product/getCard.js +145 -0
- package/dist/components/product/getCard.js.map +1 -0
- package/dist/components/progressState/EmptyAndErrorView.js +142 -0
- package/dist/components/progressState/EmptyAndErrorView.js.map +1 -0
- package/dist/components/progressState/ProgressState.js +158 -0
- package/dist/components/progressState/ProgressState.js.map +1 -0
- package/dist/components/progressState/index.js +14 -0
- package/dist/components/progressState/index.js.map +1 -0
- package/dist/components/scan/index.js +219 -0
- package/dist/components/scan/index.js.map +1 -0
- package/dist/components/select/index.js +28 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/settlement/asyncModal.js +207 -0
- package/dist/components/settlement/asyncModal.js.map +1 -0
- package/dist/components/settlement/index.js +25 -0
- package/dist/components/settlement/index.js.map +1 -0
- 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 +5557 -0
- package/dist/components/settlement/settlement.js.map +1 -0
- package/dist/components/settlement/settlement.less +0 -10
- package/dist/components/settlement/settlementApi.js +512 -0
- package/dist/components/settlement/settlementApi.js.map +1 -0
- package/dist/components/settlement/settlementStore.js +2833 -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/demo_index.html +3 -72
- package/dist/components/ticon/iconfont/iconfont.css +3 -15
- package/dist/components/ticon/iconfont/iconfont.js +36 -0
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -0
- package/dist/components/ticon/iconfont/iconfont.json +0 -21
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -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 +1148 -0
- package/dist/components/touchTable/index.js.map +1 -0
- package/dist/components/touchTable/utils.js +27 -0
- package/dist/components/touchTable/utils.js.map +1 -0
- package/dist/index.js +1 -22
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/collection/api.js +0 -105
- package/dist/components/collection/api.js.map +0 -1
- package/dist/components/collection/searchView/index.less +0 -134
- package/dist/components/password/style.less +0 -95
@@ -5,27 +5,6 @@
|
|
5
5
|
"css_prefix_text": "icon-",
|
6
6
|
"description": "",
|
7
7
|
"glyphs": [
|
8
|
-
{
|
9
|
-
"icon_id": "29749289",
|
10
|
-
"name": "应收明细账",
|
11
|
-
"font_class": "yingshoumingxizhang",
|
12
|
-
"unicode": "e69f",
|
13
|
-
"unicode_decimal": 59039
|
14
|
-
},
|
15
|
-
{
|
16
|
-
"icon_id": "29749290",
|
17
|
-
"name": "客户账本",
|
18
|
-
"font_class": "kehuzhangben",
|
19
|
-
"unicode": "e6a0",
|
20
|
-
"unicode_decimal": 59040
|
21
|
-
},
|
22
|
-
{
|
23
|
-
"icon_id": "29130171",
|
24
|
-
"name": "收款",
|
25
|
-
"font_class": "shoukuan",
|
26
|
-
"unicode": "e69e",
|
27
|
-
"unicode_decimal": 59038
|
28
|
-
},
|
29
8
|
{
|
30
9
|
"icon_id": "25788179",
|
31
10
|
"name": "加号",
|
Binary file
|
Binary file
|
Binary file
|
@@ -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';\nimport './iconfont/iconfont.css';\n\nexport default (props) => {\n const {type, icon, className, title, ...others} = props;\n return <i \n title={title} \n className={((type || icon)?'iconfont icon-'+(type || icon):'')+ (className?' '+className:'')} \n {...others} \n />\n}\n\n// interface ITicon { \n// type?:string, \n// icon:string, \n// className?:string, \n// title?:string, \n// [propName: string]: any\n// } \n\n// const Ticon : React.FC<ITicon> = ({type, icon, className, title, ...others}) => (\n// <i \n// title={title} \n// className={((type || icon)?'iconfont icon-'+(type || icon):'')+ (className?' '+className:'')} \n// {...others} \n// />\n// );\n\n// export default Ticon;\n\n// export default (props) => {\n// const {type, icon, className, title, ...others} = props;\n// return \n// }\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,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AJE;AAKjBC,gBAAU;AALO,OAMdV,gBANc,EAAnB;AAQD,G;;kBAzEkB7B,W","file":"index.js","sourcesContent":["/**\n * Created by hzy on 2019/7/30.\n *\n * @className className\n * @isElectron 设置为isElectron环境\n * @height 滚动区高度\n * @width 滚动区宽度\n * @direction horizontal or undefined\n * @scrollProgress 滚动进度\n */\nimport React, { Component } from 'react';\nimport PropTypes, {oneOfType} from 'prop-types';\nimport Swiper from 'swiper/dist/js/swiper.js';\nimport {env} from 'mutants-microfx';\nimport 'swiper/dist/css/swiper.min.css';\n\nconst envIsElectron = env.platform === 'electron';\n\nexport default class TouchScroll extends Component {\n static propTypes = {\n isElectron: PropTypes.bool,\n height: oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n width: oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n direction: PropTypes.string,\n scrollProgress: PropTypes.func,\n };\n constructor(props){\n super(props);\n const {isElectron, width, height} = this.props;\n this.isElectron = isElectron || envIsElectron;\n }\n\n componentDidMount() {\n if (!this.isElectron) return;\n\n this.createScroll();\n }\n\n componentDidUpdate() {\n if (!this.isElectron) return;\n\n if (this.touchScroll) {\n this.touchScroll.update();\n } else {\n this.createScroll();\n }\n }\n\n componentWillUnmount() {\n if (!this.isElectron) return;\n\n this.touchScroll && this.touchScroll.destroy(false);\n this.touchScroll = undefined;\n }\n\n createScroll = () => {\n let {height, width, direction, scrollProgress} = this.props;\n const parentElement = this.container.parentElement || {};\n const clientHeight = parentElement.clientHeight;\n const clientWidth = parentElement.clientWidth;\n\n if (typeof height !== 'undefined' || typeof width !== 'undefined') {\n height = typeof height === 'string' ? parseInt(height) : height;\n width = typeof width === 'string' ? parseInt(width) : width;\n } else if (!direction && clientHeight) {\n height = clientHeight;\n } else if (direction && clientWidth) {\n width = clientWidth;\n }\n\n if (height < 10 || width < 10) return;\n (parentElement.style || {}).overflow = 'hidden';\n\n const onScrollProgress = scrollProgress ? {mousewheel: true, scrollbar: {\n el: '.swiper-scrollbar',\n hide: true,\n }, watchSlidesProgress : true, on: {progress: scrollProgress}} : {};\n this.touchScroll = new Swiper(this.container, {\n height,\n width,\n direction: direction || 'vertical',\n slidesPerView: 'auto',\n freeMode: true,\n ...onScrollProgress\n });\n }\n\n render() {\n const {children, className = ''} = this.props;\n if (!this.isElectron) return children;\n\n return (<div className={className} ref={ref => this.container = ref}>\n <div className=\"swiper-wrapper\">\n <div className=\"swiper-slide\">{children}</div>\n </div>\n <div className=\"swiper-scrollbar\" />\n </div>);\n }\n}\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';\nexport class AuthProcess {\n static execute(name) {\n let operations = PosInitData('FunctionAuth');\n if (operations) {\n for (let index = 0; index < operations.length; index++) {\n const operation = operations[index];\n if ((name + '') == (operation + '')) {\n return true;\n }\n }\n }\n return false\n }\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,uBADqFC,IACrF;AAAA,MADqFA,IACrF,6BAD4F,EAC5F;AAAA,yBADgGC,MAChG;AAAA,MADgGA,MAChG,+BADyG,KACzG;AAAA,uBAD+GC,IAC/G;AAAA,MAD+GA,IAC/G,6BADoH,KACpH;;AAAA,MACOC,YADP,GACuBR,OADvB,CACOQ,YADP;;AAEA,MAAI,CAACA,YAAL,EAAmB;AACnB,MAAMC,eAAeD,YAArB;;AAEA;AACD,MAAGH,KAAKK,MAAR,EAAe;AACZ,QAAIC,SAAJ,CADY,CACE;;AAEd,QAAMC,SAASC,SAASC,aAAT,CAAuB,QAAvB,CAAf;AACAF,WAAOG,YAAP,CAAoB,OAApB,EAA6Bd,KAA7B;AACAW,WAAOG,YAAP,CAAoB,QAApB,EAA8Bb,MAA9B;AACA,QAAMc,IAAIC,SAAS,CAAChB,QAAQ,EAAT,EAAaiB,OAAb,CAAqB,IAArB,EAA2B,EAA3B,CAAT,CAAV;AACA,QAAMC,IAAIF,SAAS,CAACf,SAAS,EAAV,EAAcgB,OAAd,CAAsB,IAAtB,EAA4B,EAA5B,CAAT,CAAV;;AAEA,QAAME,MAAMR,OAAOS,UAAP,CAAkB,IAAlB,CAAZ;AACAD,QAAIjB,IAAJ,GAAWA,IAAX;AACAiB,QAAIE,SAAJ,GAAgBlB,KAAhB;AACAgB,QAAId,MAAJ,CAAWiB,KAAKC,EAAL,GAAU,GAAV,GAAgBlB,MAA3B;;AAEA,QAAI,CAACC,IAAL,EAAW;AACTa,UAAIK,QAAJ,CAAapB,IAAb,EAAmB,CAAnB,EAAsBY,SAASE,IAAI,CAAb,CAAtB;AACAC,UAAIK,QAAJ,CAAapB,IAAb,EAAmBY,SAASD,IAAI,CAAb,CAAnB,EAAoCG,CAApC;AACD,KAHD,MAGO;AACLC,UAAIK,QAAJ,CAAapB,IAAb,EAAmB,CAAnB,EAAsBc,CAAtB;AACD;AACDR,gBAAYC,OAAOc,SAAP,EAAZ;AACC;AACAjB,qBAAiBA,aAAakB,KAAb,CAAmB,kBAAnB,aAA8ChB,SAA9C,MAAjB;AACA;AACH;AACAF,mBAAiBA,aAAakB,KAAb,CAAmB,kBAAnB,UAAjB;AACD","file":"generateWater.js","sourcesContent":["export function generateWaterMark(\n element = {}, \n {width = '150px', height = '120px', font = '12px', color = 'rgba(244, 244, 244, 1)', text = '', rotate = '-30',only=false} = {}\n) {\n const {contentTable} = element;\n if (!contentTable) return;\n const tablebodyEle = contentTable\n \n /* 制作水印背景 */\n if(text.length){\n var base64Url;//水印背景\n \n const canvas = document.createElement('canvas');\n canvas.setAttribute('width', width);\n canvas.setAttribute('height', height);\n const w = parseInt((width + \"\").replace('px', ''));\n const h = parseInt((height + \"\").replace('px', ''));\n\n const ctx = canvas.getContext('2d');\n ctx.font = font;\n ctx.fillStyle = color;\n ctx.rotate(Math.PI / 180 * rotate);\n\n if (!only) {\n ctx.fillText(text, 0, parseInt(h / 4));\n ctx.fillText(text, parseInt(w / 4), h);\n } else {\n ctx.fillText(text, 0, h);\n }\n base64Url = canvas.toDataURL();\n /* 元素上背景水印 */\n tablebodyEle && (tablebodyEle.style['background-image']=`url(${base64Url})`);\n return \n }\n tablebodyEle && (tablebodyEle.style['background-image']=`none`)\n}\n"]}
|