1.0.158 • Published 3 years ago
asp-smart-layout-demo v1.0.158
asp-smart-layout 开发指南
安装
cnpm i asp-smart-layout -S
全量加载
import Vue from 'vue'
import AspSmartLayout from 'asp-smart-layout'
Vue.use(AspSmartLayout)
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)
});
新发布说明
步骤:登录、打包、发布
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-layout version
```历次
npm view asp-smart-layout versions
1.0.158
3 years ago
1.0.146
3 years ago
1.0.121
4 years ago
1.0.123
4 years ago
1.0.122
4 years ago
1.0.117
4 years ago
1.0.116
4 years ago
1.0.115
4 years ago
1.0.105
4 years ago
1.0.16
4 years ago
1.0.103
4 years ago
1.0.104
4 years ago
1.0.15
4 years ago
1.0.9
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.11
4 years ago
1.0.10
4 years ago
1.0.14
4 years ago
1.0.13
4 years ago
1.0.12
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.0
4 years ago