first
This commit is contained in:
1
node_modules/vant/lib/goods-action-icon/index.css
generated
vendored
Normal file
1
node_modules/vant/lib/goods-action-icon/index.css
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
.van-goods-action-icon{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;min-width:48px;height:100%;color:#646566;font-size:10px;line-height:1;text-align:center;background-color:#fff;cursor:pointer}.van-goods-action-icon:active{background-color:#f2f3f5}.van-goods-action-icon__icon{position:relative;width:1em;margin:0 auto 5px;color:#323233;font-size:18px}
|
90
node_modules/vant/lib/goods-action-icon/index.js
generated
vendored
Normal file
90
node_modules/vant/lib/goods-action-icon/index.js
generated
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = void 0;
|
||||
|
||||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
||||
|
||||
var _utils = require("../utils");
|
||||
|
||||
var _router = require("../utils/router");
|
||||
|
||||
var _relation = require("../mixins/relation");
|
||||
|
||||
var _info = _interopRequireDefault(require("../info"));
|
||||
|
||||
var _icon = _interopRequireDefault(require("../icon"));
|
||||
|
||||
var _createNamespace = (0, _utils.createNamespace)('goods-action-icon'),
|
||||
createComponent = _createNamespace[0],
|
||||
bem = _createNamespace[1];
|
||||
|
||||
var _default = createComponent({
|
||||
mixins: [(0, _relation.ChildrenMixin)('vanGoodsAction')],
|
||||
props: (0, _extends2.default)({}, _router.routeProps, {
|
||||
dot: Boolean,
|
||||
text: String,
|
||||
icon: String,
|
||||
color: String,
|
||||
// @deprecated
|
||||
info: [Number, String],
|
||||
badge: [Number, String],
|
||||
iconClass: null
|
||||
}),
|
||||
methods: {
|
||||
onClick: function onClick(event) {
|
||||
this.$emit('click', event);
|
||||
(0, _router.route)(this.$router, this);
|
||||
},
|
||||
genIcon: function genIcon() {
|
||||
var _this$badge;
|
||||
|
||||
var h = this.$createElement;
|
||||
var slot = this.slots('icon');
|
||||
var info = (_this$badge = this.badge) != null ? _this$badge : this.info;
|
||||
|
||||
if (process.env.NODE_ENV === 'development' && this.info) {
|
||||
console.warn('[Vant] GoodsActionIcon: "info" prop is deprecated, use "badge" prop instead.');
|
||||
}
|
||||
|
||||
if (slot) {
|
||||
return h("div", {
|
||||
"class": bem('icon')
|
||||
}, [slot, h(_info.default, {
|
||||
"attrs": {
|
||||
"dot": this.dot,
|
||||
"info": info
|
||||
}
|
||||
})]);
|
||||
}
|
||||
|
||||
return h(_icon.default, {
|
||||
"class": [bem('icon'), this.iconClass],
|
||||
"attrs": {
|
||||
"tag": "div",
|
||||
"dot": this.dot,
|
||||
"name": this.icon,
|
||||
"badge": info,
|
||||
"color": this.color
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
render: function render() {
|
||||
var h = arguments[0];
|
||||
return h("div", {
|
||||
"attrs": {
|
||||
"role": "button",
|
||||
"tabindex": "0"
|
||||
},
|
||||
"class": bem(),
|
||||
"on": {
|
||||
"click": this.onClick
|
||||
}
|
||||
}, [this.genIcon(), this.slots() || this.text]);
|
||||
}
|
||||
});
|
||||
|
||||
exports.default = _default;
|
27
node_modules/vant/lib/goods-action-icon/index.less
generated
vendored
Normal file
27
node_modules/vant/lib/goods-action-icon/index.less
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
@import '../style/var';
|
||||
|
||||
.van-goods-action-icon {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
min-width: @goods-action-icon-width;
|
||||
height: @goods-action-icon-height;
|
||||
color: @goods-action-icon-text-color;
|
||||
font-size: @goods-action-icon-font-size;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
background-color: @white;
|
||||
cursor: pointer;
|
||||
|
||||
&:active {
|
||||
background-color: @goods-action-icon-active-color;
|
||||
}
|
||||
|
||||
&__icon {
|
||||
position: relative;
|
||||
width: 1em;
|
||||
margin: 0 auto 5px;
|
||||
color: @goods-action-icon-color;
|
||||
font-size: @goods-action-icon-size;
|
||||
}
|
||||
}
|
4
node_modules/vant/lib/goods-action-icon/style/index.js
generated
vendored
Normal file
4
node_modules/vant/lib/goods-action-icon/style/index.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
require('../../style/base.css');
|
||||
require('../../info/index.css');
|
||||
require('../../icon/index.css');
|
||||
require('../index.css');
|
4
node_modules/vant/lib/goods-action-icon/style/less.js
generated
vendored
Normal file
4
node_modules/vant/lib/goods-action-icon/style/less.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
require('../../style/base.less');
|
||||
require('../../info/index.less');
|
||||
require('../../icon/index.less');
|
||||
require('../index.less');
|
Reference in New Issue
Block a user