tplus-components-touch 3.26.27 → 3.26.29
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/settlement/moreCzkTable/index.js +2 -2
- package/dist/components/settlement/moreCzkTable/index.js.map +1 -1
- package/dist/components/settlement/moreCzkTable/style.less +7 -0
- package/dist/components/touchScroll/index.js +6 -2
- package/dist/components/touchScroll/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -103,8 +103,8 @@ var PrototypeTableModal = (0, _mutantsMicrofx.observer)(_class = function (_Comp
|
|
|
103
103
|
}
|
|
104
104
|
}, {
|
|
105
105
|
title: '会员手机号',
|
|
106
|
-
dataIndex: '
|
|
107
|
-
key: '
|
|
106
|
+
dataIndex: 'MemberMobile',
|
|
107
|
+
key: 'MemberMobile',
|
|
108
108
|
ellipsis: true,
|
|
109
109
|
align: 'center',
|
|
110
110
|
width: 120
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/settlement/moreCzkTable/index.js"],"names":["PrototypeTableModal","observer","getRowClassName","record","index","selectedRowIndex","props","onRowClick","setMoreCzkIndex","data1","cardTypeEnumList","BALANCE_CARD","ELEC_STORAGE_CARD","STORAGE_CARD","PHYSICAL_STORAGE_CARD","columns","title","dataIndex","key","ellipsis","align","width","render","showText","dataSource","getColumns","y","onClick","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;AAEA;;;;IAGqBA,mB,OADpBC,wB;;;;;;;;;;;;;;sOA4DCC,e,GAAkB,UAACC,MAAD,EAASC,KAAT,EAAmB;AAAA,UAC3BC,gBAD2B,GACN,MAAKC,KADC,CAC3BD,gBAD2B;;AAEnC,UAAIA,oBAAoBD,KAAxB,EAA+B;AAC7B,eAAO,cAAP;AACD,OAFD,MAEO;AACL,eAAO,EAAP;AACD;AACF,K,QAEDG,U,GAAa,UAACJ,MAAD,EAASC,KAAT,EAAmB;AAC9B,YAAKE,KAAL,CAAWE,eAAX,CAA2BJ,KAA3B;AACD,K;;;;;+BArEUK,K,EAAO;AACd;AACF,UAAMC,mBAAmB;AACrBC,sBAAc,KADO;AAErBC,2BAAmB,OAFE;AAGrBC,sBAAc,KAHO;AAIrBC,+BAAuB;AAJF,OAAzB;AAMA,UAAIC,UAAU,CACZ;AACEC,eAAO,IADT;AAEEC,mBAAW,eAFb;AAGEC,aAAK,eAHP;AAIEC,kBAAU,IAJZ;AAKEC,eAAO,QALT;AAMEC,eAAO;AANT,OADY,EASZ;AACEL,eAAO,KADT;AAEEC,mBAAW,cAFb;AAGEC,aAAK,cAHP;AAIEC,kBAAU,IAJZ;AAKEC,eAAO,QALT;AAMEC,eAAO,GANT;AAOEC,gBAAQ,gBAACC,QAAD,EAAc;AAClB,iBACI;AAAA;AAAA;AAAMb,6BAAiBa,QAAjB;AAAN,WADJ;AAGD;AAXL,OATY,EAsBZ;AACEP,eAAO,OADT;AAEEC,mBAAW,
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/settlement/moreCzkTable/index.js"],"names":["PrototypeTableModal","observer","getRowClassName","record","index","selectedRowIndex","props","onRowClick","setMoreCzkIndex","data1","cardTypeEnumList","BALANCE_CARD","ELEC_STORAGE_CARD","STORAGE_CARD","PHYSICAL_STORAGE_CARD","columns","title","dataIndex","key","ellipsis","align","width","render","showText","dataSource","getColumns","y","onClick","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;AAEA;;;;IAGqBA,mB,OADpBC,wB;;;;;;;;;;;;;;sOA4DCC,e,GAAkB,UAACC,MAAD,EAASC,KAAT,EAAmB;AAAA,UAC3BC,gBAD2B,GACN,MAAKC,KADC,CAC3BD,gBAD2B;;AAEnC,UAAIA,oBAAoBD,KAAxB,EAA+B;AAC7B,eAAO,cAAP;AACD,OAFD,MAEO;AACL,eAAO,EAAP;AACD;AACF,K,QAEDG,U,GAAa,UAACJ,MAAD,EA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KA,gBAAQ,EAAEwB,GAAG,GAAL,EALR;AAMA,oBAAY,KANZ;AAOA,eAAO,eAACvB,MAAD,EAASC,KAAT,EAAmB;AACtB,iBAAO;AACHuB,qBAAS;AAAA,qBAAM,OAAKpB,UAAL,CAAgBJ,MAAhB,EAAwBC,KAAxB,CAAN;AAAA;AADN,WAAP;AAGH,SAXD,GADJ;AAcD;;;EAzF8CwB,gB;;kBAA5B5B,mB","file":"index.js","sourcesContent":["import React, { Component } from 'react';\nimport { observer } from \"mutants-microfx\"\nimport { Table } from 'antd';\nimport './style.less';\n\n@observer\nexport default class PrototypeTableModal extends Component {\n getColumns(data1) {\n // 卡类型\n const cardTypeEnumList = {\n BALANCE_CARD: \"余额卡\", \n ELEC_STORAGE_CARD: \"电子储值卡\",\n STORAGE_CARD: \"储值卡\",\n PHYSICAL_STORAGE_CARD: \"实体储值卡\"\n }\n let columns = [\n {\n title: '卡号',\n dataIndex: 'StorageCardNo',\n key: 'StorageCardNo',\n ellipsis: true,\n align: 'center',\n width: 200,\n },\n {\n title: '卡类型',\n dataIndex: 'CardTypeEnum',\n key: 'CardTypeEnum',\n ellipsis: true,\n align: 'center',\n width: 120,\n render: (showText) => {\n return (\n <div>{cardTypeEnumList[showText]}</div>\n )\n }\n },\n {\n title: '会员手机号',\n dataIndex: 'MemberMobile',\n key: 'MemberMobile',\n ellipsis: true,\n align: 'center',\n width: 120,\n },\n {\n title: '会员',\n dataIndex: 'Name',\n key: 'Name',\n ellipsis: true,\n align: 'center',\n width: 160,\n },\n {\n title: '余额',\n dataIndex: 'BalanceStorage',\n key: 'BalanceStorage',\n ellipsis: true,\n align: 'center',\n width: 160,\n }\n ]\n return columns;\n }\n\n getRowClassName = (record, index) => {\n const { selectedRowIndex } = this.props;\n if (selectedRowIndex == index) {\n return 'row-selected'\n } else {\n return '';\n }\n }\n\n onRowClick = (record, index) => {\n this.props.setMoreCzkIndex(index)\n }\n\n render() {\n const {dataSource} = this.props;\n let columns = this.getColumns(dataSource);\n return (\n <Table\n className='moreCzkTable'\n dataSource={dataSource}\n columns={columns}\n rowClassName={this.getRowClassName}\n scroll={{ y: 257 }}\n pagination={false}\n onRow={(record, index) => {\n return {\n onClick: () => this.onRowClick(record, index)\n }\n }} ></Table>\n );\n }\n}\n"]}
|
|
@@ -131,7 +131,8 @@ var TouchScroll = (_temp = _class = function (_Component) {
|
|
|
131
131
|
{ className: 'swiper-slide' },
|
|
132
132
|
children
|
|
133
133
|
)
|
|
134
|
-
)
|
|
134
|
+
),
|
|
135
|
+
_react2.default.createElement('div', { className: 'swiper-scrollbar' })
|
|
135
136
|
);
|
|
136
137
|
}
|
|
137
138
|
}]);
|
|
@@ -168,7 +169,10 @@ var TouchScroll = (_temp = _class = function (_Component) {
|
|
|
168
169
|
if (height < 10 || width < 10) return;
|
|
169
170
|
(parentElement.style || {}).overflow = 'hidden';
|
|
170
171
|
|
|
171
|
-
var onScrollProgress = scrollProgress ? {
|
|
172
|
+
var onScrollProgress = scrollProgress ? { mousewheel: true, scrollbar: {
|
|
173
|
+
el: '.swiper-scrollbar',
|
|
174
|
+
hide: true
|
|
175
|
+
}, watchSlidesProgress: true, on: { progress: scrollProgress } } : {};
|
|
172
176
|
_this3.touchScroll = new _swiper2.default(_this3.container, (0, _extends3.default)({
|
|
173
177
|
height: height,
|
|
174
178
|
width: width,
|
|
@@ -1 +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","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;;;
|
|
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;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KjBC,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"]}
|