fusions-ui 1.2.4 → 1.2.7

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 (176) hide show
  1. package/components/fu-avatar/fu-avatar.vue +4 -2
  2. package/components/fu-avatar/props.js +52 -15
  3. package/components/fu-avatar-group/fu-avatar-group.vue +3 -2
  4. package/components/fu-avatar-group/props.js +31 -9
  5. package/components/fu-badge/fu-badge.vue +8 -14
  6. package/components/fu-badge/props.js +56 -16
  7. package/components/fu-banner-arc/fu-banner-arc.vue +4 -5
  8. package/components/fu-banner-arc/props.js +15 -4
  9. package/components/fu-button/fu-button.vue +18 -20
  10. package/components/fu-button/props.js +108 -35
  11. package/components/fu-cell/fu-cell.vue +9 -8
  12. package/components/fu-cell-group/fu-cell-group.vue +2 -1
  13. package/components/fu-cell-group/props.js +7 -2
  14. package/components/fu-checkbox/fu-checkbox.vue +5 -4
  15. package/components/fu-checkbox/props.js +51 -14
  16. package/components/fu-code-input/fu-code-input.vue +10 -6
  17. package/components/fu-code-input/props.js +66 -17
  18. package/components/fu-code-verify/fu-code-verify.vue +9 -5
  19. package/components/fu-code-verify/props.js +64 -17
  20. package/components/fu-collapse/fu-collapse.vue +10 -3
  21. package/components/fu-collapse/props.js +9 -3
  22. package/components/fu-collapse-item/fu-collapse-item.vue +45 -31
  23. package/components/fu-collapse-item/props.js +49 -16
  24. package/components/fu-countdown/fu-countdown.vue +2 -1
  25. package/components/fu-countdown/props.js +15 -4
  26. package/components/fu-datetime-picker/fu-datetime-picker.vue +6 -5
  27. package/components/fu-datetime-picker/props.js +91 -25
  28. package/components/fu-form/fu-form.vue +2 -1
  29. package/components/fu-form/props.js +34 -6
  30. package/components/fu-form-item/fu-form-item.vue +26 -33
  31. package/components/fu-form-item/props.js +30 -8
  32. package/components/fu-grid/fu-grid.vue +16 -17
  33. package/components/fu-grid/props.js +20 -5
  34. package/components/fu-grid-item/fu-grid-item.vue +31 -35
  35. package/components/fu-grid-item/props.js +11 -3
  36. package/components/fu-icon/fu-icon.vue +110 -0
  37. package/components/fu-icon/fuicon.css +584 -0
  38. package/components/{fu-icons/icons.js → fu-icon/fuicon.js} +1031 -1031
  39. package/components/{fu-icons/fuicons.ttf → fu-icon/fuicon.ttf} +0 -0
  40. package/components/fu-icon/props.js +55 -0
  41. package/components/fu-image/fu-image.vue +15 -10
  42. package/components/fu-image/props.js +69 -18
  43. package/components/fu-index-anchor/fu-index-anchor.vue +6 -5
  44. package/components/fu-index-anchor/props.js +20 -6
  45. package/components/fu-index-item/fu-index-item.vue +4 -4
  46. package/components/fu-index-list/fu-index-list.vue +9 -9
  47. package/components/fu-index-list/props.js +19 -6
  48. package/components/fu-input/fu-input.vue +54 -68
  49. package/components/fu-input/props.js +145 -53
  50. package/components/fu-keyboard/fu-keyboard.vue +19 -9
  51. package/components/fu-keyboard/keyboard-car.vue +33 -22
  52. package/components/fu-keyboard/keyboard-number.vue +17 -9
  53. package/components/fu-keyboard/props.js +66 -17
  54. package/components/fu-line/fu-line.vue +17 -13
  55. package/components/fu-line/props.js +30 -5
  56. package/components/fu-link/fu-link.vue +14 -8
  57. package/components/fu-link/props.js +22 -7
  58. package/components/fu-loading/fu-loading.vue +32 -27
  59. package/components/fu-loading/props.js +28 -8
  60. package/components/fu-loading-more/fu-loading-more.vue +19 -23
  61. package/components/fu-loading-more/props.js +27 -13
  62. package/components/fu-modal/fu-modal.vue +11 -6
  63. package/components/fu-modal/props.js +61 -17
  64. package/components/{fu-nav-bar/fu-nav-bar.vue → fu-navbar/fu-navbar.vue} +37 -44
  65. package/components/fu-notice-bar/fu-notice-bar.vue +10 -8
  66. package/components/fu-notice-bar/notice-column.vue +187 -122
  67. package/components/fu-notice-bar/notice-row.vue +85 -28
  68. package/components/fu-notice-bar/props.js +83 -22
  69. package/components/fu-number-box/fu-number-box.vue +26 -28
  70. package/components/fu-number-box/props.js +37 -11
  71. package/components/fu-parse/fu-parse.vue +0 -1
  72. package/components/fu-picker/fu-picker.vue +22 -17
  73. package/components/fu-picker/props.js +70 -19
  74. package/components/fu-popup/fu-popup.vue +38 -43
  75. package/components/fu-popup/props.js +34 -9
  76. package/components/fu-progress/fu-progress.vue +3 -2
  77. package/components/fu-progress/props.js +36 -9
  78. package/components/fu-rate/fu-rate.vue +40 -32
  79. package/components/fu-rate/props.js +47 -13
  80. package/components/fu-read-more/fu-read-more.vue +19 -14
  81. package/components/fu-read-more/props.js +68 -46
  82. package/components/fu-ribbon/fu-ribbon.vue +8 -7
  83. package/components/fu-ribbon/props.js +15 -4
  84. package/components/fu-scroll-list/fu-scroll-list.vue +18 -34
  85. package/components/fu-scroll-list/props.js +19 -10
  86. package/components/fu-search/fu-search.vue +13 -18
  87. package/components/fu-search/props.js +69 -17
  88. package/components/fu-section/fu-section.vue +19 -22
  89. package/components/fu-section/props.js +30 -4
  90. package/components/fu-sign-board/fu-sign-board.vue +34 -17
  91. package/components/fu-sign-board/props.js +15 -5
  92. package/components/fu-skeleton/fu-skeleton.vue +8 -12
  93. package/components/fu-skeleton/props.js +15 -4
  94. package/components/fu-steps/fu-steps.vue +3 -2
  95. package/components/fu-steps/props.js +23 -7
  96. package/components/fu-steps-item/fu-steps-item.vue +3 -3
  97. package/components/fu-steps-item/props.js +15 -5
  98. package/components/fu-sticky/fu-sticky.vue +3 -3
  99. package/components/fu-sticky/props.js +21 -7
  100. package/components/fu-subsection/fu-subsection.vue +29 -22
  101. package/components/fu-subsection/props.js +40 -10
  102. package/components/fu-swipe-action-item/bindingx.js +1 -1
  103. package/components/fu-swipe-action-item/fu-swipe-action-item.vue +134 -123
  104. package/components/fu-swipe-action-item/mpwxs.js +1 -1
  105. package/components/fu-swipe-action-item/props.js +22 -6
  106. package/components/fu-swiper/fu-swiper.vue +29 -27
  107. package/components/fu-swiper/props.js +81 -25
  108. package/components/fu-switch/fu-switch.vue +20 -12
  109. package/components/fu-switch/props.js +48 -13
  110. package/components/fu-tabs/fu-tabs.vue +36 -33
  111. package/components/fu-tabs/props.js +46 -13
  112. package/components/fu-tag/fu-tag.vue +24 -21
  113. package/components/fu-tag/props.js +63 -17
  114. package/components/fu-text/fu-text.vue +72 -33
  115. package/components/fu-text/props.js +85 -27
  116. package/components/fu-text/value.js +6 -6
  117. package/components/fu-textarea/fu-textarea.vue +13 -17
  118. package/components/fu-textarea/props.js +103 -30
  119. package/components/fu-timeaxis/fu-timeaxis.vue +1 -1
  120. package/components/fu-timeaxis-item/fu-timeaxis-item.vue +8 -4
  121. package/components/fu-transition/fu-transition.vue +48 -49
  122. package/components/fu-transition/props.js +21 -0
  123. package/components/fu-upload/fu-upload.vue +3 -1
  124. package/components/fu-upload/props.js +67 -19
  125. package/components/fu-upload/upload-file.vue +31 -18
  126. package/components/fu-upload/upload-image.vue +37 -19
  127. package/components/fu-vtabs/fu-vtabs.vue +6 -4
  128. package/components/fu-vtabs/props.js +50 -15
  129. package/components/fu-waterfall/fu-waterfall.vue +11 -9
  130. package/components/fu-waterfall/props.js +37 -15
  131. package/index.js +17 -24
  132. package/index.scss +9 -7
  133. package/libs/config/config.js +16 -9
  134. package/libs/function/applyEven.js +9 -9
  135. package/libs/function/check.js +81 -89
  136. package/libs/function/{index.js → common.js} +5 -5
  137. package/libs/function/message.js +0 -27
  138. package/libs/mixin/mixin.js +26 -21
  139. package/libs/{utils/min.router.config.js → route/min.route.config.js} +7 -7
  140. package/libs/{utils/router.config.js → route/route.config.js} +10 -11
  141. package/libs/{css/main.scss → style/common.scss} +50 -87
  142. package/libs/style/style.h5.scss +8 -0
  143. package/libs/style/style.mp.scss +15 -0
  144. package/package.json +1 -1
  145. package/components/fu-calendar/calendar-item.vue +0 -214
  146. package/components/fu-calendar/calendar.js +0 -546
  147. package/components/fu-calendar/fu-calendar.vue +0 -536
  148. package/components/fu-calendar/i18n/en.json +0 -12
  149. package/components/fu-calendar/i18n/index.js +0 -8
  150. package/components/fu-calendar/i18n/zh-Hans.json +0 -12
  151. package/components/fu-calendar/i18n/zh-Hant.json +0 -12
  152. package/components/fu-calendar/util.js +0 -360
  153. package/components/fu-date-picker/calendar-item.vue +0 -177
  154. package/components/fu-date-picker/calendar.vue +0 -917
  155. package/components/fu-date-picker/fu-date-picker.vue +0 -1069
  156. package/components/fu-date-picker/i18n/en.json +0 -22
  157. package/components/fu-date-picker/i18n/index.js +0 -8
  158. package/components/fu-date-picker/i18n/zh-Hans.json +0 -22
  159. package/components/fu-date-picker/i18n/zh-Hant.json +0 -22
  160. package/components/fu-date-picker/props.js +0 -68
  161. package/components/fu-date-picker/time-picker.vue +0 -924
  162. package/components/fu-date-picker/util.js +0 -419
  163. package/components/fu-icons/fu-icons.vue +0 -102
  164. package/components/fu-icons/fuicons.css +0 -585
  165. package/components/fu-landscape/fu-landscape.vue +0 -167
  166. package/components/fu-landscape/props.js +0 -64
  167. package/components/fu-tabbar/fu-tabbar.vue +0 -333
  168. package/components/fu-tabbar/props.js +0 -78
  169. package/libs/css/style.h5.scss +0 -35
  170. package/libs/css/style.mp.scss +0 -50
  171. package/libs/utils/util.js +0 -58
  172. /package/components/{fu-nav-bar → fu-navbar}/props.js +0 -0
  173. /package/components/{fu-nav-bar → fu-navbar}/status-bar.vue +0 -0
  174. /package/{components/fu-datetime-picker → libs/function}/dayjs.js +0 -0
  175. /package/libs/{css → style}/color.scss +0 -0
  176. /package/libs/{css/component.scss → style/components.scss} +0 -0
@@ -4,13 +4,13 @@
4
4
  <slot />
5
5
  <view class="fu-keyboard__tooltip" v-if="tooltip">
6
6
  <view hover-class="fu-hover-class" :hover-stay-time="100">
7
- <text class="fu-keyboard__tooltip__item fu-keyboard__tooltip__cancel" v-if="showCancel" @tap="onCancel">{{showCancel && cancelText}}</text>
7
+ <text class="fu-keyboard__tooltip__item fu-keyboard__tooltip__cancel" v-if="showCancel" @tap="handleCancel">{{showCancel && cancelText}}</text>
8
8
  </view>
9
9
  <view>
10
10
  <text class="fu-keyboard__tooltip__item fu-keyboard__tooltip__tips" v-if="showTips">{{tips ? tips : mode == 'number' ? '数字键盘' : mode == 'card' ? '身份证键盘' : '车牌号键盘'}}</text>
11
11
  </view>
12
12
  <view hover-class="fu-hover-class" :hover-stay-time="100">
13
- <text class="fu-keyboard__tooltip__item fu-keyboard__tooltip__submit" hover-class="fu-hover-class" @tap="onConfirm" v-if="showConfirm">{{showConfirm && confirmText}}</text>
13
+ <text class="fu-keyboard__tooltip__item fu-keyboard__tooltip__submit" hover-class="fu-hover-class" @tap="handleConfirm" v-if="showConfirm">{{showConfirm && confirmText}}</text>
14
14
  </view>
15
15
  </view>
16
16
  <template v-if="mode == 'number' || mode == 'card'">
@@ -47,8 +47,9 @@
47
47
  * @property {Boolean} safeArea = [true|false] 是否开启底部安全区适配 (默认 true )
48
48
  * @property {Boolean} isMaskClick = [true|false] 是否允许点击遮罩收起键盘 (默认 true )
49
49
  * @property {String,Number} zIndex 弹出键盘的z-index值 (默认 1025 )
50
- * @property {String} cancelText 取消按钮的文字 (默认 '取消'
51
- * @property {String} confirmText 确认按钮的文字 (默认 '确定'
50
+ * @property {String} cancelText 取消按钮的文字 (默认 '取消')
51
+ * @property {String} confirmText 确认按钮的文字 (默认 '确定')
52
+ *
52
53
  * @event {Function} change 按键被点击(不包含退格键被点击)
53
54
  * @event {Function} cancel 键盘顶部工具条左边的"取消"按钮被点击
54
55
  * @event {Function} confirm 键盘顶部工具条右边的"完成"按钮被点击
@@ -64,34 +65,43 @@
64
65
  KeyboardNumber
65
66
  },
66
67
  methods: {
68
+ // 打开
67
69
  open() {
68
70
  this.$refs.popup.open();
69
71
  },
72
+
73
+ // 关闭
70
74
  close() {
71
75
  this.$refs.popup.close();
72
76
  this.$emit('close')
73
77
  },
78
+
74
79
  change(e) {
75
80
  this.$emit('change', e);
76
81
  },
82
+
77
83
  // 输入完成
78
- onConfirm() {
84
+ handleConfirm() {
79
85
  this.$emit('confirm');
80
86
  if(this.closeOnClickConfirm) this.close();
81
87
  },
88
+
82
89
  // 取消输入
83
- onCancel() {
90
+ handleCancel() {
84
91
  this.$emit('cancel');
85
92
  this.close();
86
93
  },
94
+
87
95
  // 退格键
88
96
  backspace() {
89
97
  this.$emit('backspace');
90
98
  },
99
+
91
100
  // car模式切换中文|英文方法
92
101
  changeCarInputMode(e) {
93
102
  this.$emit('changeCarInputMode',e);
94
103
  },
104
+
95
105
  changeCarMode() {
96
106
  this.$refs.fuKeyboardCarRef && this.$refs.fuKeyboardCarRef.changeCarInputMode();
97
107
  }
@@ -100,14 +110,14 @@
100
110
  </script>
101
111
 
102
112
  <style lang="scss" scoped>
103
- @import '../../libs/css/color.scss';
113
+ @import '../../libs/style/components.scss';
114
+ @import '../../libs/style/color.scss';
104
115
  $show-hover: 1;
105
116
 
106
117
  .fu-keyboard {
107
118
 
108
119
  &__tooltip {
109
- display: flex;
110
- flex-direction: row;
120
+ @include flex(row);
111
121
  justify-content: space-between;
112
122
  background-color: #FFFFFF;
113
123
  padding: 14px 12px;
@@ -3,17 +3,18 @@
3
3
  <view class="fu-keyboard__button" :class="[i + 1 === 4 && 'fu-keyboard__button--center']" v-for="(group, i) in abc ? engKeyBoardList : areaList" :key="i" :index="i">
4
4
  <view class="fu-keyboard__button__inner-wrapper" v-if="i === 3">
5
5
  <view class="fu-keyboard__button__inner-wrapper__left" hover-class="fu-hover-class" :hover-stay-time="200" @tap="changeCarInputMode">
6
- <slot>
7
- <template v-if="!customabc">
8
- <text
9
- class="fu-keyboard__button__inner-wrapper__mode--zh"
10
- :class="[`fu-keyboard__button__inner-wrapper__mode--${!abc ? 'active' : 'inactive'}`]">中</text>
11
- /
12
- <text
13
- class="fu-keyboard__button__inner-wrapper__mode--en"
14
- :class="[`fu-keyboard__button__inner-wrapper__mode--${abc ? 'active' : 'inactive'}`]">英</text>
15
- </template>
16
- </slot>
6
+ <template v-if="!customabc">
7
+ <text
8
+ class="fu-keyboard__button__inner-wrapper__mode--zh"
9
+ :class="[`fu-keyboard__button__inner-wrapper__mode--${!abc ? 'active' : 'inactive'}`]">中</text>
10
+ /
11
+ <text
12
+ class="fu-keyboard__button__inner-wrapper__mode--en"
13
+ :class="[`fu-keyboard__button__inner-wrapper__mode--${abc ? 'active' : 'inactive'}`]">英</text>
14
+ </template>
15
+ <block v-else>
16
+ <slot></slot>
17
+ </block>
17
18
  </view>
18
19
  </view>
19
20
  <view class="fu-keyboard__button__inner-wrapper" v-for="(item, j) in group" :key="j">
@@ -24,7 +25,7 @@
24
25
  </view>
25
26
  <view class="fu-keyboard__button__inner-wrapper" @touchstart="backspaceClick" @touchend="clearTimer" v-if="i === 3">
26
27
  <view class="fu-keyboard__button__inner-wrapper__right" hover-class="fu-hover-class" :hover-stay-time="200">
27
- <fu-icons name="backspace" size="28" color="#303133"></fu-icons>
28
+ <fu-icon name="backspace" size="28" color="#303133" />
28
29
  </view>
29
30
  </view>
30
31
  </view>
@@ -39,6 +40,7 @@
39
40
  * @property {Boolean} autoChange = [true|false] 输入一个中文后,是否自动切换到英文(默认 false)
40
41
  * @property {Array} disKeys 被禁用的键
41
42
  * @property {Boolean} customabc = [true|false] 是否自定义abc(默认 false)
43
+ *
42
44
  * @event {Function} change 点击键盘触发
43
45
  * @event {Function} backspace 点击退格键触发
44
46
  * @example <fu-keyboard ref="uKeyboard" mode="car" v-model="show"></fu-keyboard>
@@ -47,22 +49,33 @@
47
49
  name: "KeyboardCar",
48
50
  emits: ['backspace','change','changeCarInputMode'],
49
51
  props: {
50
- // 是否打乱键盘按键的顺序
52
+ /**
53
+ * @description 是否打乱键盘按键的顺序
54
+ * @default false
55
+ */
51
56
  random: {
52
57
  type: Boolean,
53
58
  default: false
54
59
  },
55
- // 输入一个中文后,是否自动切换到英文
60
+ /**
61
+ * @description 输入一个中文后,是否自动切换到英文
62
+ * @default false
63
+ */
56
64
  autoChange: {
57
65
  type: Boolean,
58
66
  default: false
59
67
  },
60
- // 被禁用的键
68
+ /**
69
+ * @description 被禁用的键
70
+ */
61
71
  disKeys: {
62
72
  type: Array,
63
73
  default: ()=>[]
64
74
  },
65
- // 是否自定义abc
75
+ /**
76
+ * @description 是否自定义abc
77
+ * @default false
78
+ */
66
79
  customabc: {
67
80
  type: Boolean,
68
81
  default: false
@@ -215,6 +228,7 @@
215
228
  </script>
216
229
 
217
230
  <style lang="scss" scoped>
231
+ @import '../../libs/style/components.scss';
218
232
  $show-hover: 1;
219
233
  $fu-car-keyboard-background-color: rgb(224, 228, 230) !default;
220
234
  $fu-car-keyboard-padding:6px 0 6px !default;
@@ -244,8 +258,7 @@
244
258
  padding: $fu-car-keyboard-padding;
245
259
 
246
260
  &__button {
247
- display: flex;
248
- flex-direction: row;
261
+ @include flex(row);
249
262
  justify-content: center;
250
263
  flex: 1;
251
264
  /* #ifndef APP-NVUE */
@@ -268,8 +281,7 @@
268
281
  }
269
282
 
270
283
  &__inner {
271
- display: flex;
272
- flex-direction: row;
284
+ @include flex(row);
273
285
  justify-content: center;
274
286
  align-items: center;
275
287
  width: $fu-car-keyboard-button-inner-width;
@@ -293,8 +305,7 @@
293
305
  width: $fu-car-keyboard-special-button-width;
294
306
  height: $fu-car-keyboard-button-height;
295
307
  background-color: $fu-car-keyboard-fu-hover-class-background-color;
296
- display: flex;
297
- flex-direction: row;
308
+ @include flex(row);
298
309
  justify-content: center;
299
310
  align-items: center;
300
311
  box-shadow: $fu-car-keyboard-button-inner-box-shadow;
@@ -7,7 +7,7 @@
7
7
  </view>
8
8
  <view class="fu-keyboard__button-wrapper">
9
9
  <view class="fu-keyboard__button-wrapper__button fu-keyboard__button-wrapper__button--gray" hover-class="fu-hover-class" :hover-stay-time="200" @touchstart.stop="backspaceClick" @touchend="clearTimer">
10
- <fu-icons name="backspace" size="28" color="#303133"></fu-icons>
10
+ <fu-icon name="backspace" size="28" color="#303133" />
11
11
  </view>
12
12
  </view>
13
13
  </view>
@@ -29,17 +29,27 @@
29
29
  name: 'UnKeyboardNumber',
30
30
  emits: ['backspace','change'],
31
31
  props: {
32
- // 键盘的类型,number-数字键盘,card-身份证键盘
32
+ /**
33
+ * @description 键盘的类型
34
+ * @values 'number' - 数字键盘, 'card' - 身份证键盘
35
+ * @default 'number'
36
+ */
33
37
  mode: {
34
38
  type: String,
35
39
  default: 'number'
36
40
  },
37
- // 是否显示键盘的"."符号
41
+ /**
42
+ * @description 是否显示键盘的"."符号
43
+ * @default false
44
+ */
38
45
  dotDisabled: {
39
46
  type: Boolean,
40
47
  default: false
41
48
  },
42
- // 是否打乱键盘按键的顺序
49
+ /**
50
+ * @description 是否打乱键盘按键的顺序
51
+ * @default false
52
+ */
43
53
  random: {
44
54
  type: Boolean,
45
55
  default: false
@@ -120,6 +130,7 @@
120
130
  </script>
121
131
 
122
132
  <style lang="scss" scoped>
133
+ @import '../../libs/style/components.scss';
123
134
  $show-hover: 1;
124
135
  $fu-number-keyboard-background-color:rgb(224, 228, 230) !default;
125
136
  $fu-number-keyboard-padding:8px 10rpx 8px 10rpx !default;
@@ -139,9 +150,7 @@
139
150
  $fu-number-keyboard-fu-hover-class-background-color: #BBBCC6 !default;
140
151
 
141
152
  .fu-keyboard {
142
- display: flex;
143
- flex-direction: row;
144
- flex-direction: row;
153
+ @include flex(row);
145
154
  justify-content: space-around;
146
155
  background-color: $fu-number-keyboard-background-color;
147
156
  flex-wrap: wrap;
@@ -159,8 +168,7 @@
159
168
  width: $fu-number-keyboard-button-width;
160
169
  height: $fu-number-keyboard-button-height;
161
170
  background-color: $fu-number-keyboard-button-background-color;
162
- display: flex;
163
- flex-direction: row;
171
+ @include flex(row);
164
172
  justify-content: center;
165
173
  align-items: center;
166
174
  border-top-left-radius: $fu-number-keyboard-button-border-top-left-radius;
@@ -1,86 +1,135 @@
1
1
  export default {
2
2
  props: {
3
- // 键盘的类型,number 数字键盘,card 身份证键盘,car 车牌号键盘
3
+ /**
4
+ * @description 键盘的类型
5
+ * @values 'number' - 数字键盘, 'card' - 身份证键盘, 'car' - 车牌号键盘
6
+ */
4
7
  mode: {
5
8
  type: String,
6
9
  default: 'number'
7
10
  },
8
- // 是否显示键盘的"."符号
11
+ /**
12
+ * @description 是否显示键盘的"."符号
13
+ * @default false
14
+ */
9
15
  dotDisabled: {
10
16
  type: Boolean,
11
17
  default: false
12
18
  },
13
- // 是否显示顶部工具条
19
+ /**
20
+ * @description 是否显示顶部工具条
21
+ * @default true
22
+ */
14
23
  tooltip: {
15
24
  type: Boolean,
16
25
  default: true
17
26
  },
18
- // 是否显示工具条中间的提示
27
+ /**
28
+ * @description 是否显示工具条中间的提示
29
+ * @default true
30
+ */
19
31
  showTips: {
20
32
  type: Boolean,
21
33
  default: true
22
34
  },
23
- // 工具条中间的提示文字
35
+ /**
36
+ * @description 工具条中间的提示文字
37
+ */
24
38
  tips: {
25
39
  type: String,
26
40
  default: ''
27
41
  },
28
- // 是否显示工具条左边的"取消"按钮
42
+ /**
43
+ * @description 是否显示工具条左边的"取消"按钮
44
+ * @default true
45
+ */
29
46
  showCancel: {
30
47
  type: Boolean,
31
48
  default: true
32
49
  },
33
- // 是否显示工具条右边的"完成"按钮
50
+ /**
51
+ * @description 是否显示工具条右边的"完成"按钮
52
+ * @default true
53
+ */
34
54
  showConfirm: {
35
55
  type: Boolean,
36
56
  default: true
37
57
  },
38
- // 是否打乱键盘按键的顺序
58
+ /**
59
+ * @description 是否打乱键盘按键的顺序
60
+ * @default false
61
+ */
39
62
  random: {
40
63
  type: Boolean,
41
64
  default: false
42
65
  },
43
- // 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距
66
+ /**
67
+ * @description 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距
68
+ * @default true
69
+ */
44
70
  safeArea: {
45
71
  type: Boolean,
46
72
  default: true
47
73
  },
48
- // 是否允许通过点击遮罩关闭键盘
74
+ /**
75
+ * @description 是否允许通过点击遮罩关闭键盘
76
+ * @default true
77
+ */
49
78
  isMaskClick: {
50
79
  type: Boolean,
51
80
  default: true
52
81
  },
53
- // 是否允许点击确认按钮关闭组件
82
+ /**
83
+ * @description 是否允许点击确认按钮关闭组件
84
+ * @default true
85
+ */
54
86
  closeOnClickConfirm: {
55
87
  type: Boolean,
56
88
  default: true
57
89
  },
58
- // z-index值
90
+ /**
91
+ * @description 层级
92
+ * @default 10075
93
+ */
59
94
  zIndex: {
60
95
  type: [String, Number],
61
96
  default: 10075
62
97
  },
63
- // 取消按钮的文字
98
+ /**
99
+ * @description 取消按钮的文字
100
+ * @default '取消'
101
+ */
64
102
  cancelText: {
65
103
  type: String,
66
104
  default: '取消'
67
105
  },
68
- // 确认按钮的文字
106
+ /**
107
+ * @description 确认按钮的文字
108
+ * @default '确定'
109
+ */
69
110
  confirmText: {
70
111
  type: String,
71
112
  default: '确定'
72
113
  },
73
- // 输入一个中文后,是否自动切换到英文
114
+ /**
115
+ * @description 输入一个中文后,是否自动切换到英文
116
+ * @default false
117
+ */
74
118
  autoChange: {
75
119
  type: Boolean,
76
120
  default: false
77
121
  },
78
- // 被禁用的键
122
+ /**
123
+ * @description 被禁用的键
124
+ */
79
125
  disKeys: {
80
126
  type: Array,
81
127
  default: ()=>[]
82
128
  },
83
- // 是否自定义abc
129
+ /**
130
+ * @description 是否自定义abc
131
+ * @default false
132
+ */
84
133
  customabc: {
85
134
  type: Boolean,
86
135
  default: false
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="fu-line" :style="[lineStyle]"></view>
2
+ <view class="fu-line" :class="[customClass]" :style="[lineStyle]"></view>
3
3
  </template>
4
4
 
5
5
  <script>
@@ -9,18 +9,21 @@
9
9
  /**
10
10
  * line 线条
11
11
  * @description 此组件一般用于显示一根线条,用于分隔内容块,有横向和竖向两种模式,且能设置0.5px线条,使用也很简单
12
- * @property {String} color 线条的颜色 ( 默认 '#d6d7d9' )
13
- * @property {String,Number} length 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等 ( 默认 '100%' )
14
- * @property {String} direction = [row|col] 线条的方向,row 横向,col 竖向 (默认 'row' )
12
+ * @property {String} color 线条的颜色 (默认 '#d6d7d9')
13
+ * @property {String,Number} length 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等 (默认 '100%')
14
+ * @property {String} direction = [row|col] 线条的方向,row 横向,col 竖向 (默认 'row')
15
15
  * @value row 横向
16
16
  * @value col 竖向
17
17
  * @property {Boolean} hairline = [true|false] 是否显示细线条 (默认 true )
18
- * @property {String,Number} margin 线条与上下左右元素的间距,字符串形式,如"30px" (默认 0 )
18
+ * @property {String,Number} margin 线条与上下左右元素的间距,字符串形式,如"30px" (默认 0)
19
19
  * @property {String} borderStyle = [solid|dashed|dotted] 设置线条类型 (默认 solid)
20
- * @value solid 表示实线
21
- * @value dashed 表示方形虚线
22
- * @value dotted 表示圆点虚线
20
+ * @value solid 实线
21
+ * @value dashed 方形虚线
22
+ * @value dotted 圆点虚线
23
+ * @property {String,Number} borderWidth 设置线条宽度(默认 1px)
24
+ * @property {String} customClass 定义需要用到的外部类
23
25
  * @property {String,Object} customStyle 定义需要用到的外部样式
26
+ *
24
27
  * @example <fu-line color="red"></fu-line>
25
28
  */
26
29
  export default {
@@ -28,23 +31,24 @@
28
31
  mixins: [mpMixin, mixin, props],
29
32
  computed: {
30
33
  lineStyle() {
31
- const style = {}
32
- style.margin = this.$fu.addUnit(this.margin);
34
+ const style = {
35
+ margin: this.$fu.addUnit(this.margin),
36
+ borderColor: this.color
37
+ };
33
38
  // 如果是水平线条,边框高度为1px,再通过transform缩小一半,就是0.5px了
34
39
  if (this.direction === 'row') {
35
40
  // 此处采用兼容分开写,兼容nvue的写法
36
- style.borderBottomWidth = '1px';
41
+ style.borderBottomWidth = this.$fu.addUnit(this.borderWidth) || '1px';
37
42
  style.borderBottomStyle = this.borderStyle || 'solid';
38
43
  style.width = this.$fu.addUnit(this.length);
39
44
  if (this.hairline) style.transform = 'scaleY(0.5)'
40
45
  } else {
41
46
  // 如果是竖向线条,边框宽度为1px,再通过transform缩小一半,就是0.5px了
42
- style.borderLeftWidth = '1px';
47
+ style.borderLeftWidth = this.$fu.addUnit(this.borderWidth) || '1px';
43
48
  style.borderLeftStyle = this.borderStyle || 'solid';
44
49
  style.height = this.$fu.addUnit(this.length);
45
50
  if (this.hairline) style.transform = 'scaleX(0.5)'
46
51
  }
47
- style.borderColor = this.color
48
52
  return this.$fu.deepMerge(style, this.$fu.addStyle(this.customStyle))
49
53
  }
50
54
  }
@@ -1,33 +1,58 @@
1
1
  export default {
2
2
  props: {
3
+ /**
4
+ * @description 线条的颜色
5
+ */
3
6
  color: {
4
7
  type: String,
5
8
  default: '#d6d7d9'
6
9
  },
7
- // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
10
+ /**
11
+ * @description 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
12
+ */
8
13
  length: {
9
14
  type: [String, Number],
10
15
  default: ''
11
16
  },
12
- // 线条方向,col-竖向,row-横向
17
+ /**
18
+ * @description 线条方向
19
+ * @values 'col' - 竖向, 'row' - 横向
20
+ * @default 'row'
21
+ */
13
22
  direction: {
14
23
  type: String,
15
24
  default: 'row'
16
25
  },
17
- // 是否显示细边框
26
+ /**
27
+ * @description 是否显示细边框
28
+ * @default true
29
+ */
18
30
  hairline: {
19
31
  type: Boolean,
20
32
  default: true
21
33
  },
22
- // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
34
+ /**
35
+ * @description 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
36
+ */
23
37
  margin: {
24
38
  type: [String, Number],
25
39
  default: 0
26
40
  },
27
- // 设置线条类型
41
+ /**
42
+ * @description 设置线条类型
43
+ * @values 'solid' - 实线, 'dashed' - 方形虚线, 'dotted' - 圆点虚线
44
+ * @default 'solid'
45
+ */
28
46
  borderStyle: {
29
47
  type: String,
30
48
  default: 'solid'
49
+ },
50
+ /**
51
+ * @description 设置线条宽度(默认 1px)
52
+ */
53
+ borderWidth: {
54
+ type: [String,Number],
55
+ default: ''
31
56
  }
32
57
  }
33
58
  }
@@ -1,5 +1,9 @@
1
1
  <template>
2
- <text class="fu-link" :class="[customClass]" @tap.stop="onOpenLink" :style="[linkStyle]">
2
+ <text
3
+ class="fu-link"
4
+ :class="[customClass]"
5
+ :style="[linkStyle]"
6
+ @tap.stop="handleOpenLink">
3
7
  <slot>
4
8
  {{ text }}
5
9
  </slot>
@@ -14,15 +18,16 @@
14
18
  * Link 超链接
15
19
  * @description 此组件为超链接组件,在不同平台有不同表现形式:在APP平台会通过plus环境打开内置浏览器,在小程序中把链接复制到粘贴板,同时提示信息,在H5中通过window.open打开链接。
16
20
  * @property {String} color 文字颜色
17
- * @property {String,Number} size 字体大小,单位px (默认 14
21
+ * @property {String,Number} size 字体大小(默认 15
18
22
  * @property {Boolean} underLine = [true|false] 是否显示下划线 (默认 false )
19
23
  * @property {String} href 跳转的链接,要带上http(s)
20
24
  * @property {String} mpTips 各个小程序平台把链接复制到粘贴板后的提示语(默认“链接已复制,请在浏览器打开”)
21
25
  * @property {String} text 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
22
- * @property {String} customClass 定义需要用到的class外部样式
26
+ * @property {String} customClass 定义需要用到的外部类
23
27
  * @property {Object,String} customStyle 定义需要用到的外部样式
24
- * @property {Function} click 点击触发
25
- * @example <fu-link href="http://www.baidu.com">不同平台有不同表现形式</fu-link>
28
+ *
29
+ * @event {Function} click 点击链接触发
30
+ * @example <fu-link text="不同平台有不同表现形式" href="http://www.baidu.com"></fu-link>
26
31
  */
27
32
  export default {
28
33
  name:"FuLink",
@@ -41,7 +46,7 @@
41
46
  }
42
47
  },
43
48
  methods: {
44
- onOpenLink(e) {
49
+ handleOpenLink(e) {
45
50
  // #ifdef APP-PLUS
46
51
  plus.runtime.openURL(this.href)
47
52
  // #endif
@@ -70,7 +75,8 @@
70
75
  </script>
71
76
 
72
77
  <style lang="scss" scoped>
73
- @import '../../libs/css/component.scss';
78
+ @import '../../libs/style/components.scss';
79
+ @import '../../libs/style/color.scss';
74
80
  $fu-link-line-height:1 !default;
75
81
 
76
82
  .fu-link {
@@ -80,6 +86,6 @@
80
86
  @include flex;
81
87
  flex-wrap: wrap;
82
88
  flex: 1;
83
- color: #3396ff;
89
+ color: $fu-primary;
84
90
  }
85
91
  </style>
@@ -1,31 +1,46 @@
1
1
  export default {
2
2
  props: {
3
- // 文字颜色
3
+ /**
4
+ * @description 文字颜色
5
+ */
4
6
  color: {
5
7
  type: String,
6
8
  default: ''
7
9
  },
8
- // 字体大小,单位px
10
+ /**
11
+ * @description 字体大小
12
+ * @default 15
13
+ */
9
14
  size: {
10
15
  type: [String, Number],
11
- default: 14
16
+ default: 15
12
17
  },
13
- // 是否显示下划线
18
+ /**
19
+ * @description 是否显示下划线
20
+ * @default false
21
+ */
14
22
  underLine: {
15
23
  type: Boolean,
16
24
  default: false
17
25
  },
18
- // 要跳转的链接
26
+ /**
27
+ * @description 要跳转的链接
28
+ */
19
29
  href: {
20
30
  type: String,
21
31
  default: ''
22
32
  },
23
- // 小程序中复制到粘贴板的提示语
33
+ /**
34
+ * @description 小程序中复制到粘贴板的提示语
35
+ * @default '链接已复制,请在浏览器打开'
36
+ */
24
37
  mpTips: {
25
38
  type: String,
26
39
  default: '链接已复制,请在浏览器打开'
27
40
  },
28
- // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
41
+ /**
42
+ * @description 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
43
+ */
29
44
  text: {
30
45
  type: String,
31
46
  default: ''