vue-color-ui 0.0.16 → 0.0.17

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
@@ -301,3 +301,105 @@ const handleItemClick = (item, index) => {
301
301
  </template>
302
302
  ```
303
303
 
304
+ ## TTopBar 组件使用文档
305
+
306
+ ### 属性
307
+
308
+ #### `title`
309
+
310
+ - 类型:`string`
311
+ - 描述:导航栏的标题文本。
312
+
313
+ #### `leftIcon`
314
+
315
+ - 类型:`IconName` (可选)
316
+ - 描述:左侧图标的名称。
317
+
318
+ #### `leftIconColor`
319
+
320
+ - 类型:`ColorName` (可选)
321
+ - 默认值:`gray`
322
+ - 描述:左侧图标的颜色。
323
+
324
+ #### `leftText`
325
+
326
+ - 类型:`string` (可选)
327
+ - 描述:左侧的文本。
328
+
329
+ #### `rightIcon`
330
+
331
+ - 类型:`IconName` (可选)
332
+ - 描述:右侧图标的名称。
333
+
334
+ #### `rightIconColor`
335
+
336
+ - 类型:`ColorName` (可选)
337
+ - 默认值:`gray`
338
+ - 描述:右侧图标的颜色。
339
+
340
+ #### `bg`
341
+
342
+ - 类型:`ColorName` (可选)
343
+ - 默认值:`white`
344
+ - 描述:导航栏的背景颜色。
345
+
346
+ #### `avatarUrl`
347
+
348
+ - 类型:`string` (可选)
349
+ - 描述:头像的 URL。
350
+
351
+ ### 示例
352
+
353
+ #### 示例 1:简单的操作条
354
+
355
+ ```vue
356
+ <template>
357
+ <TTopBar
358
+ title="操作条"
359
+ leftIcon="back"
360
+ leftText="返回"
361
+ leftIconColor="gray"
362
+ bg="white"
363
+ />
364
+ </template>
365
+
366
+ <script setup lang="ts">
367
+ import TTopBar from './components/TTopBar.vue';
368
+ </script>
369
+ ```
370
+
371
+ #### 示例 2:海蓝主题
372
+
373
+ ```
374
+ <template>
375
+ <TTopBar
376
+ title="海蓝"
377
+ leftIcon="close"
378
+ leftText="关闭"
379
+ leftIconColor="white"
380
+ bg="blue"
381
+ />
382
+ </template>
383
+
384
+ <script setup lang="ts">
385
+ import TTopBar from './components/TTopBar.vue';
386
+ </script>
387
+ ```
388
+
389
+ #### 示例 3:带头像和右侧图标的导航栏
390
+
391
+ ```vue
392
+ <template>
393
+ <TTopBar
394
+ title="ColorUI"
395
+ bg="black"
396
+ avatarUrl="https://ossweb-img.qq.com/images/lol/web201310/skin/big91012.jpg"
397
+ rightIcon="more"
398
+ rightIconColor="white"
399
+ />
400
+ </template>
401
+
402
+ <script setup lang="ts">
403
+ import TTopBar from './components/TTopBar.vue';
404
+ </script>
405
+ ```