Component({
options: {
styleIsolation: 'shared',
},
/**
* ai-inline-icon — 行首 AI 小图标组件
*
* ## 用法
* 1. 在页面/组件的 .json 中注册:
* "ai-inline-icon": "/components/ai-inline-icon/ai-inline-icon"
*
* 2. 在 WXML 中使用:
*
*
*
*
*
*
* ## color 可选值
* red | orange | yellow | blue | indigo(默认)| purple
*
* ## 样式来源
* 全局 app.wxss:.ai-inline-icon + .ai-color-*
*
* ## 页面随机配色初始化(复制到 Page.onLoad)
* const AI_COLORS = ['red','orange','yellow','blue','indigo','purple']
* const aiColor = AI_COLORS[Math.floor(Math.random() * AI_COLORS.length)]
* this.setData({ aiColor })
*/
properties: {
/** 颜色系列:red | orange | yellow | blue | indigo | purple */
color: {
type: String,
value: 'indigo',
},
},
})