- 添加 Vant WeApp 组件库的多个组件和工具文件 - 新增的组件包括 calendar、circle、collapse、dialog 等- 添加了常用的工具函数和样式文件 - 在 app.js 中集成了 Vant WeApp 组件库
47 lines
1.3 KiB
JavaScript
47 lines
1.3 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
var component_1 = require("../common/component");
|
|
var relation_1 = require("../common/relation");
|
|
var button_1 = require("../mixins/button");
|
|
var link_1 = require("../mixins/link");
|
|
(0, component_1.VantComponent)({
|
|
mixins: [link_1.link, button_1.button],
|
|
relation: (0, relation_1.useParent)('goods-action'),
|
|
props: {
|
|
text: String,
|
|
color: String,
|
|
size: {
|
|
type: String,
|
|
value: 'normal',
|
|
},
|
|
loading: Boolean,
|
|
disabled: Boolean,
|
|
plain: Boolean,
|
|
type: {
|
|
type: String,
|
|
value: 'danger',
|
|
},
|
|
customStyle: {
|
|
type: String,
|
|
value: '',
|
|
},
|
|
},
|
|
methods: {
|
|
onClick: function (event) {
|
|
this.$emit('click', event.detail);
|
|
this.jumpLink();
|
|
},
|
|
updateStyle: function () {
|
|
if (this.parent == null) {
|
|
return;
|
|
}
|
|
var index = this.index;
|
|
var _a = this.parent.children, children = _a === void 0 ? [] : _a;
|
|
this.setData({
|
|
isFirst: index === 0,
|
|
isLast: index === children.length - 1,
|
|
});
|
|
},
|
|
},
|
|
});
|