提交初始版本,使用vant ui库

This commit is contained in:
2024-02-01 14:38:56 +08:00
commit 787a1f26b6
480 changed files with 12239 additions and 0 deletions

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,46 @@
"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,
});
},
},
});

View File

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

View File

@@ -0,0 +1,35 @@
<wxs src="../wxs/utils.wxs" module="utils" />
<van-button
id="{{ id }}"
button-id="{{ buttonId }}"
lang="{{ lang }}"
type="{{ type }}"
size="{{ size }}"
color="{{ color }}"
plain="{{ plain }}"
loading="{{ loading }}"
disabled="{{ disabled }}"
open-type="{{ openType }}"
class="{{ utils.bem('goods-action-button', [type, { first: isFirst, last: isLast, plain: plain }])}}"
custom-class="van-goods-action-button__inner custom-class"
custom-style="{{customStyle}}"
business-id="{{ businessId }}"
session-from="{{ sessionFrom }}"
app-parameter="{{ appParameter }}"
send-message-img="{{ sendMessageImg }}"
send-message-path="{{ sendMessagePath }}"
show-message-card="{{ showMessageCard }}"
send-message-title="{{ sendMessageTitle }}"
bind:click="onClick"
binderror="onError"
bindcontact="onContact"
bindopensetting="onOpenSetting"
bindgetuserinfo="onGetUserInfo"
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
bindgetRealTimePhoneNumber="onGetRealTimePhoneNumber"
bindgetphonenumber="onGetPhoneNumber"
bindlaunchapp="onLaunchApp"
>
{{ text }}
<slot></slot>
</van-button>

View File

@@ -0,0 +1 @@
@import '../common/index.wxss';:host{flex:1}.van-goods-action-button{--button-warning-background-color:var(--goods-action-button-warning-color,linear-gradient(to right,#ffd01e,#ff8917));--button-danger-background-color:var(--goods-action-button-danger-color,linear-gradient(to right,#ff6034,#ee0a24));--button-default-height:var(--goods-action-button-height,40px);--button-line-height:var(--goods-action-button-line-height,20px);--button-plain-background-color:var(--goods-action-button-plain-color,#fff);--button-border-width:0;display:block}.van-goods-action-button--first{--button-border-radius:999px 0 0 var(--goods-action-button-border-radius,999px);margin-left:5px}.van-goods-action-button--last{--button-border-radius:0 999px var(--goods-action-button-border-radius,999px) 0;margin-right:5px}.van-goods-action-button--first.van-goods-action-button--last{--button-border-radius:var(--goods-action-button-border-radius,999px)}.van-goods-action-button--plain{--button-border-width:1px}.van-goods-action-button__inner{font-weight:var(--font-weight-bold,500)!important;width:100%}@media (max-width:321px){.van-goods-action-button{font-size:13px}}