[Improvement] Support Vue.use to register a component (#401)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user