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

@kqinfo/ui

Package Overview
Dependencies
Maintainers
1
Versions
720
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kqinfo/ui

## 使用

  • 1.0.38
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

凯桥 UI

使用

$ yarn add @kqinfo/ui

按需加载

安装babel-plugin-import插件

$ yarn add babel-plugin-import -D

修改babel.config.js文件

// babel.config.js
module.exports = {
  plugins: [
+    [
+      'import',
+      {
+        libraryName: 'parsec-hooks',
+        camel2DashComponentName: false,
+        customName: name => {
+          if (/^(use)/.test(name)) {
+            return `parsec-hooks/lib/${name
+              .replace(/^(use)/, '')
+              .replace(/^\S/, s => s.toLowerCase())}Hooks`;
+          } else {
+            return `parsec-hooks/lib/utils/${name}`;
+          }
+        }
+      }
+    ],
+    [
+      'import',
+      {
+        libraryName: 'antd-mobile',
+        style: true
+      },
+      'antd-mobile'
+    ],
+    [
+      'import',
+      {
+        libraryDirectory: 'es',
+        libraryName: '@kqinfo/ui'
+      },
+      '@kqinfo/ui'
+    ]
  ]
};

开发

安装依赖

$ yarn

启动服务

$ yarn start

本地调试

启动调试

$ yarn dev

本地连接

$ yarn link

本地项目调试

$ yarn link @kqinfo/ui

开发注意项

  • fork到自己名下,再提merge request
  • 样式不要嵌套
  • 样式用less-modules
  • 表单组件暴露valueonChange
  • 不要用图片当icon
  • 尽量暴露节点的class,缩写用cls,比如暴露子项类名就用itemCls
  • 例子尽量写多点

FAQs

Package last updated on 12 Apr 2021

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