component-styling
БесплатноБез исполняемых скриптовНе проверенComponent style templates and BEM naming for vehicle insurance platform. Use when styling Vue components, implementing BEM classes, creating responsive…
от FDU-INS★ 84 звезды на GitHubОб этом скилле
Component Styling - 组件样式规范
车险签单数据分析平台的组件样式模板和BEM命名规范。
🧩 组件样式模板
1. 卡片样式 (Card)
基础卡片模板:
<template>
<div class="card">
<div class="card__header">
<h3 class="card__title">{{ title }}</h3>
<p class="card__subtitle">{{ subtitle }}</p>
</div>
<div class="card__body">
<slot></slot>
</div>
<div class="card__footer">
<slot name="footer"></slot>
</div>
</div>
</template>
<style scoped>
.card {
background: var(--surface-elevated);
border-radius: var(--radius-md);
box-shadow: var(--shadow-soft);
padding: var(--space-6);
transition: box-shadow 0.3s ease;
}
.card:hover {
box-shadow: 0 15px 40px rgba(15, 23, 42, 0.12);
}
.card__header {
margin-bottom: var(--space-4);
border-bottom: 1px solid var(--gray-300);
padding-bottom: var(--space-3);
}
.card__title {
font-size: var(--text-xl);
font-weight: 600;
color: var(--text-primary);
margin: 0;
}
.card__subtitle {
font-size: var(--text-sm);
color: var(--text-secondary);
margin: var(--space-2) 0 0;
}
.card__body {
margin-bottom: var(--space-4);
}
.card__footer {
padding-top: var(--space-3);
border-top: 1px solid var(--gray-300);
}
</style>
2. 按钮样式 (Button)
按钮变体模板:
<template>
<button :class="['btn', `btn--${variant}`, `btn--${size}`]">
<slot></slot>
</button>
</template>
<script setup>
defineProps({
variant: {
type: String,
default: 'primary',
validator: (v) => ['primary', 'secondary', 'ghost'].includes(v)
},
size: {
type: String,
default: 'md',
validator: (s) => ['sm', 'md', 'lg'].includes(s)
}
})
</script>
<style scoped>
/* 基础样式 */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
border: none;
border-radius: var(--radius-sm);
font-family: var(--font-family-base);
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* 尺寸变体 */
.btn--sm {
padding: var(--space-2) var(--space-3);
font-size: var(--text-sm);
}
.btn--md {
padding: var(--space-3) var(--space-5);
font-size: var(--text-base);
}
.btn--lg {
padding: var(--space-4) var(--space-6);
font-size: var(--text-lg);
}
/* 样式变体 */
.btn--primary {
background: var(--primary-500);
color: white;
}
.btn--primary:hover:not(:disabled) {
background: var(--primary-600);
}
.btn--primary:active:not(:disabled) {
background: var(--primary-700);
}
.btn--secondary {
background: var(--gray-100);
color: var(--text-primary);
}
.btn--secondary:hover:not(:disabled) {
background: var(--gray-300);
}
.btn--ghost {
background: transparent;
color: var(--primary-500);
border: 1px solid var(--primary-500);
}
.btn--ghost:hover:not(:disabled) {
background: var(--surface-primary-tint);
}
</style>
3. 表单控件 (Form Controls)
输入框模板:
<template>
<div class="input-group">
<label v-if="label" class="input-group__label">{{ label }}</label>
<input
:type="type"
:placeholder="placeholder"
:value="modelValue"
@input="$emit('update:modelValue', $event.target.value)"
class="input-group__input"
/>
<span v-if="error" class="input-group__error">{{ error }}</span>
</div>
</template>
<script setup>
defineProps({
label: String,
type: { type: String, default: 'text' },
placeholder: String,
modelValue: [String, Number],
error: String
})
defineEmits(['update:modelValue'])
</script>
<style scoped>
.input-group {
display: flex;
flex-direction: column;
gap: var(--space-2);
}
.input-group__label {
font-size: var(--text-sm);
font-weight: 500;
color: var(--text-primary);
}
.input-group__input {
padding: var(--space-3) var(--space-4);
border: 1px solid var(--gray-300);
border-radius: var(--radius-sm);
font-size: var(--text-base);
font-family: var(--font-family-base);
color: var(--text-primary);
background: var(--surface-default);
transition: border-color 0.2s ease;
}
.input-group__input:focus {
outline: none;
border-color: var(--primary-500);
box-shadow: 0 0 0 3px var(--surface-primary-tint);
}
.input-group__input::placeholder {
color: var(--text-muted);
}
.input-group__error {
font-size: var(--text-xs);
color: var(--status-warning);
}
</style>
4. 图表容器 (Chart Container)
ECharts容器模板:
<template>
<div class="chart-container">
<div class="chart-container__header">
<h4 class="chart-container__title">{{ title }}</h4>
<div class="chart-container__actions">
<slot name="actions"></slot>
</div>
</div>
<div class="chart-container__body">
<div ref="chartRef" class="chart-container__canvas"></div>
</div>
</div>
</template>
<style scoped>
.chart-container {
background: var(--surface-elevated);
border-radius: var(--radius-md);
box-shadow: var(--shadow-soft);
padding: var(--space-6);
}
.chart-container__header {
display: flex;
justify-content
Установить component-styling в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadEditGrepGlobFAQ
Что делает скилл component-styling?
Component style templates and BEM naming for vehicle insurance platform. Use when styling Vue components, implementing BEM classes, creating responsive layouts, or writing scoped CSS. Keywords: BEM naming, component styles, KpiCard, FilterPanel, scoped CSS, responsive design, card styles, button styles, form controls.
Как установить скилл component-styling?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл component-styling запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic