构建vue组件库脚手架_Vue.js的原型组件库构建

本文介绍了如何构建一个名为Protovue的Vue.js原型组件库,包括入门指南、各种组件如Grid、Cell、Text、Avatar等的详细说明,以及如何在项目中有效使用这些组件以提升用户体验。
摘要由CSDN通过智能技术生成

构建vue组件库脚手架

原语 (Protovue)

A prototyping component library.

原型组件库。

入门 (Getting Started)

组件 (Components)

(Grid)

<v1-grid />
<v1-grid size="8x8" /> // Default: 12x10
<v1-grid gap="0" /> // Default: 10
<v1-grid guides /> // Shows guides to help build cells
<v1-grid flat /> // Makes all cells flat (no background)

细胞 (Cell)

<v1-cell />
<v1-cell size="2x4" /> // WxH: size="2,4" and size="2 4" also work
<v1-cell x="1" /> // Default: 0
<v1-cell y="3" /> // Default: 0
<v1-cell flat /> // Removes background color
<v1-cell middle /> // Vertically aligns content in middle
<v1-cell bottom /> // Vertically aligns content in bottom
<v1-cell border /> // Adds border to all sides of cell
<v1-cell borderTop /> // Adds border to top of cell
<v1-cell borderRight /> // Adds border to right of cell
<v1-cell borderBottom /> // Adds border to bottom of cell
<v1-cell borderLeft /> // Adds border to left of cell

文本 (Text)

<v1-text />
<v1-text rows="5" /> // Default: 3
<v1-text center /> // Centers rows
<v1-text justify /> // Makes rows full width
Text

图片 (Image)

<v1-image />
<v1-image width="100px" /> // Default: 100%
<v1-image height="100px" /> // Default: 200px
<v1-image round /> // Makes circle if width equals height
<v1-image center /> // Centers horizontally
Image

头像 (Avatar)

<v1-avatar />
<v1-footer count="5" /> // Default: 1
Avatar

Works best in a vertically narrow cell

在垂直狭窄的单元中效果最佳

<v1-nav />
<v1-nav links="5" /> // Default: 4
Nav

Works best in a vertically narrow cell

在垂直狭窄的单元中效果最佳

<v1-footer />
<v1-footer links="5" /> // Default: 4
Footer

图表 (Chart)

Shows a filled line chart.

显示实线图。

<v1-chart />
<v1-chart height="300" /> // Default: 200
<v1-chart margin="100" /> // Horizontal margin, Default: 50
Chart

介绍 (Intro)

Shows a model explaining the prototype. Helps your users get into the right mind set.

显示一个解释原型的模型。 帮助您的用户进入正确的思维模式。

Works best if you include it before <v1-grid>.

如果在<v1-grid>之前包含它,则效果最好。

<v1-intro title="Testing Feature {X}" version="v1">
  <p>Imagine your job title is {A} while working for company {B}. This prototype explores a solution for problem {C}.</p>
  <p>Please take it for a test run. Then we'd like to know if you\'re excited about this direction and if you've got any feedback or ideas.</p>
  <p>Thanks for your input!</p>
</v1-intro>
<v1-grid />
Intro

翻译自: https://vuejsexamples.com/a-prototyping-component-library-build-for-vue-js/

构建vue组件库脚手架

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值