1.0.30 • Published 2 years ago
xunmeng-tech v1.0.30
这是一个测试的东西
how to use
yarn add xunmeng-tech
use hooks useUrl
示例
const { fromStateToQuery, forceFresh } = useUrl({
fn: async () => {
loading.search_loading = true;
const _params: NoticeListReqParams = {
// ...form_state.data,
index: pagination.data.current,
size: pagination.data.pageSize,
status: form_state.data.status,
};
const _result = await noticeList(_params);
if (_result.code != 0) {
Messages.add(message.error('查询失败' + _result.msg));
return;
}
pagination.data.pageSize = _result.data?.size;
pagination.data.current = _result.data?.index;
pagination.data.total = _result.data?.total;
tableData.data.source = _result.data?.list;
loading.search_loading = false;
},
formState: [
{
key: 'status',
fn: transform_pre_fn['fn.number0'],
},
// {
// key: 'showType',
// fn: (x) => {
// if (x) {
// return Number(x)
// } else {
// return 0
// }
// },
// },
// {
// key: 'type',
// fn: (x) => {
// if (x) {
// return Number(x)
// } else {
// return 0
// }
// },
// },
],
})
use components dselect
参数
options:Array<{label:String,value:T}>
uiAttr:Object<value:T>
onChange:callBack
示例
<dselect
options={[{label:"a",value:1}]}
uiAttr={{value:1}}
onChange={callBack}>
</dselect>
1.0.30
2 years ago
1.0.29
2 years ago
1.0.28
2 years ago
1.0.27
2 years ago
1.0.26
2 years ago
1.0.25
2 years ago
1.0.24
2 years ago
1.0.23
2 years ago
1.0.22
2 years ago
1.0.21
2 years ago
1.0.20
2 years ago
1.0.19
2 years ago
1.0.18
2 years ago
1.0.17
2 years ago
1.0.16
2 years ago
1.0.14
2 years ago
1.0.13
2 years ago
1.0.12
2 years ago
1.0.11
2 years ago
1.0.10
2 years ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago