fusions-ui 1.2.4 → 1.2.6

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 +107 -0
  37. package/components/fu-icon/icon.css +584 -0
  38. package/components/{fu-icons/icons.js → fu-icon/icon.js} +1031 -1031
  39. package/components/{fu-icons/fuicons.ttf → fu-icon/icon.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 +18 -3
  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
@@ -15,7 +15,7 @@
15
15
  <!-- #ifndef MP-WEIXIN && MP-QQ && MP-BAIDU -->
16
16
  <template v-if="mpAvatar && allowMp"></template>
17
17
  <!-- #endif -->
18
- <fu-icons :name="icon" :size="fontSize" :color="color" v-else-if="icon"></fu-icons>
18
+ <fu-icon :name="icon" :size="fontSize" :color="color" v-else-if="icon"></fu-icon>
19
19
  <fu-text :text="text" :size="fontSize" :color="color" align="center" v-else-if="text"></fu-text>
20
20
  <image
21
21
  class="fu-avatar__image"
@@ -56,6 +56,7 @@
56
56
  * @property {String,Number} colorIndex 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
57
57
  * @property {String} name 组件标识符(默认 'level' )
58
58
  * @property {Object,String} customStyle 定义需要用到的外部样式
59
+ *
59
60
  * @event {Function} click 点击组件时触发 index: 用户传递的标识符
60
61
  * @example <fu-avatar :src="src" mode="square"></fu-avatar>
61
62
  */
@@ -127,12 +128,13 @@
127
128
  </script>
128
129
 
129
130
  <style lang="scss" scoped>
130
- @import '../../libs/css/component.scss';
131
+ @import '../../libs/style/components.scss';
131
132
 
132
133
  .fu-avatar {
133
134
  @include flex;
134
135
  align-items: center;
135
136
  justify-content: center;
137
+ flex: 0 0 auto;
136
138
 
137
139
  &--circle {
138
140
  border-radius: 100px;
@@ -1,67 +1,102 @@
1
1
  import { checkRange } from '../../libs/function/check.js'
2
2
  export default {
3
3
  props: {
4
- // 头像图片路径(不能为相对路径)
4
+ /**
5
+ * @description 头像图片路径(不能为相对路径)
6
+ */
5
7
  src: {
6
8
  type: String,
7
9
  default: ''
8
10
  },
9
- // 头像形状,circle-圆形,square-方形
11
+ /**
12
+ * @description 头像形状
13
+ * @values 'circle' - 圆形, 'square' - 方形
14
+ * @default 'circle'
15
+ */
10
16
  shape: {
11
17
  type: String,
12
18
  default: 'circle'
13
19
  },
14
- // 头像尺寸
20
+ /**
21
+ * @description 头像尺寸
22
+ * @default 40
23
+ */
15
24
  size: {
16
25
  type: [String,Number],
17
26
  default: 40
18
27
  },
19
- // 裁剪模式
28
+ /**
29
+ * @description 裁剪模式
30
+ * @default 'aspectFill'
31
+ */
20
32
  mode: {
21
33
  type: String,
22
34
  default: 'aspectFill'
23
35
  },
24
- // 显示的文字
36
+ /**
37
+ * @description 显示的文字
38
+ */
25
39
  text: {
26
40
  type: String,
27
41
  default: ''
28
42
  },
29
- // 背景色
43
+ /**
44
+ * @description 背景颜色
45
+ * @default '#c4c8d0'
46
+ */
30
47
  bgColor: {
31
48
  type: String,
32
49
  default: '#c4c8d0'
33
50
  },
34
- // 文字颜色
51
+ /**
52
+ * @description 文字颜色
53
+ * @default '#ffffff'
54
+ */
35
55
  color: {
36
56
  type: String,
37
- default: '#fff'
57
+ default: '#ffffff'
38
58
  },
39
- // 文字大小
59
+ /**
60
+ * @description 文字大小
61
+ * @default 18
62
+ */
40
63
  fontSize: {
41
64
  type: [String,Number],
42
65
  default: 18
43
66
  },
44
- // 显示的图标
67
+ /**
68
+ * @description 显示的图标
69
+ */
45
70
  icon: {
46
71
  type: String,
47
72
  default: ''
48
73
  },
49
- // 显示小程序头像,只对百度,微信,QQ小程序有效
74
+ /**
75
+ * @description 显示小程序头像,只对百度,微信,QQ小程序有效
76
+ * @default false
77
+ */
50
78
  mpAvatar: {
51
79
  type: Boolean,
52
80
  default: false
53
81
  },
54
- // 是否使用随机背景色
82
+ /**
83
+ * @description 是否使用随机背景色
84
+ * @default false
85
+ */
55
86
  randomBgColor: {
56
87
  type: Boolean,
57
88
  default: false
58
89
  },
59
- // 加载失败的默认头像(组件有内置默认图片)
90
+ /**
91
+ * @description 加载失败的默认头像(组件有内置默认图片)
92
+ */
60
93
  defaultUrl: {
61
94
  type: String,
62
95
  default: ''
63
96
  },
64
- // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
97
+ /**
98
+ * @description 如果配置了randomBgColor=true时,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
99
+ */
65
100
  colorIndex: {
66
101
  type: [String,Number],
67
102
  // 校验参数规则,索引在0-19之间
@@ -71,7 +106,9 @@ export default {
71
106
  },
72
107
  default: ''
73
108
  },
74
- // 组件标识符
109
+ /**
110
+ * @description 组件标识符
111
+ */
75
112
  name: {
76
113
  type: String,
77
114
  default: ''
@@ -8,7 +8,7 @@
8
8
  :size="size"
9
9
  :shape="shape"
10
10
  :mode="mode"
11
- :src="$fu.object(item) ? keyName && item[keyName] || item.url : item">
11
+ :src="$fu.isObject(item) ? keyName && item[keyName] || item.url : item">
12
12
  </fu-avatar>
13
13
  <view
14
14
  class="fu-avatar-group__item__show-more"
@@ -43,6 +43,7 @@
43
43
  * @property {String} keyName 指定从数组的对象元素中读取哪个属性作为图片地址
44
44
  * @property {String,Number} gap 头像之间的遮挡比例(0.4代表遮挡40%)(默认 0.5 )
45
45
  * @property {String,Number} extraValue 需额外显示的值
46
+ *
46
47
  * @event {Function} showMore 头像组更多点击
47
48
  * @example <fu-avatar-group:urls="urls" size="35" gap="0.4" ></fu-avatar-group:urls=>
48
49
  */
@@ -67,7 +68,7 @@
67
68
  </script>
68
69
 
69
70
  <style lang="scss" scoped>
70
- @import '../../libs/css/component.scss';
71
+ @import '../../libs/style/components.scss';
71
72
 
72
73
  .fu-avatar-group {
73
74
  @include flex;
@@ -1,41 +1,61 @@
1
1
  export default {
2
2
  props: {
3
- // 头像图片组
3
+ /**
4
+ * @description 头像图片组
5
+ */
4
6
  urls: {
5
7
  type: Array,
6
8
  default: () => []
7
9
  },
8
- // 最多展示的头像数量
10
+ /**
11
+ * @description 最多展示的头像数量
12
+ */
9
13
  maxCount: {
10
14
  type: [String,Number],
11
15
  default: 5
12
16
  },
13
- // 头像形状
17
+ /**
18
+ * @description 头像形状
19
+ */
14
20
  shape: {
15
21
  type: String,
16
22
  default: 'circle'
17
23
  },
18
- // 图片裁剪模式
24
+ /**
25
+ * @description 图片裁剪模式
26
+ * @default 'aspectFill'
27
+ */
19
28
  mode: {
20
29
  type: String,
21
30
  default: 'aspectFill'
22
31
  },
23
- // 超出maxCount时是否显示查看更多的提示
32
+ /**
33
+ * @description 超出maxCount时是否显示查看更多的提示
34
+ * @default true
35
+ */
24
36
  showMore: {
25
37
  type: Boolean,
26
38
  default: true
27
39
  },
28
- // 头像大小
40
+ /**
41
+ * @description 头像大小
42
+ * @default 40
43
+ */
29
44
  size: {
30
45
  type: [String,Number],
31
46
  default: 40
32
47
  },
33
- // 指定从数组的对象元素中读取哪个属性作为图片地址
48
+ /**
49
+ * @description 指定从数组的对象元素中读取哪个属性作为图片地址
50
+ */
34
51
  keyName: {
35
52
  type: String,
36
53
  default: ''
37
54
  },
38
- // 头像之间的遮挡比例
55
+ /**
56
+ * @description 头像之间的遮挡比例
57
+ * @default 0.5
58
+ */
39
59
  gap: {
40
60
  type: [String,Number],
41
61
  validator(value) {
@@ -43,7 +63,9 @@ export default {
43
63
  },
44
64
  default: 0.5
45
65
  },
46
- // 需额外显示的值
66
+ /**
67
+ * @description 需额外显示的值
68
+ */
47
69
  extraValue: {
48
70
  type: [String,Number],
49
71
  default: 0
@@ -39,33 +39,28 @@
39
39
  * @property {Boolean} inverted = [true|false] 是否反转背景和字体颜色(默认 false )
40
40
  * @property {Boolean} absolute = [true|false] 是否绝对定位(默认 false )
41
41
  * @property {String,Object} customStyle 定义需要用到的外部样式
42
+ *
42
43
  * @example <fu-badge :type="type" :count="count"></fu-badge>
43
44
  */
44
45
  export default {
45
46
  name: 'fu-badge',
46
47
  mixins: [mpMixin, mixin, props],
47
48
  computed: {
48
- // 是否将badge中心与父组件右上角重合
49
- boxStyle() {
50
- let style = {};
51
- return style;
52
- },
53
- // 整个组件的样式
54
49
  badgeStyle() {
55
50
  const style = {}
56
51
  if(this.color) {
57
- style.color = this.color
52
+ style.color = this.color;
58
53
  }
59
54
  if (this.bgColor && !this.inverted) {
60
- style.backgroundColor = this.bgColor
55
+ style.backgroundColor = this.bgColor;
61
56
  }
62
57
  if (this.absolute) {
63
- style.position = 'absolute'
58
+ style.position = 'absolute';
64
59
  // 如果有设置offset参数
65
60
  if(this.offset.length) {
66
61
  // top和right分为为offset的第一个和第二个值,如果没有第二个值,则right等于top
67
- const top = this.offset[0]
68
- const right = this.offset[1] || top
62
+ const top = this.offset[0];
63
+ const right = this.offset[1] || top;
69
64
  style.top = this.$fu.addUnit(top)
70
65
  style.right = this.$fu.addUnit(right)
71
66
  }
@@ -96,9 +91,8 @@
96
91
  </script>
97
92
 
98
93
  <style lang="scss" scoped>
99
- @import '../../libs/css/component.scss';
100
- @import '../../libs/css/color.scss';
101
-
94
+ @import '../../libs/style/components.scss';
95
+ @import '../../libs/style/color.scss';
102
96
  $fu-badge-primary: $fu-primary !default;
103
97
  $fu-badge-error: $fu-error !default;
104
98
  $fu-badge-success: $fu-success !default;
@@ -1,69 +1,109 @@
1
1
  export default {
2
2
  props: {
3
- // 是否显示
3
+ /**
4
+ * @description 是否显示
5
+ * @default true
6
+ */
4
7
  show: {
5
8
  type: Boolean,
6
9
  default: true
7
10
  },
8
- // 是否显示圆点
11
+ /**
12
+ * @description 是否显示圆点
13
+ * @default false
14
+ */
9
15
  isDot: {
10
16
  type: Boolean,
11
17
  default: false
12
18
  },
13
- // 显示的内容
19
+ /**
20
+ * @description 显示的内容
21
+ */
14
22
  value: {
15
23
  type: [Number, String],
16
24
  default: ''
17
25
  },
18
- // 最大值,超过最大值会显示 '{max}+'
26
+ /**
27
+ * @description 最大值,超过最大值会显示 '{max}+'
28
+ * @default 999
29
+ */
19
30
  max: {
20
31
  type: [Number, String],
21
32
  default: 999
22
33
  },
23
34
  // 主题类型,error|warning|success|primary
35
+ /**
36
+ * @description 主题类型
37
+ * @values 'primary' - 主色, 'error' - 错误, 'success' - 成功, 'warning' - 警告, 'info' - 信息
38
+ * @default 'error'
39
+ */
24
40
  type: {
25
41
  type: [String,undefined,null],
26
42
  default: 'error'
27
43
  },
28
- // 当数值为 0 时,是否展示 Badge
44
+ /**
45
+ * @description 当数值为 0 时,是否展示 Badge
46
+ * @default false
47
+ */
29
48
  showZero: {
30
49
  type: Boolean,
31
50
  default: false
32
51
  },
33
- // 背景颜色,优先级比type高,如设置,type参数会失效
52
+ /**
53
+ * @description 背景颜色,优先级比type高,如设置,type参数会失效
54
+ * @default null
55
+ */
34
56
  bgColor: {
35
- type: [String, null],
57
+ type: [String],
36
58
  default: null
37
59
  },
38
- // 字体颜色
60
+ /**
61
+ * @description 字体颜色
62
+ * @default null
63
+ */
39
64
  color: {
40
65
  type: [String, null],
41
66
  default: null
42
67
  },
43
- // 徽标形状,circle-四角均为圆角,horn-左下角为直角
68
+ /**
69
+ * @description 徽标形状
70
+ * @values 'circle' - 四角均为圆角,'horn' - 左下角为直角
71
+ * @default 'circle'
72
+ */
44
73
  shape: {
45
74
  type: [String,undefined,null],
46
75
  default: 'circle'
47
76
  },
48
- // 设置数字的显示方式,overflow|ellipsis|limit
49
- // overflow会根据max字段判断,超出显示`${max}+`
50
- // ellipsis会根据max判断,超出显示`${max}...`
51
- // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
77
+ /**
78
+ * @description 设置数字的显示方式,overflow|ellipsis|limit
79
+ * overflow会根据max字段判断,超出显示`${max}+`
80
+ * ellipsis会根据max判断,超出显示`${max}...`
81
+ * limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
82
+ * @default 'overflow'
83
+ */
52
84
  numberType: {
53
85
  type: [String,undefined,null],
54
86
  default: 'overflow'
55
87
  },
56
- // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
88
+ /**
89
+ * @description 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值(仅absolute=true时有效)
90
+ */
57
91
  offset: {
58
92
  type: Array,
59
93
  default: () => []
60
94
  },
61
- // 是否反转背景和字体颜色
95
+ /**
96
+ * @description 是否反转背景和字体颜色
97
+ * @default false
98
+ */
62
99
  inverted: {
63
100
  type: Boolean,
64
101
  default: false
65
102
  },
66
- // 是否绝对定位
103
+ /**
104
+ * @description 是否绝对定位
105
+ * @default false
106
+ */
67
107
  absolute: {
68
108
  type: Boolean,
69
109
  default: false
@@ -16,6 +16,7 @@
16
16
  * @property {String,Number} percent 圆弧元素宽度占banner宽度的百分比,用于调整弧度,最低值120 默认120
17
17
  * @property {String,Number} height 自定义高度(默认150)
18
18
  * @property {String,Number} zIndex 自定义层级(默认0)
19
+ *
19
20
  * @template <fu-banner-arc bgColor="red"></fu-banner-arc>
20
21
  */
21
22
  export default {
@@ -31,7 +32,7 @@
31
32
  height: this.$fu.addUnit(this.height),
32
33
  zIndex: this.zIndex,
33
34
  width: `${this.percent < 120? 120: this.percent}%`,
34
- left: `-${(this.percent - 100) / 2}%`
35
+ left: `${(100 - this.percent) / 2}%`,
35
36
  }
36
37
  }
37
38
  }
@@ -41,19 +42,17 @@
41
42
  <style lang="scss" scoped>
42
43
  .fu-banner-arc {
43
44
  position: relative;
44
- overflow: hidden;
45
45
 
46
46
  &--box {
47
- width: 120%;
48
47
  padding-left: 10%;
49
48
  padding-right: 10%;
50
- left: -10%;
51
49
  box-sizing: border-box;
52
50
  position: absolute;
53
51
  top: 0;
54
52
  border-radius: 0 0 50% 50%;
53
+ /* #ifndef APP-NVUE */
55
54
  overflow: hidden;
55
+ /* #endif */
56
56
  }
57
-
58
57
  }
59
58
  </style>
@@ -1,21 +1,32 @@
1
1
  export default {
2
2
  props: {
3
- // 自定义背景色
3
+ /**
4
+ * @description 设置背景颜色
5
+ * @default '-webkit-linear-gradient(top, rgb(84, 115, 255), rgb(109, 168, 255))'
6
+ */
4
7
  bgColor: {
5
8
  type: String,
6
9
  default: '-webkit-linear-gradient(top, rgb(84, 115, 255), rgb(109, 168, 255))'
7
10
  },
8
- // percent 圆弧元素宽度占banner宽度的百分比,用于调整弧度,最低值120 默认120
11
+ /**
12
+ * @description percent 圆弧元素宽度占banner宽度的百分比,用于调整弧度,最低值120 默认120
13
+ * @default 120
14
+ */
9
15
  percent: {
10
16
  type: [String,Number],
11
17
  default: 120
12
18
  },
13
- // height 自定义高度 默认150
19
+ /**
20
+ * @description 设置高度
21
+ * @default 200
22
+ */
14
23
  height: {
15
24
  type: [String,Number],
16
25
  default: 200
17
26
  },
18
- // 自定义层级 默认0
27
+ /**
28
+ * @description 设置层级
29
+ */
19
30
  zIndex: {
20
31
  type: [String,Number],
21
32
  default: 0
@@ -52,21 +52,19 @@
52
52
  :send-message-img="sendMessageImg"
53
53
  :show-message-card="showMessageCard"
54
54
  :lang="lang"
55
- @tap.stop="handleClick">
55
+ @tap="handleClick">
56
56
  <!-- #endif -->
57
- <template v-if="loading">
58
- <fu-loading :mode="loadingMode" :size="loadingSize * 1.5" :color="loadingColor"></fu-loading>
59
- <text class="fu-button__loading-text"
60
- :style="[{ fontSize: $fu.addUnit(textSize) }, $fu.addStyle(customTextStyle)]">{{ loadingText || text }}</text>
61
- </template>
62
- <template v-else>
63
- <slot name="prefix"></slot>
64
- <slot>
65
- <text class="fu-button__text"
66
- :style="[{ fontSize: $fu.addUnit(textSize) }, $fu.addStyle(customTextStyle)]">{{ text }}</text>
67
- </slot>
68
- <slot name="suffix"></slot>
69
- </template>
57
+ <template v-if="loading">
58
+ <fu-loading :mode="loadingMode" :size="loadingSize * 1.5" :color="loadingColor"></fu-loading>
59
+ <text class="fu-button__loading-text" :style="[{ fontSize: $fu.addUnit(textSize) }, $fu.addStyle(customTextStyle)]">{{ loadingText || text }}</text>
60
+ </template>
61
+ <template v-else>
62
+ <slot name="prefix"></slot>
63
+ <slot>
64
+ <text class="fu-button__text" :style="[{ fontSize: $fu.addUnit(textSize) }, $fu.addStyle(customTextStyle)]">{{ text }}</text>
65
+ </slot>
66
+ <slot name="suffix"></slot>
67
+ </template>
70
68
  </button>
71
69
  </view>
72
70
  </template>
@@ -122,9 +120,10 @@
122
120
  * @value throttle 节流模式
123
121
  * @property {Number} sceneTime 防抖节流间隔时间单位毫秒(默认300)
124
122
  * @property {String} lang = [zh_CN|zh_TW|en] 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文(默认 en )
125
- * @property {String} customClass 自定义外部class样式
126
- * @property {Object,String} customStyle 自定义外部样式
127
- * @property {Object,String} customTextStyle 自定义按钮文本样式
123
+ * @property {String} customClass 定义需要用到的外部样式类
124
+ * @property {Object,String} customStyle 定义需要用到的外部样式
125
+ * @property {Object,String} customTextStyle 定义需要用到的外部按钮文本样式
126
+ *
128
127
  * @event {Function} click 非禁止并且非加载中,才能点击
129
128
  * @event {Function} tap 非禁止并且非加载中,才能点击
130
129
  * @event {Function} getphonenumber open-type="getPhoneNumber"时有效
@@ -132,7 +131,7 @@
132
131
  * @event {Function} error 当使用开放能力时,发生错误的回调
133
132
  * @event {Function} chooseavatar open-type="chooseAvatar"时有效
134
133
  * @event {Function} contact open-type="contact"时有效
135
- * @example <fu-button>按钮</fu-button>
134
+ * @example <fu-button text="按钮"></fu-button>
136
135
  */
137
136
  export default {
138
137
  name: "FuButton",
@@ -272,8 +271,7 @@
272
271
  </script>
273
272
 
274
273
  <style lang="scss" scoped>
275
- @import '../../libs/css/color.scss';
276
-
274
+ @import '../../libs/style/color.scss';
277
275
  $fu-button-height: 40px !default;
278
276
  $fu-button-loading-text-font-size: 15px !default;
279
277
  $fu-button-loading-text-margin-left: 4px !default;