Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clrc-schema

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clrc-schema - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

13

app.jsx

@@ -73,6 +73,4 @@ import './src/index.less';

enum: [
{ value: 11, name: '第11题'},
{ value: 11, name: '第12题'},
{ value: 11, name: '第13题'},
{ value: 11, name: '第14题'},
{ value: true, name: 'TRUE'},
{ value: false, name: 'FALSE'},
]

@@ -116,2 +114,9 @@ }

class APP extends Component {
componentDidMount() {
window._getData = () => {
let data = this.refs.obj.getData();
console.log(data);
};
}
render() {

@@ -118,0 +123,0 @@ return <div>

@@ -43,3 +43,14 @@ 'use strict';

var inputValue = this.refs.input.value;
return inputValue;
var result = void 0;
var schema = this.props.schema;
var options = schema.enum;
for (var i = options.length - 1; i >= 0; i--) {
var op = options[i];
if (op.name === inputValue) {
result = op.value;
break;
}
}
return result;
}

@@ -70,3 +81,3 @@ }, {

'option',
{ key: i, value: op.value },
{ key: i, value: op.name },
op.name

@@ -73,0 +84,0 @@ );

{
"name": "clrc-schema",
"version": "0.1.4",
"version": "0.1.5",
"description": "clrc schema",

@@ -5,0 +5,0 @@ "scripts": {

@@ -8,3 +8,13 @@ import { Component, PropTypes } from 'react';

let inputValue = this.refs.input.value;
return inputValue;
let result;
let { schema } = this.props;
let options = schema.enum;
for (let i = options.length - 1; i >= 0; i--) {
let op = options[i];
if(op.name === inputValue) {
result = op.value;
break;
}
}
return result;
}

@@ -22,3 +32,3 @@

let input = <select ref="input" defaultValue={data}>
{options.map((op, i) => <option key={i} value={op.value}>{op.name}</option>)}
{options.map((op, i) => <option key={i} value={op.name}>{op.name}</option>)}
</select>;

@@ -25,0 +35,0 @@ if(inline) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc