mali-applet-ui 1.0.165 → 1.0.166

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.
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <view
3
3
  class="ml-form-item"
4
- :class="[className || '', itemTitleAlign ? `title-align-${itemTitleAlign}` : '', itemAlign ? `align-${itemAlign}` : '', {'is-visible': visible, 'is-border': isFormBorder, 'is-vertical': itemVertical, 'is-required': isRequired, 'is-error': itemErrRule}]"
4
+ :class="[className || '', itemTitleAlign ? `title-align-${itemTitleAlign}` : '', itemAlign ? `align-${itemAlign}` : '', {'is-visible': visible, 'is-border': isFormBorder, 'is-vertical': itemVertical, 'is-required': isRequired, 'is-disabled': isFormDisabled, 'is-error': itemErrRule}]"
5
5
  :style="styles">
6
6
  <view v-if="title || $slots.title" class="ml-form-item-header" :style="titleStyle">
7
7
  <view v-if="isRequired" class="ml-form-item-header-asterisk">*</view>
@@ -106,6 +106,12 @@ export default {
106
106
  }
107
107
  return false
108
108
  },
109
+ isFormDisabled () {
110
+ if (this.disabled) {
111
+ return true
112
+ }
113
+ return this.form ? this.form.disabled : false
114
+ },
109
115
  itemErrRule () {
110
116
  if (this.form) {
111
117
  const item = this.form.itemList.find(item => item.mId === this.mId)
@@ -247,13 +253,18 @@ export default {
247
253
  .ml-form-item-header-extra {
248
254
  flex-shrink: 0;
249
255
  }
256
+ &.is-disabled {
257
+ color: $ml-disabled-color;
258
+ .ml-form-item-header-title {
259
+ color: $ml-disabled-color;
260
+ }
261
+ }
250
262
  &.is-vertical {
251
263
  flex-direction: column;
252
264
  }
253
265
  &:not(.is-vertical) {
254
266
  .ml-form-item-header {
255
267
  flex-shrink: 0;
256
- color: rgba(0, 0, 0, 0.65);
257
268
  }
258
269
  }
259
270
  &.title-align-left {
@@ -163,9 +163,9 @@ export default {
163
163
  color: $ml-input-color-placeholder;
164
164
  }
165
165
  &.is-disabled {
166
- color: rgba(23,26,29,0.24);
166
+ color: $ml-disabled-color;
167
167
  .ml-input-placeholder {
168
- color: rgba(23,26,29,0.24);
168
+ color: $ml-disabled-color;
169
169
  }
170
170
  }
171
171
  .ml-input-simulate {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.0.165",
3
+ "version": "1.0.166",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "lib",
package/theme.scss CHANGED
@@ -3,6 +3,7 @@ $ml-page-full-width: 100%;
3
3
 
4
4
  // 文字颜色
5
5
  $ml-font-color: rgba(0, 0, 0, 0.85);
6
+ $ml-disabled-color: rgba(23,26,29,0.24);
6
7
 
7
8
  // 主题色
8
9
  $ml-theme-primary-color: #246BFD;