mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[improvement] Remove create & i18 mixin (#2670)
This commit is contained in:
parent
ed8a294fe2
commit
89c80e818c
@ -5,7 +5,7 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import VueRouter from 'vue-router';
|
import VueRouter from 'vue-router';
|
||||||
import VantDoc, { DemoBlock, DemoSection } from '@vant/doc';
|
import VantDoc, { DemoBlock, DemoSection } from '@vant/doc';
|
||||||
import i18n from '../../packages/mixins/i18n';
|
import i18n from './utils/i18n';
|
||||||
import Vant, { Lazyload, Locale } from '../../packages';
|
import Vant, { Lazyload, Locale } from '../../packages';
|
||||||
import { camelize } from '../../packages/utils';
|
import { camelize } from '../../packages/utils';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// component mixin
|
// component mixin
|
||||||
import { get, camelize } from '../utils';
|
import { get, camelize } from '../../../packages/utils';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
computed: {
|
computed: {
|
@ -1,18 +0,0 @@
|
|||||||
/**
|
|
||||||
* Create a basic component with common options
|
|
||||||
*/
|
|
||||||
import useSfc from './use/sfc';
|
|
||||||
import useBem from './use/bem';
|
|
||||||
import i18n from '../mixins/i18n';
|
|
||||||
import { isDef } from '.';
|
|
||||||
|
|
||||||
export default function (sfc) {
|
|
||||||
sfc = useSfc('van-' + sfc.name)(sfc);
|
|
||||||
sfc.mixins = sfc.mixins || [];
|
|
||||||
sfc.mixins.push(i18n);
|
|
||||||
sfc.methods = sfc.methods || {};
|
|
||||||
sfc.methods.isDef = isDef;
|
|
||||||
sfc.methods.b = useBem(sfc.name);
|
|
||||||
|
|
||||||
return sfc;
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
/**
|
|
||||||
* Create a component with common options
|
|
||||||
*/
|
|
||||||
import createBasic from './create-basic';
|
|
||||||
import Icon from '../icon';
|
|
||||||
import Loading from '../loading';
|
|
||||||
import Cell from '../cell';
|
|
||||||
import CellGroup from '../cell-group';
|
|
||||||
|
|
||||||
export default function (sfc) {
|
|
||||||
sfc.components = Object.assign(sfc.components || {}, {
|
|
||||||
Icon,
|
|
||||||
Loading,
|
|
||||||
Cell,
|
|
||||||
CellGroup
|
|
||||||
});
|
|
||||||
return createBasic(sfc);
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user