New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

asp-smart-ui-1

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asp-smart-ui-1

SmartUI, Vue 2.0 的桌面端组件库

latest
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

asp-smart-ui 开发指南

安装

cnpm i asp-smart-ui -S

全量加载

import Vue from 'vue'
import AspSmartUI from 'asp-smart-ui'

Vue.use(AspSmartUI)

new Vue({
  el: '#app',
  render: h => h(App)
})

按需加载

借助 babel-plugin-component,我们可以只引入需要的组件,以达到减小项目体积的目的。

首先,安装 babel-plugin-component

老版本脚手架

然后,将 .babelrc 修改为:

{
  "presets": [["es2015", { "modules": false }]],
  "plugins": [
    [
      "component",
      {
        "libraryName": "asp-smart-ui",
         style: false
      }
    ]
  ]
}

新版本脚手架

然后,将 babel.config.js 修改为:

module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset'
  ],
  plugins: [        // element官方教程
    [
      'component',
      {
        'libraryName': 'asp-smart-ui',
        style: false
      }
    ]
  ]
}

接下来,如果你只希望引入部分组件,比如 Button main.js 中写入以下内容:

import Vue from 'vue';
import { Button } from 'asp-smart-ui';
import App from './App.vue';

Vue.use(Button)

new Vue({
  el: '#app',
  render: h => h(App)
});

新发布说明

步骤:登录、打包、发布

npm login --registry http://registry.npmjs.org

```bash
npm run dist

npm publish --registry http://registry.npmjs.org

查询npm上当前项目版本号

npm view 【项目名称】 versions

npm view asp-smart-ui version

```历次
npm view asp-smart-ui versions

FAQs

Package last updated on 26 Mar 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