@mc-markets/ui 1.0.93 → 1.0.94

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.
package/README.md CHANGED
@@ -115,23 +115,29 @@ export default defineConfig({
115
115
  ```javascript
116
116
  import { createApp } from 'vue'
117
117
  import App from './App.vue'
118
- // 导入组件库样式
118
+
119
+ // 导入组件库样式(必需)
119
120
  import '@mc-markets/ui/dist/style.css'
120
121
 
122
+ // 导入字体图标样式(如果使用图标组件)
123
+ import '@mc-markets/ui/styles/font'
124
+ import '@mc-markets/ui/styles/colorfont'
125
+
121
126
  createApp(App).mount('#app')
122
127
  ```
123
128
 
124
- **其他样式导入方式:**
129
+ **自动导入样式(推荐):**
125
130
 
126
- ```javascript
127
- // 方式1:导入编译后的 CSS(推荐,体积更小)
128
- import '@mc-markets/ui/dist/style.css'
131
+ 配置 resolver 的 `importStyle: 'css'` 后,会自动导入以下文件:
132
+ - `@mc-markets/ui/dist/style.css` - 主样式文件
133
+ - `@mc-markets/ui/styles/font` - 字体图标样式
134
+ - `@mc-markets/ui/styles/colorfont` - 彩色字体图标样式
129
135
 
130
- // 方式2:导入 SCSS 源文件(可自定义变量)
131
- import '@mc-markets/ui/packages/styles/index.scss'
132
-
133
- // 方式3:通过 resolver 自动导入(会在第一个组件导入时自动引入)
134
- // 在 vite.config.js 中配置 importStyle: 'css'
136
+ ```javascript
137
+ // vite.config.js
138
+ McMarketsUIResolver({
139
+ importStyle: 'css' // 自动导入所有必需的样式
140
+ })
135
141
  ```
136
142
 
137
143
  #### 4. 配置 Webpack(Vue CLI)