This commit is contained in:
2023-08-11 10:45:20 +08:00
commit 161ca982f3
31850 changed files with 2706500 additions and 0 deletions

1
node_modules/vant/es/tabbar/index.css generated vendored Normal file
View File

@ -0,0 +1 @@
.van-tabbar{z-index:1;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:content-box;width:100%;height:50px;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom);background-color:#fff}.van-tabbar--fixed{position:fixed;bottom:0;left:0}.van-tabbar--unfit{padding-bottom:0}

121
node_modules/vant/es/tabbar/index.js generated vendored Normal file
View File

@ -0,0 +1,121 @@
import { createNamespace } from '../utils';
import { BORDER_TOP_BOTTOM } from '../utils/constant';
import { callInterceptor } from '../utils/interceptor';
import { ParentMixin } from '../mixins/relation';
var _createNamespace = createNamespace('tabbar'),
createComponent = _createNamespace[0],
bem = _createNamespace[1];
export default createComponent({
mixins: [ParentMixin('vanTabbar')],
props: {
route: Boolean,
zIndex: [Number, String],
placeholder: Boolean,
activeColor: String,
beforeChange: Function,
inactiveColor: String,
value: {
type: [Number, String],
default: 0
},
border: {
type: Boolean,
default: true
},
fixed: {
type: Boolean,
default: true
},
safeAreaInsetBottom: {
type: Boolean,
default: null
}
},
data: function data() {
return {
height: null
};
},
computed: {
fit: function fit() {
if (this.safeAreaInsetBottom !== null) {
return this.safeAreaInsetBottom;
} // enable safe-area-inset-bottom by default when fixed
return this.fixed;
}
},
watch: {
value: 'setActiveItem',
children: 'setActiveItem'
},
mounted: function mounted() {
var _this = this;
if (this.placeholder && this.fixed) {
var setHeight = function setHeight() {
_this.height = _this.$refs.tabbar.getBoundingClientRect().height;
};
setHeight(); // https://github.com/vant-ui/vant/issues/10131
setTimeout(setHeight, 100);
}
},
methods: {
setActiveItem: function setActiveItem() {
var _this2 = this;
this.children.forEach(function (item, index) {
item.nameMatched = item.name === _this2.value || index === _this2.value;
});
},
triggerChange: function triggerChange(active, afterChange) {
var _this3 = this;
callInterceptor({
interceptor: this.beforeChange,
args: [active],
done: function done() {
_this3.$emit('input', active);
_this3.$emit('change', active);
afterChange();
}
});
},
genTabbar: function genTabbar() {
var _ref;
var h = this.$createElement;
return h("div", {
"ref": "tabbar",
"style": {
zIndex: this.zIndex
},
"class": [(_ref = {}, _ref[BORDER_TOP_BOTTOM] = this.border, _ref), bem({
unfit: !this.fit,
fixed: this.fixed
})]
}, [this.slots()]);
}
},
render: function render() {
var h = arguments[0];
if (this.placeholder && this.fixed) {
return h("div", {
"class": bem('placeholder'),
"style": {
height: this.height + "px"
}
}, [this.genTabbar()]);
}
return this.genTabbar();
}
});

22
node_modules/vant/es/tabbar/index.less generated vendored Normal file
View File

@ -0,0 +1,22 @@
@import '../style/var';
.van-tabbar {
z-index: @tabbar-z-index;
display: flex;
box-sizing: content-box;
width: 100%;
height: @tabbar-height;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
background-color: @tabbar-background-color;
&--fixed {
position: fixed;
bottom: 0;
left: 0;
}
&--unfit {
padding-bottom: 0;
}
}

2
node_modules/vant/es/tabbar/style/index.js generated vendored Normal file
View File

@ -0,0 +1,2 @@
import '../../style/base.css';
import '../index.css';

2
node_modules/vant/es/tabbar/style/less.js generated vendored Normal file
View File

@ -0,0 +1,2 @@
import '../../style/base.less';
import '../index.less';