mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[bugfix] module circular dependency (#728)
This commit is contained in:
parent
b5b7d33534
commit
639ef64d96
@ -64,15 +64,3 @@ Vue.use(Vant);
|
||||
```shell
|
||||
vue init youzan/vue-cli-template-vant projectName
|
||||
```
|
||||
|
||||
### Props Named Style
|
||||
HTML attributes are case-insensitive, so when using non-string templates, camelCased prop names need to use their kebab-case (hyphen-delimited) equivalents.
|
||||
|
||||
``` html
|
||||
<!-- camelCase in JavaScript -->
|
||||
<van-cell isLink />
|
||||
|
||||
<!-- kebab-case in HTML -->
|
||||
<van-cell is-link />
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
* 新增 Collapse 组件 [\#674](https://github.com/youzan/vant/pull/674) [@chenjiahan](https://github.com/chenjiahan)
|
||||
* 构建: 升级至 webpack 4,优化构建配置 [\#693](https://github.com/youzan/vant/pull/693) [@chenjiahan](https://github.com/chenjiahan)
|
||||
* Popup: 新增 lock-scroll 属性,废弃 lock-on-scroll、prevent-scroll 属性 [\#688](https://github.com/youzan/vant/pull/688) [@chenjiahan](https://github.com/chenjiahan)
|
||||
* 废弃 Waterfall 组件,推荐使用 List 组件代替 [\#683](https://github.com/youzan/vant/pull/683) [@chenjiahan](https://github.com/chenjiahan)
|
||||
* Waterfall 组件不再维护,推荐使用 List 组件代替 [\#683](https://github.com/youzan/vant/pull/683) [@chenjiahan](https://github.com/chenjiahan)
|
||||
|
||||
**Improvements**
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
* Sku: 新增头部金额 slot [\#705](https://github.com/youzan/vant/pull/705) [@w91](https://github.com/w91)
|
||||
* Sku: 优化 DOM 结构 [\#704](https://github.com/youzan/vant/pull/704) [@chenjiahan](https://github.com/chenjiahan)
|
||||
* Tab: 支持通过滑动手势进行切换 [\#694](https://github.com/youzan/vant/pull/694) [\#695](https://github.com/youzan/vant/pull/695) [@cookfront](https://github.com/cookfront)
|
||||
* Tag: 跳转标签样式 [\#689](https://github.com/youzan/vant/pull/689) [@chenjiahan](https://github.com/chenjiahan)
|
||||
* Tag: 调整标签样式 [\#689](https://github.com/youzan/vant/pull/689) [@chenjiahan](https://github.com/chenjiahan)
|
||||
* Toast: 支持通过 Vue.use 注册 [\#690](https://github.com/youzan/vant/pull/690) [@chenjiahan](https://github.com/chenjiahan)
|
||||
|
||||
|
||||
|
@ -63,15 +63,3 @@ Vue.use(Vant);
|
||||
```shell
|
||||
vue init youzan/vue-cli-template-vant projectName
|
||||
```
|
||||
|
||||
### Props 命名风格
|
||||
Vant 文档中的 props 默认采用驼峰式命名 (camelCase)。由于 HTML 特性是不区分大小写的,如果在 HTML 中直接书写 Vue 模板,需要使用短横线分割式 (kebab-case) 的命名来传递 props
|
||||
|
||||
``` html
|
||||
<!-- 在 JavaScript 中使用 camelCase -->
|
||||
<van-cell isLink />
|
||||
|
||||
<!-- 在 HTML 中使用 kebab-case-->
|
||||
<van-cell is-link />
|
||||
```
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import Popup from '../mixins/popup';
|
||||
|
||||
export default create({
|
||||
|
@ -39,7 +39,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import Field from '../field';
|
||||
import { isAndroid } from '../utils';
|
||||
|
||||
|
@ -80,7 +80,8 @@
|
||||
|
||||
<script>
|
||||
/* eslint-disable camelcase */
|
||||
import { create, isObj } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import { isObj } from '../utils';
|
||||
import Field from '../field';
|
||||
import VanButton from '../button';
|
||||
import Popup from '../popup';
|
||||
|
@ -22,7 +22,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import Radio from '../radio';
|
||||
import RadioGroup from '../radio-group';
|
||||
|
||||
|
@ -16,8 +16,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create, isObj } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import Picker from '../picker';
|
||||
import { isObj } from '../utils';
|
||||
|
||||
export default create({
|
||||
name: 'area',
|
||||
|
@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'badge-group',
|
||||
|
@ -6,7 +6,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'badge',
|
||||
|
@ -24,7 +24,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'button',
|
||||
|
@ -27,7 +27,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'card',
|
||||
|
@ -21,7 +21,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import Clickoutside from '../utils/clickoutside';
|
||||
|
||||
const THRESHOLD = 0.15;
|
||||
|
@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'checkbox-group',
|
||||
|
@ -17,7 +17,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create, isDef } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import { isDef } from '../utils';
|
||||
import findParent from '../mixins/find-parent';
|
||||
|
||||
export default create({
|
||||
|
@ -11,7 +11,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import { raf, cancel } from '../utils/raf';
|
||||
|
||||
export default create({
|
||||
|
@ -9,7 +9,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'col',
|
||||
|
@ -17,7 +17,8 @@
|
||||
|
||||
<script>
|
||||
import findParent from '../mixins/find-parent';
|
||||
import { create, isDef } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import { isDef } from '../utils';
|
||||
|
||||
export default create({
|
||||
name: 'collapse-item',
|
||||
|
@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'collapse',
|
||||
|
@ -18,7 +18,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'contact-card',
|
||||
|
@ -31,7 +31,7 @@ import VanButton from '../button';
|
||||
import Dialog from '../dialog';
|
||||
import Toast from '../toast';
|
||||
import validateMobile from '../utils/validate/mobile';
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'contact-edit',
|
||||
|
@ -24,7 +24,7 @@
|
||||
<script>
|
||||
import Radio from '../radio';
|
||||
import RadioGroup from '../radio-group';
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'contact-list',
|
||||
|
@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'coupon-cell',
|
||||
|
@ -19,7 +19,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'coupon-item',
|
||||
|
@ -48,7 +48,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import CouponItem from './Item';
|
||||
import Field from '../field';
|
||||
import VanButton from '../button';
|
||||
|
@ -11,7 +11,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import Picker from '../picker';
|
||||
|
||||
const isValidDate = date => Object.prototype.toString.call(date) === '[object Date]' && !isNaN(date.getTime());
|
||||
|
@ -31,7 +31,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import VanButton from '../button';
|
||||
import Popup from '../mixins/popup';
|
||||
|
||||
|
@ -49,7 +49,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create, isObj } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import { isObj } from '../utils';
|
||||
|
||||
export default create({
|
||||
name: 'field',
|
||||
|
@ -12,7 +12,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import VanButton from '../button';
|
||||
import RouterLink from '../mixins/router-link';
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import RouterLink from '../mixins/router-link';
|
||||
|
||||
export default create({
|
||||
|
@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'goods-action'
|
||||
|
@ -16,7 +16,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import Popup from '../mixins/popup';
|
||||
import Swipe from '../swipe';
|
||||
import SwipeItem from '../swipe-item';
|
||||
|
@ -22,7 +22,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'nav-bar',
|
||||
|
@ -26,7 +26,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'notice-bar',
|
||||
|
@ -35,7 +35,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import Key from './Key';
|
||||
|
||||
export default create({
|
||||
|
@ -31,7 +31,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'pagination',
|
||||
|
@ -17,7 +17,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'panel',
|
||||
|
@ -14,7 +14,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'password-input',
|
||||
|
@ -25,7 +25,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create, isObj } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import { isObj } from '../utils';
|
||||
|
||||
const DEFAULT_DURATION = 200;
|
||||
const range = (num, arr) => Math.min(Math.max(num, arr[0]), arr[1]);
|
||||
|
@ -28,7 +28,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import PickerColumn from './PickerColumn';
|
||||
import deepClone from '../utils/deep-clone';
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import Popup from '../mixins/popup';
|
||||
|
||||
export default create({
|
||||
|
@ -6,7 +6,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'progress',
|
||||
|
@ -29,7 +29,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import scrollUtils from '../utils/scroll';
|
||||
|
||||
export default create({
|
||||
|
@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'radio-group',
|
||||
|
@ -21,7 +21,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import findParent from '../mixins/find-parent';
|
||||
|
||||
export default create({
|
||||
|
@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'row',
|
||||
|
@ -24,7 +24,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import Clickoutside from '../utils/clickoutside';
|
||||
|
||||
export default create({
|
||||
|
@ -117,7 +117,7 @@ import {
|
||||
getSelectedSkuValues
|
||||
} from './utils/skuHelper';
|
||||
import { LIMIT_TYPE } from './constants';
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
const { QUOTA_LIMIT } = LIMIT_TYPE;
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
<script>
|
||||
import VanButton from '../../button';
|
||||
import { create } from '../../utils';
|
||||
import create from '../../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'sku-actions',
|
||||
|
@ -13,7 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../../utils';
|
||||
import create from '../../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'sku-header',
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
<script>
|
||||
import VanUploader from '../../uploader';
|
||||
import { create } from '../../utils';
|
||||
import create from '../../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'sku-img-uploader',
|
||||
|
@ -29,7 +29,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../../utils';
|
||||
import create from '../../utils/create';
|
||||
import Field from '../../field';
|
||||
import validateEmail from '../../utils/validate/email';
|
||||
import validateNumber from '../../utils/validate/number';
|
||||
|
@ -6,11 +6,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
import create from '../../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'sku-row',
|
||||
|
||||
props: {
|
||||
skuRow: Object
|
||||
}
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
@ -12,7 +12,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../../utils';
|
||||
import create from '../../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'sku-row-item',
|
||||
|
@ -18,7 +18,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../../utils';
|
||||
import create from '../../utils/create';
|
||||
import Stepper from '../../stepper';
|
||||
import { LIMIT_TYPE } from '../constants';
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'step',
|
||||
|
@ -21,7 +21,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'stepper',
|
||||
|
@ -19,7 +19,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'steps',
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
<script>
|
||||
import VanButton from '../button';
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'submit-bar',
|
||||
|
@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'swipe-item',
|
||||
|
@ -22,7 +22,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'swipe',
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
<script>
|
||||
import VanSwitch from '../switch';
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'switch-cell',
|
||||
|
@ -15,7 +15,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'switch',
|
||||
|
@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import findParent from '../mixins/find-parent';
|
||||
|
||||
export default create({
|
||||
|
@ -13,7 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import RouterLink from '../mixins/router-link';
|
||||
|
||||
export default create({
|
||||
|
@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'tabbar',
|
||||
|
@ -33,7 +33,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
import { raf } from '../utils/raf';
|
||||
import { on, off } from '../utils/event';
|
||||
import VanNode from '../utils/node';
|
||||
|
@ -12,7 +12,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'tag',
|
||||
|
@ -19,7 +19,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
const STYLE_LIST = ['success', 'fail', 'loading'];
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'tree-select',
|
||||
|
@ -13,7 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create } from '../utils';
|
||||
import create from '../utils/create';
|
||||
|
||||
export default create({
|
||||
name: 'uploader',
|
||||
|
@ -1,5 +1,4 @@
|
||||
import Vue from 'vue';
|
||||
import create from './create';
|
||||
|
||||
const isServer = Vue.prototype.$isServer;
|
||||
|
||||
@ -37,7 +36,6 @@ export {
|
||||
get,
|
||||
isObj,
|
||||
isDef,
|
||||
create,
|
||||
isServer,
|
||||
camelize,
|
||||
isAndroid
|
||||
|
Loading…
x
Reference in New Issue
Block a user