fusions-ui 1.2.6 → 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.
@@ -16,10 +16,10 @@
16
16
  <script>
17
17
  import mpMixin from '../../libs/mixin/mpMixin.js'
18
18
  import props from './props.js'
19
- import icon from './icon.js'
19
+ import icon from './fuicon.js'
20
20
  // #ifdef APP-NVUE
21
21
  var domModule = weex.requireModule('dom');
22
- import iconUrl from './icon.ttf'
22
+ import iconUrl from './fuicon.ttf'
23
23
  domModule.addRule('fontFace', {
24
24
  'fontFamily': "fusionsicon",
25
25
  'src': "url('" + iconUrl + "')"
@@ -32,6 +32,9 @@
32
32
  * @property {String} color 图标颜色
33
33
  * @property {Number} size 图标大小(默认 16)
34
34
  * @property {String} fontFamily 自定义图标
35
+ * @property {String} imgMode 图片模式,当name为图片地址时生效
36
+ * @property {String,Number} width 显示图片小图标时,图片的宽度
37
+ * @property {String,Number} width 显示图片小图标时,图片的高度
35
38
  *
36
39
  * @event {Function} click 点击图标触发
37
40
  * @example <fu-icon name="success" size="40" color="#ff0000"></fu-icon>
@@ -87,10 +90,10 @@
87
90
  <style lang="scss" scoped>
88
91
  @import '../../libs/style/components.scss';
89
92
  /* #ifndef APP-NVUE */
90
- @import './icon.css';
93
+ @import './fuicon.css';
91
94
  @font-face {
92
95
  font-family: fusionsicon;
93
- src: url('./icon.ttf') format('truetype');
96
+ src: url('./fuicon.ttf') format('truetype');
94
97
  }
95
98
  /* #endif */
96
99
 
@@ -3,7 +3,7 @@
3
3
  <!-- 签名canvas -->
4
4
  <view class="fu-sign-board__content">
5
5
  <view class="fu-sign-board__content__wrapper">
6
- <canvas class="fu-sign-board__content__canvas" :canvas-id="canvasName" :disableScroll="true" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd"></canvas>
6
+ <canvas class="fu-sign-board__content__canvas" :canvas-id="canvasId" :disableScroll="true" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd"></canvas>
7
7
  </view>
8
8
  </view>
9
9
 
@@ -52,8 +52,9 @@
52
52
  emits: ['save', 'close'],
53
53
  mixins: [mpMixin, mixin, props],
54
54
  data() {
55
+ const canvasId = this.$fu.uuid();
55
56
  return {
56
- canvasName: 'fu-sign-canvas',
57
+ canvasId,
57
58
  ctx: null,
58
59
  canvasWidth: 0,
59
60
  canvasHeight: 0,
@@ -95,7 +96,7 @@
95
96
  },
96
97
  created() {
97
98
  // 创建canvas
98
- this.ctx = uni.createCanvasContext(this.canvasName, this);
99
+ this.ctx = uni.createCanvasContext(this.canvasId, this);
99
100
  },
100
101
  methods: {
101
102
  // 获取画板的相关信息
@@ -127,12 +128,13 @@
127
128
  // #ifdef APP
128
129
  if(e.type != 'onTouchstart') return false
129
130
  // #endif
130
- // #ifndef APP || MP-ALIPAY
131
- if (e.type != 'touchstart') return false
132
- // #endif
133
131
  // #ifdef MP-ALIPAY
134
132
  if(e.type != 'touchStart') return false
135
133
  // #endif
134
+ // #ifndef APP || MP-ALIPAY
135
+ if (e.type != 'touchstart') return false
136
+ // #endif
137
+
136
138
  // 设置线条颜色
137
139
  this.ctx.setFillStyle(this.currentSelectColor)
138
140
  // 设置透明度
@@ -168,12 +170,12 @@
168
170
  // #ifdef APP
169
171
  if(e.type != 'onTouchmove') return false
170
172
  // #endif
171
- // #ifndef APP || MP-ALIPAY
172
- if (e.type != 'touchmove') return false
173
- // #endif
174
173
  // #ifdef MP-ALIPAY
175
174
  if(e.type != 'touchMove') return false
176
175
  // #endif
176
+ // #ifndef APP || MP-ALIPAY
177
+ if (e.type != 'touchmove') return false
178
+ // #endif
177
179
  if (e.cancelable) {
178
180
  // 判断默认行为是否已经被禁用
179
181
  if (!e.defaultPrevented) {
@@ -226,12 +228,12 @@
226
228
  // #ifdef APP
227
229
  if(e.type != 'onTouchend') return false
228
230
  // #endif
229
- // #ifndef APP || MP-ALIPAY
230
- if (e.type != 'touchend') return false
231
- // #endif
232
231
  // #ifdef MP-ALIPAY
233
232
  if(e.type != 'touchEnd') return false
234
233
  // #endif
234
+ // #ifndef APP || MP-ALIPAY
235
+ if (e.type != 'touchend') return false
236
+ // #endif
235
237
  let point = {
236
238
  x: e.changedTouches[0].x,
237
239
  y: e.changedTouches[0].y
@@ -274,7 +276,7 @@
274
276
  save() {
275
277
  // 在组件内使用需要第二个参数this
276
278
  uni.canvasToTempFilePath({
277
- canvasId: this.canvasName,
279
+ canvasId: this.canvasId,
278
280
  fileType: 'png',
279
281
  quality: 1,
280
282
  success: (res) => {
@@ -298,7 +300,7 @@
298
300
  previewImage() {
299
301
  // 在组件内使用需要第二个参数this
300
302
  uni.canvasToTempFilePath({
301
- canvasId: this.canvasName,
303
+ canvasId: this.canvasId,
302
304
  fileType: 'png',
303
305
  quality: 1,
304
306
  success: (res) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fusions-ui",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "FusionsUI Component library",
5
5
  "main": "index.js",
6
6
  "scripts": {
File without changes
File without changes
File without changes