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

spang-web

v1.0.0

Published

---- - node - yarn - webpack - eslint - @vue/cli ~3 - [ant-design-vue](https://github.com/vueComponent/ant-design-vue) - Ant Design Of Vue 实现 - [vue-cropper](https://github.com/xyxiao001/vue-cropper) - 头像裁剪组件 - [@antv/g2](https://antv.alipay.com/z

Downloads

2

Readme

环境和依赖


项目下载和运行


  • 拉取项目代码
git clone https://codeup.aliyun.com/spangchem/spang-web.git
cd spang-web
  • 安装依赖
yarn install
  • 开发模式运行
yarn run serve
  • 编译项目
yarn run build
  • Lints and fixes files
yarn run lint

其他说明


  • 项目使用的 vue-cli3, 请确保你所使用的 vue-cli 是新版,并且已经学习 cli 官方文档使用教程

  • 关闭 Eslint (不推荐) 移除 package.jsoneslintConfig 整个节点代码, vue.config.js 下的 lintOnSave 值改为 false

  • 组件按需加载 /src/main.js L14 相关代码 import './core/lazy_use' / import './core/use'

  • 修改 Ant Design 配色 (@kokoroli)

  • I18n: 多语言支持 (@musnow)

  • 生成环境默认不加载 mock,更多详情请看 src/mock/index.js

浏览器兼容

Modern browsers and IE10.

| IE / Edge | Firefox | Chrome | Safari | Opera | | --- | --- | --- | --- | --- | | IE10, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |

智慧安监

1、简单表格

  • 使用src/components/CommonFormModal/CommonFormModal.vue组件
  • 表格生成规则使用http://www.form-create.com/designer/生成
  • form-create文档地址:http://www.form-create.com/v2/guide/
  • 可参考src/views/safety/observation/Meeting.vue安全会议界面

2、公共组件说明

  • 人员选择下拉框src/views/safety/components/PersonListSelect.vue 属性:
    参考具体组件 事件: change({id, person})
  • 部门选择下拉框src/views/safety/components/DepartmentSelect.vue 属性:
    参考具体组件 事件: change({id, label})
  • 文件上传 src/components/UploadFile/index.vue
  例如src/views/safety/contractor/LawlessRecordModal.vue文件中的示例:
  <upload-file
    accept=".jpg, .jpeg, .png"
    :fileList="localePhotos"
    :upload-result="(fileJson, resp) => handleUpload(fileJson, resp, 'localePhotos')"
    :removePro="(file) => removeFile(file, 'localePhotos')"
    listType="picture-card"
    :disabled="disabled"
    />

参数说明

  1. fileList默认展示的文件列表
  2. uploadResult上传成功后的回调
  3. removePro删除文件列表里的某个文件
  4. 其他参数参考Ant Design文件上传组件
  • 数据展示模态框 src/views/safety/components/DescriptionsModal.vue 针对没有新增编辑功能,直接查看数据详情的页面
  • 树型结构下拉框 src/components/FormCreate/FormTreeSelect.vue
  • 人员选择模态框 src/views/safety/task/component/PersonSelectModal.vue
  • 带证书的人员选择模态框 src/views/safety/task/component/CertificatePersonSelectModal.vue

3、下拉框字典数据调用

  • this.getDict('DICT_KEY') DICT_KEY为字典的key值,参考后端给的字典说明文档传值

4、API调用方式说明

  • 所有API接口统一调用src/api/common.js文件中的方法,具体方法说明参考文件中注释
  • 所有的接口已挂载在VUE原型上,调用时直接用this.XXX调用
  • 在src/api/文件夹中新建具体模块的url文件,存入相应后台接口的url
import ApiURLs from '@/api/urls'
this.getById(ApiURLs.meeting, id).then(({ data, success }) => {
  if (success) {
     ....
  }
})