muzhiyu-ui 1.0.8 → 1.0.12

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.
@@ -61,6 +61,13 @@
61
61
  <script setup>
62
62
  import { computed, useSlots, inject } from 'vue'
63
63
 
64
+ defineOptions({
65
+ name: 'mu-button',
66
+ options: {
67
+ styleIsolation: 'shared'
68
+ }
69
+ })
70
+
64
71
  const config = inject('muConfig', null)
65
72
 
66
73
  const props = defineProps({
@@ -299,7 +306,6 @@ function onChooseAvatar(e) { emit('chooseavatar', e) }
299
306
  align-items: center !important;
300
307
  justify-content: center !important;
301
308
  line-height: 1 !important;
302
- height: 100%;
303
309
  }
304
310
 
305
311
  &__icon {
@@ -307,7 +313,6 @@ function onChooseAvatar(e) { emit('chooseavatar', e) }
307
313
  align-items: center !important;
308
314
  justify-content: center !important;
309
315
  line-height: 1 !important;
310
- height: 100%;
311
316
  flex-shrink: 0;
312
317
 
313
318
  &--left { margin-right: 8rpx; }
@@ -770,17 +770,15 @@ function handleClick(e) {
770
770
 
771
771
  <style lang="scss" scoped>
772
772
  .mu-icon {
773
- display: inline-flex;
774
- align-items: center;
775
- justify-content: center;
776
- line-height: 1;
773
+ display: inline-flex !important;
774
+ align-items: center !important;
775
+ justify-content: center !important;
776
+ vertical-align: middle !important;
777
+ line-height: 1 !important;
777
778
 
778
- &__svg {
779
- display: block;
780
- }
781
-
782
- &__image {
783
- display: block;
779
+ &__svg, &__image {
780
+ display: block !important;
781
+ margin: auto !important;
784
782
  }
785
783
 
786
784
  &__fallback {
@@ -38,7 +38,7 @@
38
38
  :auto-height="autoHeight" @input="onInput" @focus="onFocus" @blur="onBlur" />
39
39
 
40
40
  <!-- 只读选择模式 (避免拉起系统软键盘) -->
41
- <view v-if="readonly" class="mu-input__virtual-box">
41
+ <view v-else-if="readonly" class="mu-input__virtual-box">
42
42
  <text v-if="innerValue !== undefined && innerValue !== null && String(innerValue).length > 0" class="mu-input__virtual-text">{{ innerValue }}</text>
43
43
  <text v-else class="mu-input__virtual-placeholder">{{ placeholder }}</text>
44
44
  </view>
@@ -60,7 +60,11 @@ const pickerValue = ref([])
60
60
 
61
61
  function getItemLabel(item) {
62
62
  if (typeof item === 'object' && item !== null) {
63
- return (item[props.labelKey] !== undefined ? item[props.labelKey] : (item.label !== undefined ? item.label : String(item)))
63
+ if (props.labelKey && item[props.labelKey] !== undefined) return String(item[props.labelKey])
64
+ if (item.label !== undefined) return String(item.label)
65
+ if (item.text !== undefined) return String(item.text)
66
+ if (item.title !== undefined) return String(item.title)
67
+ if (item.name !== undefined) return String(item.name)
64
68
  }
65
69
  return String(item)
66
70
  }
@@ -133,7 +137,13 @@ function onPickerChange(e) {
133
137
  function getSelectedResult() {
134
138
  const items = pickerValue.value.map((idx, colIdx) => (formattedColumns.value[colIdx] && formattedColumns.value[colIdx][idx]) || (formattedColumns.value[colIdx] && formattedColumns.value[colIdx][0]))
135
139
  const values = items.map(item => item != null ? getItemValue(item) : '')
136
- return { indexs: [...pickerValue.value], items, values }
140
+ return {
141
+ indexs: [...pickerValue.value],
142
+ items,
143
+ values,
144
+ item: items[0],
145
+ value: values[0]
146
+ }
137
147
  }
138
148
 
139
149
  function handleConfirm() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muzhiyu-ui",
3
- "version": "1.0.8",
3
+ "version": "1.0.12",
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.8",
32
+ "version": "1.0.12",
33
33
  "description": "基于 UniApp Vue3 + SCSS 打造的全端极奢 UI 组件库",
34
34
  "site": "",
35
35
  "displayName": "MuzhiyuUI 极奢全端组件库"