tachybase_todo/packages/client/src/blocks/time-picker/index.md
2021-07-03 00:24:21 +08:00

930 B

title nav group
TimePicker - 时间选择器
title path
组件 /client
order title path
1 区块 - Blocks /client/blocks

TimePicker - 时间选择器

代码演示

日期选择器

/**
 * title: 日期选择器
 */
import React from 'react';
import { SchemaRenderer } from '../';

const schema = {
  type: 'object',
  properties: {
    input: {
      type: 'string',
      title: `编辑模式`,
      'x-decorator': 'FormItem',
      'x-component': 'TimePicker',
      'x-reactions': {
        target: 'read',
        fulfill: {
          state: {
            value: '{{$self.value}}',
          },
        },
      },
    },
    read: {
      type: 'string',
      title: `阅读模式`,
      'x-read-pretty': true,
      'x-decorator': 'FormItem',
      'x-component': 'TimePicker',
    },
  }
}

export default () => {
  return (
    <SchemaRenderer schema={schema} />
  );
};