[build] 0.5.14

This commit is contained in:
rex-zsd 2019-05-30 19:58:24 +08:00
parent 42e5b7ecd2
commit b5d1547af3
24 changed files with 222 additions and 156 deletions

View File

@ -34,6 +34,7 @@
<view wx:if="{{ price || price === 0 }}" class="van-card__price price-class">{{ currency }} {{ price }}</view>
<view wx:if="{{ originPrice || originPrice === 0 }}" class="van-card__origin-price origin-price-class">{{ currency }} {{ originPrice }}</view>
<view wx:if="{{ num }}" class="van-card__num num-class">x {{ num }}</view>
<slot name="bottom" />
</view>
</view>
</view>

View File

@ -5,29 +5,34 @@ VantComponent({
name: 'checkbox',
type: 'descendant',
linked(target) {
const { value, disabled } = this.data;
target.set({
value: value.indexOf(target.data.name) !== -1,
disabled: disabled || target.data.disabled
});
this.children = this.children || [];
this.children.push(target);
this.updateChild(target);
},
unlinked(target) {
this.children = this.children.filter((child) => child !== target);
}
},
props: {
max: Number,
value: Array,
disabled: Boolean
},
watch: {
value(value) {
const children = this.getRelationNodes('../checkbox/index');
children.forEach(child => {
child.set({ value: value.indexOf(child.data.name) !== -1 });
});
value: {
type: Array,
observer: 'updateChildren'
},
disabled(disabled) {
const children = this.getRelationNodes('../checkbox/index');
children.forEach(child => {
child.set({ disabled: disabled || child.data.disabled });
disabled: {
type: Boolean,
observer: 'updateChildren'
}
},
methods: {
updateChildren() {
(this.children || []).forEach((child) => this.updateChild(child));
},
updateChild(child) {
const { value, disabled } = this.data;
child.set({
value: value.indexOf(child.data.name) !== -1,
disabled: disabled || child.data.disabled
});
}
}

View File

@ -1,13 +1,23 @@
import { VantComponent } from '../common/component';
function emit(target, value) {
target.$emit('input', value);
target.$emit('change', value);
}
VantComponent({
field: true,
relation: {
name: 'checkbox-group',
type: 'ancestor'
type: 'ancestor',
linked(target) {
this.parent = target;
},
unlinked() {
this.parent = null;
}
},
classes: ['icon-class', 'label-class'],
props: {
value: null,
value: Boolean,
disabled: Boolean,
useIconSlot: Boolean,
checkedColor: String,
@ -20,46 +30,43 @@ VantComponent({
},
methods: {
emitChange(value) {
const parent = this.getRelationNodes('../checkbox-group/index')[0];
if (parent) {
this.setParentValue(parent, value);
if (this.parent) {
this.setParentValue(this.parent, value);
}
else {
this.$emit('input', value);
this.$emit('change', value);
emit(this, value);
}
},
toggle() {
if (!this.data.disabled) {
this.emitChange(!this.data.value);
const { disabled, value } = this.data;
if (!disabled) {
this.emitChange(!value);
}
},
onClickLabel() {
if (!this.data.disabled && !this.data.labelDisabled) {
this.emitChange(!this.data.value);
const { labelDisabled, disabled, value } = this.data;
if (!disabled && !labelDisabled) {
this.emitChange(!value);
}
},
setParentValue(parent, value) {
const parentValue = parent.data.value.slice();
const { name } = this.data;
const { max } = parent.data;
if (value) {
if (parent.data.max && parentValue.length >= parent.data.max) {
if (max && parentValue.length >= max) {
return;
}
/* istanbul ignore else */
if (parentValue.indexOf(name) === -1) {
parentValue.push(name);
parent.$emit('input', parentValue);
parent.$emit('change', parentValue);
emit(parent, parentValue);
}
}
else {
const index = parentValue.indexOf(name);
/* istanbul ignore else */
if (index !== -1) {
parentValue.splice(index, 1);
parent.$emit('input', parentValue);
parent.$emit('change', parentValue);
emit(parent, parentValue);
}
}
}

View File

@ -1 +1 @@
@import '../common/index.wxss';.van-checkbox{display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px}.van-checkbox__icon-wrap{-webkit-flex:none;flex:none}.van-checkbox__label{word-break:break-all}.van-checkbox__icon{display:block;width:20px;height:20px;font-size:14px;color:transparent;text-align:center;border:1px solid #e5e5e5;box-sizing:border-box;transition:.2s}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;background-color:#1989fa;border-color:#1989fa}.van-checkbox__icon--disabled{background-color:#eee;border-color:#c9c9c9}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c9c9c9}.van-checkbox__label{margin-left:10px;color:#333}.van-checkbox__label--left{float:left;margin:0 10px 0 0}.van-checkbox__label--disabled{color:#c9c9c9}.van-checkbox__label:empty{margin:0}
@import '../common/index.wxss';.van-checkbox{display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px}.van-checkbox__icon-wrap{-webkit-flex:none;flex:none}.van-checkbox__icon{display:block;width:20px;height:20px;font-size:14px;color:transparent;text-align:center;border:1px solid #e5e5e5;box-sizing:border-box;transition:.2s}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;background-color:#1989fa;border-color:#1989fa}.van-checkbox__icon--disabled{background-color:#eee;border-color:#c9c9c9}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c9c9c9}.van-checkbox__label{margin-left:10px;color:#333;word-break:break-all}.van-checkbox__label--left{float:left;margin:0 10px 0 0}.van-checkbox__label--disabled{color:#c9c9c9}.van-checkbox__label:empty{margin:0}

View File

@ -13,7 +13,7 @@ function padZero(val) {
}
function times(n, iteratee) {
let index = -1;
const result = Array(n);
const result = Array(n < 0 ? 0 : n);
while (++index < n) {
result[index] = iteratee(index);
}

View File

@ -5,28 +5,33 @@ VantComponent({
name: 'radio',
type: 'descendant',
linked(target) {
const { value, disabled } = this.data;
target.set({
value: value,
disabled: disabled || target.data.disabled
});
this.children = this.children || [];
this.children.push(target);
this.updateChild(target);
},
unlinked(target) {
this.children = this.children.filter((child) => child !== target);
}
},
props: {
value: null,
disabled: Boolean
},
watch: {
value(value) {
const children = this.getRelationNodes('../radio/index');
children.forEach(child => {
child.set({ value });
});
value: {
type: null,
observer: 'updateChildren'
},
disabled(disabled) {
const children = this.getRelationNodes('../radio/index');
children.forEach(child => {
child.set({ disabled: disabled || child.data.disabled });
disabled: {
type: Boolean,
observer: 'updateChildren'
}
},
methods: {
updateChildren() {
(this.children || []).forEach((child) => this.updateChild(child));
},
updateChild(child) {
const { value, disabled } = this.data;
child.set({
value,
disabled: disabled || child.data.disabled
});
}
}

28
dist/radio/index.js vendored
View File

@ -3,29 +3,41 @@ VantComponent({
field: true,
relation: {
name: 'radio-group',
type: 'ancestor'
type: 'ancestor',
linked(target) {
this.parent = target;
},
unlinked() {
this.parent = null;
}
},
classes: ['icon-class', 'label-class'],
props: {
name: null,
value: null,
disabled: Boolean,
labelDisabled: Boolean,
useIconSlot: Boolean,
checkedColor: String,
labelPosition: String,
checkedColor: String
labelDisabled: Boolean,
shape: {
type: String,
value: 'round'
}
},
methods: {
emitChange(value) {
const instance = this.getRelationNodes('../radio-group/index')[0] || this;
const instance = this.parent || this;
instance.$emit('input', value);
instance.$emit('change', value);
},
onChange(event) {
this.emitChange(event.detail.value);
console.log(event);
this.emitChange(this.data.name);
},
onClickLabel() {
if (!this.data.disabled && !this.data.labelDisabled) {
this.emitChange(this.data.name);
const { disabled, labelDisabled, name } = this.data;
if (!disabled && !labelDisabled) {
this.emitChange(name);
}
}
}

21
dist/radio/index.wxml vendored
View File

@ -1,23 +1,18 @@
<wxs src="../wxs/utils.wxs" module="utils" />
<view class="van-radio custom-class">
<view class="van-radio__input">
<radio-group bindchange="onChange">
<radio
value="{{ name }}"
checked="{{ value === name }}"
disabled="{{ disabled }}"
class="van-radio__control"
/>
</radio-group>
<view class="van-radio__icon-wrap" bindtap="onChange">
<slot wx:if="{{ useIconSlot }}" name="icon" />
<van-icon
class="{{ utils.bem('radio__icon', { disabled, checked: !disabled && name === value, check: !disabled && name !== value }) }}"
wx:else
name="success"
class="{{ utils.bem('radio__icon', [shape, { disabled, checked: value === name }]) }}"
style="{{ checkedColor && value && !disabled ? 'border-color:' + checkedColor + '; background-color:' + checkedColor : '' }}"
custom-class="icon-class"
color="{{ value === name ? checkedColor : '' }}"
name="{{ value === name ? 'checked' : 'circle' }}"
custom-style="line-height: 20px;"
/>
</view>
<view class="van-radio__label van-radio__label--{{ labelPosition }} label-class" bindtap="onClickLabel">
<view class="label-class {{ utils.bem('radio__label', [labelPosition, { disabled }]) }}" bindtap="onClickLabel">
<slot />
</view>
</view>

View File

@ -1 +1 @@
@import '../common/index.wxss';.van-radio{overflow:hidden;line-height:1;-webkit-user-select:none;user-select:none}.van-radio__input,.van-radio__label{display:inline-block;vertical-align:middle}.van-radio__input{position:relative;font-size:20px}.van-radio__control{z-index:1;position:absolute;top:0;left:0;width:100%;height:100%;margin:0;opacity:0}.van-radio__label{margin-left:10px;color:#333;font-size:16px;line-height:20px}.van-radio__label--left{margin:0 10px 0 0;float:left}.van-radio__label:empty{margin:0}.van-radio__icon{pointer-events:none;display:block;line-height:0}.van-radio__icon--disabled{color:#e5e5e5}.van-radio__icon--checked{color:#1989fa}.van-radio__icon--check{color:#c9c9c9}
@import '../common/index.wxss';.van-radio{display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap,.van-radio__label{line-height:20px}.van-radio__icon-wrap{-webkit-flex:none;flex:none}.van-radio__icon{display:block;width:20px;height:20px;font-size:14px;color:transparent;text-align:center;border:1px solid #e5e5e5;box-sizing:border-box;transition:.2s}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{color:#fff;background-color:#1989fa;border-color:#1989fa}.van-radio__icon--disabled{background-color:#eee;border-color:#c9c9c9}.van-radio__icon--disabled.van-radio__icon--checked{color:#c9c9c9}.van-radio__label{margin-left:10px;color:#333;word-break:break-all}.van-radio__label--left{float:left;margin:0 10px 0 0}.van-radio__label--disabled{color:#c9c9c9}.van-radio__label:empty{margin:0}

View File

@ -1,6 +1,7 @@
{
"component": true,
"usingComponents": {
"van-button": "../button/index"
"van-button": "../button/index",
"van-icon": "../icon/index"
}
}

View File

@ -23,6 +23,10 @@ VantComponent({
type: Boolean,
value: true
},
border: {
type: Boolean,
value: true
},
zIndex: {
type: Number,
value: 1

View File

@ -1,7 +1,7 @@
<wxs src="../wxs/utils.wxs" module="utils" />
<view
class="custom-class van-hairline--top-bottom {{ utils.bem('tabbar', { fixed, safe: isIPhoneX && safeAreaInsetBottom }) }}"
class="custom-class {{ border ? 'van-hairline--top-bottom' : '' }} {{ utils.bem('tabbar', { fixed, safe: isIPhoneX && safeAreaInsetBottom }) }}"
style="{{ zIndex ? 'z-index: ' + zIndex : '' }}"
>
<slot />

View File

@ -34,6 +34,7 @@
<view wx:if="{{ price || price === 0 }}" class="van-card__price price-class">{{ currency }} {{ price }}</view>
<view wx:if="{{ originPrice || originPrice === 0 }}" class="van-card__origin-price origin-price-class">{{ currency }} {{ originPrice }}</view>
<view wx:if="{{ num }}" class="van-card__num num-class">x {{ num }}</view>
<slot name="bottom" />
</view>
</view>
</view>

View File

@ -7,29 +7,37 @@ component_1.VantComponent({
name: 'checkbox',
type: 'descendant',
linked: function (target) {
var _a = this.data, value = _a.value, disabled = _a.disabled;
target.set({
value: value.indexOf(target.data.name) !== -1,
disabled: disabled || target.data.disabled
});
this.children = this.children || [];
this.children.push(target);
this.updateChild(target);
},
unlinked: function (target) {
this.children = this.children.filter(function (child) { return child !== target; });
}
},
props: {
max: Number,
value: Array,
disabled: Boolean
value: {
type: Array,
observer: 'updateChildren'
},
disabled: {
type: Boolean,
observer: 'updateChildren'
}
},
watch: {
value: function (value) {
var children = this.getRelationNodes('../checkbox/index');
children.forEach(function (child) {
child.set({ value: value.indexOf(child.data.name) !== -1 });
methods: {
updateChildren: function () {
var _this = this;
(this.children || []).forEach(function (child) {
return _this.updateChild(child);
});
},
disabled: function (disabled) {
var children = this.getRelationNodes('../checkbox/index');
children.forEach(function (child) {
child.set({ disabled: disabled || child.data.disabled });
updateChild: function (child) {
var _a = this.data, value = _a.value, disabled = _a.disabled;
child.set({
value: value.indexOf(child.data.name) !== -1,
disabled: disabled || child.data.disabled
});
}
}

View File

@ -1,15 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var component_1 = require("../common/component");
function emit(target, value) {
target.$emit('input', value);
target.$emit('change', value);
}
component_1.VantComponent({
field: true,
relation: {
name: 'checkbox-group',
type: 'ancestor'
type: 'ancestor',
linked: function (target) {
this.parent = target;
},
unlinked: function () {
this.parent = null;
}
},
classes: ['icon-class', 'label-class'],
props: {
value: null,
value: Boolean,
disabled: Boolean,
useIconSlot: Boolean,
checkedColor: String,
@ -22,46 +32,43 @@ component_1.VantComponent({
},
methods: {
emitChange: function (value) {
var parent = this.getRelationNodes('../checkbox-group/index')[0];
if (parent) {
this.setParentValue(parent, value);
if (this.parent) {
this.setParentValue(this.parent, value);
}
else {
this.$emit('input', value);
this.$emit('change', value);
emit(this, value);
}
},
toggle: function () {
if (!this.data.disabled) {
this.emitChange(!this.data.value);
var _a = this.data, disabled = _a.disabled, value = _a.value;
if (!disabled) {
this.emitChange(!value);
}
},
onClickLabel: function () {
if (!this.data.disabled && !this.data.labelDisabled) {
this.emitChange(!this.data.value);
var _a = this.data, labelDisabled = _a.labelDisabled, disabled = _a.disabled, value = _a.value;
if (!disabled && !labelDisabled) {
this.emitChange(!value);
}
},
setParentValue: function (parent, value) {
var parentValue = parent.data.value.slice();
var name = this.data.name;
var max = parent.data.max;
if (value) {
if (parent.data.max && parentValue.length >= parent.data.max) {
if (max && parentValue.length >= max) {
return;
}
/* istanbul ignore else */
if (parentValue.indexOf(name) === -1) {
parentValue.push(name);
parent.$emit('input', parentValue);
parent.$emit('change', parentValue);
emit(parent, parentValue);
}
}
else {
var index = parentValue.indexOf(name);
/* istanbul ignore else */
if (index !== -1) {
parentValue.splice(index, 1);
parent.$emit('input', parentValue);
parent.$emit('change', parentValue);
emit(parent, parentValue);
}
}
}

View File

@ -1 +1 @@
@import '../common/index.wxss';.van-checkbox{display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px}.van-checkbox__icon-wrap{-webkit-flex:none;flex:none}.van-checkbox__label{word-break:break-all}.van-checkbox__icon{display:block;width:20px;height:20px;font-size:14px;color:transparent;text-align:center;border:1px solid #e5e5e5;box-sizing:border-box;transition:.2s}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;background-color:#1989fa;border-color:#1989fa}.van-checkbox__icon--disabled{background-color:#eee;border-color:#c9c9c9}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c9c9c9}.van-checkbox__label{margin-left:10px;color:#333}.van-checkbox__label--left{float:left;margin:0 10px 0 0}.van-checkbox__label--disabled{color:#c9c9c9}.van-checkbox__label:empty{margin:0}
@import '../common/index.wxss';.van-checkbox{display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px}.van-checkbox__icon-wrap{-webkit-flex:none;flex:none}.van-checkbox__icon{display:block;width:20px;height:20px;font-size:14px;color:transparent;text-align:center;border:1px solid #e5e5e5;box-sizing:border-box;transition:.2s}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;background-color:#1989fa;border-color:#1989fa}.van-checkbox__icon--disabled{background-color:#eee;border-color:#c9c9c9}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c9c9c9}.van-checkbox__label{margin-left:10px;color:#333;word-break:break-all}.van-checkbox__label--left{float:left;margin:0 10px 0 0}.van-checkbox__label--disabled{color:#c9c9c9}.van-checkbox__label:empty{margin:0}

View File

@ -26,7 +26,7 @@ function padZero(val) {
}
function times(n, iteratee) {
var index = -1;
var result = Array(n);
var result = Array(n < 0 ? 0 : n);
while (++index < n) {
result[index] = iteratee(index);
}

View File

@ -7,28 +7,36 @@ component_1.VantComponent({
name: 'radio',
type: 'descendant',
linked: function (target) {
var _a = this.data, value = _a.value, disabled = _a.disabled;
target.set({
value: value,
disabled: disabled || target.data.disabled
});
this.children = this.children || [];
this.children.push(target);
this.updateChild(target);
},
unlinked: function (target) {
this.children = this.children.filter(function (child) { return child !== target; });
}
},
props: {
value: null,
disabled: Boolean
value: {
type: null,
observer: 'updateChildren'
},
disabled: {
type: Boolean,
observer: 'updateChildren'
}
},
watch: {
value: function (value) {
var children = this.getRelationNodes('../radio/index');
children.forEach(function (child) {
child.set({ value: value });
methods: {
updateChildren: function () {
var _this = this;
(this.children || []).forEach(function (child) {
return _this.updateChild(child);
});
},
disabled: function (disabled) {
var children = this.getRelationNodes('../radio/index');
children.forEach(function (child) {
child.set({ disabled: disabled || child.data.disabled });
updateChild: function (child) {
var _a = this.data, value = _a.value, disabled = _a.disabled;
child.set({
value: value,
disabled: disabled || child.data.disabled
});
}
}

View File

@ -5,29 +5,41 @@ component_1.VantComponent({
field: true,
relation: {
name: 'radio-group',
type: 'ancestor'
type: 'ancestor',
linked: function (target) {
this.parent = target;
},
unlinked: function () {
this.parent = null;
}
},
classes: ['icon-class', 'label-class'],
props: {
name: null,
value: null,
disabled: Boolean,
labelDisabled: Boolean,
useIconSlot: Boolean,
checkedColor: String,
labelPosition: String,
checkedColor: String
labelDisabled: Boolean,
shape: {
type: String,
value: 'round'
}
},
methods: {
emitChange: function (value) {
var instance = this.getRelationNodes('../radio-group/index')[0] || this;
var instance = this.parent || this;
instance.$emit('input', value);
instance.$emit('change', value);
},
onChange: function (event) {
this.emitChange(event.detail.value);
console.log(event);
this.emitChange(this.data.name);
},
onClickLabel: function () {
if (!this.data.disabled && !this.data.labelDisabled) {
this.emitChange(this.data.name);
var _a = this.data, disabled = _a.disabled, labelDisabled = _a.labelDisabled, name = _a.name;
if (!disabled && !labelDisabled) {
this.emitChange(name);
}
}
}

View File

@ -1,23 +1,18 @@
<wxs src="../wxs/utils.wxs" module="utils" />
<view class="van-radio custom-class">
<view class="van-radio__input">
<radio-group bindchange="onChange">
<radio
value="{{ name }}"
checked="{{ value === name }}"
disabled="{{ disabled }}"
class="van-radio__control"
/>
</radio-group>
<view class="van-radio__icon-wrap" bindtap="onChange">
<slot wx:if="{{ useIconSlot }}" name="icon" />
<van-icon
class="{{ utils.bem('radio__icon', { disabled, checked: !disabled && name === value, check: !disabled && name !== value }) }}"
wx:else
name="success"
class="{{ utils.bem('radio__icon', [shape, { disabled, checked: value === name }]) }}"
style="{{ checkedColor && value && !disabled ? 'border-color:' + checkedColor + '; background-color:' + checkedColor : '' }}"
custom-class="icon-class"
color="{{ value === name ? checkedColor : '' }}"
name="{{ value === name ? 'checked' : 'circle' }}"
custom-style="line-height: 20px;"
/>
</view>
<view class="van-radio__label van-radio__label--{{ labelPosition }} label-class" bindtap="onClickLabel">
<view class="label-class {{ utils.bem('radio__label', [labelPosition, { disabled }]) }}" bindtap="onClickLabel">
<slot />
</view>
</view>

View File

@ -1 +1 @@
@import '../common/index.wxss';.van-radio{overflow:hidden;line-height:1;-webkit-user-select:none;user-select:none}.van-radio__input,.van-radio__label{display:inline-block;vertical-align:middle}.van-radio__input{position:relative;font-size:20px}.van-radio__control{z-index:1;position:absolute;top:0;left:0;width:100%;height:100%;margin:0;opacity:0}.van-radio__label{margin-left:10px;color:#333;font-size:16px;line-height:20px}.van-radio__label--left{margin:0 10px 0 0;float:left}.van-radio__label:empty{margin:0}.van-radio__icon{pointer-events:none;display:block;line-height:0}.van-radio__icon--disabled{color:#e5e5e5}.van-radio__icon--checked{color:#1989fa}.van-radio__icon--check{color:#c9c9c9}
@import '../common/index.wxss';.van-radio{display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap,.van-radio__label{line-height:20px}.van-radio__icon-wrap{-webkit-flex:none;flex:none}.van-radio__icon{display:block;width:20px;height:20px;font-size:14px;color:transparent;text-align:center;border:1px solid #e5e5e5;box-sizing:border-box;transition:.2s}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{color:#fff;background-color:#1989fa;border-color:#1989fa}.van-radio__icon--disabled{background-color:#eee;border-color:#c9c9c9}.van-radio__icon--disabled.van-radio__icon--checked{color:#c9c9c9}.van-radio__label{margin-left:10px;color:#333;word-break:break-all}.van-radio__label--left{float:left;margin:0 10px 0 0}.van-radio__label--disabled{color:#c9c9c9}.van-radio__label:empty{margin:0}

View File

@ -1,6 +1,7 @@
{
"component": true,
"usingComponents": {
"van-button": "../button/index"
"van-button": "../button/index",
"van-icon": "../icon/index"
}
}

View File

@ -25,6 +25,10 @@ component_1.VantComponent({
type: Boolean,
value: true
},
border: {
type: Boolean,
value: true
},
zIndex: {
type: Number,
value: 1

View File

@ -1,7 +1,7 @@
<wxs src="../wxs/utils.wxs" module="utils" />
<view
class="custom-class van-hairline--top-bottom {{ utils.bem('tabbar', { fixed, safe: isIPhoneX && safeAreaInsetBottom }) }}"
class="custom-class {{ border ? 'van-hairline--top-bottom' : '' }} {{ utils.bem('tabbar', { fixed, safe: isIPhoneX && safeAreaInsetBottom }) }}"
style="{{ zIndex ? 'z-index: ' + zIndex : '' }}"
>
<slot />