[Improvement] Support Vue.use to register a component (#401)

This commit is contained in:
neverland
2017-12-11 20:41:19 +08:00
committed by GitHub
parent 7dbb5db256
commit 6f2b4c99da
162 changed files with 432 additions and 490 deletions
+2 -1
View File
@@ -3,6 +3,7 @@
*/
import Vue from 'vue';
import i18n from 'packages/mixins/i18n';
import { Locale, Toast, Dialog } from 'packages';
import { DemoBlock, DemoSection } from 'vant-doc';
import { camelize } from 'packages/utils';
@@ -23,7 +24,7 @@ const demoBaseMixin = {
window.Toast = Toast;
window.Dialog = Dialog;
Vue.mixin(Locale.i18n);
Vue.mixin(i18n);
Vue.mixin(demoBaseMixin);
Vue.component('demo-block', DemoBlock);
Vue.component('demo-section', DemoSection);
+6 -1
View File
@@ -42,9 +42,14 @@ export default {
<style lang="postcss">
.demo-layout {
.van-row {
.van-doc-demo-block {
padding: 0 15px;
}
.van-doc-demo-block__title {
padding-left: 0;
}
.van-col {
color: #fff;
font-size: 13px;