mali-applet-ui 0.0.32 → 0.0.33
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/components/ml-amount-input/ml-amount-input.vue +3 -2
- package/components/ml-amount-text/ml-amount-text.vue +2 -1
- package/components/ml-button/ml-button.vue +3 -2
- package/components/ml-checkbox/ml-checkbox.vue +3 -2
- package/components/ml-checkbox-group/ml-checkbox-group.vue +3 -2
- package/components/ml-col/ml-col.vue +4 -3
- package/components/ml-date-picker/ml-date-picker.vue +2 -1
- package/components/ml-date-range-picker/ml-date-range-picker.vue +3 -2
- package/components/ml-datetime-picker/ml-datetime-picker.vue +2 -1
- package/components/ml-datetime-range-picker/ml-datetime-range-picker.vue +3 -2
- package/components/ml-echarts/ml-echarts.vue +3 -2
- package/components/ml-form/ml-form.vue +3 -2
- package/components/ml-form-item/ml-form-item.vue +3 -2
- package/components/ml-full-watermark/ml-full-watermark.vue +3 -5
- package/components/ml-icon/ml-icon.vue +1 -1
- package/components/ml-image-swiper/ml-image-swiper.vue +44 -11
- package/components/ml-input/ml-input.vue +5 -4
- package/components/ml-list-menu/ml-list-menu.vue +3 -2
- package/components/ml-month-picker/ml-month-picker.vue +3 -2
- package/components/ml-number-input/ml-number-input.vue +3 -2
- package/components/ml-progress-bar/ml-progress-bar.vue +3 -2
- package/components/ml-province-city-picker/ml-province-city-picker.vue +2 -1
- package/components/ml-radio/ml-radio.vue +3 -2
- package/components/ml-radio-button/ml-radio-button.vue +3 -2
- package/components/ml-radio-group/ml-radio-group.vue +3 -2
- package/components/ml-row/ml-row.vue +3 -2
- package/components/ml-section/ml-section.vue +3 -2
- package/components/ml-select-picker/ml-select-picker.vue +3 -2
- package/components/ml-tabbar/ml-tabbar.vue +3 -2
- package/components/ml-table/ml-table.vue +2 -1
- package/components/ml-tabs/ml-tabs.vue +3 -2
- package/components/ml-textarea/ml-textarea.vue +3 -2
- package/components/ml-year-picker/ml-year-picker.vue +3 -2
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
class="ml-amount-input"
|
|
4
4
|
v-model="inpVal"
|
|
5
5
|
type="text"
|
|
6
|
-
:class="{'is-right': align === 'right', 'is-border': border}"
|
|
6
|
+
:class="[{'is-right': align === 'right', 'is-border': border}, className]"
|
|
7
7
|
autocomplete="off"
|
|
8
8
|
:placeholder="placeholder"
|
|
9
9
|
:maxlength="maxLength"
|
|
@@ -44,7 +44,8 @@ export default {
|
|
|
44
44
|
disabled: {
|
|
45
45
|
type: Boolean,
|
|
46
46
|
default: false
|
|
47
|
-
}
|
|
47
|
+
},
|
|
48
|
+
className: String
|
|
48
49
|
},
|
|
49
50
|
data () {
|
|
50
51
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-amount-text">
|
|
2
|
+
<view class="ml-amount-text" :class="className">
|
|
3
3
|
<slot name="symbol">
|
|
4
4
|
<view v-if="symbol" class="amount-flag">¥</view>
|
|
5
5
|
</slot>
|
|
@@ -31,6 +31,7 @@ export default {
|
|
|
31
31
|
type: Boolean,
|
|
32
32
|
default: false
|
|
33
33
|
},
|
|
34
|
+
className: String
|
|
34
35
|
},
|
|
35
36
|
computed: {
|
|
36
37
|
amountUnit () {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<button class="ml-button" :class="[`type-${type}`, status ? `status-${status}` : '', round ? 'is-round' : '']" @tap="tapEvent" @click="clickEvent">
|
|
2
|
+
<button class="ml-button" :class="[className, `type-${type}`, status ? `status-${status}` : '', round ? 'is-round' : '']" @tap="tapEvent" @click="clickEvent">
|
|
3
3
|
<slot>{{ content }}</slot>
|
|
4
4
|
</button>
|
|
5
5
|
</template>
|
|
@@ -17,7 +17,8 @@ export default {
|
|
|
17
17
|
type: {
|
|
18
18
|
type: String,
|
|
19
19
|
default: 'button'
|
|
20
|
-
}
|
|
20
|
+
},
|
|
21
|
+
className: String
|
|
21
22
|
},
|
|
22
23
|
methods: {
|
|
23
24
|
tapEvent () {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-checkbox" :class="{'is-checked': checked, 'is-disabled': disabled}" @tap="tapEvent">
|
|
2
|
+
<view class="ml-checkbox" :class="[className, {'is-checked': checked, 'is-disabled': disabled}]" @tap="tapEvent">
|
|
3
3
|
<ml-icon class="checkbox-icon" :name="checked ? 'checkbox-checked' : (indeterminate ? 'checkbox-indeterminate' : 'checkbox-unchecked')"></ml-icon>
|
|
4
4
|
<text class="checkbox-content">
|
|
5
5
|
<slot>
|
|
@@ -23,7 +23,8 @@ export default {
|
|
|
23
23
|
},
|
|
24
24
|
indeterminate: Boolean,
|
|
25
25
|
disabled: Boolean,
|
|
26
|
-
content: String
|
|
26
|
+
content: String,
|
|
27
|
+
className: String
|
|
27
28
|
},
|
|
28
29
|
computed: {
|
|
29
30
|
checked () {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-radio-group" :class="{'is-disabled': disabled, 'is-vertical': vertical}">
|
|
2
|
+
<view class="ml-radio-group" :class="[className, {'is-disabled': disabled, 'is-vertical': vertical}]">
|
|
3
3
|
<view class="ml-radio-group-item" v-for="(item, index) in options" :key="index">
|
|
4
4
|
<ml-checkbox :value="value.includes(item.value) ? item.value : null" :label="item.value" :content="item.label" :disabled="disabled || item.disabled" @change="changeEvent"></ml-checkbox>
|
|
5
5
|
</view>
|
|
@@ -16,7 +16,8 @@ export default {
|
|
|
16
16
|
value: Array,
|
|
17
17
|
options: Array,
|
|
18
18
|
disabled: Boolean,
|
|
19
|
-
vertical: Boolean
|
|
19
|
+
vertical: Boolean,
|
|
20
|
+
className: String
|
|
20
21
|
},
|
|
21
22
|
methods: {
|
|
22
23
|
changeEvent ({ label, checked }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-col" :class="[span && !width ? `span-${span}` : '', align ? `align-${align}` : '', width ? 'is-fixed' : '']" :style="styles">
|
|
2
|
+
<view class="ml-col" :class="[className, span && !width ? `span-${span}` : '', align ? `align-${align}` : '', width ? 'is-fixed' : '']" :style="styles">
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</view>
|
|
5
5
|
</template>
|
|
@@ -13,11 +13,12 @@ export default {
|
|
|
13
13
|
props: {
|
|
14
14
|
span: [String, Number],
|
|
15
15
|
align: String,
|
|
16
|
-
width: String
|
|
16
|
+
width: String,
|
|
17
|
+
className: String
|
|
17
18
|
},
|
|
18
19
|
computed: {
|
|
19
20
|
styles () {
|
|
20
|
-
return this.width ?
|
|
21
|
+
return this.width ? `width: ${this.width};` : ''
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<uni-datetime-picker v-model="selectVal" type="date" :start="start" :end="end" @change="changeEvent" :border="border"/>
|
|
2
|
+
<uni-datetime-picker :class="className" v-model="selectVal" type="date" :start="start" :end="end" @change="changeEvent" :border="border"/>
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script>
|
|
@@ -13,6 +13,7 @@ export default {
|
|
|
13
13
|
border: Boolean,
|
|
14
14
|
start: [String, Number],
|
|
15
15
|
end: [String, Number],
|
|
16
|
+
className: String
|
|
16
17
|
},
|
|
17
18
|
data () {
|
|
18
19
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<uni-datetime-picker v-model="selectDates" type="daterange" :start="start" :end="end" @change="changeEvent" :border="border" :clear-icon="clear"/>
|
|
2
|
+
<uni-datetime-picker :class="className" v-model="selectDates" type="daterange" :start="start" :end="end" @change="changeEvent" :border="border" :clear-icon="clear"/>
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script>
|
|
@@ -17,7 +17,8 @@ export default {
|
|
|
17
17
|
clear: {
|
|
18
18
|
type: Boolean,
|
|
19
19
|
default: true
|
|
20
|
-
}
|
|
20
|
+
},
|
|
21
|
+
className: String
|
|
21
22
|
},
|
|
22
23
|
data () {
|
|
23
24
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<uni-datetime-picker v-model="selectVal" type="datetime" :start="start" :end="end" @change="changeEvent" :border="border"/>
|
|
2
|
+
<uni-datetime-picker :class="className" v-model="selectVal" type="datetime" :start="start" :end="end" @change="changeEvent" :border="border"/>
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script>
|
|
@@ -13,6 +13,7 @@ export default {
|
|
|
13
13
|
border: Boolean,
|
|
14
14
|
start: [String, Number],
|
|
15
15
|
end: [String, Number],
|
|
16
|
+
className: String
|
|
16
17
|
},
|
|
17
18
|
data () {
|
|
18
19
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<uni-datetime-picker v-model="selectDates" type="datetimerange" :start="start" :end="end" @change="changeEvent" :border="border"/>
|
|
2
|
+
<uni-datetime-picker :class="className" v-model="selectDates" type="datetimerange" :start="start" :end="end" @change="changeEvent" :border="border"/>
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script>
|
|
@@ -13,7 +13,8 @@ export default {
|
|
|
13
13
|
startDate: String,
|
|
14
14
|
endDate: String,
|
|
15
15
|
start: [String, Number],
|
|
16
|
-
end: [String, Number]
|
|
16
|
+
end: [String, Number],
|
|
17
|
+
className: String
|
|
17
18
|
},
|
|
18
19
|
data () {
|
|
19
20
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-echarts" :style="{height: height || '400rpx', width: width || '100%'}">
|
|
2
|
+
<view class="ml-echarts" :class="className" :style="{height: height || '400rpx', width: width || '100%'}">
|
|
3
3
|
<canvas type="2d" class="ml-canvas" :canvas-id="canvasId" @touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd"></canvas>
|
|
4
4
|
</view>
|
|
5
5
|
</template>
|
|
@@ -44,7 +44,8 @@ export default {
|
|
|
44
44
|
height:String,
|
|
45
45
|
width: String,
|
|
46
46
|
lazyLoad:Boolean,
|
|
47
|
-
forceUseOldCanvas: Boolean
|
|
47
|
+
forceUseOldCanvas: Boolean,
|
|
48
|
+
className: String
|
|
48
49
|
},
|
|
49
50
|
data() {
|
|
50
51
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-form" :class="{'is-vertical': vertical}">
|
|
2
|
+
<view class="ml-form" :class="[className, {'is-vertical': vertical}]">
|
|
3
3
|
<uni-forms ref="uniForm" :modelValue="data" :rules="formRules" :label-position="vertical ? 'top' : 'left'">
|
|
4
4
|
<slot></slot>
|
|
5
5
|
</uni-forms>
|
|
@@ -18,7 +18,8 @@ export default {
|
|
|
18
18
|
data: Object,
|
|
19
19
|
items: Array,
|
|
20
20
|
rules: Object,
|
|
21
|
-
vertical: Boolean
|
|
21
|
+
vertical: Boolean,
|
|
22
|
+
className: String
|
|
22
23
|
},
|
|
23
24
|
data () {
|
|
24
25
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<uni-forms-item :label="title" :name="field">
|
|
2
|
+
<uni-forms-item :class="className" :label="title" :name="field">
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</uni-forms-item>
|
|
5
5
|
</template>
|
|
@@ -12,7 +12,8 @@ export default {
|
|
|
12
12
|
},
|
|
13
13
|
props: {
|
|
14
14
|
title: String,
|
|
15
|
-
field: String
|
|
15
|
+
field: String,
|
|
16
|
+
className: String
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-full-watermark">
|
|
2
|
+
<view class="ml-full-watermark" :class="className">
|
|
3
3
|
<view class="ml-full-watermark-text" v-for="index in 40" :key="index">{{ content }}</view>
|
|
4
4
|
</view>
|
|
5
5
|
</template>
|
|
@@ -7,11 +7,9 @@
|
|
|
7
7
|
<script>
|
|
8
8
|
export default {
|
|
9
9
|
name: 'MlFullWatermark',
|
|
10
|
-
options: {
|
|
11
|
-
virtualHost: true
|
|
12
|
-
},
|
|
13
10
|
props: {
|
|
14
|
-
content: String
|
|
11
|
+
content: String,
|
|
12
|
+
className: String
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
15
|
</script>
|
|
@@ -1,33 +1,66 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<swiper
|
|
4
|
-
<swiper-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
</swiper>
|
|
8
|
-
</view>
|
|
2
|
+
<swiper class="ml-image-swiper" :current="current" :class="className" :style="styles" :autoplay="autoplay" :interval="interval" circular indicator-dots @change="changeEvent">
|
|
3
|
+
<swiper-item v-for="(item, index) in options" :key="index">
|
|
4
|
+
<image class="ml-image-swiper-img" mode="aspectFill" :src="item.url"></image>
|
|
5
|
+
</swiper-item>
|
|
6
|
+
</swiper>
|
|
9
7
|
</template>
|
|
10
8
|
|
|
11
9
|
<script>
|
|
10
|
+
import XEUtils from 'xe-utils'
|
|
12
11
|
export default {
|
|
13
12
|
name: 'MlImageSwiper',
|
|
14
13
|
options: {
|
|
15
14
|
virtualHost: true
|
|
16
15
|
},
|
|
17
16
|
props: {
|
|
18
|
-
value: Number,
|
|
17
|
+
value: [Number, String],
|
|
19
18
|
options: Array,
|
|
20
19
|
autoplay: Boolean,
|
|
21
20
|
interval: Number,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
21
|
+
height: String,
|
|
22
|
+
className: String
|
|
23
|
+
},
|
|
24
|
+
data () {
|
|
25
|
+
return {
|
|
26
|
+
current: 0
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
computed: {
|
|
30
|
+
styles () {
|
|
31
|
+
return this.height ? `height: ${this.height};` : ''
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
watch: {
|
|
35
|
+
value () {
|
|
36
|
+
this.updateActive()
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
created () {
|
|
40
|
+
this.updateActive()
|
|
41
|
+
},
|
|
42
|
+
methods: {
|
|
43
|
+
updateActive () {
|
|
44
|
+
const index = XEUtils.findIndexOf(this.options, item => item.value === this.value)
|
|
45
|
+
this.current = index > -1 ? index : 0
|
|
46
|
+
},
|
|
47
|
+
changeEvent (e) {
|
|
48
|
+
const index = e.detail.current
|
|
49
|
+
const option = this.options[index]
|
|
50
|
+
this.current = index
|
|
51
|
+
const value = option ? option.value : 0
|
|
52
|
+
this.$emit('input', value)
|
|
53
|
+
this.$emit('change', { value, option })
|
|
54
|
+
}
|
|
55
|
+
}
|
|
25
56
|
}
|
|
26
57
|
</script>
|
|
27
58
|
|
|
28
59
|
<style lang="scss">
|
|
29
60
|
.ml-image-swiper {
|
|
61
|
+
height: 100%;
|
|
30
62
|
.ml-image-swiper-img {
|
|
63
|
+
height: 100%;
|
|
31
64
|
width: 100%;
|
|
32
65
|
}
|
|
33
66
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-input" :class="{'is-right': align === 'right', 'is-border': border, 'is-prefix': prefixIcon || type === 'search', 'is-suffix': suffixIcon, 'is-disabled': disabled}">
|
|
2
|
+
<view class="ml-input" :class="[className, {'is-right': align === 'right', 'is-border': border, 'is-prefix': prefixIcon || type === 'search', 'is-suffix': suffixIcon, 'is-disabled': disabled}]">
|
|
3
3
|
<view v-if="prefixIcon || type === 'search'" class="ml-input-prefix-icon">
|
|
4
|
-
<ml-icon v-if="prefixIcon" :
|
|
4
|
+
<ml-icon v-if="prefixIcon" :class="prefixIcon"></ml-icon>
|
|
5
5
|
<ml-icon v-else name="search"></ml-icon>
|
|
6
6
|
</view>
|
|
7
7
|
<input
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
:placeholder="placeholder"
|
|
13
13
|
@input="inputEvent" />
|
|
14
14
|
<view v-if="suffixIcon" class="ml-input-suffix-icon">
|
|
15
|
-
<ml-icon :
|
|
15
|
+
<ml-icon :class="suffixIcon"></ml-icon>
|
|
16
16
|
</view>
|
|
17
17
|
</view>
|
|
18
18
|
</template>
|
|
@@ -34,7 +34,8 @@ export default {
|
|
|
34
34
|
placeholder: {
|
|
35
35
|
type: String,
|
|
36
36
|
default: '请输入'
|
|
37
|
-
}
|
|
37
|
+
},
|
|
38
|
+
className: String
|
|
38
39
|
},
|
|
39
40
|
data () {
|
|
40
41
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-list-menu" @click="clickEvent" @tap="tapEvent">
|
|
2
|
+
<view class="ml-list-menu" :class="className" @click="clickEvent" @tap="tapEvent">
|
|
3
3
|
<view v-if="prefixIcon" class="ml-list-menu-left-icon">
|
|
4
4
|
<ml-icon :className="prefixIcon"></ml-icon>
|
|
5
5
|
</view>
|
|
@@ -25,7 +25,8 @@ export default {
|
|
|
25
25
|
prefixIcon: String,
|
|
26
26
|
suffixIcon: String,
|
|
27
27
|
url: String,
|
|
28
|
-
redirect: Boolean
|
|
28
|
+
redirect: Boolean,
|
|
29
|
+
className: String
|
|
29
30
|
},
|
|
30
31
|
methods: {
|
|
31
32
|
clickEvent () {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<picker :value="value" class="ml-month-picker" :class="{'is-border': border}" mode="date" fields="month" @change="changeEvent">
|
|
2
|
+
<picker :value="value" class="ml-month-picker" :class="[className, {'is-border': border}]" mode="date" fields="month" @change="changeEvent">
|
|
3
3
|
<view class="picker-warpper">
|
|
4
4
|
<view class="picker-text">{{ value || '请选择' }}</view>
|
|
5
5
|
<ml-icon class="picker-icon" name="arrow-down"></ml-icon>
|
|
@@ -15,7 +15,8 @@ export default {
|
|
|
15
15
|
},
|
|
16
16
|
props: {
|
|
17
17
|
value: String,
|
|
18
|
-
border: Boolean
|
|
18
|
+
border: Boolean,
|
|
19
|
+
className: String
|
|
19
20
|
},
|
|
20
21
|
methods: {
|
|
21
22
|
changeEvent (e) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
class="ml-number-input"
|
|
4
4
|
v-model="inpVal"
|
|
5
5
|
type="text"
|
|
6
|
-
:class="{'is-right': align === 'right', 'is-border': border}"
|
|
6
|
+
:class="[className, {'is-right': align === 'right', 'is-border': border}]"
|
|
7
7
|
autocomplete="off"
|
|
8
8
|
:placeholder="placeholder"
|
|
9
9
|
:maxlength="maxLength"
|
|
@@ -32,7 +32,8 @@ export default {
|
|
|
32
32
|
disabled: {
|
|
33
33
|
type: Boolean,
|
|
34
34
|
default: false
|
|
35
|
-
}
|
|
35
|
+
},
|
|
36
|
+
className: String
|
|
36
37
|
},
|
|
37
38
|
data () {
|
|
38
39
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-progress-bar">
|
|
2
|
+
<view class="ml-progress-bar" :class="className">
|
|
3
3
|
<view class="progress-bar-header">
|
|
4
4
|
<slot name="header">
|
|
5
5
|
<view v-if="title !== null" class="progress-bar-title" :class="{underline: titleUnderline}">{{ title }}</view>
|
|
@@ -52,7 +52,8 @@ export default {
|
|
|
52
52
|
},
|
|
53
53
|
backgroundColor: String,
|
|
54
54
|
showNum: Boolean,
|
|
55
|
-
unit: String
|
|
55
|
+
unit: String,
|
|
56
|
+
className: String
|
|
56
57
|
},
|
|
57
58
|
computed: {
|
|
58
59
|
percNum () {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-region-picker" :style="{width: width || '160rpx'}">
|
|
2
|
+
<view class="ml-region-picker" :class="className" :style="{width: width || '160rpx'}">
|
|
3
3
|
<uni-data-picker
|
|
4
4
|
v-model="selectVals"
|
|
5
5
|
popup-title="请选择城市"
|
|
@@ -26,6 +26,7 @@ export default {
|
|
|
26
26
|
city: String,
|
|
27
27
|
width: String,
|
|
28
28
|
optionProps: Object,
|
|
29
|
+
className: String
|
|
29
30
|
},
|
|
30
31
|
data () {
|
|
31
32
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-radio" :class="{'is-checked': checked, 'is-disabled': disabled}" @tap="tapEvent">
|
|
2
|
+
<view class="ml-radio" :class="[className, {'is-checked': checked, 'is-disabled': disabled}]" @tap="tapEvent">
|
|
3
3
|
<ml-icon class="radio-icon" :name="checked ? 'radio-checked' : 'radio-unchecked'"></ml-icon>
|
|
4
4
|
<text class="radio-content">
|
|
5
5
|
<slot>
|
|
@@ -22,7 +22,8 @@ export default {
|
|
|
22
22
|
default: false
|
|
23
23
|
},
|
|
24
24
|
disabled: Boolean,
|
|
25
|
-
content: String
|
|
25
|
+
content: String,
|
|
26
|
+
className: String
|
|
26
27
|
},
|
|
27
28
|
computed: {
|
|
28
29
|
checked () {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-radio-button" :class="{'is-disabled': disabled}">
|
|
2
|
+
<view class="ml-radio-button" :class="[className, {'is-disabled': disabled}]">
|
|
3
3
|
<view class="ml-radio-button-item" v-for="(item, index) in options" :class="{'is-active': value === item.value}" :key="index" @tap="changeEvent(item)">{{ item.label }}</view>
|
|
4
4
|
</view>
|
|
5
5
|
</template>
|
|
@@ -13,7 +13,8 @@ export default {
|
|
|
13
13
|
props: {
|
|
14
14
|
value: [Boolean, Number, String],
|
|
15
15
|
options: Array,
|
|
16
|
-
disabled: Boolean
|
|
16
|
+
disabled: Boolean,
|
|
17
|
+
className: String
|
|
17
18
|
},
|
|
18
19
|
methods: {
|
|
19
20
|
changeEvent (option) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-radio-group" :class="{'is-disabled': disabled, 'is-vertical': vertical}">
|
|
2
|
+
<view class="ml-radio-group" :class="[className, {'is-disabled': disabled, 'is-vertical': vertical}]">
|
|
3
3
|
<view class="ml-radio-group-item" v-for="(item, index) in options" :key="index">
|
|
4
4
|
<ml-radio :value="value" :label="item.value" :content="item.label" :disabled="disabled || item.disabled" @change="changeEvent"></ml-radio>
|
|
5
5
|
</view>
|
|
@@ -16,7 +16,8 @@ export default {
|
|
|
16
16
|
value: [Boolean, Number, String],
|
|
17
17
|
options: Array,
|
|
18
18
|
disabled: Boolean,
|
|
19
|
-
vertical: Boolean
|
|
19
|
+
vertical: Boolean,
|
|
20
|
+
className: String
|
|
20
21
|
},
|
|
21
22
|
methods: {
|
|
22
23
|
changeEvent ({ value }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-row" :class="{'is-vertical': vertical}">
|
|
2
|
+
<view class="ml-row" :class="[className, {'is-vertical': vertical}]">
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</view>
|
|
5
5
|
</template>
|
|
@@ -11,7 +11,8 @@ export default {
|
|
|
11
11
|
virtualHost: true
|
|
12
12
|
},
|
|
13
13
|
props: {
|
|
14
|
-
vertical: Boolean
|
|
14
|
+
vertical: Boolean,
|
|
15
|
+
className: String
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-section" :class="[type ? `type-${type}` : '']">
|
|
2
|
+
<view class="ml-section" :class="[className, type ? `type-${type}` : '']">
|
|
3
3
|
<view v-if="title || $slots.header" class="ml-section-header">
|
|
4
4
|
<slot name="header">
|
|
5
5
|
<text class="ml-section-header-title">{{ title }}</text>
|
|
@@ -19,7 +19,8 @@ export default {
|
|
|
19
19
|
},
|
|
20
20
|
props: {
|
|
21
21
|
title: String,
|
|
22
|
-
type: String
|
|
22
|
+
type: String,
|
|
23
|
+
className: String
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<picker class="ml-select-picker" :class="{'is-border': border}" :range="optionList" :range-key="optLabelField" @change="changeEvent">
|
|
2
|
+
<picker class="ml-select-picker" :class="[className, {'is-border': border}]" :range="optionList" :range-key="optLabelField" @change="changeEvent">
|
|
3
3
|
<view class="picker-warpper" :style="{width: width || '160rpx'}">
|
|
4
4
|
<view class="picker-text">
|
|
5
5
|
<text v-if="value !== null">{{ selectName }}</text>
|
|
@@ -26,7 +26,8 @@ export default {
|
|
|
26
26
|
options: Array,
|
|
27
27
|
optionProps: Object,
|
|
28
28
|
width: String,
|
|
29
|
-
isAll: Boolean
|
|
29
|
+
isAll: Boolean,
|
|
30
|
+
className: String
|
|
30
31
|
},
|
|
31
32
|
data () {
|
|
32
33
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-tabbar">
|
|
2
|
+
<view class="ml-tabbar" :class="className">
|
|
3
3
|
<view class="ml-tabbar-item" v-for="(item) in options" :key="item.value" :class="{'is-active': value == item.value}" @tap="tapEvent(item)">
|
|
4
4
|
<view class="ml-tabbar-icon">
|
|
5
5
|
<ml-icon class="icon" :name="value == item.value ? item.activeIcon : item.icon"></ml-icon>
|
|
@@ -15,7 +15,8 @@ export default {
|
|
|
15
15
|
name: 'MlTabbar',
|
|
16
16
|
props: {
|
|
17
17
|
value: [String, Number],
|
|
18
|
-
options: Array
|
|
18
|
+
options: Array,
|
|
19
|
+
className: String
|
|
19
20
|
},
|
|
20
21
|
data() {
|
|
21
22
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-table" :style="{height: height ? (isNaN(height) ? height : `${height}rpx`) : ''}">
|
|
2
|
+
<view class="ml-table" :class="className" :style="{height: height ? (isNaN(height) ? height : `${height}rpx`) : ''}">
|
|
3
3
|
<view class="table-header">
|
|
4
4
|
<view class="table-column-header">
|
|
5
5
|
<view class="table-tr">
|
|
@@ -75,6 +75,7 @@ export default {
|
|
|
75
75
|
},
|
|
76
76
|
props: {
|
|
77
77
|
loading: Boolean,
|
|
78
|
+
className: String,
|
|
78
79
|
height: [Number, String],
|
|
79
80
|
headerData: Array,
|
|
80
81
|
data: Array,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-tabs">
|
|
2
|
+
<view class="ml-tabs" :class="className">
|
|
3
3
|
<scroll-view scroll-x>
|
|
4
4
|
<view class="ml-tabs-navs">
|
|
5
5
|
<view class="ml-tabs-nav-item" v-for="(item, index) in options" :key="index" :class="{'is-active': value === item.value}" @tap="changeEvent(item)">{{ item.label }}</view>
|
|
@@ -16,7 +16,8 @@ export default {
|
|
|
16
16
|
},
|
|
17
17
|
props: {
|
|
18
18
|
value: [String, Number],
|
|
19
|
-
options: Array
|
|
19
|
+
options: Array,
|
|
20
|
+
className: String
|
|
20
21
|
},
|
|
21
22
|
data () {
|
|
22
23
|
return {}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-textarea" :class="{'is-border': border}">
|
|
2
|
+
<view class="ml-textarea" :class="[className, {'is-border': border}]">
|
|
3
3
|
<view v-if="readonly" class="content">{{ inpVal }}</view>
|
|
4
4
|
<view v-else>
|
|
5
5
|
<textarea class="textarea" v-model="inpVal" :rows="rows" :maxlength="maxLength" :placeholder="placeholder" @input="inputEvent" :style="{color: fontColor, height: `${rows * 30}rpx`}"></textarea>
|
|
@@ -49,7 +49,8 @@ export default {
|
|
|
49
49
|
default: false
|
|
50
50
|
},
|
|
51
51
|
showVoice: Boolean,
|
|
52
|
-
fontColor: String
|
|
52
|
+
fontColor: String,
|
|
53
|
+
className: String
|
|
53
54
|
},
|
|
54
55
|
data () {
|
|
55
56
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<picker :value="value" class="ml-year-picker" :class="{'is-border': border}" mode="date" fields="year" @change="changeEvent">
|
|
2
|
+
<picker :value="value" class="ml-year-picker" :class="[className, {'is-border': border}]" mode="date" fields="year" @change="changeEvent">
|
|
3
3
|
<view class="picker-warpper">
|
|
4
4
|
<view class="picker-text">{{ value || '请选择' }}</view>
|
|
5
5
|
<ml-icon class="picker-icon" name="arrow-down"></ml-icon>
|
|
@@ -15,7 +15,8 @@ export default {
|
|
|
15
15
|
},
|
|
16
16
|
props: {
|
|
17
17
|
value: String,
|
|
18
|
-
border: Boolean
|
|
18
|
+
border: Boolean,
|
|
19
|
+
className: String
|
|
19
20
|
},
|
|
20
21
|
methods: {
|
|
21
22
|
changeEvent (e) {
|