摘要:
import { useState, useEffect } from 'react'; import { useDataProvider } from 'react-admin'; import { Loading, Error } from './MyComponents'; const Use 阅读全文
posted @ 2023-09-08 08:55
前端导师歌谣
阅读(7)
评论(0)
推荐(0)
摘要:
<Stack direction="row" spacing={2}> <SaveButton sx={{ height: "36px", mt: '9px', mj: 2 }} type='button' mutationOptions={{ onSuccess: (params: any) => 阅读全文
posted @ 2023-09-08 08:54
前端导师歌谣
阅读(8)
评论(0)
推荐(0)
摘要:
tablist需要有有默认值 阅读全文
posted @ 2023-09-08 08:54
前端导师歌谣
阅读(9)
评论(0)
推荐(0)
摘要:
<SaveButton sx={{ height: "36px", mt: '9px', mj: 2 }} type='button' mutationOptions={{ onSuccess: (params:any) => { update('t_prod_step', { id: params 阅读全文
posted @ 2023-09-08 08:53
前端导师歌谣
阅读(9)
评论(0)
推荐(0)
摘要:
<Grid container spacing={2}> <Grid item xs={3}> <TextInput variant='outlined' sx={{ mr: 1 }} source='step_no' label='编号' /> </Grid> <Grid item xs={3}> 阅读全文
posted @ 2023-09-08 08:53
前端导师歌谣
阅读(13)
评论(0)
推荐(0)
摘要:
_.cloneDeep(value) value (*): 要深拷贝的值 var objects = [{ 'a': 1 }, { 'b': 2 }]; var deep = _.cloneDeep(objects); console.log(deep[0] objects[0]); // => f 阅读全文
posted @ 2023-09-08 08:53
前端导师歌谣
阅读(14)
评论(0)
推荐(0)
摘要:
_.compact(array) 创建一个新数组,包含原数组中所有的非假值元素。例如false, null,0, "", undefined, 和 NaN 都是被认为是“假值” _.compact([0, 1, false, 2, '', 3]); // => [1, 2, 3] 阅读全文
posted @ 2023-09-08 08:52
前端导师歌谣
阅读(8)
评论(0)
推荐(0)
摘要:
_.chunk array (Array): 需要处理的数组[size=1] (number): 每个数组区块的长度 _.chunk(['a', 'b', 'c', 'd'], 2); // => [['a', 'b'], ['c', 'd']] _.chunk(['a', 'b', 'c', 'd 阅读全文
posted @ 2023-09-08 08:52
前端导师歌谣
阅读(4)
评论(0)
推荐(0)
摘要:
const StepEdit = ({ id, record, resource }: { id: Identifier, record: any, resource: string }) => { const redirect = useRedirect() const [expand, togg 阅读全文
posted @ 2023-09-08 08:52
前端导师歌谣
阅读(7)
评论(0)
推荐(0)
摘要:
运行结果 阅读全文
posted @ 2023-09-08 08:51
前端导师歌谣
阅读(14)
评论(0)
推荐(0)
摘要:
<ReferenceInput source='part_id' reference='t_prod_part'> <AutocompleteInput variant='outlined' label="部位" sx={{ mr: 1 }} /> </ReferenceInput> 运行结果 阅读全文
posted @ 2023-09-08 08:51
前端导师歌谣
阅读(11)
评论(0)
推荐(0)
摘要:
<Edit resource={resource} id={id}> <SimpleForm toolbar={false}> <Stack direction={'row'}> <TextInput variant='outlined' sx={{ mr: 1 }} source='step_no 阅读全文
posted @ 2023-09-08 08:51
前端导师歌谣
阅读(9)
评论(0)
推荐(0)
摘要:
<Datagrid rowClick={'expand'} expandSingle={true} expand={StepEdit}> {/* <ReferenceField source='proc_solution_id' label='解决方案类型' reference="t_prod_pr 阅读全文
posted @ 2023-09-08 08:51
前端导师歌谣
阅读(8)
评论(0)
推荐(0)
摘要:
const StepEdit = ({ id, record, resource }: { id: Identifier, record: any, resource: string }) => { const redirect = useRedirect() // const [expand,to 阅读全文
posted @ 2023-09-08 08:50
前端导师歌谣
阅读(9)
评论(0)
推荐(0)
摘要:
<SaveButton sx={{ height: "36px", mt: '9px', mj: 2 }} type='button' mutationOptions={{ onSuccess: () => { redirect(false) // if(expand){ // toggleExpa 阅读全文
posted @ 2023-09-08 08:50
前端导师歌谣
阅读(9)
评论(0)
推荐(0)
摘要:
<Edit resource={resource} id={id}> <SimpleForm toolbar={false}> <Stack direction={'row'}> <TextInput variant='outlined' sx={{ mr: 1 }} source='step_no 阅读全文
posted @ 2023-09-08 08:50
前端导师歌谣
阅读(7)
评论(0)
推荐(0)
摘要:
import { useFormContext } from 'react-hook-form'; 运行结果 const MyButton = () => { const { reset, setFocus, getValues } = useFormContext<{ step_no: strin 阅读全文
posted @ 2023-09-08 08:50
前端导师歌谣
阅读(16)
评论(0)
推荐(0)
摘要:
<TabContext value={solutionname} > <TabList onChange={handleChange}> {machinechangeList && machinechangeList.map((item: any, idx: number) => { return 阅读全文
posted @ 2023-09-08 08:49
前端导师歌谣
阅读(13)
评论(0)
推荐(0)
摘要:
const { data } = useGetList('t_prod_machine_type'); useEffect(() => { if (data !== undefined) { data.forEach(it => { it['name'] = it['type_name']; }); 阅读全文
posted @ 2023-09-08 08:49
前端导师歌谣
阅读(16)
评论(0)
推荐(0)
摘要:
前言 我是歌谣 最好的种树是十年前 其次是现在 今天继续给大家带来的是this的讲解 环境配置 npm init -y yarn add vite -D 修改page.json配置端口 { "name": "demo1", "version": "1.0.0", "description": "", 阅读全文
posted @ 2023-09-08 08:41
前端导师歌谣
阅读(10)
评论(0)
推荐(0)

浙公网安备 33010602011771号