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

@aqsc/common

v0.1.8

Published

基于element-ui实现的二次封装

Downloads

3

Readme

aqsc-common,安生平台npm包组件

1、组件打包命令

先用nrm将npm切换到本地源 nrm use '本地源的名字'

npm adduser --registry http://10.244.130.144:8082/repository/npm-local/

账号 admin 密码 ****** 邮箱 [email protected]

登录成功之后npm publish

2、准备工作

  1. 依赖下载。

    npm i @aqsc/common
  2. 依赖引入

    import AqscCommon from '@aqsc/common'
    import '@aqsc/common/lib/aqsc-common.css'
       
    Vue.use(AqscCommon)
       

3、组件文档

  1. aqsc-select属性介绍

  // 保留element-ui的基础配置信息,如需要可额外扩展
    placeholder: {
      type: String,
      default: ""
    },
    filterable: {
      type: Boolean,
      default: true
    },
    collapseTags: {
      type: Boolean,
      default: true
    },
    multiple: {
      type: Boolean,
      default: false
    },
    disabled: {
      type: Boolean,
      default: false
    },
    clearable: {
      type: Boolean,
      default: true
    },
    size: {
      type: String,
      default: "small"
    },
    // api信息
    getDatas: {
      type: Object,
      default: () => {
        return  {
          // 接口路径、方法、返回值键名
          url: '/bzgl/base-data/v1/werks',
          method: 'get',
          responseKey: 'dataset.datas',
          // options数据映射关系
          value: 'werksCode',
          label: 'werksName',
          // 其他额外数据处理配置
          isReturnAllInfo: true, // 是否返回所选条目的所有信息
          emitTab: 'werkInfo'// 父组件获取所选条目所有信息的回调标记
        };
      }
    },
    // 获取options信息的参数
    params: {
      type: Object,
      default: () => {
        return {};
      }
    },
    // options数据
    optionsMap: {
      type: Object,
      default: () => {
        return {};
      }
    },
    // 默认值
    value: {
      type: [String, Number, Array],
      default: null
    },
    // 封装的调接口方法
    request: {
      type: Function,
      default: null
    }

2、aqsc-select组件的方法

this.$emit("renewOptionsMap", optionsArr, key);
// 父组件
renewOptionsMap(options, key) {
this.optionsMap[key] = options
this.optionsMap = { ...this.optionsMap }
},

this.$emit(
"receiveSelectedOptions",
selectedOpions,
this.getDatas.emitTab
);
// 父组件
receiveSelectedOptions([selectedOpions = {}], emitTab) {
console.log(emitTab)
switch (emitTab) {
case 'werkInfo':
this.findForm.params.bukrs = selectedOpions.expands ? selectedOpions.expands.bukrsCode : '';
this.findForm.params.bmId = ''
this.findForm.params.bzId = ''
this.findForm.params.zyId = ''
break;
case 'departmentInfo':
this.findForm.params.bzId = ''
break;
case 'majorInfo':
this.findForm.params.bzId = ''
break;
default:
break;
}
},