-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
681260d
commit 1e38848
Showing
20 changed files
with
558 additions
and
296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
module.exports = { | ||
presets: ["@vue/cli-plugin-babel/preset"] | ||
presets: ["@vue/cli-plugin-babel/preset"], | ||
plugins: [ | ||
[ | ||
"import", | ||
{ | ||
libraryName: "ant-design-vue", | ||
libraryDirectory: "es", | ||
style: true | ||
} | ||
] | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
71 changes: 0 additions & 71 deletions
71
micro-juejin-activity/src/components/People/PeopleList.vue
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,6 @@ | ||
<template> | ||
<div> | ||
<div id="nav"> | ||
<router-link to="/">Home</router-link> | | ||
<router-link to="/people">People</router-link> | ||
</div> | ||
<router-view /> | ||
</div> | ||
<router-view /> | ||
</template> | ||
<script> | ||
export default {}; | ||
</script> | ||
<style lang="scss" scoped> | ||
#nav { | ||
padding: 30px; | ||
a { | ||
font-weight: bold; | ||
color: #2c3e50; | ||
&.router-link-exact-active { | ||
color: #42b983; | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Vue from "vue"; | ||
import VueLazyload from "vue-lazyload"; | ||
|
||
// eslint-disable-next-line no-unused-vars | ||
import errorPng from "../assets/404-5.png"; | ||
import loading from "../assets/loading-4.gif"; | ||
|
||
Vue.use(VueLazyload, { | ||
preLoad: 1.3, | ||
error: errorPng, | ||
loading: loading, | ||
attempt: 1 | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
使用babel-plugin-import按需引入antd,具体配置在babel.config.js中。 | ||
另外因为是定制主题的方式,还需要在vue.config.js中配置less的相关参数, | ||
其中javascriptEnabled的值必须为true,否则主题定制的样式无法生效 | ||
*/ | ||
|
||
/* | ||
* 这里是全局按需引入 | ||
* 如果想要进一步提升性能 | ||
* 可以只在此注册频繁用到的组件 | ||
* 一些特定场景下才会用到的大型组件可以在具体业务组件中单独引入注册。 | ||
* 例如List组件在运行时接近2M大小,并且只有People页面中使用的话可以不在这里全局注册List组件,而是在People中去单独按需引入List组件 | ||
* */ | ||
|
||
import Vue from "vue"; | ||
// eslint-disable-next-line no-unused-vars | ||
import { | ||
Button, | ||
Empty, | ||
notification, | ||
message, | ||
Avatar, | ||
Icon, | ||
Tooltip, | ||
Layout, | ||
Menu, | ||
Dropdown, | ||
Input | ||
} from "ant-design-vue"; | ||
// | ||
Vue.prototype.$notification = notification; | ||
Vue.prototype.$message = message; | ||
|
||
/*需要注册的组件名字, 注册之前需要确保已经import这个组件*/ | ||
const components = [ | ||
Button, | ||
Empty, | ||
notification, | ||
message, | ||
Avatar, | ||
Icon, | ||
Tooltip, | ||
Layout, | ||
Menu, | ||
Dropdown, | ||
Input | ||
]; | ||
register(components); | ||
|
||
function register(components) { | ||
components.forEach(comp => { | ||
Vue.use(comp); | ||
}); | ||
// Vue.component(Button.name, Button); | ||
} |
Oops, something went wrong.