kts-component-invoice-operate 1.2.2 → 1.2.3
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/index.esm.js
CHANGED
|
@@ -5073,6 +5073,8 @@ var BuyerNameInput = (function (props) {
|
|
|
5073
5073
|
|
|
5074
5074
|
|
|
5075
5075
|
var content = React.useMemo(function () {
|
|
5076
|
+
var _dataSource$recent, _dataSource$list;
|
|
5077
|
+
|
|
5076
5078
|
return /*#__PURE__*/React.createElement("div", {
|
|
5077
5079
|
className: 'kts-invoice-operate-buyer-name-content'
|
|
5078
5080
|
}, loading ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -5090,14 +5092,16 @@ var BuyerNameInput = (function (props) {
|
|
|
5090
5092
|
}
|
|
5091
5093
|
}, "\u6700\u8FD1\u5F00\u5177"), /*#__PURE__*/React.createElement("ul", {
|
|
5092
5094
|
className: 'kts-invoice-operate-buyer-name-content-recently-issued'
|
|
5093
|
-
}, dataSource.recent.map(function (e, i) {
|
|
5095
|
+
}, (_dataSource$recent = dataSource.recent) === null || _dataSource$recent === void 0 ? void 0 : _dataSource$recent.map(function (e, i) {
|
|
5096
|
+
var _dataSource$recent$le, _dataSource$recent2;
|
|
5097
|
+
|
|
5094
5098
|
return /*#__PURE__*/React.createElement("li", {
|
|
5095
5099
|
key: i,
|
|
5096
5100
|
onClick: function onClick() {
|
|
5097
5101
|
onClickItem(e);
|
|
5098
5102
|
},
|
|
5099
5103
|
style: {
|
|
5100
|
-
marginBottom: interval(i, dataSource.recent.length)
|
|
5104
|
+
marginBottom: interval(i, (_dataSource$recent$le = (_dataSource$recent2 = dataSource.recent) === null || _dataSource$recent2 === void 0 ? void 0 : _dataSource$recent2.length) !== null && _dataSource$recent$le !== void 0 ? _dataSource$recent$le : 0)
|
|
5101
5105
|
}
|
|
5102
5106
|
}, /*#__PURE__*/React.createElement(MyTag, null, e.buyerName));
|
|
5103
5107
|
}))), /*#__PURE__*/React.createElement(Divider, {
|
|
@@ -5113,7 +5117,7 @@ var BuyerNameInput = (function (props) {
|
|
|
5113
5117
|
style: {
|
|
5114
5118
|
padding: '0 10px'
|
|
5115
5119
|
}
|
|
5116
|
-
}, "\u9009\u62E9\u516C\u53F8"), dataSource.list.map(function (e, i) {
|
|
5120
|
+
}, "\u9009\u62E9\u516C\u53F8"), (_dataSource$list = dataSource.list) === null || _dataSource$list === void 0 ? void 0 : _dataSource$list.map(function (e, i) {
|
|
5117
5121
|
return /*#__PURE__*/React.createElement("ul", {
|
|
5118
5122
|
key: i,
|
|
5119
5123
|
onClick: function onClick() {
|
package/dist/index.js
CHANGED
|
@@ -5083,6 +5083,8 @@ var BuyerNameInput = (function (props) {
|
|
|
5083
5083
|
|
|
5084
5084
|
|
|
5085
5085
|
var content = React__default['default'].useMemo(function () {
|
|
5086
|
+
var _dataSource$recent, _dataSource$list;
|
|
5087
|
+
|
|
5086
5088
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
5087
5089
|
className: 'kts-invoice-operate-buyer-name-content'
|
|
5088
5090
|
}, loading ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -5100,14 +5102,16 @@ var BuyerNameInput = (function (props) {
|
|
|
5100
5102
|
}
|
|
5101
5103
|
}, "\u6700\u8FD1\u5F00\u5177"), /*#__PURE__*/React__default['default'].createElement("ul", {
|
|
5102
5104
|
className: 'kts-invoice-operate-buyer-name-content-recently-issued'
|
|
5103
|
-
}, dataSource.recent.map(function (e, i) {
|
|
5105
|
+
}, (_dataSource$recent = dataSource.recent) === null || _dataSource$recent === void 0 ? void 0 : _dataSource$recent.map(function (e, i) {
|
|
5106
|
+
var _dataSource$recent$le, _dataSource$recent2;
|
|
5107
|
+
|
|
5104
5108
|
return /*#__PURE__*/React__default['default'].createElement("li", {
|
|
5105
5109
|
key: i,
|
|
5106
5110
|
onClick: function onClick() {
|
|
5107
5111
|
onClickItem(e);
|
|
5108
5112
|
},
|
|
5109
5113
|
style: {
|
|
5110
|
-
marginBottom: interval(i, dataSource.recent.length)
|
|
5114
|
+
marginBottom: interval(i, (_dataSource$recent$le = (_dataSource$recent2 = dataSource.recent) === null || _dataSource$recent2 === void 0 ? void 0 : _dataSource$recent2.length) !== null && _dataSource$recent$le !== void 0 ? _dataSource$recent$le : 0)
|
|
5111
5115
|
}
|
|
5112
5116
|
}, /*#__PURE__*/React__default['default'].createElement(MyTag, null, e.buyerName));
|
|
5113
5117
|
}))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Divider, {
|
|
@@ -5123,7 +5127,7 @@ var BuyerNameInput = (function (props) {
|
|
|
5123
5127
|
style: {
|
|
5124
5128
|
padding: '0 10px'
|
|
5125
5129
|
}
|
|
5126
|
-
}, "\u9009\u62E9\u516C\u53F8"), dataSource.list.map(function (e, i) {
|
|
5130
|
+
}, "\u9009\u62E9\u516C\u53F8"), (_dataSource$list = dataSource.list) === null || _dataSource$list === void 0 ? void 0 : _dataSource$list.map(function (e, i) {
|
|
5127
5131
|
return /*#__PURE__*/React__default['default'].createElement("ul", {
|
|
5128
5132
|
key: i,
|
|
5129
5133
|
onClick: function onClick() {
|
package/docs/index.md
CHANGED
package/package.json
CHANGED
|
@@ -42,14 +42,14 @@ export default (props: IBuyerNameInputProps) => {
|
|
|
42
42
|
<div className='kts-invoice-operate-buyer-name-content-block' style={{ padding: '14px 10px' }} >
|
|
43
43
|
<label style={{ marginBottom: 10 }} >最近开具</label>
|
|
44
44
|
<ul className='kts-invoice-operate-buyer-name-content-recently-issued' >
|
|
45
|
-
{dataSource.recent
|
|
45
|
+
{dataSource.recent?.map((e, i) => <li key={i} onClick={() => { onClickItem(e) }} style={{ marginBottom: interval(i, dataSource.recent?.length ?? 0) }} ><MyTag>{e.buyerName}</MyTag></li>)}
|
|
46
46
|
</ul>
|
|
47
47
|
</div>
|
|
48
48
|
<Divider style={{ margin: "0 6px" }} />
|
|
49
49
|
<div className='kts-invoice-operate-buyer-name-content-block' style={{ padding: '14px 10px 4px' }} >
|
|
50
50
|
<label style={{ padding: '0 10px' }} >选择公司</label>
|
|
51
51
|
{
|
|
52
|
-
dataSource.list
|
|
52
|
+
dataSource.list?.map((e, i) => {
|
|
53
53
|
return (
|
|
54
54
|
<ul key={i} onClick={() => { onClickItem(e) }} className='kts-invoice-operate-buyer-name-content-select-company' >
|
|
55
55
|
<li>{e.buyerName}</li>
|
|
@@ -78,7 +78,7 @@ export default (props: IBuyerNameInputProps) => {
|
|
|
78
78
|
onBuyNameChange(e.target.value);
|
|
79
79
|
}, [dataSource])
|
|
80
80
|
|
|
81
|
-
React.useEffect(()=>{
|
|
81
|
+
React.useEffect(() => {
|
|
82
82
|
visible && onBuyNameChange(props.value)
|
|
83
83
|
}, [visible, props.value])
|
|
84
84
|
|
|
@@ -121,7 +121,7 @@ function useDataSource() {
|
|
|
121
121
|
|
|
122
122
|
const [loading, setLoading] = React.useState(false);
|
|
123
123
|
|
|
124
|
-
const [dataSource, setDataSource] = React.useState<{ recent
|
|
124
|
+
const [dataSource, setDataSource] = React.useState<{ recent?: IBuyerInfo[], list?: IBuyerInfo[] }>({ recent: [], list: [] })
|
|
125
125
|
|
|
126
126
|
const autoContainer = controller.useMemo(s => s.buyerState.autoContainer, []);
|
|
127
127
|
|