mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
build: compile 1.4.3-beta.0
This commit is contained in:
parent
842ca1a8b8
commit
c1544d88cb
81
dist/dialog/dialog.d.ts
vendored
81
dist/dialog/dialog.d.ts
vendored
@ -1,47 +1,50 @@
|
||||
/// <reference types="miniprogram-api-typings" />
|
||||
declare type DialogAction = 'confirm' | 'cancel';
|
||||
declare type DialogOptions = {
|
||||
lang?: string;
|
||||
show?: boolean;
|
||||
title?: string;
|
||||
width?: string | number;
|
||||
zIndex?: number;
|
||||
context?: WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance;
|
||||
message?: string;
|
||||
overlay?: boolean;
|
||||
selector?: string;
|
||||
ariaLabel?: string;
|
||||
className?: string;
|
||||
customStyle?: string;
|
||||
transition?: string;
|
||||
asyncClose?: boolean;
|
||||
businessId?: number;
|
||||
sessionFrom?: string;
|
||||
overlayStyle?: string;
|
||||
appParameter?: string;
|
||||
messageAlign?: string;
|
||||
sendMessageImg?: string;
|
||||
showMessageCard?: boolean;
|
||||
sendMessagePath?: string;
|
||||
sendMessageTitle?: string;
|
||||
confirmButtonText?: string;
|
||||
cancelButtonText?: string;
|
||||
showConfirmButton?: boolean;
|
||||
showCancelButton?: boolean;
|
||||
closeOnClickOverlay?: boolean;
|
||||
confirmButtonOpenType?: string;
|
||||
lang?: string;
|
||||
show?: boolean;
|
||||
title?: string;
|
||||
width?: string | number;
|
||||
zIndex?: number;
|
||||
theme?: string;
|
||||
context?:
|
||||
| WechatMiniprogram.Page.TrivialInstance
|
||||
| WechatMiniprogram.Component.TrivialInstance;
|
||||
message?: string;
|
||||
overlay?: boolean;
|
||||
selector?: string;
|
||||
ariaLabel?: string;
|
||||
className?: string;
|
||||
customStyle?: string;
|
||||
transition?: string;
|
||||
asyncClose?: boolean;
|
||||
businessId?: number;
|
||||
sessionFrom?: string;
|
||||
overlayStyle?: string;
|
||||
appParameter?: string;
|
||||
messageAlign?: string;
|
||||
sendMessageImg?: string;
|
||||
showMessageCard?: boolean;
|
||||
sendMessagePath?: string;
|
||||
sendMessageTitle?: string;
|
||||
confirmButtonText?: string;
|
||||
cancelButtonText?: string;
|
||||
showConfirmButton?: boolean;
|
||||
showCancelButton?: boolean;
|
||||
closeOnClickOverlay?: boolean;
|
||||
confirmButtonOpenType?: string;
|
||||
};
|
||||
interface Dialog {
|
||||
(options: DialogOptions): Promise<DialogAction>;
|
||||
alert?: (options: DialogOptions) => Promise<DialogAction>;
|
||||
confirm?: (options: DialogOptions) => Promise<DialogAction>;
|
||||
close?: () => void;
|
||||
stopLoading?: () => void;
|
||||
install?: () => void;
|
||||
setDefaultOptions?: (options: DialogOptions) => void;
|
||||
resetDefaultOptions?: () => void;
|
||||
defaultOptions?: DialogOptions;
|
||||
currentOptions?: DialogOptions;
|
||||
(options: DialogOptions): Promise<DialogAction>;
|
||||
alert?: (options: DialogOptions) => Promise<DialogAction>;
|
||||
confirm?: (options: DialogOptions) => Promise<DialogAction>;
|
||||
close?: () => void;
|
||||
stopLoading?: () => void;
|
||||
install?: () => void;
|
||||
setDefaultOptions?: (options: DialogOptions) => void;
|
||||
resetDefaultOptions?: () => void;
|
||||
defaultOptions?: DialogOptions;
|
||||
currentOptions?: DialogOptions;
|
||||
}
|
||||
declare const Dialog: Dialog;
|
||||
export default Dialog;
|
||||
|
1
dist/dialog/dialog.js
vendored
1
dist/dialog/dialog.js
vendored
@ -29,6 +29,7 @@ Dialog.defaultOptions = {
|
||||
show: false,
|
||||
title: '',
|
||||
width: null,
|
||||
theme: 'default',
|
||||
message: '',
|
||||
zIndex: 100,
|
||||
overlay: true,
|
||||
|
8
dist/dialog/index.js
vendored
8
dist/dialog/index.js
vendored
@ -1,7 +1,7 @@
|
||||
import { VantComponent } from '../common/component';
|
||||
import { button } from '../mixins/button';
|
||||
import { openType } from '../mixins/open-type';
|
||||
import { GRAY, BLUE } from '../common/color';
|
||||
import { GRAY, RED } from '../common/color';
|
||||
VantComponent({
|
||||
mixins: [button, openType],
|
||||
props: {
|
||||
@ -13,6 +13,10 @@ VantComponent({
|
||||
},
|
||||
title: String,
|
||||
message: String,
|
||||
theme: {
|
||||
type: String,
|
||||
value: 'default',
|
||||
},
|
||||
useSlot: Boolean,
|
||||
className: String,
|
||||
customStyle: String,
|
||||
@ -38,7 +42,7 @@ VantComponent({
|
||||
},
|
||||
confirmButtonColor: {
|
||||
type: String,
|
||||
value: BLUE,
|
||||
value: RED,
|
||||
},
|
||||
cancelButtonColor: {
|
||||
type: String,
|
||||
|
4
dist/dialog/index.json
vendored
4
dist/dialog/index.json
vendored
@ -2,6 +2,8 @@
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"van-popup": "../popup/index",
|
||||
"van-button": "../button/index"
|
||||
"van-button": "../button/index",
|
||||
"van-goods-action": "../goods-action//index",
|
||||
"van-goods-action-button": "../goods-action-button/index"
|
||||
}
|
||||
}
|
||||
|
44
dist/dialog/index.wxml
vendored
44
dist/dialog/index.wxml
vendored
@ -27,7 +27,49 @@
|
||||
<text class="van-dialog__message-text">{{ message }}</text>
|
||||
</view>
|
||||
|
||||
<view class="van-hairline--top van-dialog__footer">
|
||||
<van-goods-action wx:if="{{ theme === 'round-button' }}" custom-class="van-dialog__footer--round">
|
||||
<van-goods-action-button
|
||||
wx:if="{{ showCancelButton }}"
|
||||
size="large"
|
||||
loading="{{ loading.cancel }}"
|
||||
class="van-dialog__button van-hairline--right"
|
||||
custom-class="van-dialog__cancel"
|
||||
custom-style="color: {{ cancelButtonColor }}"
|
||||
bind:click="onCancel"
|
||||
>
|
||||
{{ cancelButtonText }}
|
||||
</van-goods-action-button>
|
||||
<van-goods-action-button
|
||||
wx:if="{{ showConfirmButton }}"
|
||||
size="large"
|
||||
class="van-dialog__button"
|
||||
loading="{{ loading.confirm }}"
|
||||
custom-class="van-dialog__confirm"
|
||||
custom-style="color: {{ confirmButtonColor }}"
|
||||
|
||||
open-type="{{ confirmButtonOpenType }}"
|
||||
lang="{{ lang }}"
|
||||
business-id="{{ businessId }}"
|
||||
session-from="{{ sessionFrom }}"
|
||||
send-message-title="{{ sendMessageTitle }}"
|
||||
send-message-path="{{ sendMessagePath }}"
|
||||
send-message-img="{{ sendMessageImg }}"
|
||||
show-message-card="{{ showMessageCard }}"
|
||||
app-parameter="{{ appParameter }}"
|
||||
|
||||
bind:click="onConfirm"
|
||||
bindgetuserinfo="bindGetUserInfo"
|
||||
bindcontact="bindContact"
|
||||
bindgetphonenumber="bindGetPhoneNumber"
|
||||
binderror="bindError"
|
||||
bindlaunchapp="bindLaunchApp"
|
||||
bindopensetting="bindOpenSetting"
|
||||
>
|
||||
{{ confirmButtonText }}
|
||||
</van-goods-action-button>
|
||||
</van-goods-action>
|
||||
|
||||
<view wx:else class="van-hairline--top van-dialog__footer">
|
||||
<van-button
|
||||
wx:if="{{ showCancelButton }}"
|
||||
size="large"
|
||||
|
2
dist/dialog/index.wxss
vendored
2
dist/dialog/index.wxss
vendored
@ -1 +1 @@
|
||||
@import '../common/index.wxss';.van-dialog{top:45%!important;overflow:hidden;width:320px;width:var(--dialog-width,320px);font-size:16px;font-size:var(--dialog-font-size,16px);border-radius:16px;border-radius:var(--dialog-border-radius,16px);background-color:#fff;background-color:var(--dialog-background-color,#fff)}@media (max-width:321px){.van-dialog{width:90%;width:var(--dialog-small-screen-width,90%)}}.van-dialog__header{text-align:center;padding-top:24px;padding-top:var(--dialog-header-padding-top,24px);font-weight:500;font-weight:var(--dialog-header-font-weight,500);line-height:24px;line-height:var(--dialog-header-line-height,24px)}.van-dialog__header--isolated{padding:24px 0;padding:var(--dialog-header-isolated-padding,24px 0)}.van-dialog__message{overflow-y:auto;text-align:center;-webkit-overflow-scrolling:touch;font-size:14px;font-size:var(--dialog-message-font-size,14px);line-height:20px;line-height:var(--dialog-message-line-height,20px);max-height:60vh;max-height:var(--dialog-message-max-height,60vh);padding:24px;padding:var(--dialog-message-padding,24px)}.van-dialog__message-text{word-wrap:break-word}.van-dialog__message--has-title{padding-top:12px;padding-top:var(--dialog-has-title-message-padding-top,12px);color:#646566;color:var(--dialog-has-title-message-text-color,#646566)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:-webkit-flex;display:flex}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog-bounce-enter{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
|
||||
@import '../common/index.wxss';.van-dialog{top:45%!important;overflow:hidden;width:320px;width:var(--dialog-width,320px);font-size:16px;font-size:var(--dialog-font-size,16px);border-radius:16px;border-radius:var(--dialog-border-radius,16px);background-color:#fff;background-color:var(--dialog-background-color,#fff)}@media (max-width:321px){.van-dialog{width:90%;width:var(--dialog-small-screen-width,90%)}}.van-dialog__header{text-align:center;padding-top:24px;padding-top:var(--dialog-header-padding-top,24px);font-weight:500;font-weight:var(--dialog-header-font-weight,500);line-height:24px;line-height:var(--dialog-header-line-height,24px)}.van-dialog__header--isolated{padding:24px 0;padding:var(--dialog-header-isolated-padding,24px 0)}.van-dialog__message{overflow-y:auto;text-align:center;-webkit-overflow-scrolling:touch;font-size:14px;font-size:var(--dialog-message-font-size,14px);line-height:20px;line-height:var(--dialog-message-line-height,20px);max-height:60vh;max-height:var(--dialog-message-max-height,60vh);padding:24px;padding:var(--dialog-message-padding,24px)}.van-dialog__message-text{word-wrap:break-word}.van-dialog__message--has-title{padding-top:12px;padding-top:var(--dialog-has-title-message-padding-top,12px);color:#646566;color:var(--dialog-has-title-message-text-color,#646566)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:-webkit-flex;display:flex}.van-dialog__footer--round{position:relative!important;padding:0 19px 16px!important}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog-bounce-enter{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
|
@ -46,6 +46,7 @@ Dialog.defaultOptions = {
|
||||
show: false,
|
||||
title: '',
|
||||
width: null,
|
||||
theme: 'default',
|
||||
message: '',
|
||||
zIndex: 100,
|
||||
overlay: true,
|
||||
|
@ -15,6 +15,10 @@ component_1.VantComponent({
|
||||
},
|
||||
title: String,
|
||||
message: String,
|
||||
theme: {
|
||||
type: String,
|
||||
value: 'default',
|
||||
},
|
||||
useSlot: Boolean,
|
||||
className: String,
|
||||
customStyle: String,
|
||||
@ -40,7 +44,7 @@ component_1.VantComponent({
|
||||
},
|
||||
confirmButtonColor: {
|
||||
type: String,
|
||||
value: color_1.BLUE,
|
||||
value: color_1.RED,
|
||||
},
|
||||
cancelButtonColor: {
|
||||
type: String,
|
||||
|
@ -2,6 +2,8 @@
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"van-popup": "../popup/index",
|
||||
"van-button": "../button/index"
|
||||
"van-button": "../button/index",
|
||||
"van-goods-action": "../goods-action//index",
|
||||
"van-goods-action-button": "../goods-action-button/index"
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,49 @@
|
||||
<text class="van-dialog__message-text">{{ message }}</text>
|
||||
</view>
|
||||
|
||||
<view class="van-hairline--top van-dialog__footer">
|
||||
<van-goods-action wx:if="{{ theme === 'round-button' }}" custom-class="van-dialog__footer--round">
|
||||
<van-goods-action-button
|
||||
wx:if="{{ showCancelButton }}"
|
||||
size="large"
|
||||
loading="{{ loading.cancel }}"
|
||||
class="van-dialog__button van-hairline--right"
|
||||
custom-class="van-dialog__cancel"
|
||||
custom-style="color: {{ cancelButtonColor }}"
|
||||
bind:click="onCancel"
|
||||
>
|
||||
{{ cancelButtonText }}
|
||||
</van-goods-action-button>
|
||||
<van-goods-action-button
|
||||
wx:if="{{ showConfirmButton }}"
|
||||
size="large"
|
||||
class="van-dialog__button"
|
||||
loading="{{ loading.confirm }}"
|
||||
custom-class="van-dialog__confirm"
|
||||
custom-style="color: {{ confirmButtonColor }}"
|
||||
|
||||
open-type="{{ confirmButtonOpenType }}"
|
||||
lang="{{ lang }}"
|
||||
business-id="{{ businessId }}"
|
||||
session-from="{{ sessionFrom }}"
|
||||
send-message-title="{{ sendMessageTitle }}"
|
||||
send-message-path="{{ sendMessagePath }}"
|
||||
send-message-img="{{ sendMessageImg }}"
|
||||
show-message-card="{{ showMessageCard }}"
|
||||
app-parameter="{{ appParameter }}"
|
||||
|
||||
bind:click="onConfirm"
|
||||
bindgetuserinfo="bindGetUserInfo"
|
||||
bindcontact="bindContact"
|
||||
bindgetphonenumber="bindGetPhoneNumber"
|
||||
binderror="bindError"
|
||||
bindlaunchapp="bindLaunchApp"
|
||||
bindopensetting="bindOpenSetting"
|
||||
>
|
||||
{{ confirmButtonText }}
|
||||
</van-goods-action-button>
|
||||
</van-goods-action>
|
||||
|
||||
<view wx:else class="van-hairline--top van-dialog__footer">
|
||||
<van-button
|
||||
wx:if="{{ showCancelButton }}"
|
||||
size="large"
|
||||
|
@ -1 +1 @@
|
||||
@import '../common/index.wxss';.van-dialog{top:45%!important;overflow:hidden;width:320px;width:var(--dialog-width,320px);font-size:16px;font-size:var(--dialog-font-size,16px);border-radius:16px;border-radius:var(--dialog-border-radius,16px);background-color:#fff;background-color:var(--dialog-background-color,#fff)}@media (max-width:321px){.van-dialog{width:90%;width:var(--dialog-small-screen-width,90%)}}.van-dialog__header{text-align:center;padding-top:24px;padding-top:var(--dialog-header-padding-top,24px);font-weight:500;font-weight:var(--dialog-header-font-weight,500);line-height:24px;line-height:var(--dialog-header-line-height,24px)}.van-dialog__header--isolated{padding:24px 0;padding:var(--dialog-header-isolated-padding,24px 0)}.van-dialog__message{overflow-y:auto;text-align:center;-webkit-overflow-scrolling:touch;font-size:14px;font-size:var(--dialog-message-font-size,14px);line-height:20px;line-height:var(--dialog-message-line-height,20px);max-height:60vh;max-height:var(--dialog-message-max-height,60vh);padding:24px;padding:var(--dialog-message-padding,24px)}.van-dialog__message-text{word-wrap:break-word}.van-dialog__message--has-title{padding-top:12px;padding-top:var(--dialog-has-title-message-padding-top,12px);color:#646566;color:var(--dialog-has-title-message-text-color,#646566)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:-webkit-flex;display:flex}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog-bounce-enter{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
|
||||
@import '../common/index.wxss';.van-dialog{top:45%!important;overflow:hidden;width:320px;width:var(--dialog-width,320px);font-size:16px;font-size:var(--dialog-font-size,16px);border-radius:16px;border-radius:var(--dialog-border-radius,16px);background-color:#fff;background-color:var(--dialog-background-color,#fff)}@media (max-width:321px){.van-dialog{width:90%;width:var(--dialog-small-screen-width,90%)}}.van-dialog__header{text-align:center;padding-top:24px;padding-top:var(--dialog-header-padding-top,24px);font-weight:500;font-weight:var(--dialog-header-font-weight,500);line-height:24px;line-height:var(--dialog-header-line-height,24px)}.van-dialog__header--isolated{padding:24px 0;padding:var(--dialog-header-isolated-padding,24px 0)}.van-dialog__message{overflow-y:auto;text-align:center;-webkit-overflow-scrolling:touch;font-size:14px;font-size:var(--dialog-message-font-size,14px);line-height:20px;line-height:var(--dialog-message-line-height,20px);max-height:60vh;max-height:var(--dialog-message-max-height,60vh);padding:24px;padding:var(--dialog-message-padding,24px)}.van-dialog__message-text{word-wrap:break-word}.van-dialog__message--has-title{padding-top:12px;padding-top:var(--dialog-has-title-message-padding-top,12px);color:#646566;color:var(--dialog-has-title-message-text-color,#646566)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:-webkit-flex;display:flex}.van-dialog__footer--round{position:relative!important;padding:0 19px 16px!important}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog-bounce-enter{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
|
Loading…
x
Reference in New Issue
Block a user