mali-applet-ui 1.0.19 → 1.0.20
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.
- package/README.md +2 -0
- package/config/index.js +1 -1
- package/config/store.js +7 -7
- package/lib/components/ml-amount-input/ml-amount-input.vue +2 -2
- package/lib/components/ml-approval-type/ml-approval-type.vue +2 -2
- package/lib/components/ml-button/ml-button.vue +21 -2
- package/lib/components/ml-card/ml-card.vue +5 -1
- package/lib/components/ml-chunk-item/ml-chunk-item.vue +1 -1
- package/lib/components/ml-col/ml-col.vue +2 -2
- package/lib/components/ml-date-range-picker/ml-date-range-picker.vue +1 -1
- package/lib/components/ml-datetime-picker/ml-datetime-picker.vue +1 -1
- package/lib/components/ml-datetime-range-picker/ml-datetime-range-picker.vue +1 -1
- package/lib/components/ml-echart2/ec-canvas.vue +140 -0
- package/lib/components/ml-echart2/echarts.js +11 -0
- package/lib/components/ml-echart2/echarts.simple.min.js +18 -0
- package/lib/components/ml-echart2/ml-echart2.vue +182 -0
- package/lib/components/ml-echart2/wx-canvas.js +111 -0
- package/lib/components/ml-echarts/echarts.js +14 -14
- package/lib/components/ml-echarts/echarts.min.js +46 -46
- package/lib/components/ml-echarts/echarts.simple.min.js +18 -18
- package/lib/components/ml-echarts/ml-echarts.vue +5 -0
- package/lib/components/ml-echarts/wx-canvas.js +168 -168
- package/lib/components/ml-form/ml-form.vue +0 -1
- package/lib/components/ml-form-group/ml-form-group.vue +1 -0
- package/lib/components/ml-form-item/ml-form-item.vue +4 -7
- package/lib/components/ml-icon/iconfont.css +757 -757
- package/lib/components/ml-input/ml-input.vue +37 -13
- package/lib/components/ml-list-group/ml-list-group.vue +1 -0
- package/lib/components/ml-list-item/ml-list-item.vue +9 -1
- package/lib/components/ml-list-menu-group/ml-list-menu-group.vue +0 -1
- package/lib/components/ml-list-menu-item/ml-list-menu-item.vue +26 -5
- package/lib/components/ml-location-pick/location.js +12 -0
- package/lib/components/ml-location-pick/ml-location-pick.vue +72 -0
- package/lib/components/ml-modal/ml-modal.vue +1 -0
- package/lib/components/ml-month-picker/ml-month-picker.vue +1 -1
- package/lib/components/ml-navbar/ml-navbar.vue +1 -1
- package/lib/components/ml-number-input/ml-number-input.vue +2 -2
- package/lib/components/ml-progress-bar/ml-progress-bar.vue +1 -1
- package/lib/components/ml-rich-text/ml-rich-text.vue +1 -1
- package/lib/components/ml-search-bar/ml-search-bar.vue +8 -8
- package/lib/components/ml-select-picker/ml-select-picker.vue +1 -1
- package/lib/components/ml-status-tag/ml-status-tag.vue +11 -3
- package/lib/components/ml-switch/ml-switch.vue +1 -1
- package/lib/components/ml-tab-pane/ml-tab-pane.vue +1 -1
- package/lib/components/ml-tabbar/ml-tabbar.vue +1 -1
- package/lib/components/ml-tabs/ml-tabs.vue +1 -1
- package/lib/components/ml-text/ml-text.vue +1 -1
- package/lib/components/ml-textarea/ml-textarea.vue +3 -4
- package/lib/components/ml-textarea/voice-input.vue +1 -1
- package/lib/components/ml-toast/ml-toast.vue +1 -1
- package/lib/components/ml-upload/ml-upload.vue +5 -9
- package/lib/components/ml-year-picker/ml-year-picker.vue +1 -1
- package/package.json +1 -1
- package/theme.scss +9 -0
package/README.md
CHANGED
package/config/index.js
CHANGED
package/config/store.js
CHANGED
|
@@ -28,13 +28,13 @@ const globalStore = {
|
|
|
28
28
|
optionMethod: null
|
|
29
29
|
},
|
|
30
30
|
types: [
|
|
31
|
-
{ value: 0, label: '起草中', color: '#353535', background: '#
|
|
32
|
-
{ value: 1, label: '审批中', color: '#
|
|
33
|
-
{ value: 2, label: '已通过', color: '#
|
|
34
|
-
{ value: 3, label: '已驳回', color: '#
|
|
35
|
-
{ value: 4, label: '会签中', color: '#
|
|
36
|
-
{ value: 5, label: '处理中', color: '#
|
|
37
|
-
{ value: 6, label: '已完成', color: '#
|
|
31
|
+
{ value: 0, label: '起草中', color: '#353535', background: '#eaebed' },
|
|
32
|
+
{ value: 1, label: '审批中', color: '#007FFF', background: '#e0efff' },
|
|
33
|
+
{ value: 2, label: '已通过', color: '#00B042', background: '#e0f5e8' },
|
|
34
|
+
{ value: 3, label: '已驳回', color: '#FF5064', background: '#ffeaec' },
|
|
35
|
+
{ value: 4, label: '会签中', color: '#007FFF', background: '#e0efff' },
|
|
36
|
+
{ value: 5, label: '处理中', color: '#007FFF', background: '#e0efff' },
|
|
37
|
+
{ value: 6, label: '已完成', color: '#00B042', background: '#e0f5e8' }
|
|
38
38
|
]
|
|
39
39
|
},
|
|
40
40
|
// 上拉加载更多
|
|
@@ -215,7 +215,7 @@ export default {
|
|
|
215
215
|
display: flex;
|
|
216
216
|
flex-direction: row;
|
|
217
217
|
.ml-amount-input-placeholder {
|
|
218
|
-
color: $
|
|
218
|
+
color: $ml-input-color-placeholder;;
|
|
219
219
|
}
|
|
220
220
|
.ml-amount-input-readonly-content {
|
|
221
221
|
padding: 20rpx 4rpx;
|
|
@@ -263,7 +263,7 @@ export default {
|
|
|
263
263
|
}
|
|
264
264
|
.ml-amount-input-inp,
|
|
265
265
|
.ml-amount-input-simulate {
|
|
266
|
-
font-size: $
|
|
266
|
+
font-size: $ml-base-font-size;
|
|
267
267
|
width: 100%;
|
|
268
268
|
height: 70rpx;
|
|
269
269
|
padding: 0 10rpx;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<button
|
|
2
|
+
<button
|
|
3
|
+
class="ml-button"
|
|
4
|
+
:class="[className || '', `type-${type}`, size ? `size-${size}` : '', status ? `ss-${status}` : '', {'is-round': round, 'is-underline': underline, 'is-disabled': disabled}]"
|
|
5
|
+
:disabled="disabled"
|
|
6
|
+
:open-type="openType"
|
|
7
|
+
:style="styles"
|
|
8
|
+
@tap="tapEvent"
|
|
9
|
+
@click="clickEvent">
|
|
3
10
|
<slot>{{ content }}</slot>
|
|
4
11
|
</button>
|
|
5
12
|
</template>
|
|
@@ -72,7 +79,19 @@ export default {
|
|
|
72
79
|
line-height: 1.5;
|
|
73
80
|
vertical-align: middle;
|
|
74
81
|
background: transparent;
|
|
75
|
-
font-size: $
|
|
82
|
+
font-size: $ml-base-font-size;
|
|
83
|
+
&.size-large {
|
|
84
|
+
font-size: 40rpx;
|
|
85
|
+
}
|
|
86
|
+
&.size-medium {
|
|
87
|
+
font-size: 36rpx;
|
|
88
|
+
}
|
|
89
|
+
&.size-small {
|
|
90
|
+
font-size: 28rpx;
|
|
91
|
+
}
|
|
92
|
+
&.size-mini {
|
|
93
|
+
font-size: 24rpx;
|
|
94
|
+
}
|
|
76
95
|
&.is-underline {
|
|
77
96
|
text-decoration: underline;
|
|
78
97
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-card" :class="{'is-bg': background, 'is-padding': padding}">
|
|
2
|
+
<view class="ml-card" :class="{'is-bg': background, 'is-padding': padding, 'is-border': border}">
|
|
3
3
|
<view v-if="title || showHeader" class="ml-card-header">
|
|
4
4
|
<view class="ml-card-title">
|
|
5
5
|
<slot name="title">{{ title }}</slot>
|
|
@@ -22,6 +22,7 @@ export default {
|
|
|
22
22
|
},
|
|
23
23
|
props: {
|
|
24
24
|
title: String,
|
|
25
|
+
border: Boolean,
|
|
25
26
|
background: {
|
|
26
27
|
type: Boolean,
|
|
27
28
|
default: true
|
|
@@ -42,6 +43,9 @@ export default {
|
|
|
42
43
|
&.is-bg {
|
|
43
44
|
background: #fff;
|
|
44
45
|
}
|
|
46
|
+
&.is-border {
|
|
47
|
+
border: 1px solid #e5e5e5;
|
|
48
|
+
}
|
|
45
49
|
&.is-padding {
|
|
46
50
|
.ml-card-body {
|
|
47
51
|
padding: 0 20rpx 20rpx 20rpx;
|
|
@@ -60,7 +60,7 @@ export default {
|
|
|
60
60
|
flex-direction: column;
|
|
61
61
|
padding: 20rpx;
|
|
62
62
|
line-height: 50rpx;
|
|
63
|
-
font-size: $
|
|
63
|
+
font-size: $ml-describe-font-size;
|
|
64
64
|
$spans: 4.16667%, 8.33333%, 12.5%, 16.66667%, 20.83333%, 25%, 29.16667%, 33.33333%,
|
|
65
65
|
37.5%, 41.66667%, 45.83333%, 50%, 54.16667%, 58.33333%, 62.5%, 66.66667%,
|
|
66
66
|
70.83333%, 75%, 79.16667%, 83.33333%, 87.5%, 91.66667%, 95.83333%, 100%;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="ml-echarts" :class="className" :style="{height: height || '400rpx', width: width || '100%'}">
|
|
3
|
+
<canvas class="ec-canvas ec-canvas ec-canvas-aaa" ref="saveChildRef0" :id="canvasId" :width="width" :height="height" @touchStart="touchStart" @touchMove="touchMove" @touchEnd="touchEnd" @init="init"></canvas>
|
|
4
|
+
</view>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
/* eslint-disable */
|
|
9
|
+
import WxCanvas from './wx-canvas'
|
|
10
|
+
import echarts from './echarts'
|
|
11
|
+
import { getAppDpr } from '../../../utils'
|
|
12
|
+
|
|
13
|
+
let ctx
|
|
14
|
+
|
|
15
|
+
function wrapTouch (event) {
|
|
16
|
+
for (let i = 0; i < event.touches.length; ++i) {
|
|
17
|
+
const touch = event.touches[i]
|
|
18
|
+
touch.offsetX = touch.x
|
|
19
|
+
touch.offsetY = touch.y
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return event
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
props: {
|
|
27
|
+
options: Object,
|
|
28
|
+
height: String,
|
|
29
|
+
width: String,
|
|
30
|
+
lazyLoad: Boolean,
|
|
31
|
+
formatLegend: Function,
|
|
32
|
+
className: String
|
|
33
|
+
},
|
|
34
|
+
data () {
|
|
35
|
+
return {
|
|
36
|
+
canvasId: 'aaa',
|
|
37
|
+
width: '',
|
|
38
|
+
height: ''
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
mounted () {
|
|
42
|
+
this.init()
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
init: function () {
|
|
46
|
+
ctx = uni.createCanvasContext(this.canvasId, this)
|
|
47
|
+
const canvas = new WxCanvas(ctx, this.canvasId)
|
|
48
|
+
echarts.setCanvasCreator(() => {
|
|
49
|
+
return canvas
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
const query = uni.createSelectorQuery().in(this)
|
|
53
|
+
|
|
54
|
+
const selector = '.ec-canvas-' + this.canvasId
|
|
55
|
+
const ratio = getAppDpr()
|
|
56
|
+
query
|
|
57
|
+
.select(selector)
|
|
58
|
+
.boundingClientRect(res => {
|
|
59
|
+
const _w = ratio * res.width
|
|
60
|
+
|
|
61
|
+
const _h = ratio * res.height
|
|
62
|
+
|
|
63
|
+
const w = res.width
|
|
64
|
+
const h = res.height
|
|
65
|
+
this.width= _w
|
|
66
|
+
this.height= _h
|
|
67
|
+
|
|
68
|
+
const chart = echarts.init(canvas, null, {
|
|
69
|
+
width: w,
|
|
70
|
+
height: h
|
|
71
|
+
})
|
|
72
|
+
canvas.setChart(chart)
|
|
73
|
+
chart.setOption(this.options)
|
|
74
|
+
})
|
|
75
|
+
.exec()
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
canvasToTempFilePath (opt) {
|
|
79
|
+
if (!opt.canvasId) {
|
|
80
|
+
opt.canvasId = this.canvasId
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
ctx.draw(true, () => {
|
|
84
|
+
uni.canvasToTempFilePath(opt, this)
|
|
85
|
+
})
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
touchStart (e) {
|
|
89
|
+
if (this.chart && e.touches.length > 0) {
|
|
90
|
+
const touch = e.touches[0]
|
|
91
|
+
const handler = this.chart.getZr().handler
|
|
92
|
+
handler.dispatch('mousedown', {
|
|
93
|
+
zrX: touch.x,
|
|
94
|
+
zrY: touch.y
|
|
95
|
+
})
|
|
96
|
+
handler.dispatch('mousemove', {
|
|
97
|
+
zrX: touch.x,
|
|
98
|
+
zrY: touch.y
|
|
99
|
+
})
|
|
100
|
+
handler.processGesture(wrapTouch(e), 'start')
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
touchMove (e) {
|
|
105
|
+
if (this.chart && e.touches.length > 0) {
|
|
106
|
+
const touch = e.touches[0]
|
|
107
|
+
const handler = this.chart.getZr().handler
|
|
108
|
+
handler.dispatch('mousemove', {
|
|
109
|
+
zrX: touch.x,
|
|
110
|
+
zrY: touch.y
|
|
111
|
+
})
|
|
112
|
+
handler.processGesture(wrapTouch(e), 'change')
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
touchEnd (e) {
|
|
117
|
+
if (this.chart) {
|
|
118
|
+
const touch = e.changedTouches ? e.changedTouches[0] : {}
|
|
119
|
+
const handler = this.chart.getZr().handler
|
|
120
|
+
handler.dispatch('mouseup', {
|
|
121
|
+
zrX: touch.x,
|
|
122
|
+
zrY: touch.y
|
|
123
|
+
})
|
|
124
|
+
handler.dispatch('click', {
|
|
125
|
+
zrX: touch.x,
|
|
126
|
+
zrY: touch.y
|
|
127
|
+
})
|
|
128
|
+
handler.processGesture(wrapTouch(e), 'end')
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
</script>
|
|
134
|
+
|
|
135
|
+
<style lang="scss">
|
|
136
|
+
.ml-canvas {
|
|
137
|
+
width: 100%;
|
|
138
|
+
height: 100%;
|
|
139
|
+
}
|
|
140
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as echarts from './echarts.simple.min.js'
|
|
2
|
+
import { getAppDpr } from '../../../utils'
|
|
3
|
+
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
const eInit = echarts.init
|
|
6
|
+
echarts.init = function (p1, p2, opts = {}) {
|
|
7
|
+
opts.devicePixelRatio = opts.devicePixelRatio || getAppDpr()
|
|
8
|
+
return eInit.call(this, p1, p2, opts)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default echarts
|