Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
xqz
/
dianDemo
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f8f6db73
authored
2020-04-21 12:15:41 +0800
by
sunnie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
readme
1 parent
ec147e31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
README.md
README.md
View file @
f8f6db7
...
...
@@ -222,24 +222,31 @@ module.exports = {
#### 安装插件
```
javascript
```
bash
npm i babel-plugin-import -D
```
在
` babel.config.js`
设置
```
javascript
// 对于使用 babel7 的用户,可以在 babel.config.js 中配置
module
.
exports
=
{
presets
:
[[
'@vue/cli-plugin-babel/preset'
,
{
useBuiltIns
:
'entry'
}]],
plugins
:
[
[
'import'
,
{
libraryName
:
'vant'
,
libraryDirectory
:
'es'
,
style
:
true
},
'vant'
]
const
plugins
=
[
[
'import'
,
{
libraryName
:
'vant'
,
libraryDirectory
:
'es'
,
style
:
true
},
'vant'
]
]
module
.
exports
=
{
presets
:
[[
'@vue/cli-plugin-babel/preset'
,
{
useBuiltIns
:
'usage'
,
corejs
:
3
}]],
plugins
}
```
#### 使用组件
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment