✨ feat(vscode): 代码阅读的块种类只画图标(lucide,种类色),种类名放进鼠标停上去的提示和读屏文字;库规则给自己的图标
This commit is contained in:
1 parent
33a1b5d57c
commit
1dfc0c7b1e
19 files changed
+185
-56
No files matched your search
@@ -20,6 +20,7 @@ const SCHEMA_ITEMS = new Set(['ForeignKey', 'Sequence', 'Identity', 'Computed',
|
||||
const SIZE_KEYWORDS = ['length', 'precision', 'scale']
|
||||
const TABLE_KIND = 'sqlalchemy.table'
|
||||
const TABLE_COLOR: ThemeColor = { dark: '#e8a860', light: '#a3590d' }
|
||||
const TABLE_ICON = 'database'
|
||||
|
||||
/** 一种显示语言的用词。 */
|
||||
interface Words {
|
||||
@@ -435,7 +436,7 @@ function tableBlock(block: ClassBlock, model: Model, env: Env): RuleCard {
|
||||
const members = [model.table, model.args, ...model.columns.map(column => column.member), ...model.relationships.map(relationship => relationship.member)]
|
||||
return {
|
||||
kind: TABLE_KIND,
|
||||
badge: { label: words.kind, color: TABLE_COLOR },
|
||||
badge: { label: words.kind, color: TABLE_COLOR, icon: TABLE_ICON },
|
||||
rows,
|
||||
...(facts.name && { defines: range(facts.name) }),
|
||||
absorbs: withLeadingComments(block.children, members.filter((member): member is Member => member !== undefined).map(member => member.block)),
|
||||
|
||||
Reference in new issue
Block a user