muzhiyu-ui 1.0.5 → 1.0.8

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.
@@ -39,9 +39,9 @@
39
39
  </view>
40
40
 
41
41
  <!-- 按钮文本 -->
42
- <span v-if="hasLabel" class="mu-button__label">
42
+ <text v-if="hasLabel" class="mu-button__label">
43
43
  <slot></slot>
44
- </span>
44
+ </text>
45
45
 
46
46
  <!-- 右侧矢量图标 -->
47
47
  <view v-if="!loading && (icon || $slots.icon) && iconPosition === 'right'" class="mu-button__icon mu-button__icon--right">
@@ -270,21 +270,22 @@ function onChooseAvatar(e) { emit('chooseavatar', e) }
270
270
 
271
271
  &__inner {
272
272
  position: relative;
273
- display: inline-flex;
274
- align-items: center;
275
- justify-content: center;
276
- box-sizing: border-box;
273
+ display: inline-flex !important;
274
+ align-items: center !important;
275
+ justify-content: center !important;
276
+ box-sizing: border-box !important;
277
277
  white-space: nowrap;
278
278
  cursor: pointer;
279
279
  user-select: none;
280
280
  transition: all $mu-duration $mu-ease;
281
281
  border: none;
282
282
  outline: none;
283
- line-height: 1;
283
+ line-height: 1 !important;
284
+ margin: 0 !important;
284
285
 
285
286
  /* 微信小程序原生按钮重置 */
286
287
  &::after {
287
- display: none;
288
+ display: none !important;
288
289
  }
289
290
 
290
291
  &--active {
@@ -294,20 +295,20 @@ function onChooseAvatar(e) { emit('chooseavatar', e) }
294
295
  }
295
296
 
296
297
  &__label {
297
- display: inline-flex;
298
- align-items: center;
299
- justify-content: center;
300
- line-height: 1;
301
- vertical-align: middle;
298
+ display: inline-flex !important;
299
+ align-items: center !important;
300
+ justify-content: center !important;
301
+ line-height: 1 !important;
302
+ height: 100%;
302
303
  }
303
304
 
304
305
  &__icon {
305
- display: inline-flex;
306
- align-items: center;
307
- justify-content: center;
308
- line-height: 1;
306
+ display: inline-flex !important;
307
+ align-items: center !important;
308
+ justify-content: center !important;
309
+ line-height: 1 !important;
310
+ height: 100%;
309
311
  flex-shrink: 0;
310
- vertical-align: middle;
311
312
 
312
313
  &--left { margin-right: 8rpx; }
313
314
  &--right { margin-left: 8rpx; }
@@ -410,7 +411,7 @@ function onChooseAvatar(e) { emit('chooseavatar', e) }
410
411
  }
411
412
  }
412
413
 
413
- .mu-dark, page.mu-dark {
414
+ .mu-dark {
414
415
  .mu-button {
415
416
  &--default &__inner {
416
417
  background: rgba(36, 36, 50, 0.9);
@@ -38,12 +38,12 @@
38
38
  </view>
39
39
 
40
40
  <!-- 右侧自定义插槽 (支持绑定/授权手机号按钮、开关、文案等) -->
41
- <view class="mu-cell__right" @tap="handleClick">
41
+ <view class="mu-cell__right">
42
42
  <slot name="right">
43
43
  <slot name="value">
44
44
  <text v-if="value" class="mu-cell__value">{{ value }}</text>
45
45
  </slot>
46
- <view v-if="arrow" class="mu-cell__arrow" @tap="handleClick">
46
+ <view v-if="computedArrow" class="mu-cell__arrow">
47
47
  <mu-icon name="chevron_right" :size="16" color="#94A3B8" />
48
48
  </view>
49
49
  </slot>
@@ -81,6 +81,7 @@ const props = defineProps({
81
81
  iconSize: { type: [Number, String], default: 20 },
82
82
  iconColor: { type: String, default: '' },
83
83
  arrow: { type: Boolean, default: false },
84
+ isLink: { type: Boolean, default: false },
84
85
  disabled: { type: Boolean, default: false },
85
86
  required: { type: Boolean, default: false },
86
87
  divider: { type: Boolean, default: true },
@@ -110,6 +111,8 @@ const contentStyle = computed(() => {
110
111
  return {}
111
112
  })
112
113
 
114
+ const computedArrow = computed(() => props.arrow || props.isLink)
115
+
113
116
  const touchStartX = ref(0)
114
117
  const touchStartY = ref(0)
115
118
  const swipeOffset = ref(0)
@@ -360,7 +363,7 @@ function handleClick(e) {
360
363
  }
361
364
  }
362
365
 
363
- .mu-dark, page.mu-dark {
366
+ .mu-dark {
364
367
 
365
368
  .mu-cell {
366
369
  background: $mu-dark-bg-base;
@@ -789,7 +789,7 @@ function handleClick(e) {
789
789
  }
790
790
  }
791
791
 
792
- .mu-dark, page.mu-dark {
792
+ .mu-dark {
793
793
 
794
794
  .mu-icon {
795
795
  &__svg {
@@ -37,7 +37,13 @@
37
37
  :value="innerValue" :placeholder="placeholder" :disabled="disabled" :maxlength="maxlength"
38
38
  :auto-height="autoHeight" @input="onInput" @focus="onFocus" @blur="onBlur" />
39
39
 
40
- <!-- 普通 / 数字 / 手机 / 密码 / 验证码 / 虚拟键盘 Input -->
40
+ <!-- 只读选择模式 (避免拉起系统软键盘) -->
41
+ <view v-if="readonly" class="mu-input__virtual-box">
42
+ <text v-if="innerValue !== undefined && innerValue !== null && String(innerValue).length > 0" class="mu-input__virtual-text">{{ innerValue }}</text>
43
+ <text v-else class="mu-input__virtual-placeholder">{{ placeholder }}</text>
44
+ </view>
45
+
46
+ <!-- 虚拟键盘 Input -->
41
47
  <view v-else-if="isVirtualKeyboardActive" class="mu-input__virtual-box">
42
48
  <text v-if="innerValue" class="mu-input__virtual-text">{{ innerValue }}</text>
43
49
  <text v-else class="mu-input__virtual-placeholder">{{ placeholder }}</text>
@@ -115,6 +121,7 @@ const props = defineProps({
115
121
  required: { type: Boolean, default: false }, // 是否显示必填红星 *
116
122
  placeholder: { type: String, default: '请输入' },
117
123
  disabled: { type: Boolean, default: false },
124
+ readonly: { type: Boolean, default: false },
118
125
  clearable: { type: Boolean, default: false },
119
126
  maxlength: { type: [Number, String], default: -1 },
120
127
  counter: { type: Boolean, default: false },
@@ -540,7 +547,7 @@ defineExpose({
540
547
  }
541
548
  }
542
549
 
543
- .mu-dark, page.mu-dark {
550
+ .mu-dark {
544
551
 
545
552
  .mu-input {
546
553
  &__label-text { color: $mu-dark-text-primary; }
@@ -355,7 +355,7 @@ watch(() => props.value, (val) => {
355
355
  }
356
356
  }
357
357
 
358
- .mu-dark, page.mu-dark {
358
+ .mu-dark {
359
359
  .mu-keyboard {
360
360
  &__panel {
361
361
  background: #0F172A;
@@ -271,7 +271,7 @@ watch(() => props.show, (val) => {
271
271
  }
272
272
  }
273
273
 
274
- .mu-dark, page.mu-dark {
274
+ .mu-dark {
275
275
 
276
276
  .mu-picker {
277
277
  &__mask { background: rgba(0, 0, 0, 0.65); }
@@ -269,7 +269,7 @@ defineExpose({ close: handleClose, open: () => { visible.value = true } })
269
269
  }
270
270
  }
271
271
 
272
- .mu-dark, page.mu-dark {
272
+ .mu-dark {
273
273
 
274
274
  .mu-popup {
275
275
  &__content {
@@ -194,7 +194,7 @@ function handleRightClick(e) {
194
194
  }
195
195
  }
196
196
 
197
- .mu-dark, page.mu-dark {
197
+ .mu-dark {
198
198
 
199
199
  .mu-section {
200
200
  &__title { color: $mu-dark-text-primary; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muzhiyu-ui",
3
- "version": "1.0.5",
3
+ "version": "1.0.8",
4
4
  "description": "基于 UniApp Vue3 + SCSS 打造的全端极奢组件库",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "uni_modules": {
30
30
  "id": "muzhiyu-ui",
31
31
  "name": "muzhiyu-ui 极奢组件库",
32
- "version": "1.0.5",
32
+ "version": "1.0.8",
33
33
  "description": "基于 UniApp Vue3 + SCSS 打造的全端极奢 UI 组件库",
34
34
  "site": "",
35
35
  "displayName": "MuzhiyuUI 极奢全端组件库"