Remove wxcomponents/ from tracking
This commit is contained in:
1
wxcomponents/vant/button/index.d.ts
vendored
1
wxcomponents/vant/button/index.d.ts
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
@@ -1,68 +0,0 @@
|
||||
import { VantComponent } from '../common/component';
|
||||
import { button } from '../mixins/button';
|
||||
import { openType } from '../mixins/open-type';
|
||||
VantComponent({
|
||||
mixins: [button, openType],
|
||||
classes: ['hover-class', 'loading-class'],
|
||||
data: {
|
||||
style: ''
|
||||
},
|
||||
props: {
|
||||
icon: String,
|
||||
plain: Boolean,
|
||||
block: Boolean,
|
||||
round: Boolean,
|
||||
square: Boolean,
|
||||
loading: Boolean,
|
||||
hairline: Boolean,
|
||||
disabled: Boolean,
|
||||
loadingText: String,
|
||||
customStyle: String,
|
||||
loadingType: {
|
||||
type: String,
|
||||
value: 'circular'
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
value: 'default'
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
value: 'normal'
|
||||
},
|
||||
loadingSize: {
|
||||
type: String,
|
||||
value: '20px'
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
observer(color) {
|
||||
let style = '';
|
||||
if (color) {
|
||||
style += `color: ${this.data.plain ? color : 'white'};`;
|
||||
if (!this.data.plain) {
|
||||
// Use background instead of backgroundColor to make linear-gradient work
|
||||
style += `background: ${color};`;
|
||||
}
|
||||
// hide border when color is linear-gradient
|
||||
if (color.indexOf('gradient') !== -1) {
|
||||
style += 'border: 0;';
|
||||
}
|
||||
else {
|
||||
style += `border-color: ${color};`;
|
||||
}
|
||||
}
|
||||
if (style !== this.data.style) {
|
||||
this.setData({ style });
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
if (!this.data.disabled && !this.data.loading) {
|
||||
this.$emit('click');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"van-icon": "../icon/index",
|
||||
"van-loading": "../loading/index"
|
||||
}
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
<template>
|
||||
<uni-shadow-root class="vant-button-index"><button :id="id" :class="'custom-class '+(utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]))+' '+(hairline ? 'van-hairline--surround' : '')" hover-class="van-button--active hover-class" :lang="lang" :style="(style)+' '+(customStyle)" :open-type="openType" :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" :aria-label="ariaLabel" @click="onClick" @getuserinfo="bindGetUserInfo" @contact="bindContact" @getphonenumber="bindGetPhoneNumber" @error="bindError" @launchapp="bindLaunchApp" @opensetting="bindOpenSetting">
|
||||
<block v-if="loading">
|
||||
<van-loading custom-class="loading-class" :size="loadingSize" :type="loadingType" :color="type === 'default' ? '#c9c9c9' : 'white'"></van-loading>
|
||||
<view v-if="loadingText" class="van-button__loading-text">
|
||||
{{ loadingText }}
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<van-icon v-if="icon" size="1.2em" :name="icon" class="van-button__icon" custom-style="line-height: inherit;"></van-icon>
|
||||
<view class="van-button__text">
|
||||
<slot></slot>
|
||||
</view>
|
||||
</block>
|
||||
</button></uni-shadow-root>
|
||||
</template>
|
||||
<wxs src="../wxs/utils.wxs" module="utils"></wxs>
|
||||
<script>
|
||||
import VanIcon from '../icon/index.vue'
|
||||
import VanLoading from '../loading/index.vue'
|
||||
global['__wxVueOptions'] = {components:{'van-icon': VanIcon,'van-loading': VanLoading}}
|
||||
|
||||
global['__wxRoute'] = 'vant/button/index'
|
||||
import { VantComponent } from '../common/component';
|
||||
import { button } from '../mixins/button';
|
||||
import { openType } from '../mixins/open-type';
|
||||
VantComponent({
|
||||
mixins: [button, openType],
|
||||
classes: ['hover-class', 'loading-class'],
|
||||
data: {
|
||||
style: ''
|
||||
},
|
||||
props: {
|
||||
icon: String,
|
||||
plain: Boolean,
|
||||
block: Boolean,
|
||||
round: Boolean,
|
||||
square: Boolean,
|
||||
loading: Boolean,
|
||||
hairline: Boolean,
|
||||
disabled: Boolean,
|
||||
loadingText: String,
|
||||
customStyle: String,
|
||||
loadingType: {
|
||||
type: String,
|
||||
value: 'circular'
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
value: 'default'
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
value: 'normal'
|
||||
},
|
||||
loadingSize: {
|
||||
type: String,
|
||||
value: '20px'
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
observer(color) {
|
||||
let style = '';
|
||||
if (color) {
|
||||
style += `color: ${this.data.plain ? color : 'white'};`;
|
||||
if (!this.data.plain) {
|
||||
// Use background instead of backgroundColor to make linear-gradient work
|
||||
style += `background: ${color};`;
|
||||
}
|
||||
// hide border when color is linear-gradient
|
||||
if (color.indexOf('gradient') !== -1) {
|
||||
style += 'border: 0;';
|
||||
}
|
||||
else {
|
||||
style += `border-color: ${color};`;
|
||||
}
|
||||
}
|
||||
if (style !== this.data.style) {
|
||||
this.setData({ style });
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
if (!this.data.disabled && !this.data.loading) {
|
||||
this.$emit('click');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
export default global['__wxComponents']['vant/button/index']
|
||||
</script>
|
||||
<style platform="mp-weixin">
|
||||
@import '../common/index.css';.van-button{position:relative;display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;padding:0;line-height:20px;text-align:center;vertical-align:middle;-webkit-appearance:none;-webkit-text-size-adjust:100%;height:44px;height:var(--button-default-height,44px);font-size:16px;font-size:var(--button-default-font-size,16px);transition:opacity .2s;transition:opacity var(--animation-duration-fast,.2s);border-radius:2px;border-radius:var(--button-border-radius,2px)}.van-button:before{position:absolute;top:50%;left:50%;width:100%;height:100%;border:inherit;border-radius:inherit;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);opacity:0;content:" ";background-color:#000;background-color:var(--black,#000);border-color:#000;border-color:var(--black,#000)}.van-button:after{border-width:0}.van-button--active:before{opacity:.15}.van-button--unclickable:after{display:none}.van-button--default{color:#323233;color:var(--button-default-color,#323233);background-color:#fff;background-color:var(--button-default-background-color,#fff);border:1px solid #ebedf0;border:1px solid var(--button-default-border-color,#ebedf0)}.van-button--primary{color:#fff;color:var(--button-primary-color,#fff);background-color:#07c160;background-color:var(--button-primary-background-color,#07c160);border:1px solid #07c160;border:1px solid var(--button-primary-border-color,#07c160)}.van-button--info{color:#fff;color:var(--button-info-color,#fff);background-color:#1989fa;background-color:var(--button-info-background-color,#1989fa);border:1px solid #1989fa;border:1px solid var(--button-info-border-color,#1989fa)}.van-button--danger{color:#fff;color:var(--button-danger-color,#fff);background-color:#ee0a24;background-color:var(--button-danger-background-color,#ee0a24);border:1px solid #ee0a24;border:1px solid var(--button-danger-border-color,#ee0a24)}.van-button--warning{color:#fff;color:var(--button-warning-color,#fff);background-color:#ff976a;background-color:var(--button-warning-background-color,#ff976a);border:1px solid #ff976a;border:1px solid var(--button-warning-border-color,#ff976a)}.van-button--plain{background-color:#fff;background-color:var(--button-plain-background-color,#fff)}.van-button--plain.van-button--primary{color:#07c160;color:var(--button-primary-background-color,#07c160)}.van-button--plain.van-button--info{color:#1989fa;color:var(--button-info-background-color,#1989fa)}.van-button--plain.van-button--danger{color:#ee0a24;color:var(--button-danger-background-color,#ee0a24)}.van-button--plain.van-button--warning{color:#ff976a;color:var(--button-warning-background-color,#ff976a)}.van-button--large{width:100%;height:50px;height:var(--button-large-height,50px)}.van-button--normal{padding:0 15px;font-size:14px;font-size:var(--button-normal-font-size,14px)}.van-button--small{min-width:60px;min-width:var(--button-small-min-width,60px);height:30px;height:var(--button-small-height,30px);padding:0 8px;padding:0 var(--padding-xs,8px);font-size:12px;font-size:var(--button-small-font-size,12px)}.van-button--mini{display:inline-block;min-width:50px;min-width:var(--button-mini-min-width,50px);height:22px;height:var(--button-mini-height,22px);font-size:10px;font-size:var(--button-mini-font-size,10px)}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:-webkit-flex;display:flex;width:100%}.van-button--round{border-radius:999px;border-radius:var(--button-round-border-radius,999px)}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5;opacity:var(--button-disabled-opacity,.5)}.van-button__text{display:inline}.van-button__icon+.van-button__text:not(:empty),.van-button__loading-text{margin-left:4px}.van-button__icon{min-width:1em;line-height:inherit!important;vertical-align:top}.van-button--hairline{padding-top:1px;border-width:0}.van-button--hairline:after{border-color:inherit;border-width:1px;border-radius:4px;border-radius:calc(var(--button-border-radius, 2px)*2)}.van-button--hairline.van-button--round:after{border-radius:999px;border-radius:var(--button-round-border-radius,999px)}.van-button--hairline.van-button--square:after{border-radius:0}
|
||||
</style>
|
||||
@@ -1,52 +0,0 @@
|
||||
<wxs src="../wxs/utils.wxs" module="utils" />
|
||||
|
||||
<button
|
||||
id="{{ id }}"
|
||||
class="custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]) }} {{ hairline ? 'van-hairline--surround' : '' }}"
|
||||
hover-class="van-button--active hover-class"
|
||||
lang="{{ lang }}"
|
||||
style="{{ style }} {{ customStyle }}"
|
||||
open-type="{{ openType }}"
|
||||
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 }}"
|
||||
aria-label="{{ ariaLabel }}"
|
||||
bindtap="onClick"
|
||||
bindgetuserinfo="bindGetUserInfo"
|
||||
bindcontact="bindContact"
|
||||
bindgetphonenumber="bindGetPhoneNumber"
|
||||
binderror="bindError"
|
||||
bindlaunchapp="bindLaunchApp"
|
||||
bindopensetting="bindOpenSetting"
|
||||
>
|
||||
<block wx:if="{{ loading }}">
|
||||
<van-loading
|
||||
custom-class="loading-class"
|
||||
size="{{ loadingSize }}"
|
||||
type="{{ loadingType }}"
|
||||
color="{{ type === 'default' ? '#c9c9c9' : 'white' }}"
|
||||
/>
|
||||
<view
|
||||
wx:if="{{ loadingText }}"
|
||||
class="van-button__loading-text"
|
||||
>
|
||||
{{ loadingText }}
|
||||
</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<van-icon
|
||||
wx:if="{{ icon }}"
|
||||
size="1.2em"
|
||||
name="{{ icon }}"
|
||||
class="van-button__icon"
|
||||
custom-style="line-height: inherit;"
|
||||
/>
|
||||
<view class="van-button__text">
|
||||
<slot />
|
||||
</view>
|
||||
</block>
|
||||
</button>
|
||||
@@ -1 +0,0 @@
|
||||
@import '../common/index.wxss';.van-button{position:relative;display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;padding:0;line-height:20px;text-align:center;vertical-align:middle;-webkit-appearance:none;-webkit-text-size-adjust:100%;height:44px;height:var(--button-default-height,44px);font-size:16px;font-size:var(--button-default-font-size,16px);transition:opacity .2s;transition:opacity var(--animation-duration-fast,.2s);border-radius:2px;border-radius:var(--button-border-radius,2px)}.van-button:before{position:absolute;top:50%;left:50%;width:100%;height:100%;border:inherit;border-radius:inherit;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);opacity:0;content:" ";background-color:#000;background-color:var(--black,#000);border-color:#000;border-color:var(--black,#000)}.van-button:after{border-width:0}.van-button--active:before{opacity:.15}.van-button--unclickable:after{display:none}.van-button--default{color:#323233;color:var(--button-default-color,#323233);background-color:#fff;background-color:var(--button-default-background-color,#fff);border:1px solid #ebedf0;border:1px solid var(--button-default-border-color,#ebedf0)}.van-button--primary{color:#fff;color:var(--button-primary-color,#fff);background-color:#07c160;background-color:var(--button-primary-background-color,#07c160);border:1px solid #07c160;border:1px solid var(--button-primary-border-color,#07c160)}.van-button--info{color:#fff;color:var(--button-info-color,#fff);background-color:#1989fa;background-color:var(--button-info-background-color,#1989fa);border:1px solid #1989fa;border:1px solid var(--button-info-border-color,#1989fa)}.van-button--danger{color:#fff;color:var(--button-danger-color,#fff);background-color:#ee0a24;background-color:var(--button-danger-background-color,#ee0a24);border:1px solid #ee0a24;border:1px solid var(--button-danger-border-color,#ee0a24)}.van-button--warning{color:#fff;color:var(--button-warning-color,#fff);background-color:#ff976a;background-color:var(--button-warning-background-color,#ff976a);border:1px solid #ff976a;border:1px solid var(--button-warning-border-color,#ff976a)}.van-button--plain{background-color:#fff;background-color:var(--button-plain-background-color,#fff)}.van-button--plain.van-button--primary{color:#07c160;color:var(--button-primary-background-color,#07c160)}.van-button--plain.van-button--info{color:#1989fa;color:var(--button-info-background-color,#1989fa)}.van-button--plain.van-button--danger{color:#ee0a24;color:var(--button-danger-background-color,#ee0a24)}.van-button--plain.van-button--warning{color:#ff976a;color:var(--button-warning-background-color,#ff976a)}.van-button--large{width:100%;height:50px;height:var(--button-large-height,50px)}.van-button--normal{padding:0 15px;font-size:14px;font-size:var(--button-normal-font-size,14px)}.van-button--small{min-width:60px;min-width:var(--button-small-min-width,60px);height:30px;height:var(--button-small-height,30px);padding:0 8px;padding:0 var(--padding-xs,8px);font-size:12px;font-size:var(--button-small-font-size,12px)}.van-button--mini{display:inline-block;min-width:50px;min-width:var(--button-mini-min-width,50px);height:22px;height:var(--button-mini-height,22px);font-size:10px;font-size:var(--button-mini-font-size,10px)}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:-webkit-flex;display:flex;width:100%}.van-button--round{border-radius:999px;border-radius:var(--button-round-border-radius,999px)}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5;opacity:var(--button-disabled-opacity,.5)}.van-button__text{display:inline}.van-button__icon+.van-button__text:not(:empty),.van-button__loading-text{margin-left:4px}.van-button__icon{min-width:1em;line-height:inherit!important;vertical-align:top}.van-button--hairline{padding-top:1px;border-width:0}.van-button--hairline:after{border-color:inherit;border-width:1px;border-radius:4px;border-radius:calc(var(--button-border-radius, 2px)*2)}.van-button--hairline.van-button--round:after{border-radius:999px;border-radius:var(--button-round-border-radius,999px)}.van-button--hairline.van-button--square:after{border-radius:0}
|
||||
7
wxcomponents/vant/common/color.d.ts
vendored
7
wxcomponents/vant/common/color.d.ts
vendored
@@ -1,7 +0,0 @@
|
||||
export declare const RED = "#ee0a24";
|
||||
export declare const BLUE = "#1989fa";
|
||||
export declare const WHITE = "#fff";
|
||||
export declare const GREEN = "#07c160";
|
||||
export declare const ORANGE = "#ff976a";
|
||||
export declare const GRAY = "#323233";
|
||||
export declare const GRAY_DARK = "#969799";
|
||||
@@ -1,7 +0,0 @@
|
||||
export const RED = '#ee0a24';
|
||||
export const BLUE = '#1989fa';
|
||||
export const WHITE = '#fff';
|
||||
export const GREEN = '#07c160';
|
||||
export const ORANGE = '#ff976a';
|
||||
export const GRAY = '#323233';
|
||||
export const GRAY_DARK = '#969799';
|
||||
3
wxcomponents/vant/common/component.d.ts
vendored
3
wxcomponents/vant/common/component.d.ts
vendored
@@ -1,3 +0,0 @@
|
||||
import { VantComponentOptions, CombinedComponentInstance } from '../definitions/index';
|
||||
declare function VantComponent<Data, Props, Methods>(vantOptions?: VantComponentOptions<Data, Props, Methods, CombinedComponentInstance<Data, Props, Methods>>): void;
|
||||
export { VantComponent };
|
||||
@@ -1,48 +0,0 @@
|
||||
import { basic } from '../mixins/basic';
|
||||
import { observe } from '../mixins/observer/index';
|
||||
function mapKeys(source, target, map) {
|
||||
Object.keys(map).forEach(key => {
|
||||
if (source[key]) {
|
||||
target[map[key]] = source[key];
|
||||
}
|
||||
});
|
||||
}
|
||||
function VantComponent(vantOptions = {}) {
|
||||
const options = {};
|
||||
mapKeys(vantOptions, options, {
|
||||
data: 'data',
|
||||
props: 'properties',
|
||||
mixins: 'behaviors',
|
||||
methods: 'methods',
|
||||
beforeCreate: 'created',
|
||||
created: 'attached',
|
||||
mounted: 'ready',
|
||||
relations: 'relations',
|
||||
destroyed: 'detached',
|
||||
classes: 'externalClasses'
|
||||
});
|
||||
const { relation } = vantOptions;
|
||||
if (relation) {
|
||||
options.relations = Object.assign(options.relations || {}, {
|
||||
[`../${relation.name}/index`]: relation
|
||||
});
|
||||
}
|
||||
// add default externalClasses
|
||||
options.externalClasses = options.externalClasses || [];
|
||||
options.externalClasses.push('custom-class');
|
||||
// add default behaviors
|
||||
options.behaviors = options.behaviors || [];
|
||||
options.behaviors.push(basic);
|
||||
// map field to form-field behavior
|
||||
if (vantOptions.field) {
|
||||
options.behaviors.push('wx://form-field');
|
||||
}
|
||||
// add default options
|
||||
options.options = {
|
||||
multipleSlots: true,
|
||||
addGlobalClass: true
|
||||
};
|
||||
observe(vantOptions, options);
|
||||
Component(options);
|
||||
}
|
||||
export { VantComponent };
|
||||
@@ -1 +0,0 @@
|
||||
.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{display:table;clear:both;content:""}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
|
||||
@@ -1 +0,0 @@
|
||||
.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{display:table;clear:both;content:""}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
|
||||
@@ -1 +0,0 @@
|
||||
.van-clearfix:after{display:table;clear:both;content:""}
|
||||
@@ -1 +0,0 @@
|
||||
.van-clearfix:after{display:table;clear:both;content:""}
|
||||
@@ -1 +0,0 @@
|
||||
.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}
|
||||
@@ -1 +0,0 @@
|
||||
.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}
|
||||
@@ -1 +0,0 @@
|
||||
.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
|
||||
@@ -1 +0,0 @@
|
||||
.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
|
||||
8
wxcomponents/vant/common/utils.d.ts
vendored
8
wxcomponents/vant/common/utils.d.ts
vendored
@@ -1,8 +0,0 @@
|
||||
/// <reference types="miniprogram-api-typings" />
|
||||
export declare function isDef(value: any): boolean;
|
||||
export declare function isObj(x: any): boolean;
|
||||
export declare function isNumber(value: any): boolean;
|
||||
export declare function range(num: number, min: number, max: number): number;
|
||||
export declare function nextTick(fn: Function): void;
|
||||
export declare function getSystemInfoSync(): WechatMiniprogram.GetSystemInfoSuccessCallbackResult;
|
||||
export declare function addUnit(value?: string | number): string | undefined;
|
||||
@@ -1,32 +0,0 @@
|
||||
export function isDef(value) {
|
||||
return value !== undefined && value !== null;
|
||||
}
|
||||
export function isObj(x) {
|
||||
const type = typeof x;
|
||||
return x !== null && (type === 'object' || type === 'function');
|
||||
}
|
||||
export function isNumber(value) {
|
||||
return /^\d+(\.\d+)?$/.test(value);
|
||||
}
|
||||
export function range(num, min, max) {
|
||||
return Math.min(Math.max(num, min), max);
|
||||
}
|
||||
export function nextTick(fn) {
|
||||
setTimeout(() => {
|
||||
fn();
|
||||
}, 1000 / 30);
|
||||
}
|
||||
let systemInfo = null;
|
||||
export function getSystemInfoSync() {
|
||||
if (systemInfo == null) {
|
||||
systemInfo = wx.getSystemInfoSync();
|
||||
}
|
||||
return systemInfo;
|
||||
}
|
||||
export function addUnit(value) {
|
||||
if (!isDef(value)) {
|
||||
return undefined;
|
||||
}
|
||||
value = String(value);
|
||||
return isNumber(value) ? `${value}px` : value;
|
||||
}
|
||||
1
wxcomponents/vant/icon/index.d.ts
vendored
1
wxcomponents/vant/icon/index.d.ts
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
@@ -1,39 +0,0 @@
|
||||
import { VantComponent } from '../common/component';
|
||||
import { addUnit } from '../common/utils';
|
||||
VantComponent({
|
||||
props: {
|
||||
dot: Boolean,
|
||||
info: null,
|
||||
size: {
|
||||
type: null,
|
||||
observer: 'setSizeWithUnit'
|
||||
},
|
||||
color: String,
|
||||
customStyle: String,
|
||||
classPrefix: {
|
||||
type: String,
|
||||
value: 'van-icon'
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
observer(val) {
|
||||
this.setData({
|
||||
isImageName: val.indexOf('/') !== -1
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
sizeWithUnit: null,
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
this.$emit('click');
|
||||
},
|
||||
setSizeWithUnit(size) {
|
||||
this.setData({
|
||||
sizeWithUnit: addUnit(size)
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"van-info": "../info/index"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,18 +0,0 @@
|
||||
<view
|
||||
class="custom-class {{ classPrefix }} {{ isImageName ? 'van-icon--image' : classPrefix + '-' + name }}"
|
||||
style="{{ color ? 'color: ' + color + ';' : '' }}{{ size ? 'font-size: ' + sizeWithUnit + ';' : '' }}{{ customStyle }}"
|
||||
bind:tap="onClick"
|
||||
>
|
||||
<van-info
|
||||
wx:if="{{ info !== null || dot }}"
|
||||
dot="{{ dot }}"
|
||||
info="{{ info }}"
|
||||
custom-class="van-icon__info"
|
||||
/>
|
||||
<image
|
||||
wx:if="{{ isImageName }}"
|
||||
src="{{ name }}"
|
||||
mode="aspectFit"
|
||||
class="van-icon__image"
|
||||
/>
|
||||
</view>
|
||||
@@ -1,957 +0,0 @@
|
||||
@import '../common/index.wxss';
|
||||
|
||||
@font-face {
|
||||
font-weight: 600;
|
||||
font-family: vant-icon;
|
||||
font-style: normal;
|
||||
font-display: auto;
|
||||
src: url(https://img.yzcdn.cn/vant/vant-icon-d3825a.woff2) format("woff2"), url(https://img.yzcdn.cn/vant/vant-icon-d3825a.woff) format("woff"), url(https://img.yzcdn.cn/vant/vant-icon-d3825a.ttf) format("truetype")
|
||||
}
|
||||
|
||||
.van-icon {
|
||||
position: relative;
|
||||
font: normal normal normal 14px/1 vant-icon;
|
||||
font-size: inherit;
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased
|
||||
}
|
||||
|
||||
.van-icon,
|
||||
.van-icon:before {
|
||||
display: inline-block
|
||||
}
|
||||
|
||||
.van-icon-add-o:before {
|
||||
content: "\F000"
|
||||
}
|
||||
|
||||
.van-icon-add-square:before {
|
||||
content: "\F001"
|
||||
}
|
||||
|
||||
.van-icon-add:before {
|
||||
content: "\F002"
|
||||
}
|
||||
|
||||
.van-icon-after-sale:before {
|
||||
content: "\F003"
|
||||
}
|
||||
|
||||
.van-icon-aim:before {
|
||||
content: "\F004"
|
||||
}
|
||||
|
||||
.van-icon-alipay:before {
|
||||
content: "\F005"
|
||||
}
|
||||
|
||||
.van-icon-apps-o:before {
|
||||
content: "\F006"
|
||||
}
|
||||
|
||||
.van-icon-arrow-down:before {
|
||||
content: "\F007"
|
||||
}
|
||||
|
||||
.van-icon-arrow-left:before {
|
||||
content: "\F008"
|
||||
}
|
||||
|
||||
.van-icon-arrow-up:before {
|
||||
content: "\F009"
|
||||
}
|
||||
|
||||
.van-icon-arrow:before {
|
||||
content: "\F00A"
|
||||
}
|
||||
|
||||
.van-icon-ascending:before {
|
||||
content: "\F00B"
|
||||
}
|
||||
|
||||
.van-icon-audio:before {
|
||||
content: "\F00C"
|
||||
}
|
||||
|
||||
.van-icon-award-o:before {
|
||||
content: "\F00D"
|
||||
}
|
||||
|
||||
.van-icon-award:before {
|
||||
content: "\F00E"
|
||||
}
|
||||
|
||||
.van-icon-bag-o:before {
|
||||
content: "\F00F"
|
||||
}
|
||||
|
||||
.van-icon-bag:before {
|
||||
content: "\F010"
|
||||
}
|
||||
|
||||
.van-icon-balance-list-o:before {
|
||||
content: "\F011"
|
||||
}
|
||||
|
||||
.van-icon-balance-list:before {
|
||||
content: "\F012"
|
||||
}
|
||||
|
||||
.van-icon-balance-o:before {
|
||||
content: "\F013"
|
||||
}
|
||||
|
||||
.van-icon-balance-pay:before {
|
||||
content: "\F014"
|
||||
}
|
||||
|
||||
.van-icon-bar-chart-o:before {
|
||||
content: "\F015"
|
||||
}
|
||||
|
||||
.van-icon-bars:before {
|
||||
content: "\F016"
|
||||
}
|
||||
|
||||
.van-icon-bell:before {
|
||||
content: "\F017"
|
||||
}
|
||||
|
||||
.van-icon-bill-o:before {
|
||||
content: "\F018"
|
||||
}
|
||||
|
||||
.van-icon-bill:before {
|
||||
content: "\F019"
|
||||
}
|
||||
|
||||
.van-icon-birthday-cake-o:before {
|
||||
content: "\F01A"
|
||||
}
|
||||
|
||||
.van-icon-bookmark-o:before {
|
||||
content: "\F01B"
|
||||
}
|
||||
|
||||
.van-icon-bookmark:before {
|
||||
content: "\F01C"
|
||||
}
|
||||
|
||||
.van-icon-browsing-history-o:before {
|
||||
content: "\F01D"
|
||||
}
|
||||
|
||||
.van-icon-browsing-history:before {
|
||||
content: "\F01E"
|
||||
}
|
||||
|
||||
.van-icon-brush-o:before {
|
||||
content: "\F01F"
|
||||
}
|
||||
|
||||
.van-icon-bulb-o:before {
|
||||
content: "\F020"
|
||||
}
|
||||
|
||||
.van-icon-bullhorn-o:before {
|
||||
content: "\F021"
|
||||
}
|
||||
|
||||
.van-icon-calender-o:before {
|
||||
content: "\F022"
|
||||
}
|
||||
|
||||
.van-icon-card:before {
|
||||
content: "\F023"
|
||||
}
|
||||
|
||||
.van-icon-cart-circle-o:before {
|
||||
content: "\F024"
|
||||
}
|
||||
|
||||
.van-icon-cart-circle:before {
|
||||
content: "\F025"
|
||||
}
|
||||
|
||||
.van-icon-cart-o:before {
|
||||
content: "\F026"
|
||||
}
|
||||
|
||||
.van-icon-cart:before {
|
||||
content: "\F027"
|
||||
}
|
||||
|
||||
.van-icon-cash-back-record:before {
|
||||
content: "\F028"
|
||||
}
|
||||
|
||||
.van-icon-cash-on-deliver:before {
|
||||
content: "\F029"
|
||||
}
|
||||
|
||||
.van-icon-cashier-o:before {
|
||||
content: "\F02A"
|
||||
}
|
||||
|
||||
.van-icon-certificate:before {
|
||||
content: "\F02B"
|
||||
}
|
||||
|
||||
.van-icon-chart-trending-o:before {
|
||||
content: "\F02C"
|
||||
}
|
||||
|
||||
.van-icon-chat-o:before {
|
||||
content: "\F02D"
|
||||
}
|
||||
|
||||
.van-icon-chat:before {
|
||||
content: "\F02E"
|
||||
}
|
||||
|
||||
.van-icon-checked:before {
|
||||
content: "\F02F"
|
||||
}
|
||||
|
||||
.van-icon-circle:before {
|
||||
content: "\F030"
|
||||
}
|
||||
|
||||
.van-icon-clear:before {
|
||||
content: "\F031"
|
||||
}
|
||||
|
||||
.van-icon-clock-o:before {
|
||||
content: "\F032"
|
||||
}
|
||||
|
||||
.van-icon-clock:before {
|
||||
content: "\F033"
|
||||
}
|
||||
|
||||
.van-icon-close:before {
|
||||
content: "\F034"
|
||||
}
|
||||
|
||||
.van-icon-closed-eye:before {
|
||||
content: "\F035"
|
||||
}
|
||||
|
||||
.van-icon-cluster-o:before {
|
||||
content: "\F036"
|
||||
}
|
||||
|
||||
.van-icon-cluster:before {
|
||||
content: "\F037"
|
||||
}
|
||||
|
||||
.van-icon-column:before {
|
||||
content: "\F038"
|
||||
}
|
||||
|
||||
.van-icon-comment-circle-o:before {
|
||||
content: "\F039"
|
||||
}
|
||||
|
||||
.van-icon-comment-circle:before {
|
||||
content: "\F03A"
|
||||
}
|
||||
|
||||
.van-icon-comment-o:before {
|
||||
content: "\F03B"
|
||||
}
|
||||
|
||||
.van-icon-comment:before {
|
||||
content: "\F03C"
|
||||
}
|
||||
|
||||
.van-icon-completed:before {
|
||||
content: "\F03D"
|
||||
}
|
||||
|
||||
.van-icon-contact:before {
|
||||
content: "\F03E"
|
||||
}
|
||||
|
||||
.van-icon-coupon-o:before {
|
||||
content: "\F03F"
|
||||
}
|
||||
|
||||
.van-icon-coupon:before {
|
||||
content: "\F040"
|
||||
}
|
||||
|
||||
.van-icon-credit-pay:before {
|
||||
content: "\F041"
|
||||
}
|
||||
|
||||
.van-icon-cross:before {
|
||||
content: "\F042"
|
||||
}
|
||||
|
||||
.van-icon-debit-pay:before {
|
||||
content: "\F043"
|
||||
}
|
||||
|
||||
.van-icon-delete:before {
|
||||
content: "\F044"
|
||||
}
|
||||
|
||||
.van-icon-descending:before {
|
||||
content: "\F045"
|
||||
}
|
||||
|
||||
.van-icon-description:before {
|
||||
content: "\F046"
|
||||
}
|
||||
|
||||
.van-icon-desktop-o:before {
|
||||
content: "\F047"
|
||||
}
|
||||
|
||||
.van-icon-diamond-o:before {
|
||||
content: "\F048"
|
||||
}
|
||||
|
||||
.van-icon-diamond:before {
|
||||
content: "\F049"
|
||||
}
|
||||
|
||||
.van-icon-discount:before {
|
||||
content: "\F04A"
|
||||
}
|
||||
|
||||
.van-icon-down:before {
|
||||
content: "\F04B"
|
||||
}
|
||||
|
||||
.van-icon-ecard-pay:before {
|
||||
content: "\F04C"
|
||||
}
|
||||
|
||||
.van-icon-edit:before {
|
||||
content: "\F04D"
|
||||
}
|
||||
|
||||
.van-icon-ellipsis:before {
|
||||
content: "\F04E"
|
||||
}
|
||||
|
||||
.van-icon-empty:before {
|
||||
content: "\F04F"
|
||||
}
|
||||
|
||||
.van-icon-envelop-o:before {
|
||||
content: "\F050"
|
||||
}
|
||||
|
||||
.van-icon-exchange:before {
|
||||
content: "\F051"
|
||||
}
|
||||
|
||||
.van-icon-expand-o:before {
|
||||
content: "\F052"
|
||||
}
|
||||
|
||||
.van-icon-expand:before {
|
||||
content: "\F053"
|
||||
}
|
||||
|
||||
.van-icon-eye-o:before {
|
||||
content: "\F054"
|
||||
}
|
||||
|
||||
.van-icon-eye:before {
|
||||
content: "\F055"
|
||||
}
|
||||
|
||||
.van-icon-fail:before {
|
||||
content: "\F056"
|
||||
}
|
||||
|
||||
.van-icon-failure:before {
|
||||
content: "\F057"
|
||||
}
|
||||
|
||||
.van-icon-filter-o:before {
|
||||
content: "\F058"
|
||||
}
|
||||
|
||||
.van-icon-fire-o:before {
|
||||
content: "\F059"
|
||||
}
|
||||
|
||||
.van-icon-fire:before {
|
||||
content: "\F05A"
|
||||
}
|
||||
|
||||
.van-icon-flag-o:before {
|
||||
content: "\F05B"
|
||||
}
|
||||
|
||||
.van-icon-flower-o:before {
|
||||
content: "\F05C"
|
||||
}
|
||||
|
||||
.van-icon-free-postage:before {
|
||||
content: "\F05D"
|
||||
}
|
||||
|
||||
.van-icon-friends-o:before {
|
||||
content: "\F05E"
|
||||
}
|
||||
|
||||
.van-icon-friends:before {
|
||||
content: "\F05F"
|
||||
}
|
||||
|
||||
.van-icon-gem-o:before {
|
||||
content: "\F060"
|
||||
}
|
||||
|
||||
.van-icon-gem:before {
|
||||
content: "\F061"
|
||||
}
|
||||
|
||||
.van-icon-gift-card-o:before {
|
||||
content: "\F062"
|
||||
}
|
||||
|
||||
.van-icon-gift-card:before {
|
||||
content: "\F063"
|
||||
}
|
||||
|
||||
.van-icon-gift-o:before {
|
||||
content: "\F064"
|
||||
}
|
||||
|
||||
.van-icon-gift:before {
|
||||
content: "\F065"
|
||||
}
|
||||
|
||||
.van-icon-gold-coin-o:before {
|
||||
content: "\F066"
|
||||
}
|
||||
|
||||
.van-icon-gold-coin:before {
|
||||
content: "\F067"
|
||||
}
|
||||
|
||||
.van-icon-good-job-o:before {
|
||||
content: "\F068"
|
||||
}
|
||||
|
||||
.van-icon-good-job:before {
|
||||
content: "\F069"
|
||||
}
|
||||
|
||||
.van-icon-goods-collect-o:before {
|
||||
content: "\F06A"
|
||||
}
|
||||
|
||||
.van-icon-goods-collect:before {
|
||||
content: "\F06B"
|
||||
}
|
||||
|
||||
.van-icon-graphic:before {
|
||||
content: "\F06C"
|
||||
}
|
||||
|
||||
.van-icon-home-o:before {
|
||||
content: "\F06D"
|
||||
}
|
||||
|
||||
.van-icon-hot-o:before {
|
||||
content: "\F06E"
|
||||
}
|
||||
|
||||
.van-icon-hot-sale-o:before {
|
||||
content: "\F06F"
|
||||
}
|
||||
|
||||
.van-icon-hot-sale:before {
|
||||
content: "\F070"
|
||||
}
|
||||
|
||||
.van-icon-hot:before {
|
||||
content: "\F071"
|
||||
}
|
||||
|
||||
.van-icon-hotel-o:before {
|
||||
content: "\F072"
|
||||
}
|
||||
|
||||
.van-icon-idcard:before {
|
||||
content: "\F073"
|
||||
}
|
||||
|
||||
.van-icon-info-o:before {
|
||||
content: "\F074"
|
||||
}
|
||||
|
||||
.van-icon-info:before {
|
||||
content: "\F075"
|
||||
}
|
||||
|
||||
.van-icon-invition:before {
|
||||
content: "\F076"
|
||||
}
|
||||
|
||||
.van-icon-label-o:before {
|
||||
content: "\F077"
|
||||
}
|
||||
|
||||
.van-icon-label:before {
|
||||
content: "\F078"
|
||||
}
|
||||
|
||||
.van-icon-like-o:before {
|
||||
content: "\F079"
|
||||
}
|
||||
|
||||
.van-icon-like:before {
|
||||
content: "\F07A"
|
||||
}
|
||||
|
||||
.van-icon-live:before {
|
||||
content: "\F07B"
|
||||
}
|
||||
|
||||
.van-icon-location-o:before {
|
||||
content: "\F07C"
|
||||
}
|
||||
|
||||
.van-icon-location:before {
|
||||
content: "\F07D"
|
||||
}
|
||||
|
||||
.van-icon-lock:before {
|
||||
content: "\F07E"
|
||||
}
|
||||
|
||||
.van-icon-logistics:before {
|
||||
content: "\F07F"
|
||||
}
|
||||
|
||||
.van-icon-manager-o:before {
|
||||
content: "\F080"
|
||||
}
|
||||
|
||||
.van-icon-manager:before {
|
||||
content: "\F081"
|
||||
}
|
||||
|
||||
.van-icon-map-marked:before {
|
||||
content: "\F082"
|
||||
}
|
||||
|
||||
.van-icon-medal-o:before {
|
||||
content: "\F083"
|
||||
}
|
||||
|
||||
.van-icon-medal:before {
|
||||
content: "\F084"
|
||||
}
|
||||
|
||||
.van-icon-more-o:before {
|
||||
content: "\F085"
|
||||
}
|
||||
|
||||
.van-icon-more:before {
|
||||
content: "\F086"
|
||||
}
|
||||
|
||||
.van-icon-music-o:before {
|
||||
content: "\F087"
|
||||
}
|
||||
|
||||
.van-icon-music:before {
|
||||
content: "\F088"
|
||||
}
|
||||
|
||||
.van-icon-new-arrival-o:before {
|
||||
content: "\F089"
|
||||
}
|
||||
|
||||
.van-icon-new-arrival:before {
|
||||
content: "\F08A"
|
||||
}
|
||||
|
||||
.van-icon-new-o:before {
|
||||
content: "\F08B"
|
||||
}
|
||||
|
||||
.van-icon-new:before {
|
||||
content: "\F08C"
|
||||
}
|
||||
|
||||
.van-icon-newspaper-o:before {
|
||||
content: "\F08D"
|
||||
}
|
||||
|
||||
.van-icon-notes-o:before {
|
||||
content: "\F08E"
|
||||
}
|
||||
|
||||
.van-icon-orders-o:before {
|
||||
content: "\F08F"
|
||||
}
|
||||
|
||||
.van-icon-other-pay:before {
|
||||
content: "\F090"
|
||||
}
|
||||
|
||||
.van-icon-paid:before {
|
||||
content: "\F091"
|
||||
}
|
||||
|
||||
.van-icon-passed:before {
|
||||
content: "\F092"
|
||||
}
|
||||
|
||||
.van-icon-pause-circle-o:before {
|
||||
content: "\F093"
|
||||
}
|
||||
|
||||
.van-icon-pause-circle:before {
|
||||
content: "\F094"
|
||||
}
|
||||
|
||||
.van-icon-pause:before {
|
||||
content: "\F095"
|
||||
}
|
||||
|
||||
.van-icon-peer-pay:before {
|
||||
content: "\F096"
|
||||
}
|
||||
|
||||
.van-icon-pending-payment:before {
|
||||
content: "\F097"
|
||||
}
|
||||
|
||||
.van-icon-phone-circle-o:before {
|
||||
content: "\F098"
|
||||
}
|
||||
|
||||
.van-icon-phone-circle:before {
|
||||
content: "\F099"
|
||||
}
|
||||
|
||||
.van-icon-phone-o:before {
|
||||
content: "\F09A"
|
||||
}
|
||||
|
||||
.van-icon-phone:before {
|
||||
content: "\F09B"
|
||||
}
|
||||
|
||||
.van-icon-photo-o:before {
|
||||
content: "\F09C"
|
||||
}
|
||||
|
||||
.van-icon-photo:before {
|
||||
content: "\F09D"
|
||||
}
|
||||
|
||||
.van-icon-photograph:before {
|
||||
content: "\F09E"
|
||||
}
|
||||
|
||||
.van-icon-play-circle-o:before {
|
||||
content: "\F09F"
|
||||
}
|
||||
|
||||
.van-icon-play-circle:before {
|
||||
content: "\F0A0"
|
||||
}
|
||||
|
||||
.van-icon-play:before {
|
||||
content: "\F0A1"
|
||||
}
|
||||
|
||||
.van-icon-plus:before {
|
||||
content: "\F0A2"
|
||||
}
|
||||
|
||||
.van-icon-point-gift-o:before {
|
||||
content: "\F0A3"
|
||||
}
|
||||
|
||||
.van-icon-point-gift:before {
|
||||
content: "\F0A4"
|
||||
}
|
||||
|
||||
.van-icon-points:before {
|
||||
content: "\F0A5"
|
||||
}
|
||||
|
||||
.van-icon-printer:before {
|
||||
content: "\F0A6"
|
||||
}
|
||||
|
||||
.van-icon-qr-invalid:before {
|
||||
content: "\F0A7"
|
||||
}
|
||||
|
||||
.van-icon-qr:before {
|
||||
content: "\F0A8"
|
||||
}
|
||||
|
||||
.van-icon-question-o:before {
|
||||
content: "\F0A9"
|
||||
}
|
||||
|
||||
.van-icon-question:before {
|
||||
content: "\F0AA"
|
||||
}
|
||||
|
||||
.van-icon-records:before {
|
||||
content: "\F0AB"
|
||||
}
|
||||
|
||||
.van-icon-refund-o:before {
|
||||
content: "\F0AC"
|
||||
}
|
||||
|
||||
.van-icon-replay:before {
|
||||
content: "\F0AD"
|
||||
}
|
||||
|
||||
.van-icon-scan:before {
|
||||
content: "\F0AE"
|
||||
}
|
||||
|
||||
.van-icon-search:before {
|
||||
content: "\F0AF"
|
||||
}
|
||||
|
||||
.van-icon-send-gift-o:before {
|
||||
content: "\F0B0"
|
||||
}
|
||||
|
||||
.van-icon-send-gift:before {
|
||||
content: "\F0B1"
|
||||
}
|
||||
|
||||
.van-icon-service-o:before {
|
||||
content: "\F0B2"
|
||||
}
|
||||
|
||||
.van-icon-service:before {
|
||||
content: "\F0B3"
|
||||
}
|
||||
|
||||
.van-icon-setting-o:before {
|
||||
content: "\F0B4"
|
||||
}
|
||||
|
||||
.van-icon-setting:before {
|
||||
content: "\F0B5"
|
||||
}
|
||||
|
||||
.van-icon-share:before {
|
||||
content: "\F0B6"
|
||||
}
|
||||
|
||||
.van-icon-shop-collect-o:before {
|
||||
content: "\F0B7"
|
||||
}
|
||||
|
||||
.van-icon-shop-collect:before {
|
||||
content: "\F0B8"
|
||||
}
|
||||
|
||||
.van-icon-shop-o:before {
|
||||
content: "\F0B9"
|
||||
}
|
||||
|
||||
.van-icon-shop:before {
|
||||
content: "\F0BA"
|
||||
}
|
||||
|
||||
.van-icon-shopping-cart-o:before {
|
||||
content: "\F0BB"
|
||||
}
|
||||
|
||||
.van-icon-shopping-cart:before {
|
||||
content: "\F0BC"
|
||||
}
|
||||
|
||||
.van-icon-shrink:before {
|
||||
content: "\F0BD"
|
||||
}
|
||||
|
||||
.van-icon-sign:before {
|
||||
content: "\F0BE"
|
||||
}
|
||||
|
||||
.van-icon-smile-comment-o:before {
|
||||
content: "\F0BF"
|
||||
}
|
||||
|
||||
.van-icon-smile-comment:before {
|
||||
content: "\F0C0"
|
||||
}
|
||||
|
||||
.van-icon-smile-o:before {
|
||||
content: "\F0C1"
|
||||
}
|
||||
|
||||
.van-icon-smile:before {
|
||||
content: "\F0C2"
|
||||
}
|
||||
|
||||
.van-icon-star-o:before {
|
||||
content: "\F0C3"
|
||||
}
|
||||
|
||||
.van-icon-star:before {
|
||||
content: "\F0C4"
|
||||
}
|
||||
|
||||
.van-icon-stop-circle-o:before {
|
||||
content: "\F0C5"
|
||||
}
|
||||
|
||||
.van-icon-stop-circle:before {
|
||||
content: "\F0C6"
|
||||
}
|
||||
|
||||
.van-icon-stop:before {
|
||||
content: "\F0C7"
|
||||
}
|
||||
|
||||
.van-icon-success:before {
|
||||
content: "\F0C8"
|
||||
}
|
||||
|
||||
.van-icon-thumb-circle-o:before {
|
||||
content: "\F0C9"
|
||||
}
|
||||
|
||||
.van-icon-thumb-circle:before {
|
||||
content: "\F0CA"
|
||||
}
|
||||
|
||||
.van-icon-todo-list-o:before {
|
||||
content: "\F0CB"
|
||||
}
|
||||
|
||||
.van-icon-todo-list:before {
|
||||
content: "\F0CC"
|
||||
}
|
||||
|
||||
.van-icon-tosend:before {
|
||||
content: "\F0CD"
|
||||
}
|
||||
|
||||
.van-icon-tv-o:before {
|
||||
content: "\F0CE"
|
||||
}
|
||||
|
||||
.van-icon-umbrella-circle:before {
|
||||
content: "\F0CF"
|
||||
}
|
||||
|
||||
.van-icon-underway-o:before {
|
||||
content: "\F0D0"
|
||||
}
|
||||
|
||||
.van-icon-underway:before {
|
||||
content: "\F0D1"
|
||||
}
|
||||
|
||||
.van-icon-upgrade:before {
|
||||
content: "\F0D2"
|
||||
}
|
||||
|
||||
.van-icon-user-circle-o:before {
|
||||
content: "\F0D3"
|
||||
}
|
||||
|
||||
.van-icon-user-o:before {
|
||||
content: "\F0D4"
|
||||
}
|
||||
|
||||
.van-icon-video-o:before {
|
||||
content: "\F0D5"
|
||||
}
|
||||
|
||||
.van-icon-video:before {
|
||||
content: "\F0D6"
|
||||
}
|
||||
|
||||
.van-icon-vip-card-o:before {
|
||||
content: "\F0D7"
|
||||
}
|
||||
|
||||
.van-icon-vip-card:before {
|
||||
content: "\F0D8"
|
||||
}
|
||||
|
||||
.van-icon-volume-o:before {
|
||||
content: "\F0D9"
|
||||
}
|
||||
|
||||
.van-icon-volume:before {
|
||||
content: "\F0DA"
|
||||
}
|
||||
|
||||
.van-icon-wap-home-o:before {
|
||||
content: "\F0DB"
|
||||
}
|
||||
|
||||
.van-icon-wap-home:before {
|
||||
content: "\F0DC"
|
||||
}
|
||||
|
||||
.van-icon-wap-nav:before {
|
||||
content: "\F0DD"
|
||||
}
|
||||
|
||||
.van-icon-warn-o:before {
|
||||
content: "\F0DE"
|
||||
}
|
||||
|
||||
.van-icon-warning-o:before {
|
||||
content: "\F0DF"
|
||||
}
|
||||
|
||||
.van-icon-warning:before {
|
||||
content: "\F0E0"
|
||||
}
|
||||
|
||||
.van-icon-weapp-nav:before {
|
||||
content: "\F0E1"
|
||||
}
|
||||
|
||||
.van-icon-wechat:before {
|
||||
content: "\F0E2"
|
||||
}
|
||||
|
||||
.van-icon-youzan-shield:before {
|
||||
content: "\F0E3"
|
||||
}
|
||||
|
||||
:host {
|
||||
display: -webkit-inline-flex;
|
||||
display: inline-flex;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
-webkit-justify-content: center;
|
||||
justify-content: center
|
||||
}
|
||||
|
||||
.van-icon--image {
|
||||
width: 1em;
|
||||
height: 1em
|
||||
}
|
||||
|
||||
.van-icon__image {
|
||||
width: 100%;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.van-icon__info {
|
||||
z-index: 1
|
||||
}
|
||||
1
wxcomponents/vant/info/index.d.ts
vendored
1
wxcomponents/vant/info/index.d.ts
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
@@ -1,8 +0,0 @@
|
||||
import { VantComponent } from '../common/component';
|
||||
VantComponent({
|
||||
props: {
|
||||
dot: Boolean,
|
||||
info: null,
|
||||
customStyle: String
|
||||
}
|
||||
});
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<template>
|
||||
<uni-shadow-root class="vant-info-index"><view v-if="info !== null && info !== '' || dot" :class="'custom-class van-info '+(utils.bem('info', { dot }))" :style="customStyle">{{ dot ? '' : info }}</view></uni-shadow-root>
|
||||
</template>
|
||||
<wxs src="../wxs/utils.wxs" module="utils"></wxs>
|
||||
<script>
|
||||
|
||||
global['__wxRoute'] = 'vant/info/index'
|
||||
import { VantComponent } from '../common/component';
|
||||
VantComponent({
|
||||
props: {
|
||||
dot: Boolean,
|
||||
info: null,
|
||||
customStyle: String
|
||||
}
|
||||
});
|
||||
export default global['__wxComponents']['vant/info/index']
|
||||
</script>
|
||||
<style platform="mp-weixin">
|
||||
@import '../common/index.css';.van-info{position:absolute;top:0;right:0;box-sizing:border-box;white-space:nowrap;text-align:center;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%);-webkit-transform-origin:100%;transform-origin:100%;min-width:16px;min-width:var(--info-size,16px);padding:0 3px;padding:var(--info-padding,0 3px);color:#fff;color:var(--info-color,#fff);font-weight:500;font-weight:var(--info-font-weight,500);font-size:12px;font-size:var(--info-font-size,12px);font-family:PingFang SC,Helvetica Neue,Arial,sans-serif;font-family:var(--info-font-family,PingFang SC,Helvetica Neue,Arial,sans-serif);line-height:14px;line-height:calc(var(--info-size, 16px) - var(--info-border-width, 1px)*2);background-color:#ee0a24;background-color:var(--info-background-color,#ee0a24);border:1px solid #fff;border:var(--info-border-width,1px) solid var(--white,#fff);border-radius:16px;border-radius:var(--info-size,16px)}.van-info--dot{min-width:0;border-radius:100%;width:8px;width:var(--info-dot-size,8px);height:8px;height:var(--info-dot-size,8px);background-color:#ee0a24;background-color:var(--info-dot-color,#ee0a24)}
|
||||
</style>
|
||||
@@ -1,7 +0,0 @@
|
||||
<wxs src="../wxs/utils.wxs" module="utils" />
|
||||
|
||||
<view
|
||||
wx:if="{{ info !== null && info !== '' || dot }}"
|
||||
class="custom-class van-info {{ utils.bem('info', { dot }) }}"
|
||||
style="{{ customStyle }}"
|
||||
>{{ dot ? '' : info }}</view>
|
||||
@@ -1 +0,0 @@
|
||||
@import '../common/index.wxss';.van-info{position:absolute;top:0;right:0;box-sizing:border-box;white-space:nowrap;text-align:center;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%);-webkit-transform-origin:100%;transform-origin:100%;min-width:16px;min-width:var(--info-size,16px);padding:0 3px;padding:var(--info-padding,0 3px);color:#fff;color:var(--info-color,#fff);font-weight:500;font-weight:var(--info-font-weight,500);font-size:12px;font-size:var(--info-font-size,12px);font-family:PingFang SC,Helvetica Neue,Arial,sans-serif;font-family:var(--info-font-family,PingFang SC,Helvetica Neue,Arial,sans-serif);line-height:14px;line-height:calc(var(--info-size, 16px) - var(--info-border-width, 1px)*2);background-color:#ee0a24;background-color:var(--info-background-color,#ee0a24);border:1px solid #fff;border:var(--info-border-width,1px) solid var(--white,#fff);border-radius:16px;border-radius:var(--info-size,16px)}.van-info--dot{min-width:0;border-radius:100%;width:8px;width:var(--info-dot-size,8px);height:8px;height:var(--info-dot-size,8px);background-color:#ee0a24;background-color:var(--info-dot-color,#ee0a24)}
|
||||
1
wxcomponents/vant/loading/index.d.ts
vendored
1
wxcomponents/vant/loading/index.d.ts
vendored
@@ -1 +0,0 @@
|
||||
export {};
|
||||
@@ -1,32 +0,0 @@
|
||||
import { VantComponent } from '../common/component';
|
||||
import { addUnit } from '../common/utils';
|
||||
VantComponent({
|
||||
props: {
|
||||
color: String,
|
||||
vertical: Boolean,
|
||||
type: {
|
||||
type: String,
|
||||
value: 'circular'
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
observer: 'setSizeWithUnit'
|
||||
},
|
||||
textSize: {
|
||||
type: String,
|
||||
observer: 'setTextSizeWithUnit'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setSizeWithUnit(size) {
|
||||
this.setData({
|
||||
sizeWithUnit: addUnit(size)
|
||||
});
|
||||
},
|
||||
setTextSizeWithUnit(size) {
|
||||
this.set({
|
||||
textSizeWithUnit: addUnit(size)
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
<template>
|
||||
<uni-shadow-root class="vant-loading-index"><view :class="'custom-class van-loading '+(vertical ? 'van-loading--vertical' : '')">
|
||||
<view :class="'van-loading__spinner van-loading__spinner--'+(type)" :style="'color: '+(color)+'; width: '+(sizeWithUnit)+'; height: '+(sizeWithUnit)">
|
||||
<view v-for="(item,index) in ('item in 12')" :key="item.index" v-if="type === 'spinner'" class="van-loading__dot"></view>
|
||||
</view>
|
||||
<view class="van-loading__text" :style="'font-size: '+(textSizeWithUnit)+';'">
|
||||
<slot></slot>
|
||||
</view>
|
||||
</view></uni-shadow-root>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
global['__wxRoute'] = 'vant/loading/index'
|
||||
import { VantComponent } from '../common/component';
|
||||
import { addUnit } from '../common/utils';
|
||||
VantComponent({
|
||||
props: {
|
||||
color: String,
|
||||
vertical: Boolean,
|
||||
type: {
|
||||
type: String,
|
||||
value: 'circular'
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
observer: 'setSizeWithUnit'
|
||||
},
|
||||
textSize: {
|
||||
type: String,
|
||||
observer: 'setTextSizeWithUnit'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setSizeWithUnit(size) {
|
||||
this.setData({
|
||||
sizeWithUnit: addUnit(size)
|
||||
});
|
||||
},
|
||||
setTextSizeWithUnit(size) {
|
||||
this.set({
|
||||
textSizeWithUnit: addUnit(size)
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
export default global['__wxComponents']['vant/loading/index']
|
||||
</script>
|
||||
<style platform="mp-weixin">
|
||||
@import '../common/index.css';.vant-loading-index{font-size:0;line-height:1}.van-loading{display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#c8c9cc;color:var(--loading-spinner-color,#c8c9cc)}.van-loading__spinner{position:relative;box-sizing:border-box;width:30px;width:var(--loading-spinner-size,30px);max-width:100%;max-height:100%;height:30px;height:var(--loading-spinner-size,30px);-webkit-animation:van-rotate .8s linear infinite;animation:van-rotate .8s linear infinite;-webkit-animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite}.van-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.van-loading__spinner--circular{border:1px solid transparent;border-top-color:initial;border-radius:100%}.van-loading__text{margin-left:8px;margin-left:var(--padding-xs,8px);color:#969799;color:var(--loading-text-color,#969799);font-size:14px;font-size:var(--loading-text-font-size,14px);line-height:20px;line-height:var(--loading-text-line-height,20px)}.van-loading__text:empty{display:none}.van-loading--vertical{-webkit-flex-direction:column;flex-direction:column}.van-loading--vertical .van-loading__text{margin:8px 0 0;margin:var(--padding-xs,8px) 0 0}.van-loading__dot{position:absolute;top:0;left:0;width:100%;height:100%}.van-loading__dot:before{display:block;width:2px;height:25%;margin:0 auto;background-color:currentColor;border-radius:40%;content:" "}.van-loading__dot:first-of-type{-webkit-transform:rotate(30deg);transform:rotate(30deg);opacity:1}.van-loading__dot:nth-of-type(2){-webkit-transform:rotate(60deg);transform:rotate(60deg);opacity:.9375}.van-loading__dot:nth-of-type(3){-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:.875}.van-loading__dot:nth-of-type(4){-webkit-transform:rotate(120deg);transform:rotate(120deg);opacity:.8125}.van-loading__dot:nth-of-type(5){-webkit-transform:rotate(150deg);transform:rotate(150deg);opacity:.75}.van-loading__dot:nth-of-type(6){-webkit-transform:rotate(180deg);transform:rotate(180deg);opacity:.6875}.van-loading__dot:nth-of-type(7){-webkit-transform:rotate(210deg);transform:rotate(210deg);opacity:.625}.van-loading__dot:nth-of-type(8){-webkit-transform:rotate(240deg);transform:rotate(240deg);opacity:.5625}.van-loading__dot:nth-of-type(9){-webkit-transform:rotate(270deg);transform:rotate(270deg);opacity:.5}.van-loading__dot:nth-of-type(10){-webkit-transform:rotate(300deg);transform:rotate(300deg);opacity:.4375}.van-loading__dot:nth-of-type(11){-webkit-transform:rotate(330deg);transform:rotate(330deg);opacity:.375}.van-loading__dot:nth-of-type(12){-webkit-transform:rotate(1turn);transform:rotate(1turn);opacity:.3125}@-webkit-keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}
|
||||
</style>
|
||||
@@ -1,16 +0,0 @@
|
||||
<view class="custom-class van-loading {{ vertical ? 'van-loading--vertical' : '' }}">
|
||||
<view
|
||||
class="van-loading__spinner van-loading__spinner--{{ type }}"
|
||||
style="color: {{ color }}; width: {{ sizeWithUnit }}; height: {{ sizeWithUnit }}"
|
||||
>
|
||||
<view
|
||||
wx:if="{{ type === 'spinner' }}"
|
||||
wx:for="item in 12"
|
||||
wx:key="index"
|
||||
class="van-loading__dot"
|
||||
/>
|
||||
</view>
|
||||
<view class="van-loading__text" style="font-size: {{ textSizeWithUnit }};">
|
||||
<slot />
|
||||
</view>
|
||||
</view>
|
||||
@@ -1 +0,0 @@
|
||||
@import '../common/index.wxss';:host{font-size:0;line-height:1}.van-loading{display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#c8c9cc;color:var(--loading-spinner-color,#c8c9cc)}.van-loading__spinner{position:relative;box-sizing:border-box;width:30px;width:var(--loading-spinner-size,30px);max-width:100%;max-height:100%;height:30px;height:var(--loading-spinner-size,30px);-webkit-animation:van-rotate .8s linear infinite;animation:van-rotate .8s linear infinite;-webkit-animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite}.van-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.van-loading__spinner--circular{border:1px solid transparent;border-top-color:initial;border-radius:100%}.van-loading__text{margin-left:8px;margin-left:var(--padding-xs,8px);color:#969799;color:var(--loading-text-color,#969799);font-size:14px;font-size:var(--loading-text-font-size,14px);line-height:20px;line-height:var(--loading-text-line-height,20px)}.van-loading__text:empty{display:none}.van-loading--vertical{-webkit-flex-direction:column;flex-direction:column}.van-loading--vertical .van-loading__text{margin:8px 0 0;margin:var(--padding-xs,8px) 0 0}.van-loading__dot{position:absolute;top:0;left:0;width:100%;height:100%}.van-loading__dot:before{display:block;width:2px;height:25%;margin:0 auto;background-color:currentColor;border-radius:40%;content:" "}.van-loading__dot:first-of-type{-webkit-transform:rotate(30deg);transform:rotate(30deg);opacity:1}.van-loading__dot:nth-of-type(2){-webkit-transform:rotate(60deg);transform:rotate(60deg);opacity:.9375}.van-loading__dot:nth-of-type(3){-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:.875}.van-loading__dot:nth-of-type(4){-webkit-transform:rotate(120deg);transform:rotate(120deg);opacity:.8125}.van-loading__dot:nth-of-type(5){-webkit-transform:rotate(150deg);transform:rotate(150deg);opacity:.75}.van-loading__dot:nth-of-type(6){-webkit-transform:rotate(180deg);transform:rotate(180deg);opacity:.6875}.van-loading__dot:nth-of-type(7){-webkit-transform:rotate(210deg);transform:rotate(210deg);opacity:.625}.van-loading__dot:nth-of-type(8){-webkit-transform:rotate(240deg);transform:rotate(240deg);opacity:.5625}.van-loading__dot:nth-of-type(9){-webkit-transform:rotate(270deg);transform:rotate(270deg);opacity:.5}.van-loading__dot:nth-of-type(10){-webkit-transform:rotate(300deg);transform:rotate(300deg);opacity:.4375}.van-loading__dot:nth-of-type(11){-webkit-transform:rotate(330deg);transform:rotate(330deg);opacity:.375}.van-loading__dot:nth-of-type(12){-webkit-transform:rotate(1turn);transform:rotate(1turn);opacity:.3125}@-webkit-keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}
|
||||
1
wxcomponents/vant/mixins/basic.d.ts
vendored
1
wxcomponents/vant/mixins/basic.d.ts
vendored
@@ -1 +0,0 @@
|
||||
export declare const basic: string;
|
||||
@@ -1,22 +0,0 @@
|
||||
export const basic = Behavior({
|
||||
methods: {
|
||||
$emit(...args) {
|
||||
this.triggerEvent(...args);
|
||||
},
|
||||
getRect(selector, all) {
|
||||
return new Promise(resolve => {
|
||||
wx.createSelectorQuery()
|
||||
.in(this)[all ? 'selectAll' : 'select'](selector)
|
||||
.boundingClientRect(rect => {
|
||||
if (all && Array.isArray(rect) && rect.length) {
|
||||
resolve(rect);
|
||||
}
|
||||
if (!all && rect) {
|
||||
resolve(rect);
|
||||
}
|
||||
})
|
||||
.exec();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
1
wxcomponents/vant/mixins/button.d.ts
vendored
1
wxcomponents/vant/mixins/button.d.ts
vendored
@@ -1 +0,0 @@
|
||||
export declare const button: string;
|
||||
@@ -1,18 +0,0 @@
|
||||
export const button = Behavior({
|
||||
externalClasses: ['hover-class'],
|
||||
properties: {
|
||||
id: String,
|
||||
lang: {
|
||||
type: String,
|
||||
value: 'en'
|
||||
},
|
||||
businessId: Number,
|
||||
sessionFrom: String,
|
||||
sendMessageTitle: String,
|
||||
sendMessagePath: String,
|
||||
sendMessageImg: String,
|
||||
showMessageCard: Boolean,
|
||||
appParameter: String,
|
||||
ariaLabel: String
|
||||
}
|
||||
});
|
||||
1
wxcomponents/vant/mixins/link.d.ts
vendored
1
wxcomponents/vant/mixins/link.d.ts
vendored
@@ -1 +0,0 @@
|
||||
export declare const link: string;
|
||||
@@ -1,17 +0,0 @@
|
||||
export const link = Behavior({
|
||||
properties: {
|
||||
url: String,
|
||||
linkType: {
|
||||
type: String,
|
||||
value: 'navigateTo'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jumpLink(urlKey = 'url') {
|
||||
const url = this.data[urlKey];
|
||||
if (url) {
|
||||
wx[this.data.linkType]({ url });
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1 +0,0 @@
|
||||
export declare const behavior: string;
|
||||
@@ -1,14 +0,0 @@
|
||||
export const behavior = Behavior({
|
||||
methods: {
|
||||
set(data, callback) {
|
||||
return new Promise(resolve => {
|
||||
this.setData(data, () => {
|
||||
if (callback && typeof callback === 'function') {
|
||||
callback.call(this);
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
1
wxcomponents/vant/mixins/observer/index.d.ts
vendored
1
wxcomponents/vant/mixins/observer/index.d.ts
vendored
@@ -1 +0,0 @@
|
||||
export declare function observe(vantOptions: any, options: any): void;
|
||||
@@ -1,19 +0,0 @@
|
||||
import { behavior } from './behavior';
|
||||
export function observe(vantOptions, options) {
|
||||
const { watch } = vantOptions;
|
||||
options.behaviors.push(behavior);
|
||||
if (watch) {
|
||||
const props = options.properties || {};
|
||||
Object.keys(watch).forEach(key => {
|
||||
if (key in props) {
|
||||
let prop = props[key];
|
||||
if (prop === null || !('type' in prop)) {
|
||||
prop = { type: prop };
|
||||
}
|
||||
prop.observer = watch[key];
|
||||
props[key] = prop;
|
||||
}
|
||||
});
|
||||
options.properties = props;
|
||||
}
|
||||
}
|
||||
1
wxcomponents/vant/mixins/open-type.d.ts
vendored
1
wxcomponents/vant/mixins/open-type.d.ts
vendored
@@ -1 +0,0 @@
|
||||
export declare const openType: string;
|
||||
@@ -1,25 +0,0 @@
|
||||
export const openType = Behavior({
|
||||
properties: {
|
||||
openType: String
|
||||
},
|
||||
methods: {
|
||||
bindGetUserInfo(event) {
|
||||
this.$emit('getuserinfo', event.detail);
|
||||
},
|
||||
bindContact(event) {
|
||||
this.$emit('contact', event.detail);
|
||||
},
|
||||
bindGetPhoneNumber(event) {
|
||||
this.$emit('getphonenumber', event.detail);
|
||||
},
|
||||
bindError(event) {
|
||||
this.$emit('error', event.detail);
|
||||
},
|
||||
bindLaunchApp(event) {
|
||||
this.$emit('launchapp', event.detail);
|
||||
},
|
||||
bindOpenSetting(event) {
|
||||
this.$emit('opensetting', event.detail);
|
||||
},
|
||||
}
|
||||
});
|
||||
1
wxcomponents/vant/mixins/touch.d.ts
vendored
1
wxcomponents/vant/mixins/touch.d.ts
vendored
@@ -1 +0,0 @@
|
||||
export declare const touch: string;
|
||||
@@ -1,35 +0,0 @@
|
||||
const MIN_DISTANCE = 10;
|
||||
function getDirection(x, y) {
|
||||
if (x > y && x > MIN_DISTANCE) {
|
||||
return 'horizontal';
|
||||
}
|
||||
if (y > x && y > MIN_DISTANCE) {
|
||||
return 'vertical';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
export const touch = Behavior({
|
||||
methods: {
|
||||
resetTouchStatus() {
|
||||
this.direction = '';
|
||||
this.deltaX = 0;
|
||||
this.deltaY = 0;
|
||||
this.offsetX = 0;
|
||||
this.offsetY = 0;
|
||||
},
|
||||
touchStart(event) {
|
||||
this.resetTouchStatus();
|
||||
const touch = event.touches[0];
|
||||
this.startX = touch.clientX;
|
||||
this.startY = touch.clientY;
|
||||
},
|
||||
touchMove(event) {
|
||||
const touch = event.touches[0];
|
||||
this.deltaX = touch.clientX - this.startX;
|
||||
this.deltaY = touch.clientY - this.startY;
|
||||
this.offsetX = Math.abs(this.deltaX);
|
||||
this.offsetY = Math.abs(this.deltaY);
|
||||
this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
|
||||
}
|
||||
}
|
||||
});
|
||||
1
wxcomponents/vant/mixins/transition.d.ts
vendored
1
wxcomponents/vant/mixins/transition.d.ts
vendored
@@ -1 +0,0 @@
|
||||
export declare const transition: (showDefaultValue: boolean) => any;
|
||||
@@ -1,120 +0,0 @@
|
||||
import { isObj } from '../common/utils';
|
||||
const getClassNames = (name) => ({
|
||||
enter: `van-${name}-enter van-${name}-enter-active enter-class enter-active-class`,
|
||||
'enter-to': `van-${name}-enter-to van-${name}-enter-active enter-to-class enter-active-class`,
|
||||
leave: `van-${name}-leave van-${name}-leave-active leave-class leave-active-class`,
|
||||
'leave-to': `van-${name}-leave-to van-${name}-leave-active leave-to-class leave-active-class`
|
||||
});
|
||||
const nextTick = () => new Promise(resolve => setTimeout(resolve, 1000 / 30));
|
||||
export const transition = function (showDefaultValue) {
|
||||
return Behavior({
|
||||
properties: {
|
||||
customStyle: String,
|
||||
// @ts-ignore
|
||||
show: {
|
||||
type: Boolean,
|
||||
value: showDefaultValue,
|
||||
observer: 'observeShow'
|
||||
},
|
||||
// @ts-ignore
|
||||
duration: {
|
||||
type: null,
|
||||
value: 300,
|
||||
observer: 'observeDuration'
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
value: 'fade'
|
||||
}
|
||||
},
|
||||
data: {
|
||||
type: '',
|
||||
inited: false,
|
||||
display: false
|
||||
},
|
||||
attached() {
|
||||
if (this.data.show) {
|
||||
this.enter();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
observeShow(value) {
|
||||
value ? this.enter() : this.leave();
|
||||
},
|
||||
enter() {
|
||||
const { duration, name } = this.data;
|
||||
const classNames = getClassNames(name);
|
||||
const currentDuration = isObj(duration) ? duration.enter : duration;
|
||||
this.status = 'enter';
|
||||
this.$emit('before-enter');
|
||||
Promise.resolve()
|
||||
.then(nextTick)
|
||||
.then(() => {
|
||||
this.checkStatus('enter');
|
||||
this.$emit('enter');
|
||||
this.setData({
|
||||
inited: true,
|
||||
display: true,
|
||||
classes: classNames.enter,
|
||||
currentDuration
|
||||
});
|
||||
})
|
||||
.then(nextTick)
|
||||
.then(() => {
|
||||
this.checkStatus('enter');
|
||||
this.transitionEnded = false;
|
||||
this.setData({
|
||||
classes: classNames['enter-to']
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
},
|
||||
leave() {
|
||||
if (!this.data.display) {
|
||||
return;
|
||||
}
|
||||
const { duration, name } = this.data;
|
||||
const classNames = getClassNames(name);
|
||||
const currentDuration = isObj(duration) ? duration.leave : duration;
|
||||
this.status = 'leave';
|
||||
this.$emit('before-leave');
|
||||
Promise.resolve()
|
||||
.then(nextTick)
|
||||
.then(() => {
|
||||
this.checkStatus('leave');
|
||||
this.$emit('leave');
|
||||
this.setData({
|
||||
classes: classNames.leave,
|
||||
currentDuration
|
||||
});
|
||||
})
|
||||
.then(nextTick)
|
||||
.then(() => {
|
||||
this.checkStatus('leave');
|
||||
this.transitionEnded = false;
|
||||
setTimeout(() => this.onTransitionEnd(), currentDuration);
|
||||
this.setData({
|
||||
classes: classNames['leave-to']
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
},
|
||||
checkStatus(status) {
|
||||
if (status !== this.status) {
|
||||
throw new Error(`incongruent status: ${status}`);
|
||||
}
|
||||
},
|
||||
onTransitionEnd() {
|
||||
if (this.transitionEnded) {
|
||||
return;
|
||||
}
|
||||
this.transitionEnded = true;
|
||||
this.$emit(`after-${this.status}`);
|
||||
const { show, display } = this.data;
|
||||
if (!show && display) {
|
||||
this.setData({ display: false });
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
function isArray(array) {
|
||||
return array && (array.constructor === 'Array' || (typeof Array !== 'undefined' && Array.isArray(array)));
|
||||
}
|
||||
|
||||
module.exports.isArray = isArray;
|
||||
@@ -1,38 +0,0 @@
|
||||
var array = require('./array.wxs');
|
||||
var object = require('./object.wxs');
|
||||
var PREFIX = 'van-';
|
||||
|
||||
function join(name, mods) {
|
||||
name = PREFIX + name;
|
||||
mods = mods.map(function(mod) {
|
||||
return name + '--' + mod;
|
||||
});
|
||||
mods.unshift(name);
|
||||
return mods.join(' ');
|
||||
}
|
||||
|
||||
function traversing(mods, conf) {
|
||||
if (!conf) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof conf === 'string' || typeof conf === 'number') {
|
||||
mods.push(conf);
|
||||
} else if (array.isArray(conf)) {
|
||||
conf.forEach(function(item) {
|
||||
traversing(mods, item);
|
||||
});
|
||||
} else if (typeof conf === 'object') {
|
||||
object.keys(conf).forEach(function(key) {
|
||||
conf[key] && mods.push(key);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function bem(name, conf) {
|
||||
var mods = [];
|
||||
traversing(mods, conf);
|
||||
return join(name, mods);
|
||||
}
|
||||
|
||||
module.exports.bem = bem;
|
||||
@@ -1,54 +0,0 @@
|
||||
/**
|
||||
* Simple memoize
|
||||
* wxs doesn't support fn.apply, so this memoize only support up to 2 args
|
||||
*/
|
||||
|
||||
function isPrimitive(value) {
|
||||
var type = typeof value;
|
||||
return (
|
||||
type === 'boolean' ||
|
||||
type === 'number' ||
|
||||
type === 'string' ||
|
||||
type === 'undefined' ||
|
||||
value === null
|
||||
);
|
||||
}
|
||||
|
||||
// mock simple fn.call in wxs
|
||||
function call(fn, args) {
|
||||
if (args.length === 2) {
|
||||
return fn(args[0], args[1]);
|
||||
}
|
||||
|
||||
if (args.length === 1) {
|
||||
return fn(args[0]);
|
||||
}
|
||||
|
||||
return fn();
|
||||
}
|
||||
|
||||
function serializer(args) {
|
||||
if (args.length === 1 && isPrimitive(args[0])) {
|
||||
return args[0];
|
||||
}
|
||||
var obj = {};
|
||||
for (var i = 0; i < args.length; i++) {
|
||||
obj['key' + i] = args[i];
|
||||
}
|
||||
return JSON.stringify(obj);
|
||||
}
|
||||
|
||||
function memoize(fn) {
|
||||
var cache = {};
|
||||
|
||||
return function() {
|
||||
var key = serializer(arguments);
|
||||
if (cache[key] === undefined) {
|
||||
cache[key] = call(fn, arguments);
|
||||
}
|
||||
|
||||
return cache[key];
|
||||
};
|
||||
}
|
||||
|
||||
module.exports.memoize = memoize;
|
||||
@@ -1,13 +0,0 @@
|
||||
/* eslint-disable */
|
||||
var REGEXP = getRegExp('{|}|"', 'g');
|
||||
|
||||
function keys(obj) {
|
||||
return JSON.stringify(obj)
|
||||
.replace(REGEXP, '')
|
||||
.split(',')
|
||||
.map(function(item) {
|
||||
return item.split(':')[0];
|
||||
});
|
||||
}
|
||||
|
||||
module.exports.keys = keys;
|
||||
@@ -1,7 +0,0 @@
|
||||
var bem = require('./bem.wxs').bem;
|
||||
var memoize = require('./memoize.wxs').memoize;
|
||||
|
||||
module.exports = {
|
||||
bem: memoize(bem),
|
||||
memoize: memoize
|
||||
};
|
||||
Reference in New Issue
Block a user