muzhiyu-ui 1.0.2 → 1.0.3

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.
@@ -161,7 +161,6 @@ const computedIconSize = computed(() => {
161
161
 
162
162
  const defaultIconColor = computed(() => {
163
163
  if (props.iconColor) return props.iconColor
164
- if (props.color) return props.color
165
164
  if (props.plain) {
166
165
  switch (props.type) {
167
166
  case 'primary': return config?.primaryColor?.value || '#171717'
@@ -171,6 +170,11 @@ const defaultIconColor = computed(() => {
171
170
  default: return '#64748B'
172
171
  }
173
172
  }
173
+ // 实色按钮 (primary, danger, success, warning) 图标默认必须为纯白
174
+ if (props.type === 'primary' || props.type === 'danger' || props.type === 'success' || props.type === 'warning') {
175
+ return '#ffffff'
176
+ }
177
+ if (props.color) return props.color
174
178
  if (props.type === 'default' || props.type === 'text' || props.type === 'link') return '#475569'
175
179
  return '#ffffff'
176
180
  })
package/index.js CHANGED
@@ -5,7 +5,8 @@
5
5
  * @version 1.0.0
6
6
  */
7
7
  import http from './utils/request.js'
8
- import { util, validate, format, color } from './utils/index.js'
8
+ import { util, validate, validator, color } from './utils/index.js'
9
+ const format = util // 别名挂载
9
10
 
10
11
  // Toast 快捷 JS 弹窗函数
11
12
  const toast = (title, type, options = {}) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muzhiyu-ui",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
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.2",
32
+ "version": "1.0.3",
33
33
  "description": "基于 UniApp Vue3 + SCSS 打造的全端极奢 UI 组件库",
34
34
  "site": "",
35
35
  "displayName": "MuzhiyuUI 极奢全端组件库"
package/utils/index.js CHANGED
@@ -529,6 +529,8 @@ util.notify.close = () => uni.$emit('mu-notify-close')
529
529
  util.loadingPage.hide = () => uni.$emit('mu-loading-page-hide')
530
530
  util.loadingPage.close = () => uni.$emit('mu-loading-page-hide')
531
531
 
532
+ export const format = util
533
+
532
534
  /**
533
535
  * 全局统一导出核心入口对象 (mu)
534
536
  */