mali-applet-ui 1.0.162 → 1.0.163
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.
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
<view v-if="isFromReadonly" class="ml-input is-readonly" :class="[className || '', {'is-right': align === 'right'}]" @tap="tapEvent">
|
|
3
3
|
<view class="ml-input-readonly-content">{{ inpVal }}</view>
|
|
4
4
|
</view>
|
|
5
|
-
<view v-else-if="!editable && (platformEnv.isWXMP || platformEnv.isQWMP)" class="ml-input not-edit" :class="[className || '', {'is-right': align === 'right', 'is-border': border, 'is-disabled':
|
|
5
|
+
<view v-else-if="!editable && (platformEnv.isWXMP || platformEnv.isQWMP)" class="ml-input not-edit" :class="[className || '', {'is-right': align === 'right', 'is-border': border, 'is-disabled': isFormDisabled}]" @tap="tapEvent">
|
|
6
6
|
<view class="ml-input-simulate">
|
|
7
7
|
<text v-if="inpVal">{{ inpVal }}</text>
|
|
8
8
|
<text v-else class="ml-input-placeholder">{{ placeholder }}</text>
|
|
9
9
|
</view>
|
|
10
10
|
</view>
|
|
11
|
-
<view v-else class="ml-input" :class="[className || '', {'is-right': align === 'right', 'is-border': border, 'is-prefix': hasPrefix || type === 'search', 'is-suffix': hasSuffix, 'is-disabled':
|
|
11
|
+
<view v-else class="ml-input" :class="[className || '', {'is-right': align === 'right', 'is-border': border, 'is-prefix': hasPrefix || type === 'search', 'is-suffix': hasSuffix, 'is-disabled': isFormDisabled, 'is-clear': clearable && inpVal}]">
|
|
12
12
|
<view v-if="hasPrefix || type === 'search'" class="ml-input-prefix-icon">
|
|
13
13
|
<slot name="prefix">
|
|
14
14
|
<ml-icon v-if="prefixIcon" :name="prefixIcon"></ml-icon>
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
:confirm-type="type === 'search' ? 'search' : 'done'"
|
|
24
24
|
:placeholder="placeholder"
|
|
25
25
|
:maxlength="maxlength"
|
|
26
|
-
:disabled="
|
|
26
|
+
:disabled="isFormDisabled"
|
|
27
27
|
@tap="tapEvent"
|
|
28
28
|
@input="inputEvent"
|
|
29
29
|
@focus="focusEvent"
|
|
30
30
|
@blur="blurEvent"
|
|
31
31
|
@confirm="confirmEvent"/>
|
|
32
|
-
<view v-if="clearable && !
|
|
32
|
+
<view v-if="clearable && !isFormDisabled && inpVal" class="ml-input-clear-icon" @click.stop="clearEvent">
|
|
33
33
|
<ml-icon name="delete-filling"></ml-icon>
|
|
34
34
|
</view>
|
|
35
35
|
<view v-if="hasSuffix" class="ml-input-suffix-icon">
|
|
@@ -85,6 +85,10 @@ export default {
|
|
|
85
85
|
form: {
|
|
86
86
|
from: 'mlForm',
|
|
87
87
|
default: null
|
|
88
|
+
},
|
|
89
|
+
formItem: {
|
|
90
|
+
from: 'mlFormItem',
|
|
91
|
+
default: null
|
|
88
92
|
}
|
|
89
93
|
},
|
|
90
94
|
data () {
|
|
@@ -100,6 +104,12 @@ export default {
|
|
|
100
104
|
}
|
|
101
105
|
return this.form ? this.form.readonly : false
|
|
102
106
|
},
|
|
107
|
+
isFormDisabled () {
|
|
108
|
+
if (this.disabled) {
|
|
109
|
+
return true
|
|
110
|
+
}
|
|
111
|
+
return this.formItem ? this.formItem.disabled : false
|
|
112
|
+
},
|
|
103
113
|
hasSuffix () {
|
|
104
114
|
return this.$slots.suffix || this.suffixIcon
|
|
105
115
|
},
|
package/package.json
CHANGED