Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react';
import { List, InputItem, Icon, Toast, Checkbox, Modal } from 'antd-mobile';
import { createForm } from 'rc-form';
import { connect } from 'react-redux';
import Touch from './Touch';
import Text from './Text';
import { firstError } from '../utils/rcform';
const CheckboxItem = Checkbox.CheckboxItem;
@connect(({ todo }) => ({ todo }))
class TodoList extends React.Component {
componentDidMount() {
if (window.platform) { // 只在 ReactNative 中使用
this.props.screenProps.stackNavigation.setParams({
title: 'Todos', drawerNavigation: this.props.navigation,
});
}
}
onSave = () => {
const { form, dispatch } = this.props;
form.validateFields({ first: false }, async (error, value) => {
if (error) Toast.fail(firstError(error), 1);
// tslint:disable:jsx-no-multiline-js
import { Checkbox, List, WhiteSpace } from 'antd-mobile';
import React from 'react';
import { Text, View } from 'react-native';
const AgreeItem = Checkbox.AgreeItem;
const CheckboxItem = Checkbox.CheckboxItem;
export default class BasicCheckboxExample extends React.Component {
constructor(props: any, context: any) {
super(props, context);
this.state = {
checkBox1: true,
agreeItem1: true,
checkboxItem1: true,
};
}
render() {
return (
useCheckbox() {
const AgreeItem = Checkbox.AgreeItem;
const CheckboxItem = Checkbox.CheckboxItem;
return (
import React from 'react';
import { connect } from 'react-redux';
import {bindActionCreators} from 'redux';
import {Checkbox} from 'antd-mobile';
import * as actions from '@/store/actions';
import './style.scss';
const CheckboxItem = Checkbox.CheckboxItem;
@connect(
(state)=>state.global,
(dispatch)=>bindActionCreators(actions,dispatch)
)
class SongMenuMangement extends React.Component{
state={
selectedList:[]
}
comeback=()=>{
this.props.songMenuMangementShowSwitch();
}
changeSelectedList(text){
const isCanAdd=!this.state.selectedList.some((item)=>{
return text===item;
});
let selectedList=this.state.selectedList;
render (){
const RadioItem = Radio.RadioItem;
const CheckboxItem = Checkbox.CheckboxItem;
return (
<div>
{this.props.redirect?:null}
}
onLeftClick={() => this.props.history.push("/login")}
>注册
</div>