import { ConnectedRouter } from 'connected-react-router/immutable';
import { BrowserRouter as Router,} from 'react-router-dom';
Run Code Online (Sandbox Code Playgroud)
我需要知道以上两者之间的区别。
<Row type="flex" justify="center" align="center">
<Col span={4} >
<form onSubmit={handleSubmit(this.handleSubmit)} >
<Field
style={{ marginBottom: 12 }}
prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />}
name="name"
type="text"
component={AInput}
/>
<Field
style={{ marginBottom: 12 }}
className="form-group"
prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />}
name="password"
type="password"
component={AInput}
/>
<Button
block
type="primary"
htmlType="submit"
className="login-form-button"
>
Log in
</Button>
</form>
</Col>
</Row>
Run Code Online (Sandbox Code Playgroud)
上面的登录表单需要在网页中居中,我尝试使用 antd 样式元素但失败了。它将使用 css 内联样式,但我不想这样。
实际上,我正在使用 react-native-element 设计语言。当我过去实现复选框时,它的行为就像我不想要的可触摸不透明度。
<CheckBox
containerStyle={{ backgroundColor: "transparent", borderWidth: 0 }}
center
size={14}
title="vegetarian"
textStyle={{
fontSize: theme.FONT_SIZE_X_SMALL,
fontWeight: theme.FONT_WEIGHT_LIGHT
}}
checkedColor="red"
checked={this.state.checked}
onPress={() => this.setState({ checked: !this.state.checked })}
/>;
Run Code Online (Sandbox Code Playgroud) 实际上,我需要更改 laravel nova 操作名称,例如翻译成不同的语言。
class PrintWithDetail extends Action
{
use InteractsWithQueue, Queueable, SerializesModels;
/**
* Perform the action on the given models.
*
* @param \Laravel\Nova\Fields\ActionFields $fields
* @param \Illuminate\Support\Collection $models
* @return mixed
*/
public function handle(ActionFields $fields, Collection $models)
{
$id = '';
//
foreach ($models as $model) {
$id = $model->id;
}
return Action::openInNewTab(route("print.work.order", [$id, 'type' => 'detail']));
}
}
Run Code Online (Sandbox Code Playgroud)
上面的操作将PrintWithDetail显示为名称。
但是,我需要将PrintWithDetail更改为荷兰语。