@10yun/cv-mobile-ui 0.5.30 → 0.5.32

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.
Files changed (111) hide show
  1. package/package.json +5 -1
  2. package/ui-cv/components/cv-btn-base/cv-btn-base.vue +1 -1
  3. package/uview-plus/README.md +1 -1
  4. package/uview-plus/components/u-action-sheet/u-action-sheet.vue +8 -8
  5. package/uview-plus/components/u-album/u-album.vue +1 -1
  6. package/uview-plus/components/u-alert/u-alert.vue +5 -5
  7. package/uview-plus/components/u-app-update/u-app-update.vue +2 -2
  8. package/uview-plus/components/u-avatar/u-avatar.vue +2 -2
  9. package/uview-plus/components/u-avatar-group/u-avatar-group.vue +79 -3
  10. package/uview-plus/components/u-back-top/u-back-top.vue +4 -4
  11. package/uview-plus/components/u-badge/u-badge.vue +1 -1
  12. package/uview-plus/components/u-button/u-button.vue +8 -8
  13. package/uview-plus/components/u-button-wu/u-button-wu.vue +9 -9
  14. package/uview-plus/components/u-calendar/u-calendar.vue +5 -6
  15. package/uview-plus/components/u-car-keyboard/u-car-keyboard.vue +2 -2
  16. package/uview-plus/components/u-card/u-card.vue +139 -3
  17. package/uview-plus/components/u-cell/u-cell.vue +4 -4
  18. package/uview-plus/components/u-cell-group/u-cell-group.vue +2 -2
  19. package/uview-plus/components/u-checkbox/u-checkbox.vue +4 -4
  20. package/uview-plus/components/u-checkbox-group/u-checkbox-group.vue +1 -1
  21. package/uview-plus/components/u-code/u-code.vue +1 -1
  22. package/uview-plus/components/u-code-input/u-code-input.vue +1 -1
  23. package/uview-plus/components/u-col/u-col.vue +1 -1
  24. package/uview-plus/components/u-collapse/u-collapse.vue +2 -2
  25. package/uview-plus/components/u-collapse-item/u-collapse-item.vue +218 -3
  26. package/uview-plus/components/u-column-notice/u-column-notice.vue +3 -3
  27. package/uview-plus/components/u-copy/u-copy.vue +68 -1
  28. package/uview-plus/components/u-count-down/u-count-down.vue +1 -1
  29. package/uview-plus/components/u-count-to/u-count-to.vue +1 -1
  30. package/uview-plus/components/u-datetime-picker/u-datetime-picker.vue +3 -3
  31. package/uview-plus/components/u-divider/u-divider.vue +3 -3
  32. package/uview-plus/components/u-dropdown/u-dropdown.vue +3 -3
  33. package/uview-plus/components/u-dropdown-item/u-dropdown-item.vue +1 -1
  34. package/uview-plus/components/u-empty/u-empty.vue +3 -3
  35. package/uview-plus/components/u-form/u-form.vue +243 -1
  36. package/uview-plus/components/u-form-item/u-form-item.vue +4 -4
  37. package/uview-plus/components/u-gap/u-gap.vue +1 -1
  38. package/uview-plus/components/u-grid/u-grid.vue +1 -1
  39. package/uview-plus/components/u-grid-item/u-grid-item.vue +1 -1
  40. package/uview-plus/components/u-icon/u-icon.vue +1 -1
  41. package/uview-plus/components/u-icon/u-icon2.vue +1 -1
  42. package/uview-plus/components/u-image/u-image.vue +5 -5
  43. package/uview-plus/components/u-image-wu/u-image-wu.vue +5 -5
  44. package/uview-plus/components/u-index-anchor/u-index-anchor.vue +1 -1
  45. package/uview-plus/components/u-index-list/u-index-list.vue +2 -2
  46. package/uview-plus/components/u-input/u-input.vue +4 -4
  47. package/uview-plus/components/u-keyboard/u-keyboard.vue +6 -6
  48. package/uview-plus/components/u-lazy-load/u-lazy-load.vue +257 -3
  49. package/uview-plus/components/u-line/u-line.vue +1 -1
  50. package/uview-plus/components/u-line-progress/u-line-progress.vue +1 -1
  51. package/uview-plus/components/u-link/u-link.vue +1 -1
  52. package/uview-plus/components/u-list/u-list.vue +1 -1
  53. package/uview-plus/components/u-list-item/u-list-item.vue +1 -1
  54. package/uview-plus/components/u-loading-icon/u-loading-icon.vue +191 -3
  55. package/uview-plus/components/u-loading-page/u-loading-page.vue +4 -4
  56. package/uview-plus/components/u-loadmore/u-loadmore.vue +4 -4
  57. package/uview-plus/components/u-mask/u-mask.vue +120 -113
  58. package/uview-plus/components/u-message-input/u-message-input.vue +1 -1
  59. package/uview-plus/components/u-modal/u-modal.vue +6 -6
  60. package/uview-plus/components/u-navbar/u-navbar.vue +4 -4
  61. package/uview-plus/components/u-navbar-mini/u-navbar-mini.vue +2 -2
  62. package/uview-plus/components/u-navbar-wu/u-navbar-wu.vue +4 -4
  63. package/uview-plus/components/u-no-network/u-no-network.vue +5 -5
  64. package/uview-plus/components/u-notice-bar/u-notice-bar.vue +5 -5
  65. package/uview-plus/components/u-notify/u-notify.vue +6 -6
  66. package/uview-plus/components/u-number-box/u-number-box.vue +9 -3
  67. package/uview-plus/components/u-number-keyboard/u-number-keyboard.vue +1 -1
  68. package/uview-plus/components/u-overlay/u-overlay.vue +3 -3
  69. package/uview-plus/components/u-picker/u-picker.vue +5 -5
  70. package/uview-plus/components/u-popup/u-popup.vue +8 -8
  71. package/uview-plus/components/u-popup-wu/u-popup-wu.vue +7 -7
  72. package/uview-plus/components/u-qrcode/u-qrcode.vue +275 -3
  73. package/uview-plus/components/u-radio/u-radio.vue +4 -4
  74. package/uview-plus/components/u-radio-group/u-radio-group.vue +1 -1
  75. package/uview-plus/components/u-rate/u-rate.vue +5 -5
  76. package/uview-plus/components/u-read-more/u-read-more.vue +126 -3
  77. package/uview-plus/components/u-row/u-row.vue +1 -1
  78. package/uview-plus/components/u-row-notice/u-row-notice.vue +3 -3
  79. package/uview-plus/components/u-safe-bottom/u-safe-bottom.vue +48 -3
  80. package/uview-plus/components/u-search/u-search.vue +4 -4
  81. package/uview-plus/components/u-select/u-select.vue +175 -3
  82. package/uview-plus/components/u-skeleton/u-skeleton.vue +3 -3
  83. package/uview-plus/components/u-sku-wu/u-sku-wu.vue +4 -4
  84. package/uview-plus/components/u-status-bar/u-status-bar.vue +1 -1
  85. package/uview-plus/components/u-steps/u-steps.vue +1 -1
  86. package/uview-plus/components/u-steps-item/u-steps-item.vue +7 -7
  87. package/uview-plus/components/u-sticky/u-sticky.vue +1 -1
  88. package/uview-plus/components/u-subsection/u-subsection.vue +1 -1
  89. package/uview-plus/components/u-swipe-action/u-swipe-action.vue +1 -1
  90. package/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue +3 -3
  91. package/uview-plus/components/u-swiper/u-swiper.vue +1 -1
  92. package/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue +1 -1
  93. package/uview-plus/components/u-switch/u-switch.vue +2 -2
  94. package/uview-plus/components/u-tabbar/u-tabbar.vue +2 -2
  95. package/uview-plus/components/u-tabbar-item/u-tabbar-item.vue +9 -4
  96. package/uview-plus/components/u-table/u-table.vue +1 -1
  97. package/uview-plus/components/u-tabs/u-tabs.vue +3 -3
  98. package/uview-plus/components/u-tag/u-tag.vue +5 -5
  99. package/uview-plus/components/u-text/u-text.vue +159 -3
  100. package/uview-plus/components/u-toast/u-toast.vue +8 -8
  101. package/uview-plus/components/u-tooltip/u-tooltip.vue +6 -6
  102. package/uview-plus/components/u-upload/u-upload.vue +10 -10
  103. package/uview-plus/components/u-waterfall/u-waterfall.vue +221 -3
  104. package/uview-plus/index.js +4 -2
  105. package/uview-plus/libs/ctocode/image.js +17 -0
  106. package/uview-plus/libs/ctocode/index.js +150 -0
  107. package/uview-plus/libs/ctocode/map.js +38 -0
  108. package/uview-plus/libs/function/index-wu.js +6 -34
  109. package/uview-plus/package.json +3 -3
  110. package/uview-plus/readme-wu.md +1 -1
  111. package/uview-plus/libs/function/cc.js +0 -66
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <u-transition mode="fade" :show="show" style="display: inline-flex">
2
+ <up-transition mode="fade" :show="show" style="display: inline-flex">
3
3
  <view class="u-tag-wrapper cursor-pointer">
4
4
  <view
5
5
  class="u-tag"
@@ -22,7 +22,7 @@
22
22
  <slot name="icon">
23
23
  <view class="u-tag__icon" v-if="icon">
24
24
  <image v-if="testImage(icon)" :src="icon" :style="[imgStyle]"></image>
25
- <u-icon v-else :color="elIconColor" :name="icon" :size="iconSize"></u-icon>
25
+ <up-icon v-else :color="elIconColor" :name="icon" :size="iconSize"></up-icon>
26
26
  </view>
27
27
  </slot>
28
28
  <view class="u-tag__content">
@@ -54,10 +54,10 @@
54
54
  @tap.stop="closeHandler"
55
55
  :style="{ backgroundColor: closeColor }"
56
56
  >
57
- <u-icon name="close" :size="closeSize" color="#ffffff"></u-icon>
57
+ <up-icon name="close" :size="closeSize" color="#ffffff"></up-icon>
58
58
  </view>
59
59
  </view>
60
- </u-transition>
60
+ </up-transition>
61
61
  </template>
62
62
  <script>
63
63
  import { props } from './props';
@@ -86,7 +86,7 @@ import { addUnit, genLightColor } from '../../libs/function/index';
86
86
  * @property {String} icon 内置图标,或绝对路径的图片
87
87
  * @event {Function(index)} click 点击标签时触发 index: 传递的index参数值
88
88
  * @event {Function(index)} close closable为true时,点击标签关闭按钮触发 index: 传递的index参数值
89
- * @example <u-tag text="标签" type="error" plain plainFill></u-tag>
89
+ * @example <up-tag text="标签" type="error" plain plainFill></up-tag>
90
90
  */
91
91
  export default {
92
92
  name: 'u-tag',
@@ -1,3 +1,159 @@
1
- <template>
2
1
  <view class="u-text" :class="[customClass]" v-if="show" :style="wrapStyle" @tap="clickHandler">
3
2
  <text :class="['u-text__price', type && `u-text__value--${type}`]" v-if="mode === 'price'" :style="[valueStyle]">¥</text>
4
3
  <view class="u-text__prefix-icon" v-if="prefixIcon">
5
4
  <u-icon :name="prefixIcon" :customStyle="addStyle(iconStyle)"></u-icon>
6
5
  </view>
7
6
  <u-link
8
7
  v-if="mode === 'link'"
9
8
  class="u-text__value"
10
9
  :style="{ fontWeight: valueStyle.fontWeight, wordWrap: valueStyle.wordWrap, fontSize: valueStyle.fontSize }"
11
10
  :class="[type && `u-text__value--${type}`, lines && `u-line-${lines}`]"
12
11
  :text="value"
13
12
  :href="href"
14
13
  underLine
15
14
  ></u-link>
16
15
  <template v-else-if="openType && isMp">
17
16
  <button
18
17
  class="u-reset-button u-text__value"
19
18
  :style="[valueStyle]"
20
19
  :data-index="index"
21
20
  :openType="openType"
22
21
  @getuserinfo="onGetUserInfo"
23
22
  @contact="onContact"
24
23
  @getphonenumber="onGetPhoneNumber"
25
24
  @error="onError"
26
25
  @launchapp="onLaunchApp"
27
26
  @opensetting="onOpenSetting"
28
27
  :lang="lang"
29
28
  :session-from="sessionFrom"
30
29
  :send-message-title="sendMessageTitle"
31
30
  :send-message-path="sendMessagePath"
32
31
  :send-message-img="sendMessageImg"
33
32
  :show-message-card="showMessageCard"
34
33
  :app-parameter="appParameter"
35
34
  >
36
35
  {{ value }}
37
36
  </button>
38
37
  </template>
39
38
  <text
40
39
  v-else
41
40
  class="u-text__value"
42
41
  :style="[valueStyle]"
43
42
  :class="[type && `u-text__value--${type}`, lines && `u-line-${lines}`]"
44
43
  >
45
44
  {{ value }}
46
45
  </text>
47
46
  <view class="u-text__suffix-icon" v-if="suffixIcon">
48
47
  <u-icon :name="suffixIcon" :customStyle="addStyle(iconStyle)"></u-icon>
49
48
  </view>
50
49
  </view>
51
50
  * Text 文本
52
51
  * @description 此组件集成了文本类在项目中的常用功能,包括状态,拨打电话,格式化日期,*替换,超链接...等功能。 您大可不必在使用特殊文本时自己定义,text组件几乎涵盖您能使用的大部分场景。
53
52
  * @tutorial https://ijry.github.io/uview-plus/components/loading.html
54
53
  * @property {String} type 主题颜色
55
54
  * @property {Boolean} show 是否显示(默认 true )
56
55
  * @property {String | Number} text 显示的值
57
56
  * @property {String} prefixIcon 前置图标
58
57
  * @property {String} suffixIcon 后置图标
59
58
  * @property {String} mode 文本处理的匹配模式 text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
60
59
  * @property {String} href mode=link下,配置的链接
61
60
  * @property {String | Function} format 格式化规则
62
61
  * @property {Boolean} call mode=phone时,点击文本是否拨打电话(默认 false )
63
62
  * @property {String} openType 小程序的打开方式
64
63
  * @property {Boolean} bold 是否粗体,默认normal(默认 false )
65
64
  * @property {Boolean} block 是否块状(默认 false )
66
65
  * @property {String | Number} lines 文本显示的行数,如果设置,超出此行数,将会显示省略号
67
66
  * @property {String} color 文本颜色(默认 '#303133' )
68
67
  * @property {String | Number} size 字体大小(默认 15 )
69
68
  * @property {Object | String} iconStyle 图标的样式 (默认 {fontSize: '15px'} )
70
69
  * @property {String} decoration 文字装饰,下划线,中划线等,可选值 none|underline|line-through(默认 'none' )
71
70
  * @property {Object | String | Number} margin 外边距,对象、字符串,数值形式均可(默认 0 )
72
71
  * @property {String | Number} lineHeight 文本行高
73
72
  * @property {String} align 文本对齐方式,可选值left|center|right(默认 'left' )
74
73
  * @property {String} wordWrap 文字换行,可选值break-word|normal|anywhere(默认 'normal' )
75
74
  * @event {Function} click 点击触发事件
76
75
  * @example <up-text text="我用十年青春,赴你最后之约"></up-text>
77
76
  */
78
77
  name: 'up-text',
79
78
  // #ifdef MP
80
79
  mixins: [mpMixin, mixin, value, buttonMixin, openType, props],
81
80
  // #endif
82
81
  // #ifndef MP
83
82
  mixins: [mpMixin, mixin, value, props],
84
83
  // #endif
85
84
  emits: ['click'],
86
85
  computed: {
87
86
  wrapStyle() {
88
87
  let style = {
89
88
  margin: this.margin,
90
89
  justifyContent: this.align === 'left' ? 'flex-start' : this.align === 'center' ? 'center' : 'flex-end'
91
90
  };
92
91
  // 占满剩余空间
93
92
  if (this.flex1) {
94
93
  style.flex = 1;
95
94
  // #ifndef APP-NVUE
96
95
  style.width = '100%';
97
96
  // #endif
98
97
  }
99
98
  return style;
100
99
  },
101
100
  valueStyle() {
102
101
  const style = {
103
102
  textDecoration: this.decoration,
104
103
  fontWeight: this.bold ? 'bold' : 'normal',
105
104
  wordWrap: this.wordWrap,
106
105
  fontSize: addUnit(this.size)
107
106
  };
108
107
  !this.type && (style.color = this.color);
109
108
  this.isNvue && this.lines && (style.lines = this.lines);
110
109
  this.lineHeight && (style.lineHeight = addUnit(this.lineHeight));
111
110
  !this.isNvue && this.block && (style.display = 'block');
112
111
  return deepMerge(style, addStyle(this.customStyle));
113
112
  },
114
113
  isNvue() {
115
114
  let nvue = false;
116
115
  // #ifdef APP-NVUE
117
116
  nvue = true;
118
117
  // #endif
119
118
  return nvue;
120
119
  },
121
120
  isMp() {
122
121
  let mp = false;
123
122
  // #ifdef MP
124
123
  mp = true;
125
124
  // #endif
126
125
  return mp;
127
126
  }
128
127
  },
129
128
  data() {
130
129
  return {};
131
130
  },
132
131
  methods: {
133
132
  addStyle,
134
133
  clickHandler(e) {
135
134
  // 如果为手机号模式,拨打电话
136
135
  if (this.call && this.mode === 'phone') {
137
136
  uni.makePhoneCall({
138
137
  phoneNumber: this.text
139
138
  });
140
139
  }
141
140
  this.$emit('click', e);
142
141
  }
143
142
  }
144
- @import './style.css';
145
- </style>
143
+ <template>
144
+ <view class="u-text" :class="[customClass]" v-if="show" :style="wrapStyle" @tap="clickHandler">
145
+ <text :class="['u-text__price', type && `u-text__value--${type}`]" v-if="mode === 'price'" :style="[valueStyle]">¥</text>
146
+ <view class="u-text__prefix-icon" v-if="prefixIcon">
147
+ <up-icon :name="prefixIcon" :customStyle="addStyle(iconStyle)"></up-icon>
148
+ </view>
149
+ <up-link
150
+ v-if="mode === 'link'"
151
+ class="u-text__value"
152
+ :style="{ fontWeight: valueStyle.fontWeight, wordWrap: valueStyle.wordWrap, fontSize: valueStyle.fontSize }"
153
+ :class="[type && `u-text__value--${type}`, lines && `u-line-${lines}`]"
154
+ :text="value"
155
+ :href="href"
156
+ underLine
157
+ ></up-link>
158
+ <template v-else-if="openType && isMp">
159
+ <button
160
+ class="u-reset-button u-text__value"
161
+ :style="[valueStyle]"
162
+ :data-index="index"
163
+ :openType="openType"
164
+ @getuserinfo="onGetUserInfo"
165
+ @contact="onContact"
166
+ @getphonenumber="onGetPhoneNumber"
167
+ @error="onError"
168
+ @launchapp="onLaunchApp"
169
+ @opensetting="onOpenSetting"
170
+ :lang="lang"
171
+ :session-from="sessionFrom"
172
+ :send-message-title="sendMessageTitle"
173
+ :send-message-path="sendMessagePath"
174
+ :send-message-img="sendMessageImg"
175
+ :show-message-card="showMessageCard"
176
+ :app-parameter="appParameter"
177
+ >
178
+ {{ value }}
179
+ </button>
180
+ </template>
181
+ <text
182
+ v-else
183
+ class="u-text__value"
184
+ :style="[valueStyle]"
185
+ :class="[type && `u-text__value--${type}`, lines && `u-line-${lines}`]"
186
+ >
187
+ {{ value }}
188
+ </text>
189
+ <view class="u-text__suffix-icon" v-if="suffixIcon">
190
+ <up-icon :name="suffixIcon" :customStyle="addStyle(iconStyle)"></up-icon>
191
+ </view>
192
+ </view>
193
+ </template>
194
+ <script>
195
+ import { props } from './props';
196
+ import value from './value.js';
197
+ import { mpMixin } from '../../libs/mixin/mpMixin';
198
+ import { mixin } from '../../libs/mixin/mixin';
199
+ import { buttonMixin } from '../../libs/mixin/button';
200
+ import { openType } from '../../libs/mixin/openType';
201
+ import { addStyle, addUnit, deepMerge } from '../../libs/function/index';
202
+ /**
203
+ * Text 文本
204
+ * @description 此组件集成了文本类在项目中的常用功能,包括状态,拨打电话,格式化日期,*替换,超链接...等功能。 您大可不必在使用特殊文本时自己定义,text组件几乎涵盖您能使用的大部分场景。
205
+ * @tutorial https://ijry.github.io/uview-plus/components/loading.html
206
+ * @property {String} type 主题颜色
207
+ * @property {Boolean} show 是否显示(默认 true )
208
+ * @property {String | Number} text 显示的值
209
+ * @property {String} prefixIcon 前置图标
210
+ * @property {String} suffixIcon 后置图标
211
+ * @property {String} mode 文本处理的匹配模式 text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
212
+ * @property {String} href mode=link下,配置的链接
213
+ * @property {String | Function} format 格式化规则
214
+ * @property {Boolean} call mode=phone时,点击文本是否拨打电话(默认 false )
215
+ * @property {String} openType 小程序的打开方式
216
+ * @property {Boolean} bold 是否粗体,默认normal(默认 false )
217
+ * @property {Boolean} block 是否块状(默认 false )
218
+ * @property {String | Number} lines 文本显示的行数,如果设置,超出此行数,将会显示省略号
219
+ * @property {String} color 文本颜色(默认 '#303133' )
220
+ * @property {String | Number} size 字体大小(默认 15 )
221
+ * @property {Object | String} iconStyle 图标的样式 (默认 {fontSize: '15px'} )
222
+ * @property {String} decoration 文字装饰,下划线,中划线等,可选值 none|underline|line-through(默认 'none' )
223
+ * @property {Object | String | Number} margin 外边距,对象、字符串,数值形式均可(默认 0 )
224
+ * @property {String | Number} lineHeight 文本行高
225
+ * @property {String} align 文本对齐方式,可选值left|center|right(默认 'left' )
226
+ * @property {String} wordWrap 文字换行,可选值break-word|normal|anywhere(默认 'normal' )
227
+ * @event {Function} click 点击触发事件
228
+ * @example <up-text text="我用十年青春,赴你最后之约"></up-text>
229
+ */
230
+ export default {
231
+ name: 'up-text',
232
+ // #ifdef MP
233
+ mixins: [mpMixin, mixin, value, buttonMixin, openType, props],
234
+ // #endif
235
+ // #ifndef MP
236
+ mixins: [mpMixin, mixin, value, props],
237
+ // #endif
238
+ emits: ['click'],
239
+ computed: {
240
+ wrapStyle() {
241
+ let style = {
242
+ margin: this.margin,
243
+ justifyContent: this.align === 'left' ? 'flex-start' : this.align === 'center' ? 'center' : 'flex-end'
244
+ };
245
+ // 占满剩余空间
246
+ if (this.flex1) {
247
+ style.flex = 1;
248
+ // #ifndef APP-NVUE
249
+ style.width = '100%';
250
+ // #endif
251
+ }
252
+ return style;
253
+ },
254
+ valueStyle() {
255
+ const style = {
256
+ textDecoration: this.decoration,
257
+ fontWeight: this.bold ? 'bold' : 'normal',
258
+ wordWrap: this.wordWrap,
259
+ fontSize: addUnit(this.size)
260
+ };
261
+ !this.type && (style.color = this.color);
262
+ this.isNvue && this.lines && (style.lines = this.lines);
263
+ this.lineHeight && (style.lineHeight = addUnit(this.lineHeight));
264
+ !this.isNvue && this.block && (style.display = 'block');
265
+ return deepMerge(style, addStyle(this.customStyle));
266
+ },
267
+ isNvue() {
268
+ let nvue = false;
269
+ // #ifdef APP-NVUE
270
+ nvue = true;
271
+ // #endif
272
+ return nvue;
273
+ },
274
+ isMp() {
275
+ let mp = false;
276
+ // #ifdef MP
277
+ mp = true;
278
+ // #endif
279
+ return mp;
280
+ }
281
+ },
282
+ data() {
283
+ return {};
284
+ },
285
+ methods: {
286
+ addStyle,
287
+ clickHandler(e) {
288
+ // 如果为手机号模式,拨打电话
289
+ if (this.call && this.mode === 'phone') {
290
+ uni.makePhoneCall({
291
+ phoneNumber: this.text
292
+ });
293
+ }
294
+ this.$emit('click', e);
295
+ }
296
+ }
297
+ };
298
+ </script>
299
+ <style scoped>
300
+ @import './style.css';
301
+ </style>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <view class="u-toast">
3
- <u-overlay :show="isShow" :zIndex="tmpConfig.overlay ? 10070 : -1" :custom-style="overlayStyle">
3
+ <up-overlay :show="isShow" :zIndex="tmpConfig.overlay ? 10070 : -1" :custom-style="overlayStyle">
4
4
  <view
5
5
  class="u-toast__content"
6
6
  :style="[contentStyle]"
@@ -9,26 +9,26 @@
9
9
  tmpConfig.type === 'loading' || tmpConfig.loading ? 'u-toast__content--loading' : ''
10
10
  ]"
11
11
  >
12
- <u-loading-icon
12
+ <up-loading-icon
13
13
  v-if="tmpConfig.type === 'loading'"
14
14
  mode="circle"
15
15
  color="rgb(255, 255, 255)"
16
16
  inactiveColor="rgb(120, 120, 120)"
17
17
  size="25"
18
- ></u-loading-icon>
19
- <u-icon
18
+ ></up-loading-icon>
19
+ <up-icon
20
20
  v-else-if="tmpConfig.type !== 'defalut' && iconName"
21
21
  :name="iconName"
22
22
  size="17"
23
23
  :color="tmpConfig.type"
24
24
  :customStyle="iconStyle"
25
- ></u-icon>
26
- <u-gap v-if="tmpConfig.type === 'loading' || tmpConfig.loading" height="12" bgColor="transparent"></u-gap>
25
+ ></up-icon>
26
+ <up-gap v-if="tmpConfig.type === 'loading' || tmpConfig.loading" height="12" bgColor="transparent"></up-gap>
27
27
  <text class="u-toast__content__text" :class="['u-toast__content__text--' + tmpConfig.type]" style="max-width: 400rpx">
28
28
  {{ tmpConfig.message }}
29
29
  </text>
30
30
  </view>
31
- </u-overlay>
31
+ </up-overlay>
32
32
  </view>
33
33
  </template>
34
34
  <script>
@@ -57,7 +57,7 @@ import { hexToRgb } from '../../libs/function/colorGradient';
57
57
  * @property {Boolean} back 结束toast是否自动返回上一页 (默认 false )
58
58
  * @property {Object} customStyle 组件的样式,对象形式
59
59
  * @event {Function} show 显示toast,如需一进入页面就显示toast,请在onReady生命周期调用
60
- * @example <u-toast ref="uToast" />
60
+ * @example <up-toast ref="uToast" />
61
61
  */
62
62
  export default {
63
63
  name: 'u-toast',
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <view class="u-tooltip" :style="[addStyle(customStyle)]">
3
- <u-overlay
3
+ <up-overlay
4
4
  :show="showTooltip && tooltipTop !== -10000 && overlay"
5
5
  customStyle="backgroundColor: rgba(0, 0, 0, 0)"
6
6
  @click="overlayClickHandler"
7
- ></u-overlay>
7
+ ></up-overlay>
8
8
  <view class="u-tooltip__wrapper">
9
9
  <text
10
10
  class="u-tooltip__wrapper__text"
@@ -20,7 +20,7 @@
20
20
  >
21
21
  {{ text }}
22
22
  </text>
23
- <u-transition
23
+ <up-transition
24
24
  mode="fade"
25
25
  :show="showTooltip"
26
26
  duration="300"
@@ -55,16 +55,16 @@
55
55
  >
56
56
  <text class="u-tooltip__wrapper__popup__list__btn__text">复制</text>
57
57
  </view>
58
- <u-line direction="column" color="#8d8e90" v-if="showCopy && buttons.length > 0" length="18"></u-line>
58
+ <up-line direction="column" color="#8d8e90" v-if="showCopy && buttons.length > 0" length="18"></up-line>
59
59
  <block v-for="(item, index) in buttons" :key="index">
60
60
  <view class="u-tooltip__wrapper__popup__list__btn" hover-class="u-tooltip__wrapper__popup__list__btn--hover">
61
61
  <text class="u-tooltip__wrapper__popup__list__btn__text" @tap="btnClickHandler(index)">{{ item }}</text>
62
62
  </view>
63
- <u-line direction="column" color="#8d8e90" v-if="index < buttons.length - 1" length="18"></u-line>
63
+ <up-line direction="column" color="#8d8e90" v-if="index < buttons.length - 1" length="18"></up-line>
64
64
  </block>
65
65
  </view>
66
66
  </view>
67
- </u-transition>
67
+ </up-transition>
68
68
  </view>
69
69
  </view>
70
70
  </template>
@@ -37,12 +37,12 @@
37
37
  }
38
38
  ]"
39
39
  />
40
- <u-icon
40
+ <up-icon
41
41
  v-else
42
42
  color="#80CBF9"
43
43
  size="26"
44
44
  :name="item.isVideo || (item.type && item.type === 'video') ? 'movie' : 'file-text'"
45
- ></u-icon>
45
+ ></up-icon>
46
46
  <view v-if="item.status === 'success'" class="u-upload__wrap__play" @tap="onClickPreview(item, index)">
47
47
  <slot name="playIcon"></slot>
48
48
  <up-icon v-if="!$slots['playIcon']" class="u-upload__wrap__play__icon" name="play-right" size="22px"></up-icon>
@@ -59,19 +59,19 @@
59
59
  }
60
60
  ]"
61
61
  >
62
- <u-icon
62
+ <up-icon
63
63
  color="#80CBF9"
64
64
  size="26"
65
65
  :name="item.isVideo || (item.type && item.type === 'video') ? 'movie' : 'folder'"
66
- ></u-icon>
66
+ ></up-icon>
67
67
  <text class="u-upload__wrap__preview__other__text">
68
68
  {{ item.isVideo || (item.type && item.type === 'video') ? item.name || '视频' : item.name || '文件' }}
69
69
  </text>
70
70
  </view>
71
71
  <view class="u-upload__status" v-if="item.status === 'uploading' || item.status === 'failed'">
72
72
  <view class="u-upload__status__icon">
73
- <u-icon v-if="item.status === 'failed'" name="close-circle" color="#ffffff" size="25" />
74
- <u-loading-icon size="22" mode="circle" v-else />
73
+ <up-icon v-if="item.status === 'failed'" name="close-circle" color="#ffffff" size="25" />
74
+ <up-loading-icon size="22" mode="circle" v-else />
75
75
  </view>
76
76
  <text v-if="item.message" class="u-upload__status__message">{{ item.message }}</text>
77
77
  <up-gap class="u-upload__progress" height="3px" :style="{ width: item.progress + '%' }"></up-gap>
@@ -82,7 +82,7 @@
82
82
  @tap.stop="deleteItem(index)"
83
83
  >
84
84
  <view class="u-upload__deletable__icon">
85
- <u-icon name="close" color="#ffffff" size="10"></u-icon>
85
+ <up-icon name="close" color="#ffffff" size="10"></up-icon>
86
86
  </view>
87
87
  </view>
88
88
  <slot name="success">
@@ -92,7 +92,7 @@
92
92
  <!-- #endif -->
93
93
  <!-- #ifndef APP-NVUE -->
94
94
  <view class="u-upload__success__icon">
95
- <u-icon name="checkmark" color="#ffffff" size="12"></u-icon>
95
+ <up-icon name="checkmark" color="#ffffff" size="12"></up-icon>
96
96
  </view>
97
97
  <!-- #endif -->
98
98
  </view>
@@ -121,7 +121,7 @@
121
121
  }
122
122
  ]"
123
123
  >
124
- <u-icon :name="uploadIcon" size="26" :color="uploadIconColor"></u-icon>
124
+ <up-icon :name="uploadIcon" size="26" :color="uploadIconColor"></up-icon>
125
125
  <text v-if="uploadText" class="u-upload__button__text">{{ uploadText }}</text>
126
126
  </view>
127
127
  </template>
@@ -185,7 +185,7 @@ import test from '../../libs/function/test';
185
185
  * @event {Function} oversize 文件超出大小限制
186
186
  * @event {Function} clickPreview 点击预览图片
187
187
  * @event {Function} delete 删除图片
188
- * @example <u-upload :action="action" :fileList="fileList" ></u-upload>
188
+ * @example <up-upload :action="action" :fileList="fileList" ></up-upload>
189
189
  */
190
190
  export default {
191
191
  name: 'u-upload',