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

develop-panel

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

develop-panel

A library for building a dev panel easily.

  • 0.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Dev Panel

A library for you to build a develop panel easily.

Install

npm i develop-panel

or

yarn add develop-panel

or

pnpm i develop-panel

Usage

import { DevPanel } from 'develop-panel';
DevPanel.create({
    el: 'hahaha',
    plugins: ['reload'],
    content: [
    {
        type: 'text',
        value: '这时一个调试页面',
    },
    {
        type: 'map',
        label: '用户名',
        value: 'test-user',
    },
    {
        type: 'button',
        value: '点我触发功能',
        onClick: () => {
            console.log('233');
        },
    },
    {
        type: 'switch',
        label: '开启功能',
        key: 'open',
        default: false,
        onChange: (val) => {
            console.log(val);
        },
    },
    {
        type: 'select',
        label: '单选',
        key: 'one',
        options: [
            {
                label: '选项1',
                value: '0',
            },
            {
                label: '选项2',
                value: '1',
            },
            {
                label: '选项3',
                value: '2',
            },
        ],
        onChange: (val) => {
            console.log(val);
        },
    },
    {
        type: 'select',
        label: '多选',
        multiple: true,
        key: 'two',
        options: [
            {
                label: '选项1',
                value: '0',
            },
            {
                label: '选项2',
                value: '1',
            },
            {
                label: '选项3',
                value: '2',
            },
        ],
        onChange: (val) => {
            console.log(val);
        },
    },
    {
        type: 'input',
        label: '输入 ID',
        key: 'id',
        default: '',
        placeholder: '输入 ID',
        onChange: (val) => {
            console.log(val);
        },
    },
    ],
}).render(true);

FAQs

Package last updated on 05 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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