clrc-schema
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -45,6 +45,4 @@ import './src/index.less'; | ||
pic: { | ||
type: 'string', | ||
type: 'integer', | ||
title: '图片', | ||
format: 'image', | ||
size: '200x200' | ||
}, | ||
@@ -99,3 +97,2 @@ answers: { | ||
answers: [ | ||
{ key: 'C', content: 'DDDDDD', score: 1 } | ||
] | ||
@@ -102,0 +99,0 @@ }, |
@@ -71,3 +71,5 @@ 'use strict'; | ||
if (schema.size && schema.size > 100) { | ||
input = React.createElement('textarea', { className: 'schema-input', ref: 'input', defaultValue: data }); | ||
input = React.createElement('textarea', { className: 'schema-ta', ref: 'input', defaultValue: data }); | ||
} else if (schema.type === 'integer') { | ||
input = React.createElement('input', { className: 'schema-number', ref: 'input', type: 'number', defaultValue: data }); | ||
} else { | ||
@@ -74,0 +76,0 @@ input = React.createElement('input', { className: 'schema-input', ref: 'input', type: 'text', defaultValue: data }); |
@@ -102,2 +102,3 @@ 'use strict'; | ||
if (inline) { | ||
var contentCls = subSchema.type === 'array' ? 'key-obj-row' : 'key-obj'; | ||
return React.createElement( | ||
@@ -113,3 +114,3 @@ 'div', | ||
'span', | ||
{ className: 'key-obj' }, | ||
{ className: contentCls }, | ||
compObj | ||
@@ -116,0 +117,0 @@ ) |
{ | ||
"name": "clrc-schema", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "clrc schema", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -27,3 +27,5 @@ import { Component, PropTypes } from 'react'; | ||
if(schema.size && schema.size > 100) { | ||
input = <textarea className="schema-input" ref="input" defaultValue={data}></textarea>; | ||
input = <textarea className="schema-ta" ref="input" defaultValue={data}></textarea>; | ||
} else if(schema.type === 'integer') { | ||
input = <input className="schema-number" ref="input" type="number" defaultValue={data}/>; | ||
} else { | ||
@@ -30,0 +32,0 @@ input = <input className="schema-input" ref="input" type="text" defaultValue={data}/>; |
@@ -48,5 +48,6 @@ import { Component, PropTypes } from 'react'; | ||
if(inline) { | ||
let contentCls = subSchema.type === 'array' ? 'key-obj-row': 'key-obj'; | ||
return <div className="object-key-row" key={i}> | ||
<span className="key-title">{subSchema.title}</span> | ||
<span className="key-obj">{compObj}</span> | ||
<span className={contentCls}>{compObj}</span> | ||
</div>; | ||
@@ -53,0 +54,0 @@ } else { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1141616
25170