npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ewtd/ewt-question

v0.2.3-beta1

Published

An ewt component

Downloads

226

Readme

USAGE

Install

$ npm i @ewtd/ewt-question

demo

 import Question from '@ewtd/ewt-question';
    
    <Question
        data={item} //数据
        styleType="primary" //皮肤样式,默认:normal 注: 学生做题用primary
        doable //开启做题模式 默认不开启
        titleTagSlot={<div style={{ display: 'inline' }}>新题</div>} // 题干最前端自定义标签
        onChange={this.handleChange} // 做题模式下,用户选择答案后的回调
        showAnswer //是否展示答案
        studentAnswer={['A', 'B']} //用户选择的答案,开启展示答案才有意义
    />

参数含义

 {
        data: PropTypes.object,
        doable: PropTypes.bool, // 是否可是做
        showAnswer: PropTypes.bool, // 是否显示答案
        studentAnswer: PropTypes.array,
        styleType: PropTypes.string, // 样式类型
        title: PropTypes.node, // 题目大标题,听力大小题时用到
        // 插槽
        titleTagSlot: PropTypes.node, // 自定义标签,标题前半部分
        // 事件
        onChange:PropTypes.func //选择答案 后的回调
    }

data含义

   {
        id: 500,
        index: 1, //题目序号
        type: 4, //单选 = 1,填空=2,  多选 = 3, 判断=4, 主观 = 10,  听力=31 , 解答 = 9,
        typeName: '判断题',
        title: "请选择正确的一项()",//题干
        label:'新题',// 标签
        answer: ['A'],// 答案
        studentAnswer:['A','B'],// 用户选择的答案
        options: [  // 选项
        {
            choice: 'A',// 选项的标识
            selectvalue: 'A',
            option: '你是人', //选项的方案
        },
        {
            choice: 'B',
            selectvalue: 'B',
            option: '你不是人',
        },
        ],
        analyse: '本题考查技术与自然的关系,自然为人类的繁衍生息提供资源,技术的发展应注重环境保护.',
        method: '依靠技术,人类得以利用自然和改造自然,并与自然保持和谐共处的友好关系,在保证自然不受破坏的前提下,合理实现自然为人所用的目的.<br />故答案为:T.',
        discuss: '本题考查技术与自然的关系,自然是人类赖以生存的环境,不能以破坏自然为前提去发展技术.本题属于简单题.',
        childMethods:[  //子题解答
            {
                method:''
            }
        ],
        childAnalysis:[ //子分析
            {
                analysis:'',
            }
        ],
        childQuestions:[
            {
                title:'子题'
            }
        ],
        answerLabel: '你的校对结果', //校对结果的显示名称
        answerResult: '正确', // “正确”,“错误”,“未校对”,“半对” 等
  },