@blueking/chat-x 0.0.18 → 0.0.19
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.
|
@@ -29,7 +29,7 @@ button.ai-shortcut-btn(flex,gap: 4px,height: 28px,padding: 0 4px,white
|
|
|
29
29
|
│
|
|
30
30
|
├── <slot name="default">(覆盖后图标+名称全部替换)
|
|
31
31
|
│ ├── [shortcut.icon 为字符串 && 以 'http' 开头]
|
|
32
|
-
│ │
|
|
32
|
+
│ │ 加载成功:<img … />;加载失败:回退 AgentIcon.ai-shortcut-btn-icon
|
|
33
33
|
│ ├── [shortcut.icon 为字符串 && 不以 'http' 开头]
|
|
34
34
|
│ │ <span :class="icon" />(CSS 图标类名,无其他 class)
|
|
35
35
|
│ ├── [shortcut.icon 为函数或组件]
|
|
@@ -47,14 +47,14 @@ defineExpose: { get $el() { return el.value } }(懒 getter,返回 button 元
|
|
|
47
47
|
|
|
48
48
|
## 图标渲染规则
|
|
49
49
|
|
|
50
|
-
| `shortcut.icon` 类型 | 渲染结果 | 额外说明
|
|
51
|
-
| ------------------------------------- | --------------------------- |
|
|
52
|
-
| 未设置(且 `components` 为空/未设置) | `AgentIcon`(默认图标) | `components: []` 与不传效果相同
|
|
53
|
-
| 未设置(且 `components` 有内容) | 无图标 | 表单类快捷指令
|
|
54
|
-
| `string`,以 `'http'` 开头 | `<img
|
|
55
|
-
| `string`,不以 `'http'` 开头 | `<span :class="icon">` | 视为 CSS 图标类名,无其他 class
|
|
56
|
-
| 函数 `(h) => Component/VNode` | `<component :is="icon(h)">` | 有 `.ai-shortcut-btn-icon`
|
|
57
|
-
| 组件对象 | `<component :is="icon">` | 有 `.ai-shortcut-btn-icon`
|
|
50
|
+
| `shortcut.icon` 类型 | 渲染结果 | 额外说明 |
|
|
51
|
+
| ------------------------------------- | --------------------------- | ---------------------------------------------------------------- |
|
|
52
|
+
| 未设置(且 `components` 为空/未设置) | `AgentIcon`(默认图标) | `components: []` 与不传效果相同 |
|
|
53
|
+
| 未设置(且 `components` 有内容) | 无图标 | 表单类快捷指令 |
|
|
54
|
+
| `string`,以 `'http'` 开头 | `<img>`,失败时 `AgentIcon` | `.ai-common-icon .ai-shortcut-btn-icon`;`@error` 后回退默认图标 |
|
|
55
|
+
| `string`,不以 `'http'` 开头 | `<span :class="icon">` | 视为 CSS 图标类名,无其他 class |
|
|
56
|
+
| 函数 `(h) => Component/VNode` | `<component :is="icon(h)">` | 有 `.ai-shortcut-btn-icon` |
|
|
57
|
+
| 组件对象 | `<component :is="icon">` | 有 `.ai-shortcut-btn-icon` |
|
|
58
58
|
|
|
59
59
|
## 基础用法
|
|
60
60
|
|