cfel-base-components 2.0.9 → 2.0.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cfel-base-components",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "description": "cfel-base-components",
5
5
  "main": "/src/index.tsx",
6
6
  "types": "src/index.d.ts",
@@ -29,6 +29,7 @@ export interface LiosLayoutlProps {
29
29
  availableAmount:string,
30
30
  currency:string
31
31
  }
32
+ myWalletInfoAction?:Function,
32
33
  logoutUrl?: string,
33
34
  switchTenantUrl?: string,
34
35
  defaultOpenKeys?: string[],
@@ -53,7 +54,8 @@ export default function LiosLayout(props: LiosLayoutlProps) {
53
54
  defaultOpenKeys,
54
55
  productList,
55
56
  logoData,
56
- myWalletInfo
57
+ myWalletInfo,
58
+ myWalletInfoAction
57
59
  } = props
58
60
 
59
61
  const {
@@ -80,10 +82,9 @@ export default function LiosLayout(props: LiosLayoutlProps) {
80
82
 
81
83
  const [collapsed, setCollapsed] = useState(false);
82
84
  const [currencyList, setCurrencyList] = useState([
83
- { value: 'JPY', label: '日元' },
84
- { value: 'SAR', label: '沙特币' },
85
- { value: 'USD', label: '美元' },
86
- { value: 'CNY', label: '人民币' }
85
+ { value: 'JPY', label: '日元' , icon:'¥'},
86
+ { value: 'USD', label: '美元',icon:"$" },
87
+ { value: 'CNY', label: '人民币' , icon:'¥'}
87
88
  ])
88
89
  useEffect(() => {
89
90
  if (!productList) return
@@ -109,7 +110,7 @@ export default function LiosLayout(props: LiosLayoutlProps) {
109
110
  let text = ''
110
111
  currencyList.some((item:any)=>{
111
112
  if(item.value == currencyText){
112
- text = item.label
113
+ text = item.icon
113
114
  return true
114
115
  }
115
116
  })
@@ -137,13 +138,16 @@ export default function LiosLayout(props: LiosLayoutlProps) {
137
138
  myWalletInfo && <div className='lios-userInfo'>
138
139
  <div className='lios-li'>
139
140
  <div className='lios-key'>现金余额</div>
140
- <div className='lios-value'>{availableCashAmount || '加载中...'}
141
- <span>{currencyText(currency)}</span></div>
141
+ <div className='lios-value'>
142
+ <span>{currencyText(currency)}</span>
143
+ {availableCashAmount || '加载中...'}
144
+ </div>
142
145
  </div>
143
146
  <div className='lios-li'>
144
147
  <div className='lios-key'>可用额度</div>
145
- <div className='lios-value'>{availableAmount || '加载中...'}
146
- <span>{currencyText(currency)}</span></div>
148
+ <div className='lios-value'><span>{currencyText(currency)}</span>
149
+ {availableAmount || '加载中...'}
150
+ </div>
147
151
  </div>
148
152
  </div>
149
153
  }
@@ -258,7 +262,11 @@ export default function LiosLayout(props: LiosLayoutlProps) {
258
262
  })}
259
263
  </div>
260
264
 
261
- <Popover placement="bottom" content={<UserCard />} arrow={false} trigger="click">
265
+ <Popover placement="bottom" content={<UserCard />} arrow={false} trigger="click"
266
+ onOpenChange={((e)=>{
267
+ if(!e)return
268
+ myWalletInfoAction()
269
+ })}>
262
270
  <div className="lios-header-user">
263
271
  <img
264
272
  className="author"