@10yun/cv-mobile-ui 0.5.30 → 0.5.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -1
- package/ui-cv/components/cv-btn-base/cv-btn-base.vue +1 -1
- package/uview-plus/README.md +1 -1
- package/uview-plus/components/u-action-sheet/u-action-sheet.vue +8 -8
- package/uview-plus/components/u-album/u-album.vue +1 -1
- package/uview-plus/components/u-alert/u-alert.vue +5 -5
- package/uview-plus/components/u-app-update/u-app-update.vue +2 -2
- package/uview-plus/components/u-avatar/u-avatar.vue +2 -2
- package/uview-plus/components/u-avatar-group/u-avatar-group.vue +79 -3
- package/uview-plus/components/u-back-top/u-back-top.vue +4 -4
- package/uview-plus/components/u-badge/u-badge.vue +1 -1
- package/uview-plus/components/u-button/u-button.vue +8 -8
- package/uview-plus/components/u-button-wu/u-button-wu.vue +9 -9
- package/uview-plus/components/u-calendar/u-calendar.vue +5 -6
- package/uview-plus/components/u-car-keyboard/u-car-keyboard.vue +2 -2
- package/uview-plus/components/u-card/u-card.vue +139 -3
- package/uview-plus/components/u-cell/u-cell.vue +4 -4
- package/uview-plus/components/u-cell-group/u-cell-group.vue +2 -2
- package/uview-plus/components/u-checkbox/u-checkbox.vue +4 -4
- package/uview-plus/components/u-checkbox-group/u-checkbox-group.vue +1 -1
- package/uview-plus/components/u-code/u-code.vue +1 -1
- package/uview-plus/components/u-code-input/u-code-input.vue +1 -1
- package/uview-plus/components/u-col/u-col.vue +1 -1
- package/uview-plus/components/u-collapse/u-collapse.vue +2 -2
- package/uview-plus/components/u-collapse-item/u-collapse-item.vue +218 -3
- package/uview-plus/components/u-column-notice/u-column-notice.vue +3 -3
- package/uview-plus/components/u-count-down/u-count-down.vue +1 -1
- package/uview-plus/components/u-count-to/u-count-to.vue +1 -1
- package/uview-plus/components/u-datetime-picker/u-datetime-picker.vue +3 -3
- package/uview-plus/components/u-divider/u-divider.vue +3 -3
- package/uview-plus/components/u-dropdown/u-dropdown.vue +3 -3
- package/uview-plus/components/u-dropdown-item/u-dropdown-item.vue +1 -1
- package/uview-plus/components/u-empty/u-empty.vue +3 -3
- package/uview-plus/components/u-form-item/u-form-item.vue +4 -4
- package/uview-plus/components/u-gap/u-gap.vue +1 -1
- package/uview-plus/components/u-grid/u-grid.vue +1 -1
- package/uview-plus/components/u-grid-item/u-grid-item.vue +1 -1
- package/uview-plus/components/u-icon/u-icon.vue +1 -1
- package/uview-plus/components/u-icon/u-icon2.vue +1 -1
- package/uview-plus/components/u-image/u-image.vue +5 -5
- package/uview-plus/components/u-image-wu/u-image-wu.vue +5 -5
- package/uview-plus/components/u-index-anchor/u-index-anchor.vue +1 -1
- package/uview-plus/components/u-index-list/u-index-list.vue +2 -2
- package/uview-plus/components/u-input/u-input.vue +4 -4
- package/uview-plus/components/u-keyboard/u-keyboard.vue +6 -6
- package/uview-plus/components/u-lazy-load/u-lazy-load.vue +257 -3
- package/uview-plus/components/u-line/u-line.vue +1 -1
- package/uview-plus/components/u-line-progress/u-line-progress.vue +1 -1
- package/uview-plus/components/u-link/u-link.vue +1 -1
- package/uview-plus/components/u-list/u-list.vue +1 -1
- package/uview-plus/components/u-list-item/u-list-item.vue +1 -1
- package/uview-plus/components/u-loading-icon/u-loading-icon.vue +191 -3
- package/uview-plus/components/u-loading-page/u-loading-page.vue +4 -4
- package/uview-plus/components/u-loadmore/u-loadmore.vue +4 -4
- package/uview-plus/components/u-mask/u-mask.vue +120 -113
- package/uview-plus/components/u-message-input/u-message-input.vue +1 -1
- package/uview-plus/components/u-modal/u-modal.vue +6 -6
- package/uview-plus/components/u-navbar/u-navbar.vue +4 -4
- package/uview-plus/components/u-navbar-mini/u-navbar-mini.vue +2 -2
- package/uview-plus/components/u-navbar-wu/u-navbar-wu.vue +4 -4
- package/uview-plus/components/u-no-network/u-no-network.vue +5 -5
- package/uview-plus/components/u-notice-bar/u-notice-bar.vue +5 -5
- package/uview-plus/components/u-notify/u-notify.vue +6 -6
- package/uview-plus/components/u-number-box/u-number-box.vue +9 -3
- package/uview-plus/components/u-number-keyboard/u-number-keyboard.vue +1 -1
- package/uview-plus/components/u-overlay/u-overlay.vue +3 -3
- package/uview-plus/components/u-picker/u-picker.vue +5 -5
- package/uview-plus/components/u-popup/u-popup.vue +8 -8
- package/uview-plus/components/u-popup-wu/u-popup-wu.vue +7 -7
- package/uview-plus/components/u-radio/u-radio.vue +4 -4
- package/uview-plus/components/u-radio-group/u-radio-group.vue +1 -1
- package/uview-plus/components/u-rate/u-rate.vue +5 -5
- package/uview-plus/components/u-read-more/u-read-more.vue +126 -3
- package/uview-plus/components/u-row/u-row.vue +1 -1
- package/uview-plus/components/u-row-notice/u-row-notice.vue +3 -3
- package/uview-plus/components/u-safe-bottom/u-safe-bottom.vue +48 -3
- package/uview-plus/components/u-search/u-search.vue +4 -4
- package/uview-plus/components/u-select/u-select.vue +175 -3
- package/uview-plus/components/u-skeleton/u-skeleton.vue +3 -3
- package/uview-plus/components/u-sku-wu/u-sku-wu.vue +4 -4
- package/uview-plus/components/u-status-bar/u-status-bar.vue +1 -1
- package/uview-plus/components/u-steps/u-steps.vue +1 -1
- package/uview-plus/components/u-steps-item/u-steps-item.vue +7 -7
- package/uview-plus/components/u-sticky/u-sticky.vue +1 -1
- package/uview-plus/components/u-subsection/u-subsection.vue +1 -1
- package/uview-plus/components/u-swipe-action/u-swipe-action.vue +1 -1
- package/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue +3 -3
- package/uview-plus/components/u-swiper/u-swiper.vue +1 -1
- package/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue +1 -1
- package/uview-plus/components/u-switch/u-switch.vue +2 -2
- package/uview-plus/components/u-tabbar/u-tabbar.vue +2 -2
- package/uview-plus/components/u-tabbar-item/u-tabbar-item.vue +9 -4
- package/uview-plus/components/u-table/u-table.vue +1 -1
- package/uview-plus/components/u-tabs/u-tabs.vue +3 -3
- package/uview-plus/components/u-tag/u-tag.vue +5 -5
- package/uview-plus/components/u-text/u-text.vue +159 -3
- package/uview-plus/components/u-toast/u-toast.vue +8 -8
- package/uview-plus/components/u-tooltip/u-tooltip.vue +6 -6
- package/uview-plus/components/u-upload/u-upload.vue +10 -10
- package/uview-plus/components/u-waterfall/u-waterfall.vue +221 -3
- package/uview-plus/index.js +4 -2
- package/uview-plus/libs/ctocode/index.js +120 -0
- package/uview-plus/libs/function/index-wu.js +1 -34
- package/uview-plus/package.json +3 -3
- package/uview-plus/readme-wu.md +1 -1
- package/uview-plus/libs/function/cc.js +0 -66
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@10yun/cv-mobile-ui",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.31",
|
|
4
4
|
"description": "十云cvjs移动端ui,适用uniapp",
|
|
5
5
|
"author": "10yun",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
"url": "https://gitee.com/cvjs/cv-mobile-ui"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"clipboard": "^2.0.11",
|
|
18
|
+
"dayjs": "^1.11.13"
|
|
19
|
+
},
|
|
16
20
|
"browserslist": [
|
|
17
21
|
"Android >= 7",
|
|
18
22
|
"ios >= 9"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<button class="cv-button-wrap" :type="type" :size="size" @click="parentClick" :disabled="loadingStatus">
|
|
3
3
|
<view class="cv-button-box">
|
|
4
4
|
<view :class="loadingStatus ? 'cv-button-rotateloop' : ''">
|
|
5
|
-
<
|
|
5
|
+
<up-loading-icon v-if="loadingStatus" size="20"></up-loading-icon>
|
|
6
6
|
</view>
|
|
7
7
|
<slot>{{ text }}</slot>
|
|
8
8
|
</view>
|
package/uview-plus/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<up-popup :show="show" mode="bottom" @close="closeHandler" :safeAreaInsetBottom="safeAreaInsetBottom" :round="round">
|
|
3
3
|
<view class="u-action-sheet">
|
|
4
4
|
<view class="u-action-sheet__header" v-if="title">
|
|
5
5
|
<text class="u-action-sheet__header__title u-line-1">{{ title }}</text>
|
|
6
6
|
<view class="u-action-sheet__header__icon-wrap" @tap.stop="cancel">
|
|
7
|
-
<
|
|
7
|
+
<up-icon name="close" size="17" color="#c8c9cc" bold></up-icon>
|
|
8
8
|
</view>
|
|
9
9
|
</view>
|
|
10
10
|
<text
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
{{ description }}
|
|
20
20
|
</text>
|
|
21
21
|
<slot>
|
|
22
|
-
<
|
|
22
|
+
<up-line v-if="description"></up-line>
|
|
23
23
|
<scroll-view scroll-y class="u-action-sheet__item-wrap" :style="{ maxHeight: wrapMaxHeight }">
|
|
24
24
|
<view :key="index" v-for="(item, index) in actions">
|
|
25
25
|
<!-- #ifdef MP -->
|
|
@@ -53,16 +53,16 @@
|
|
|
53
53
|
<text class="u-action-sheet__item-wrap__item__name" :style="[itemStyle(index)]">{{ item.name }}</text>
|
|
54
54
|
<text v-if="item.subname" class="u-action-sheet__item-wrap__item__subname">{{ item.subname }}</text>
|
|
55
55
|
</template>
|
|
56
|
-
<
|
|
56
|
+
<up-loading-icon v-else custom-class="van-action-sheet__loading" size="18" mode="circle" />
|
|
57
57
|
</view>
|
|
58
58
|
<!-- #ifdef MP -->
|
|
59
59
|
</button>
|
|
60
60
|
<!-- #endif -->
|
|
61
|
-
<
|
|
61
|
+
<up-line v-if="index !== actions.length - 1"></up-line>
|
|
62
62
|
</view>
|
|
63
63
|
</scroll-view>
|
|
64
64
|
</slot>
|
|
65
|
-
<
|
|
65
|
+
<up-gap bgColor="#eaeaec" height="6" v-if="cancelText"></up-gap>
|
|
66
66
|
<view
|
|
67
67
|
class="u-action-sheet__item-wrap__item u-action-sheet__cancel"
|
|
68
68
|
hover-class="u-action-sheet--hover"
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
<text @touchmove.stop.prevent :hover-stay-time="150" class="u-action-sheet__cancel-text">{{ cancelText }}</text>
|
|
73
73
|
</view>
|
|
74
74
|
</view>
|
|
75
|
-
</
|
|
75
|
+
</up-popup>
|
|
76
76
|
</template>
|
|
77
77
|
<script>
|
|
78
78
|
import { openType } from '../../libs/mixin/openType';
|
|
@@ -112,7 +112,7 @@ import { addUnit } from '../../libs/function/index';
|
|
|
112
112
|
* @event {Function} error 当使用开放能力时,发生错误的回调,openType="error"时有效
|
|
113
113
|
* @event {Function} launchapp 打开 APP 成功的回调,openType="launchApp"时有效
|
|
114
114
|
* @event {Function} opensetting 在打开授权设置页后回调,openType="openSetting"时有效
|
|
115
|
-
* @example <
|
|
115
|
+
* @example <up-action-sheet :actions="list" :title="title" :show="show"></up-action-sheet>
|
|
116
116
|
*/
|
|
117
117
|
export default {
|
|
118
118
|
name: 'u-action-sheet',
|
|
@@ -81,7 +81,7 @@ const dom = uni.requireNativePlugin('dom');
|
|
|
81
81
|
* @property {Boolean} autoWrap 自适应换行模式,不受rowCount限制,图片会自动换行 (默认 false )
|
|
82
82
|
* @property {String} unit 图片单位 (默认 px )
|
|
83
83
|
* @event {Function} albumWidth 某些特殊的情况下,需要让文字与相册的宽度相等,这里事件的形式对外发送 (回调参数 width )
|
|
84
|
-
* @example <
|
|
84
|
+
* @example <up-album :urls="urls2" @albumWidth="width => albumWidth = width" multipleSize="68" ></up-album>
|
|
85
85
|
*/
|
|
86
86
|
export default {
|
|
87
87
|
name: 'u-album',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<up-transition mode="fade" :show="show">
|
|
3
3
|
<view class="u-alert" :class="[`u-alert--${type}--${effect}`]" @tap.stop="clickHandler" :style="[addStyle(customStyle)]">
|
|
4
4
|
<view class="u-alert__icon" v-if="showIcon">
|
|
5
|
-
<
|
|
5
|
+
<up-icon :name="iconName" size="18" :color="iconColor"></up-icon>
|
|
6
6
|
</view>
|
|
7
7
|
<view
|
|
8
8
|
class="u-alert__content"
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
</text>
|
|
41
41
|
</view>
|
|
42
42
|
<view class="u-alert__close" v-if="closable" @tap.stop="closeHandler">
|
|
43
|
-
<
|
|
43
|
+
<up-icon name="close" :color="iconColor" size="15"></up-icon>
|
|
44
44
|
</view>
|
|
45
45
|
</view>
|
|
46
|
-
</
|
|
46
|
+
</up-transition>
|
|
47
47
|
</template>
|
|
48
48
|
<script>
|
|
49
49
|
import { props } from './props';
|
|
@@ -66,7 +66,7 @@ import { addUnit, addStyle } from '../../libs/function/index';
|
|
|
66
66
|
* @property {Object} customStyle 定义需要用到的外部样式
|
|
67
67
|
* @event {Function} click 点击组件时触发
|
|
68
68
|
* @event {Function} close 点击关闭按钮时触发
|
|
69
|
-
* @example <
|
|
69
|
+
* @example <up-alert :title="title" type = "warning" :closable="closable" :description = "description"></up-alert>
|
|
70
70
|
*/
|
|
71
71
|
export default {
|
|
72
72
|
name: 'u-alert',
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
<uni-popup ref="popup" type="center" :isMaskClick="false" @touchmove.stop.prevent>
|
|
4
4
|
<view class="content_popup" :style="{ backgroundColor: bgColor }">
|
|
5
5
|
<!-- 关闭app -->
|
|
6
|
-
<
|
|
6
|
+
<up-icon
|
|
7
7
|
v-if="!isForceUpdata"
|
|
8
8
|
class="close"
|
|
9
9
|
name="close"
|
|
10
10
|
:color="closeIconColor"
|
|
11
11
|
:size="closeIconSize"
|
|
12
12
|
@click="closeUpdate"
|
|
13
|
-
></
|
|
13
|
+
></up-icon>
|
|
14
14
|
<!-- 版本提示 -->
|
|
15
15
|
<view class="version" :style="{ color: versionColor }">v{{ version }}</view>
|
|
16
16
|
<!-- 背景 -->
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<!-- #ifndef MP-WEIXIN && MP-QQ && MP-BAIDU -->
|
|
30
30
|
<template v-if="mpAvatar && allowMp"></template>
|
|
31
31
|
<!-- #endif -->
|
|
32
|
-
<
|
|
32
|
+
<up-icon v-else-if="icon" :name="icon" :size="fontSize" :color="color"></up-icon>
|
|
33
33
|
<up-text
|
|
34
34
|
v-else-if="text"
|
|
35
35
|
:text="text"
|
|
@@ -84,7 +84,7 @@ const base64Avatar =
|
|
|
84
84
|
* @property {Object} customStyle 定义需要用到的外部样式
|
|
85
85
|
*
|
|
86
86
|
* @event {Function} click 点击组件时触发 index: 用户传递的标识符
|
|
87
|
-
* @example <
|
|
87
|
+
* @example <up-avatar :src="src" mode="square"></up-avatar>
|
|
88
88
|
*/
|
|
89
89
|
export default {
|
|
90
90
|
name: 'u-avatar',
|
|
@@ -1,3 +1,79 @@
|
|
|
1
|
-
<template>
|
|
2
1
|
<view class="u-avatar-group">
|
|
3
2
|
<view
|
|
4
3
|
class="u-avatar-group__item"
|
|
5
4
|
v-for="(item, index) in showUrl"
|
|
6
5
|
:key="index"
|
|
7
6
|
:style="{
|
|
8
7
|
marginLeft: index === 0 ? 0 : addUnit(-size * gap)
|
|
9
8
|
}"
|
|
10
9
|
>
|
|
11
10
|
<u-avatar
|
|
12
11
|
:size="size"
|
|
13
12
|
:shape="shape"
|
|
14
13
|
:mode="mode"
|
|
15
14
|
:src="testObject(item) ? (keyName && item[keyName]) || item.url : item"
|
|
16
15
|
></u-avatar>
|
|
17
16
|
<view
|
|
18
17
|
class="u-avatar-group__item__show-more"
|
|
19
18
|
v-if="showMore && index === showUrl.length - 1 && (urls.length > maxCount || extraValue > 0)"
|
|
20
19
|
@tap="clickHandler"
|
|
21
20
|
>
|
|
22
21
|
<up-text
|
|
23
22
|
color="#ffffff"
|
|
24
23
|
:size="size * 0.4"
|
|
25
24
|
:text="`+${extraValue || urls.length - showUrl.length}`"
|
|
26
25
|
align="center"
|
|
27
26
|
customStyle="justify-content: center"
|
|
28
27
|
></up-text>
|
|
29
28
|
</view>
|
|
30
29
|
</view>
|
|
31
30
|
</view>
|
|
32
31
|
* AvatarGroup 头像组
|
|
33
32
|
* @description 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。
|
|
34
33
|
* @tutorial https://ijry.github.io/uview-plus/components/avatar.html
|
|
35
34
|
*
|
|
36
35
|
* @property {Array} urls 头像图片组 (默认 [] )
|
|
37
36
|
* @property {String | Number} maxCount 最多展示的头像数量 ( 默认 5 )
|
|
38
37
|
* @property {String} shape 头像形状( 'circle' (默认) | 'square' )
|
|
39
38
|
* @property {String} mode 图片裁剪模式(默认 'scaleToFill' )
|
|
40
39
|
* @property {Boolean} showMore 超出maxCount时是否显示查看更多的提示 (默认 true )
|
|
41
40
|
* @property {String | Number} size 头像大小 (默认 40 )
|
|
42
41
|
* @property {String} keyName 指定从数组的对象元素中读取哪个属性作为图片地址
|
|
43
42
|
* @property {String | Number} gap 头像之间的遮挡比例(0.4代表遮挡40%) (默认 0.5 )
|
|
44
43
|
* @property {String | Number} extraValue 需额外显示的值
|
|
45
44
|
* @event {Function} showMore 头像组更多点击
|
|
46
45
|
* @example <u-avatar-group:urls="urls" size="35" gap="0.4" ></u-avatar-group:urls=>
|
|
47
46
|
*/
|
|
48
47
|
name: 'u-avatar-group',
|
|
49
48
|
mixins: [mpMixin, mixin, props],
|
|
50
49
|
data() {
|
|
51
50
|
return {};
|
|
52
51
|
},
|
|
53
52
|
computed: {
|
|
54
53
|
showUrl() {
|
|
55
54
|
return this.urls.slice(0, this.maxCount);
|
|
56
55
|
}
|
|
57
56
|
},
|
|
58
57
|
emits: ['showMore'],
|
|
59
58
|
methods: {
|
|
60
59
|
addUnit,
|
|
61
60
|
testObject: test.object,
|
|
62
61
|
clickHandler() {
|
|
63
62
|
this.$emit('showMore');
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
<template>
|
|
66
|
+
<view class="u-avatar-group">
|
|
67
|
+
<view
|
|
68
|
+
class="u-avatar-group__item"
|
|
69
|
+
v-for="(item, index) in showUrl"
|
|
70
|
+
:key="index"
|
|
71
|
+
:style="{
|
|
72
|
+
marginLeft: index === 0 ? 0 : addUnit(-size * gap)
|
|
73
|
+
}"
|
|
74
|
+
>
|
|
75
|
+
<up-avatar
|
|
76
|
+
:size="size"
|
|
77
|
+
:shape="shape"
|
|
78
|
+
:mode="mode"
|
|
79
|
+
:src="testObject(item) ? (keyName && item[keyName]) || item.url : item"
|
|
80
|
+
></up-avatar>
|
|
81
|
+
<view
|
|
82
|
+
class="u-avatar-group__item__show-more"
|
|
83
|
+
v-if="showMore && index === showUrl.length - 1 && (urls.length > maxCount || extraValue > 0)"
|
|
84
|
+
@tap="clickHandler"
|
|
85
|
+
>
|
|
86
|
+
<up-text
|
|
87
|
+
color="#ffffff"
|
|
88
|
+
:size="size * 0.4"
|
|
89
|
+
:text="`+${extraValue || urls.length - showUrl.length}`"
|
|
90
|
+
align="center"
|
|
91
|
+
customStyle="justify-content: center"
|
|
92
|
+
></up-text>
|
|
93
|
+
</view>
|
|
94
|
+
</view>
|
|
95
|
+
</view>
|
|
96
|
+
</template>
|
|
97
|
+
<script>
|
|
98
|
+
import { props } from './props';
|
|
99
|
+
import { mpMixin } from '../../libs/mixin/mpMixin';
|
|
100
|
+
import { mixin } from '../../libs/mixin/mixin';
|
|
101
|
+
import { addUnit } from '../../libs/function/index';
|
|
102
|
+
import test from '../../libs/function/test';
|
|
103
|
+
/**
|
|
104
|
+
* AvatarGroup 头像组
|
|
105
|
+
* @description 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。
|
|
106
|
+
* @tutorial https://ijry.github.io/uview-plus/components/avatar.html
|
|
107
|
+
*
|
|
108
|
+
* @property {Array} urls 头像图片组 (默认 [] )
|
|
109
|
+
* @property {String | Number} maxCount 最多展示的头像数量 ( 默认 5 )
|
|
110
|
+
* @property {String} shape 头像形状( 'circle' (默认) | 'square' )
|
|
111
|
+
* @property {String} mode 图片裁剪模式(默认 'scaleToFill' )
|
|
112
|
+
* @property {Boolean} showMore 超出maxCount时是否显示查看更多的提示 (默认 true )
|
|
113
|
+
* @property {String | Number} size 头像大小 (默认 40 )
|
|
114
|
+
* @property {String} keyName 指定从数组的对象元素中读取哪个属性作为图片地址
|
|
115
|
+
* @property {String | Number} gap 头像之间的遮挡比例(0.4代表遮挡40%) (默认 0.5 )
|
|
116
|
+
* @property {String | Number} extraValue 需额外显示的值
|
|
117
|
+
* @event {Function} showMore 头像组更多点击
|
|
118
|
+
* @example <up-avatar-group :urls="urls" size="35" gap="0.4" ></up-avatar-group>
|
|
119
|
+
*/
|
|
120
|
+
export default {
|
|
121
|
+
name: 'u-avatar-group',
|
|
122
|
+
mixins: [mpMixin, mixin, props],
|
|
123
|
+
data() {
|
|
124
|
+
return {};
|
|
125
|
+
},
|
|
126
|
+
computed: {
|
|
127
|
+
showUrl() {
|
|
128
|
+
return this.urls.slice(0, this.maxCount);
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
emits: ['showMore'],
|
|
132
|
+
methods: {
|
|
133
|
+
addUnit,
|
|
134
|
+
testObject: test.object,
|
|
135
|
+
clickHandler() {
|
|
136
|
+
this.$emit('showMore');
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
</script>
|
|
141
|
+
<style scoped>
|
|
142
|
+
@import './style.css';
|
|
143
|
+
</style>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<up-transition mode="fade" :customStyle="backTopStyle" :show="show">
|
|
3
3
|
<view class="u-back-top" :style="[contentStyle]" v-if="!$slots.default && !$slots.$default" @click="backToTop">
|
|
4
|
-
<
|
|
4
|
+
<up-icon :name="icon" :custom-style="iconStyle"></up-icon>
|
|
5
5
|
<text v-if="text" class="u-back-top__text">{{ text }}</text>
|
|
6
6
|
</view>
|
|
7
7
|
<slot v-else />
|
|
8
|
-
</
|
|
8
|
+
</up-transition>
|
|
9
9
|
</template>
|
|
10
10
|
<script>
|
|
11
11
|
import { props } from './props';
|
|
@@ -32,7 +32,7 @@ const dom = weex.requireModule('dom');
|
|
|
32
32
|
* @property {Object<Object>} iconStyle 图标的样式,对象形式 (默认 {color: '#909399',fontSize: '19px'})
|
|
33
33
|
* @property {Object} customStyle 定义需要用到的外部样式
|
|
34
34
|
*
|
|
35
|
-
* @example <
|
|
35
|
+
* @example <up-back-top :scrollTop="scrollTop"></up-back-top>
|
|
36
36
|
*/
|
|
37
37
|
export default {
|
|
38
38
|
name: 'u-back-top',
|
|
@@ -37,7 +37,7 @@ import { addStyle, addUnit } from '../../libs/function/index';
|
|
|
37
37
|
* @property {Boolean} inverted 是否反转背景和字体颜色(默认 false )
|
|
38
38
|
* @property {Boolean} absolute 是否绝对定位(默认 false )
|
|
39
39
|
* @property {Object} customStyle 定义需要用到的外部样式
|
|
40
|
-
* @example <
|
|
40
|
+
* @example <up-badge :type="type" :count="count"></up-badge>
|
|
41
41
|
*/
|
|
42
42
|
export default {
|
|
43
43
|
name: 'u-badge',
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
:class="bemClass"
|
|
28
28
|
>
|
|
29
29
|
<template v-if="loading">
|
|
30
|
-
<
|
|
30
|
+
<up-loading-icon :mode="loadingMode" :size="loadingSize * 1.15" :color="loadingColor"></up-loading-icon>
|
|
31
31
|
<text class="u-button__loading-text" :style="[{ fontSize: textSize + 'px' }]">{{ loadingText || text }}</text>
|
|
32
32
|
</template>
|
|
33
33
|
<template v-else>
|
|
34
|
-
<
|
|
34
|
+
<up-icon
|
|
35
35
|
v-if="icon"
|
|
36
36
|
:name="icon"
|
|
37
37
|
:color="iconColorCom"
|
|
38
38
|
:size="textSize * 1.35"
|
|
39
39
|
:customStyle="{ marginRight: '2px' }"
|
|
40
|
-
></
|
|
40
|
+
></up-icon>
|
|
41
41
|
<slot>
|
|
42
42
|
<text class="u-button__text" :style="[{ fontSize: textSize + 'px' }]">{{ text }}</text>
|
|
43
43
|
</slot>
|
|
@@ -53,21 +53,21 @@
|
|
|
53
53
|
!disabled && !loading && !color && (plain || type === 'info')
|
|
54
54
|
? 'u-button--active--plain'
|
|
55
55
|
: !disabled && !loading && !plain
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
? 'u-button--active'
|
|
57
|
+
: ''
|
|
58
58
|
"
|
|
59
59
|
@tap="clickHandler"
|
|
60
60
|
:class="bemClass"
|
|
61
61
|
:style="[baseColor, addStyle(customStyle)]"
|
|
62
62
|
>
|
|
63
63
|
<template v-if="loading">
|
|
64
|
-
<
|
|
64
|
+
<up-loading-icon :mode="loadingMode" :size="loadingSize * 1.15" :color="loadingColor"></up-loading-icon>
|
|
65
65
|
<text class="u-button__loading-text" :style="[nvueTextStyle]" :class="[plain && `u-button__text--plain--${type}`]">
|
|
66
66
|
{{ loadingText || text }}
|
|
67
67
|
</text>
|
|
68
68
|
</template>
|
|
69
69
|
<template v-else>
|
|
70
|
-
<
|
|
70
|
+
<up-icon v-if="icon" :name="icon" :color="iconColorCom" :size="textSize * 1.35"></up-icon>
|
|
71
71
|
<text
|
|
72
72
|
class="u-button__text"
|
|
73
73
|
:style="[
|
|
@@ -135,7 +135,7 @@ import color from '../../libs/config/color';
|
|
|
135
135
|
* @event {Function} opensetting 在打开授权设置页并关闭后回调
|
|
136
136
|
* @event {Function} launchapp 打开 APP 成功的回调
|
|
137
137
|
* @event {Function} agreeprivacyauthorization 用户同意隐私协议事件回调
|
|
138
|
-
* @example <
|
|
138
|
+
* @example <up-button>月落</up-button>
|
|
139
139
|
*/
|
|
140
140
|
export default {
|
|
141
141
|
name: 'u-button',
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
:class="bemClass"
|
|
38
38
|
>
|
|
39
39
|
<template v-if="loading">
|
|
40
|
-
<
|
|
40
|
+
<up-loading-icon :mode="loadingMode" :size="loadingSize * 1.15" :color="loadingColor"></up-loading-icon>
|
|
41
41
|
<text class="u-button__loading-text" :style="[{ fontSize: textSize + 'px' }, addStyle(customTextStyle)]">
|
|
42
42
|
{{ loadingText || text }}
|
|
43
43
|
</text>
|
|
44
44
|
</template>
|
|
45
45
|
<template v-else>
|
|
46
|
-
<
|
|
46
|
+
<up-icon
|
|
47
47
|
v-if="icon"
|
|
48
48
|
:name="icon"
|
|
49
49
|
:color="iconColorCom"
|
|
50
50
|
:size="textSize * 1.35"
|
|
51
51
|
:customStyle="{ marginRight: '2px' }"
|
|
52
|
-
></
|
|
52
|
+
></up-icon>
|
|
53
53
|
<slot>
|
|
54
54
|
<text class="u-button__text" :style="[{ fontSize: textSize + 'px' }, addStyle(customTextStyle)]">{{ text }}</text>
|
|
55
55
|
</slot>
|
|
@@ -78,19 +78,19 @@
|
|
|
78
78
|
:class="bemClass"
|
|
79
79
|
>
|
|
80
80
|
<template v-if="loading">
|
|
81
|
-
<
|
|
81
|
+
<up-loading-icon :mode="loadingMode" :size="loadingSize * 1.15" :color="loadingColor"></up-loading-icon>
|
|
82
82
|
<text class="u-button__loading-text" :style="[{ fontSize: textSize + 'px' }, addStyle(customTextStyle)]">
|
|
83
83
|
{{ loadingText || text }}
|
|
84
84
|
</text>
|
|
85
85
|
</template>
|
|
86
86
|
<template v-else>
|
|
87
|
-
<
|
|
87
|
+
<up-icon
|
|
88
88
|
v-if="icon"
|
|
89
89
|
:name="icon"
|
|
90
90
|
:color="iconColorCom"
|
|
91
91
|
:size="textSize * 1.35"
|
|
92
92
|
:customStyle="{ marginRight: '2px' }"
|
|
93
|
-
></
|
|
93
|
+
></up-icon>
|
|
94
94
|
<slot>
|
|
95
95
|
<text class="u-button__text" :style="[{ fontSize: textSize + 'px' }, addStyle(customTextStyle)]">{{ text }}</text>
|
|
96
96
|
</slot>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
:style="[baseColor, addStyle(customStyle)]"
|
|
117
117
|
>
|
|
118
118
|
<template v-if="loading">
|
|
119
|
-
<
|
|
119
|
+
<up-loading-icon :mode="loadingMode" :size="loadingSize * 1.15" :color="loadingColor"></up-loading-icon>
|
|
120
120
|
<text
|
|
121
121
|
class="u-button__loading-text"
|
|
122
122
|
:style="[nvueTextStyle, addStyle(customTextStyle)]"
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
</text>
|
|
127
127
|
</template>
|
|
128
128
|
<template v-else>
|
|
129
|
-
<
|
|
129
|
+
<up-icon v-if="icon" :name="icon" :color="iconColorCom" :size="textSize * 1.35"></up-icon>
|
|
130
130
|
<text
|
|
131
131
|
class="u-button__text"
|
|
132
132
|
:style="[
|
|
@@ -202,7 +202,7 @@ import props from './props.js';
|
|
|
202
202
|
* @event {Function} error 当使用开放能力时,发生错误的回调
|
|
203
203
|
* @event {Function} opensetting 在打开授权设置页并关闭后回调
|
|
204
204
|
* @event {Function} launchapp 打开 APP 成功的回调
|
|
205
|
-
* @example <
|
|
205
|
+
* @example <up-button>千金散尽还复来</up-button>
|
|
206
206
|
*/
|
|
207
207
|
export default {
|
|
208
208
|
name: 'u-button',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<up-popup :show="show" mode="bottom" closeable @close="close" :round="round" :closeOnClickOverlay="closeOnClickOverlay">
|
|
3
3
|
<view class="u-calendar">
|
|
4
4
|
<uHeader
|
|
5
5
|
:title="title"
|
|
@@ -44,17 +44,17 @@
|
|
|
44
44
|
</scroll-view>
|
|
45
45
|
<slot name="footer" v-if="showConfirm">
|
|
46
46
|
<view class="u-calendar__confirm">
|
|
47
|
-
<
|
|
47
|
+
<up-button
|
|
48
48
|
shape="circle"
|
|
49
49
|
:text="buttonDisabled ? confirmDisabledText : confirmText"
|
|
50
50
|
:color="color"
|
|
51
51
|
@click="confirm"
|
|
52
52
|
:disabled="buttonDisabled"
|
|
53
|
-
></
|
|
53
|
+
></up-button>
|
|
54
54
|
</view>
|
|
55
55
|
</slot>
|
|
56
56
|
</view>
|
|
57
|
-
</
|
|
57
|
+
</up-popup>
|
|
58
58
|
</template>
|
|
59
59
|
<script>
|
|
60
60
|
import uHeader from './header.vue';
|
|
@@ -103,8 +103,7 @@ import test from '../../libs/function/test';
|
|
|
103
103
|
*
|
|
104
104
|
* @event {Function()} confirm 点击确定按钮时触发 选择日期相关的返回参数
|
|
105
105
|
* @event {Function()} close 日历关闭时触发 可定义页面关闭时的回调事件
|
|
106
|
-
* @example <
|
|
107
|
-
</u-calendar>
|
|
106
|
+
* @example <up-calendar :defaultDate="defaultDateMultiple" :show="show" mode="multiple" @confirm="confirm"></up-calendar>
|
|
108
107
|
* */
|
|
109
108
|
export default {
|
|
110
109
|
name: 'u-calendar',
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
</view>
|
|
42
42
|
<view v-if="i === 3" @touchstart="backspaceClick" @touchend="clearTimer" class="u-keyboard__button__inner-wrapper">
|
|
43
43
|
<view class="u-keyboard__button__inner-wrapper__right" hover-class="u-hover-class" :hover-stay-time="200">
|
|
44
|
-
<
|
|
44
|
+
<up-icon size="28" name="backspace" color="#303133"></up-icon>
|
|
45
45
|
</view>
|
|
46
46
|
</view>
|
|
47
47
|
</view>
|
|
@@ -59,7 +59,7 @@ import { randomArray, sleep } from '../../libs/function/index';
|
|
|
59
59
|
* @property {Boolean} random 是否打乱键盘的顺序
|
|
60
60
|
* @event {Function} change 点击键盘触发
|
|
61
61
|
* @event {Function} backspace 点击退格键触发
|
|
62
|
-
* @example <
|
|
62
|
+
* @example <up-keyboard ref="uKeyboard" mode="car" v-model="show"></up-keyboard>
|
|
63
63
|
*/
|
|
64
64
|
export default {
|
|
65
65
|
name: 'u-car-keyboard',
|