
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
asp-smart-layoutkk
Advanced tools
cnpm i asp-smart-layout -S
注意: 如果本项目已经安装了 SmartLayout 1.X的版本,请运行cnpm i asp-smart-layout@2.x 的命令,指定安装2.X的某个版本。
import Vue from 'vue'
import form from 'asp-smart-layout/lib/form'
import table from 'asp-smart-layout/lib/table'
import portal from 'asp-smart-layout/lib/portal'
import 'asp-smart-layout/lib/theme-chalk/zhengqi/index.css'
Vue.use(form)
Vue.use(table)
Vue.use(portal)
new Vue({
el: '#app',
render: h => h(App)
})
借助 babel-plugin-component,我们可以只引入需要的组件,以达到减小项目体积的目的。
首先,安装 babel-plugin-component:
然后,将 .babelrc 修改为:
{
"presets": [["es2015", { "modules": false }]],
"plugins": [
[
"component",
{
"libraryName": "asp-smart-layout",
style: false
}
]
]
}
然后,将 babel.config.js 修改为:
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
],
plugins: [ // element官方教程
[
'component',
{
'libraryName': 'asp-smart-layout',
style: false
}
]
]
}
接下来,如果你只希望引入部分组件,比如 table 和 form main.js 中写入以下内容:
import Vue from 'vue';
import { table } from 'asp-smart-layout';
import App from './App.vue';
Vue.use(table)
new Vue({
el: '#app',
render: h => h(App)
});
目前提供3中主题,分别是:
import 'asp-smart-layout/lib/theme-chalk/classic/index.css' // 经典
import 'asp-smart-layout/lib/theme-chalk/zhengqi/index.css' // 政企
import 'asp-smart-layout/lib/theme-chalk/spider/index.css' // 服务业务线
步骤:登录、打包、发布
登录
npm login --registry https://registry.npmjs.org
打包
npm run dist
发布
npm publish --registry https://registry.npmjs.org
npm view 【项目名称】 versions
最新
npm view asp-smart-layout version
历次
npm view asp-smart-layout versions
FAQs
We found that asp-smart-layoutkk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.