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
@@ -3,29 +3,29 @@
3
3
  <view :class="{ 'fu-navbar--fixed': fixed, 'fu-navbar--shadow': shadow, 'fu-navbar--border': border }" :style="{ 'background': themeBgColor }" class="fu-navbar__content">
4
4
  <status-bar v-if="statusBar" />
5
5
  <view class="fu-navbar__header" :style="{ color: themeColor, height: navbarHeight}">
6
- <view @tap="onClickLeft" class="fu-navbar__header-btns fu-navbar__header-btns-left" :style="{width: leftIconWidth}">
6
+ <view @tap="handleClickLeft" class="fu-navbar__header-btns fu-navbar__header-btns-left" :style="{width: leftIconWidth}">
7
7
  <slot name="left">
8
- <view class="fu-navbar__content_view" v-if="leftIcon.length > 0">
9
- <fu-icons :color="themeColor" :name="leftIcon" size="24" />
8
+ <view class="fu-navbar__content_view" v-if="leftIcon">
9
+ <fu-icon :color="themeColor" :name="leftIcon" size="24" />
10
10
  </view>
11
- <view class="fu-navbar-btn-text" :class="{ 'fu-navbar-btn-icon-left': !leftIcon.length > 0 }" v-if="leftText.length">
11
+ <view class="fu-navbar-btn-text" :class="{ 'fu-navbar-btn-icon-left': !leftIcon }" v-if="leftText">
12
12
  <text :style="{ color: themeColor, fontSize: '12px' }">{{ leftText }}</text>
13
13
  </view>
14
14
  </slot>
15
15
  </view>
16
- <view class="fu-navbar__header-container" :style="{'padding': '0 ' + paddingTitle + 'px'}" @tap="onClickTitle">
16
+ <view class="fu-navbar__header-container" :style="{'padding': '0 ' + paddingTitle + 'px'}" @tap="handleClickTitle">
17
17
  <slot>
18
- <view class="fu-navbar__header-container-inner" v-if="title.length>0">
18
+ <view class="fu-navbar__header-container-inner" v-if="title">
19
19
  <text class="fu-nav-bar-text fu-ellipsis-1" :style="{color: themeColor }">{{ title }}</text>
20
20
  </view>
21
21
  </slot>
22
22
  </view>
23
- <view class="fu-navbar__header-btns fu-navbar__header-btns-right" :style="{width:rightIconWidth}" @click="onClickRight">
23
+ <view class="fu-navbar__header-btns fu-navbar__header-btns-right" :style="{width:rightIconWidth}" @click="handleClickRight">
24
24
  <slot name="right">
25
- <view v-if="rightIcon.length">
26
- <fu-icons :color="themeColor" :name="rightIcon" size="24" />
25
+ <view v-if="rightIcon">
26
+ <fu-icon :color="themeColor" :name="rightIcon" size="24" />
27
27
  </view>
28
- <view class="fu-navbar-btn-text" v-if="rightText.length && !rightIcon.length">
28
+ <view class="fu-navbar-btn-text" v-if="rightText && !rightIcon">
29
29
  <text class="fu-nav-bar-right-text" :style="{ color: themeColor}">{{ rightText }}</text>
30
30
  </view>
31
31
  </slot>
@@ -65,17 +65,19 @@
65
65
  * @property {String,Number} leftWidth 导航栏左侧宽度(默认 60)
66
66
  * @property {String,Number} rightWidth 导航栏右侧宽度 (默认60)
67
67
  * @property {String} paddingTitle 导航栏左右内间距(默认 10)
68
+ *
68
69
  * @event {Function} clickLeft 左侧按钮点击时触发
69
70
  * @event {Function} clickRight 右侧按钮点击时触发
70
71
  * @event {Function} clickTitle 中间标题点击时触发
72
+ * @example <fu-navbar :title="title"></fu-navbar>
71
73
  */
72
74
  export default {
73
- name: 'FuNavBar',
75
+ name: 'FuNavbar',
74
76
  components: {
75
77
  statusBar
76
78
  },
77
- emits: ['clickLeft', 'clickRight', 'clickTitle'],
78
79
  mixins: [mpMixin, props],
80
+ emits: ['clickLeft', 'clickRight', 'clickTitle'],
79
81
  computed: {
80
82
  themeBgColor() {
81
83
  if (this.dark) {
@@ -83,10 +85,10 @@
83
85
  if (this.bgColor) {
84
86
  return this.bgColor
85
87
  } else {
86
- return this.dark ? '#333' : '#FFF'
88
+ return this.dark ? '#333333' : '#FFFFFF'
87
89
  }
88
90
  }
89
- return this.bgColor || '#FFF'
91
+ return this.bgColor || '#FFFFFF'
90
92
  },
91
93
  themeColor() {
92
94
  if (this.dark) {
@@ -115,15 +117,18 @@
115
117
  }
116
118
  },
117
119
  methods: {
118
- onClickLeft(e) {
120
+ // 左侧按钮点击时触发
121
+ handleClickLeft(e) {
119
122
  this.$emit("clickLeft", e);
120
123
  },
121
-
122
- onClickRight(e) {
124
+
125
+ // 右侧按钮点击时触发
126
+ handleClickRight(e) {
123
127
  this.$emit("clickRight", e);
124
128
  },
125
-
126
- onClickTitle(e) {
129
+
130
+ // 中间标题点击时触发
131
+ handleClickTitle(e) {
127
132
  this.$emit("clickTitle", e);
128
133
  }
129
134
  }
@@ -131,6 +136,7 @@
131
136
  </script>
132
137
 
133
138
  <style lang="scss" scoped>
139
+ @import '../../libs/style/components.scss';
134
140
  $nav-height: 44px;
135
141
 
136
142
  .fu-nvue-fixed {
@@ -158,32 +164,25 @@
158
164
  }
159
165
 
160
166
  .fu-navbar-btn-text {
161
- /* #ifndef APP-NVUE */
162
- display: flex;
163
- /* #endif */
164
- flex-direction: column;
167
+ @include flex(column);
165
168
  justify-content: flex-start;
166
169
  align-items: center;
167
170
  line-height: 12px;
168
171
  }
169
172
 
170
173
  .fu-navbar__header {
171
- /* #ifndef APP-NVUE */
172
- display: flex;
173
- /* #endif */
174
+ @include flex(row);
174
175
  padding: 0 10px;
175
- flex-direction: row;
176
176
  height: $nav-height;
177
177
  font-size: 12px;
178
178
  }
179
179
 
180
180
  .fu-navbar__header-btns {
181
+ @include flex(row);
181
182
  /* #ifndef APP-NVUE */
182
183
  overflow: hidden;
183
- display: flex;
184
184
  /* #endif */
185
185
  flex-wrap: nowrap;
186
- flex-direction: row;
187
186
  width: 120rpx;
188
187
  justify-content: center;
189
188
  align-items: center;
@@ -193,42 +192,36 @@
193
192
  }
194
193
 
195
194
  .fu-navbar__header-btns-left {
196
- /* #ifndef APP-NVUE */
197
- display: flex;
198
- /* #endif */
195
+ @include flex;
199
196
  width: 120rpx;
200
197
  justify-content: flex-start;
201
198
  align-items: center;
202
199
  }
203
200
 
204
201
  .fu-navbar__header-btns-right {
205
- /* #ifndef APP-NVUE */
206
- display: flex;
207
- /* #endif */
208
- flex-direction: row;
202
+ @include flex(row);
209
203
  justify-content: flex-end;
210
204
  align-items: center;
211
205
  }
212
206
 
213
207
  .fu-navbar__header-container {
214
- /* #ifndef APP-NVUE */
215
- display: flex;
216
- /* #endif */
208
+ @include flex;
217
209
  flex: 1;
218
210
  padding: 0 10px;
211
+ /* #ifndef APP-NVUE */
219
212
  overflow: hidden;
213
+ /* #endif */
220
214
  }
221
215
 
222
216
  .fu-navbar__header-container-inner {
223
- /* #ifndef APP-NVUE */
224
- display: flex;
225
- /* #endif */
217
+ @include flex(row);
226
218
  flex: 1;
227
- flex-direction: row;
228
219
  align-items: center;
229
220
  justify-content: center;
230
221
  font-size: 12px;
222
+ /* #ifndef APP-NVUE */
231
223
  overflow: hidden;
224
+ /* #endif */
232
225
  }
233
226
 
234
227
 
@@ -262,8 +255,8 @@
262
255
  }
263
256
 
264
257
  .fu-ellipsis-1 {
265
- overflow: hidden;
266
258
  /* #ifndef APP-NVUE */
259
+ overflow: hidden;
267
260
  white-space: nowrap;
268
261
  text-overflow: ellipsis;
269
262
  /* #endif */
@@ -53,9 +53,9 @@
53
53
  </template>
54
54
 
55
55
  <script>
56
+ import mpMixin from '../../libs/mixin/mpMixin.js'
56
57
  import NoticeRow from './notice-row.vue'
57
58
  import NoticeColumn from './notice-column.vue'
58
- import mpMixin from '../../libs/mixin/mpMixin.js'
59
59
  import props from './props.js'
60
60
  /**
61
61
  * NoticeBar 通知栏
@@ -79,20 +79,20 @@
79
79
  * @property {String} color 字体颜色
80
80
  * @property {String,Number} size 字体大小(默认 14)
81
81
  * @property {String} bgColor 背景颜色
82
+ *
83
+ * @event {Function} click 点击通知栏文字触发
84
+ * @event {Function} clickRight 点击右侧图标触发
85
+ * @event {Function} end 一个周期滚动结束触发(仅mode=column时生效)
86
+ * @example <fu-notice-bar :list="list"></fu-notice-bar>
82
87
  */
83
88
  export default {
84
89
  name:"FuNoticeBar",
85
- emits: ['click', 'clickLeft', 'clickRight', 'end'],
90
+ emits: ['click', 'clickRight', 'end'],
86
91
  mixins: [mpMixin, props],
87
92
  components: {
88
93
  NoticeRow,
89
94
  NoticeColumn
90
95
  },
91
- data() {
92
- return {
93
-
94
- };
95
- },
96
96
  computed: {
97
97
  // 当设置了show为false,或者autoHidden为true且list为空时,不显示通知
98
98
  showNotice() {
@@ -123,6 +123,8 @@
123
123
 
124
124
  <style lang="scss" scoped>
125
125
  .fu-notice-bar {
126
- overflow: hidden;
126
+ /* #ifndef APP-NVUE */
127
+ overflow: hidden;
128
+ /* #endif */
127
129
  }
128
130
  </style>
@@ -2,21 +2,22 @@
2
2
  <view class="fu-column-notice" :style="[noticeStyle]" @tap="handleClick" v-if="show">
3
3
  <!-- 左图标 -->
4
4
  <view class="fu-column-notice__icon--left" v-if="leftIcon">
5
- <fu-icons :name="leftIconName" :size="leftIconSize" :color="leftIconColor"></fu-icons>
5
+ <fu-icon :name="leftIconName" :size="leftIconSize" :color="leftIconColor"></fu-icon>
6
6
  </view>
7
-
7
+
8
8
  <!-- 滚动显示内容 -->
9
- <swiper class="fu-column-notice__swiper" :style="[swiperStyle]" :vertical="vertical" circular :autoplay="autoPlay" :interval="duration" @change="change">
10
- <swiper-item v-for="(item, index) in list" :key="index" class="fu-column-notice__swiper__item">
11
- <view class="fu-column-notice__swiper__content fu-text-ellipsis" :style="[textStyle()]">
12
- {{item}}
13
- </view>
14
- </swiper-item>
9
+ <swiper class="fu-column-notice__swiper" :style="[swiperStyle]" :vertical="vertical" circular
10
+ :autoplay="autoPlay" :interval="duration" @change="change">
11
+ <swiper-item v-for="(item, index) in list" :key="index" class="fu-column-notice__swiper__item">
12
+ <view class="fu-column-notice__swiper__content fu-text-ellipsis" :style="[textStyle()]">
13
+ {{item}}
14
+ </view>
15
+ </swiper-item>
15
16
  </swiper>
16
-
17
+
17
18
  <!-- 右图标 -->
18
19
  <view class="fu-column-notice__icon--right" @click="handleClickRight" v-if="rightIcon">
19
- <fu-icons :name="rightIconName" :size="rightIconSize" :color="rightIconColor"></fu-icons>
20
+ <fu-icon :name="rightIconName" :size="rightIconSize" :color="rightIconColor"></fu-icon>
20
21
  </view>
21
22
  </view>
22
23
  </template>
@@ -42,104 +43,160 @@
42
43
  * @property {String} fontColor 字体颜色
43
44
  * @property {String,Number} fontSize 字体大小(默认 14)
44
45
  * @property {String} bgColor 背景颜色
46
+ *
47
+ * @event {Function} click 点击通知栏文字触发
48
+ * @event {Function} clickRight 点击右侧图标触发
49
+ * @event {Function} end 一个周期滚动结束触发
50
+ * @example <notice-column :list="list"></notice-column>
45
51
  */
46
52
  export default {
47
- name:"NoticeColumn",
53
+ name: "NoticeColumn",
48
54
  mixins: [mpMixin, mixin],
49
55
  emits: ['click', 'clickRight', 'end'],
50
56
  props: {
51
- // 显示的内容
57
+ /**
58
+ * @description 显示的内容
59
+ */
52
60
  list: {
53
- type: Array,
54
- default() {
55
- return []
56
- }
61
+ type: Array,
62
+ default () {
63
+ return []
64
+ }
57
65
  },
58
- // 是否显示
66
+ /**
67
+ * @description 是否显示
68
+ * @default true
69
+ */
59
70
  show: {
60
- type: Boolean,
61
- default: true
71
+ type: Boolean,
72
+ default: true
62
73
  },
63
- // 滚动方向
64
- // row -> 水平滚动 column -> 垂直滚动
74
+ /**
75
+ * @description 滚动方向
76
+ * @values @values 'row' - 水平滚动, 'column' - 垂直滚动
77
+ * @default 'row'
78
+ */
65
79
  mode: {
66
- type: String,
67
- default: 'row'
80
+ type: String,
81
+ default: 'row'
68
82
  },
69
- // 是否显示左边图标
83
+ /**
84
+ * @description 是否显示左边图标
85
+ * @default true
86
+ */
70
87
  leftIcon: {
71
- type: Boolean,
72
- default: true
88
+ type: Boolean,
89
+ default: true
73
90
  },
74
- // 左边图标的名称
91
+ /**
92
+ * @description 左边图标的名称
93
+ * @default 'volume'
94
+ */
75
95
  leftIconName: {
76
- type: String,
77
- default: 'volume'
96
+ type: String,
97
+ default: 'volume'
78
98
  },
79
- // 左边图标的大小
99
+ /**
100
+ * @description 左边图标的大小
101
+ * @default 20
102
+ */
80
103
  leftIconSize: {
81
- type: Number,
82
- default: 20
104
+ type: Number,
105
+ default: 20
83
106
  },
84
- // 左边图标的颜色
107
+ /**
108
+ * @description 左边图标的颜色
109
+ * @default '#333333'
110
+ */
85
111
  leftIconColor: {
86
112
  type: String,
87
113
  default: '#333333'
88
114
  },
89
- // 是否显示右边的图标
115
+ /**
116
+ * @description 是否显示右边的图标
117
+ * @default false
118
+ */
90
119
  rightIcon: {
91
- type: Boolean,
92
- default: false
120
+ type: Boolean,
121
+ default: false
93
122
  },
94
- // 右边图标的名称
123
+ /**
124
+ * @description 右边图标的名称
125
+ * @default 'right'
126
+ */
95
127
  rightIconName: {
96
- type: String,
97
- default: 'right'
128
+ type: String,
129
+ default: 'right'
98
130
  },
99
- // 右边图标的大小
131
+ /**
132
+ * @description 右边图标的大小
133
+ * @default 20
134
+ */
100
135
  rightIconSize: {
101
- type: [String,Number],
102
- default: 26
136
+ type: [String, Number],
137
+ default: 20
103
138
  },
104
- // 右边图标的颜色
139
+ /**
140
+ * @description 右边图标的颜色
141
+ * @default '#333333'
142
+ */
105
143
  rightIconColor: {
106
144
  type: String,
107
145
  default: '#333333'
108
146
  },
109
- // 圆角
147
+ /**
148
+ * @description 设置圆角
149
+ */
110
150
  radius: {
111
- type: Number,
112
- default: 0
151
+ type: Number,
152
+ default: 0
113
153
  },
114
- // 内边距
154
+ /**
155
+ * @description 内边距
156
+ * @default '9px 12px'
157
+ */
115
158
  padding: {
116
- type: String,
117
- default: '9px 12px'
159
+ type: String,
160
+ default: '9px 12px'
118
161
  },
119
- // 自动播放
162
+ /**
163
+ * @description 自动播放
164
+ * @default true
165
+ */
120
166
  autoPlay: {
121
- type: Boolean,
122
- default: true
167
+ type: Boolean,
168
+ default: true
123
169
  },
124
- // 滚动周期
170
+ /**
171
+ * @description 滚动周期
172
+ * @default 2000
173
+ */
125
174
  duration: {
126
- type: Number,
127
- default: 2000
175
+ type: Number,
176
+ default: 2000
128
177
  },
129
- // 背景颜色
178
+ /**
179
+ * @description 背景颜色
180
+ */
130
181
  bgColor: {
131
- type: String,
132
- default: ''
182
+ type: String,
183
+ default: ''
133
184
  },
134
- // 字体颜色
185
+ /**
186
+ * @description 字体颜色
187
+ * @default '#333333'
188
+ */
135
189
  fontColor: {
136
- type: String,
137
- default: ''
190
+ type: String,
191
+ default: '#333333'
138
192
  },
139
- // 字体大小
193
+ /**
194
+ * @description 字体大小
195
+ * @default 14
196
+ */
140
197
  fontSize: {
141
- type: [String,Number],
142
- default: 14
198
+ type: [String, Number],
199
+ default: 14
143
200
  }
144
201
  },
145
202
  data() {
@@ -149,31 +206,31 @@
149
206
  },
150
207
  computed: {
151
208
  textStyle() {
152
- return (type) => {
153
- let style = {
154
- color: this.fontColor || '',
155
- fontSize: this.$fu.addUnit(this.fontSize)
156
- };
157
- return style
158
- }
209
+ return (type) => {
210
+ let style = {
211
+ color: this.fontColor || '',
212
+ fontSize: this.$fu.addUnit(this.fontSize)
213
+ };
214
+ return style
215
+ }
159
216
  },
160
217
  noticeStyle() {
161
- let style = {
162
- background: this.bgColor || 'transparent'
163
- };
164
- if (this.padding) style.padding = this.padding
165
- return style
218
+ let style = {
219
+ background: this.bgColor || 'transparent'
220
+ };
221
+ if (this.padding) style.padding = this.padding
222
+ return style
166
223
  },
167
224
  swiperStyle() {
168
- let style = {}
169
- style.height = this.fontSize ? this.$fu.addUnit(this.fontSize + 6) : '16px';
170
- style.lineHeight = style.height;
171
- return style
225
+ let style = {}
226
+ style.height = this.fontSize ? this.$fu.addUnit(this.fontSize + 6) : '16px';
227
+ style.lineHeight = style.height;
228
+ return style
172
229
  },
173
230
  // 标记是否为垂直
174
231
  vertical() {
175
- if (this.mode === 'row') return false
176
- else return true
232
+ if (this.mode === 'row') return false
233
+ else return true
177
234
  }
178
235
  },
179
236
  methods: {
@@ -181,12 +238,12 @@
181
238
  handleClick() {
182
239
  this.$emit('click', this.index)
183
240
  },
184
-
241
+
185
242
  // 点击右边图标
186
243
  handleClickRight() {
187
244
  this.$emit('clickRight', this.index)
188
245
  },
189
-
246
+
190
247
  // 切换事件
191
248
  change(e) {
192
249
  let index = e.detail.current;
@@ -200,49 +257,57 @@
200
257
  </script>
201
258
 
202
259
  <style lang="scss" scoped>
203
- @import '../../libs/css/component.scss';
204
-
260
+ @import '../../libs/style/components.scss';
261
+
205
262
  .fu-column-notice {
206
- @include flex(row);
207
- align-items: center;
208
- justify-content: center;
209
- flex-wrap: nowrap;
210
- overflow: hidden;
211
-
212
- &__swiper {
213
- height: auto;
214
- flex: 1;
215
- @include flex(row);
216
- align-items: center;
217
- margin-left: 6px;
218
-
219
- &__item {
220
- @include flex(row);
221
- overflow: hidden;
222
- }
223
-
224
- &__content {
225
- overflow: hidden;
226
- }
227
- }
228
-
229
- &__icon {
230
- &--left {
231
- display: inline-flex;
232
- align-items: center;
233
- }
234
-
235
- &--right {
236
- margin-left: 6px;
237
- display: inline-flex;
238
- align-items: center;
239
- }
240
- }
263
+ @include flex(row);
264
+ align-items: center;
265
+ justify-content: center;
266
+ flex-wrap: nowrap;
267
+ /* #ifndef APP-NVUE */
268
+ overflow: hidden;
269
+ /* #endif */
270
+
271
+ &__swiper {
272
+ height: auto;
273
+ flex: 1;
274
+ @include flex(row);
275
+ align-items: center;
276
+ margin-left: 6px;
277
+
278
+ &__item {
279
+ @include flex(row);
280
+ /* #ifndef APP-NVUE */
281
+ overflow: hidden;
282
+ /* #endif */
283
+ }
284
+
285
+ &__content {
286
+ /* #ifndef APP-NVUE */
287
+ overflow: hidden;
288
+ /* #endif */
289
+ }
290
+ }
291
+
292
+ &__icon {
293
+ &--left {
294
+ display: inline-flex;
295
+ align-items: center;
296
+ }
297
+
298
+ &--right {
299
+ margin-left: 6px;
300
+ display: inline-flex;
301
+ align-items: center;
302
+ }
303
+ }
241
304
  }
242
-
305
+
243
306
  .fu-text-ellipsis {
307
+ /* #ifndef APP-NVUE */
244
308
  overflow: hidden;
245
309
  white-space: nowrap;
246
310
  text-overflow: ellipsis;
311
+ /* #endif */
247
312
  }
248
313
  </style>