Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: update #2073

Merged
merged 6 commits into from
Oct 24, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc update
  • Loading branch information
0xjoanne committed Oct 13, 2017
commit 95844528b7b31cdd255df56fa82462fda46bda70
5 changes: 4 additions & 1 deletion src/components/checklist/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ export default {
type: Boolean,
default: true
},
labelPosition: String,
labelPosition: {
type: String,
default: 'right'
},
disabled: Boolean
},
data () {
Expand Down
5 changes: 3 additions & 2 deletions src/components/checklist/metas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ props:
label-position:
version: v2.2.1-rc.4
type: String
en: label position, can be set to left
zh-CN: label 位置,可以设置为 left
default: right
en: label position, can be set to left or right
zh-CN: label 位置,可以设置为 left 或者 right
disabled:
version: v2.3.8
en: if disable user from selecting
Expand Down
8 changes: 6 additions & 2 deletions src/components/clocker/clocker.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,13 @@ function strftime (offsetObject) {
.replace('%_M2', offsetObject.minutes_2)
.replace('%_S1', offsetObject.seconds_1)
.replace('%_S2', offsetObject.seconds_2)
.replace('%_S3', offsetObject.seconds_3)
.replace('%_H1', offsetObject.hours_1)
.replace('%_H2', offsetObject.hours_2)
.replace('%_H3', offsetObject.hours_3)
.replace('%_D1', offsetObject.days_1)
.replace('%_D2', offsetObject.days_2)
.replace('%_D3', offsetObject.days_3)
format = format.replace(/%%/, '%')
return format
}
Expand Down Expand Up @@ -209,8 +212,9 @@ var fns = {
for (var i = 0; i < list.length; i++) {
var key = list[i]
var numbers = splitNumber(this.offset[key])
this.offset[key + '_1'] = numbers[0]
this.offset[key + '_2'] = numbers[1]
for (let n = 0; n < numbers.length; n++) {
this.offset[`${key}_${n + 1}`] = numbers[n]
}
}
// Dispatch an event
if (this.totalSecsLeft === 0) {
Expand Down
16 changes: 15 additions & 1 deletion src/components/clocker/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@
<script>
import Clocker from './clocker'
let format = '%D 天 %H 小时 %M 分 %S 秒'
if (typeof V_LOCALE === 'undefined') {
if (process.env.NODE_ENV === 'development') {
console.warn('[VUX warn] 抱歉,clocker 组件需要升级 vux-loader 到最新版本才能正常使用')
}
} else {
if (V_LOCALE === 'en') { // eslint-disable-line
format = '%D d %H h %M m %S s'
} else if (V_LOCALE === 'zh-CN') { // eslint-disable-line
format = '%D 天 %H 小时 %M 分 %S 秒'
}
}
export default {
name: 'clocker',
mounted () {
Expand Down Expand Up @@ -49,7 +63,7 @@ export default {
time: [String, Number],
format: {
type: String,
default: '%D 天 %H 小时 %M 分 %S 秒'
default: format
}
},
watch: {
Expand Down
4 changes: 2 additions & 2 deletions src/components/countup/metas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ props:
duration:
type: Number
default: 2
en: how long to complete
zh-CN: 耗时
en: duration value (second)
zh-CN: 耗时(秒)
options:
type: 'Object'
en: options for `countup.js`
Expand Down
6 changes: 3 additions & 3 deletions src/components/datetime-range/metas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ props:
en: label text
zh-CN: 标题文字
value:
type: String
type: Array
default: ''
en: form's value, use `v-model` for binding
zh-CN: 表单值,`v-model`绑定
en: "form's value, use `v-model` for binding. For example, ['2017-01-15', '03', '05']"
zh-CN: "表单值,`v-model`绑定。比如,['2017-01-15', '03', '05']"
inline-desc:
type: String
default: ''
Expand Down
3 changes: 3 additions & 0 deletions src/components/datetime/metas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ props:
en: 'dynamically set days list, params `({year, month, min, max}, generateRange)`'
zh-CN: '动态设置日期列表,参数为 `({year, month, min, max}, generateRange)`'
slots:
default:
en: trigger element content
zh-CN: 触发元素内容
title:
version: v2.3.6
en: title slot
Expand Down
20 changes: 17 additions & 3 deletions src/components/flexbox/metas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,40 @@ flexbox:
gutter:
type: Number
default: 8
zh-CN: 间隙像素大小
en: gap size (px)
zh-CN: 间隙像素大小(px)
orient:
type: String
default: horizontal
en: "can be in ['horizontal', 'vertical']"
zh-CN: "排布方向,可选['horizontal', 'vertical']"
justify:
zh-CN: '`flex`的 `justify-content`属性'
en: '`justify-content` in `flex`'
zh-CN: '`flex`的`justify-content`属性'
align:
en: '`align-items` in `flex`'
zh-CN: '`flex`的`align-items`属性'
wrap:
en: '`flex-wrap` in `flex`'
zh-CN: '`flex`的`flex-wrap`属性'
direction:
en: '`flex-direction` in `flex`'
zh-CN: '`flex`的`flex-direction`属性'
slots:
default:
en: 'content slot for `flexbox-item`'
zh-CN: '`flexbox-item`的内容插槽'
flexbox-item:
props:
span:
type: Number
zh-CN: 占用宽度,如果不设,所有flexbox-item将平分
en: occupied width. If not set, all flexbox-item will get the same width.
zh-CN: 占用宽度,如果不设置,所有flexbox-item将平分
order:
type: String
en: '`order` in `flex`'
zh-CN: '`flex`的`order`属性'
slots:
default:
en: content slot
zh-CN: '内容插槽'
46 changes: 45 additions & 1 deletion src/components/flow/metas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,57 @@ items:
- flow-line
flow:
props:
orientation:
type: String
default: 'horizontal'
en: "orientation of flow, can be in ['horizontal', 'vertical']"
zh-CN: "flow 方向,可选['horizontal', 'vertical']"
flow-state:
props:
title:
type: String
default: ''
en: title for state point
zh-CN: 标题
state:
type: String,Number
default: ''
en: content showed inside state point.
zh-CN: 在节点中显示的内容
is-done:
type: Boolean
default: false
en: if done
zh-CN: 该节点是否完成
flow-line:
props:
tip:
type: String
default: ''
en: tip for flow line, invalid when is-done is true
zh-CN: 流线的提示文字,当 is-done 为 true 时无效
tip-direction:
type: String
default: top for horizontal flow, left for vertical flow
en: "orientation of tip, can be in ['top', 'right', 'bottom', 'left']. If horizontal flow, the default is top; if vertical flow, the default is left"
zh-CN: "提示文字方向,可选['top', 'right', 'bottom', 'left']. 在横向 flow 中默认为 top,纵向默认则为 left"
is-done:
type: Boolean
default: false
en: if done
zh-CN: 该流线是否完成
line-span:
type: Number,String
en: length of flow line. if not set, all flow-line will get the same length
zh-CN: 流线的整体长度,如果不设置,所有 flow line 将平分
process-span:
type: Number,String
default: 50
en: percentage rate of progress which will be showed in flow line
zh-CN: 在 flow line 上显示的进度比例
changes:
v2.3.1:
en:
- '[feature] new component'
zh-CN:
- '[feature] 新组件'
- '[feature] 新组件'
4 changes: 2 additions & 2 deletions src/components/form-preview/metas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ props:
type: Array
default: '[]'
en: |
button list, [{style: 'primary', text: 'text', onButtonClick: fn(prop:name), link: '/path'}]
zh-CN: '底部按钮列表,default为灰色样式,primary文字为高亮颜色, [{style: "primary", text: "text", onButtonClick: fn(prop:name), link: "/path"}]'
button list. Default is a gray style, and the primary text is highlighted. [{style: 'primary', text: 'text', onButtonClick: fn(prop:name), link: '/path'}]
zh-CN: '底部按钮列表,default 为灰色样式,primary 文字为高亮颜色, [{style: "primary", text: "text", onButtonClick: fn(prop:name), link: "/path"}]'
changes:
v2.5.12:
en:
Expand Down
10 changes: 5 additions & 5 deletions src/components/grid/metas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ grid:
type: Number
version: v2.2.0
default: 3
en: (deprecated after v2.6.0)rows number
zh-CN: (v2.6.0 之后废弃,使用 col 替代)宫格列数,建议少于`5`
en: (deprecated after v2.6.0) the number of rows. Less than 5 will be better
zh-CN: (v2.6.0 之后废弃,使用 col 替代)宫格行数,建议少于`5`
cols:
type: Number
version: v2.6.1
default: 3
en: column number
en: the number of columns. if there is more than one row in grid, need to set cols value, otherwise all grid items will show in one row with the same width
zh-CN: 列数。如果为非单行 Grid,需要设置 cols,否则所有 GridItem 会平均宽度显示在一行。
slots:
default:
Expand All @@ -49,10 +49,10 @@ grid-item:
slots:
icon:
en: 'icon slot, use `<img>`'
zh-CN: 图标内容,`直接使用<img>标签`
zh-CN: "图标内容,直接使用`<img>`标签"
label:
en: slot for label, the same func as prop:label
zh-CN: label文字的slot,作用同prop:label
zh-CN: label 文字的 slot,作用同 prop:label
changes:
v2.6.1:
en:
Expand Down
8 changes: 4 additions & 4 deletions src/components/group/metas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ props:
default: ''
en: group title
zh-CN: 分组标题
titleColor:
title-color:
type: String
default: ''
en: group title's color
zh-CN: 分组标题文字颜色
labelWidth:
label-width:
type: String
default: ''
en: common label width for child components
zh-CN: 为子元素设定统一label宽度
labelAlign:
label-align:
type: String
default: ''
en: common label text-align for child components
zh-CN: 为子元素设定统一对齐方式
labelMarginRight:
label-margin-right:
type: String
default: ''
en: common margin right value for child components
Expand Down
6 changes: 3 additions & 3 deletions src/components/icon/metas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ props:
type:
type: String
default: ''
en: icon name
en: icon name, optional values are shown in demo
zh-CN: 图标名字,可选值见demo
is-msg:
type: Boolean
default: false
en: if used as msg icon, icon's font-size will be bigger(93px) than default
en: if used as msg icon. Icon's font-size will be bigger(93px) than default
zh-CN: 是否用作消息提示页面图标,图标尺寸会使用93px
changes:
v2.1.1-rc.4:
Expand All @@ -46,4 +46,4 @@ changes:
v2.1.0:
zh-CN:
- '[feature] 更新`WeUI`样式到最新版本'
- '[change] `type`参数由下划线变为中划线,组件内部做了兼容保证升级时无影响'
- '[change] `type`参数由下划线变为中划线,组件内部做了兼容保证升级时无影响'
12 changes: 6 additions & 6 deletions src/components/inline-calendar/metas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ props:
value:
type: String, Array
default: ''
en: calendar value, use `v-modle` for binding
en: calendar value, use `v-modle` for binding. String (including empty) means single seleciton; array (including empty array) means multiple selection.
zh-CN: 当前选中日期,使用`v-model`绑定。值为字符串(包括空字符串)时表示单选日期,为数组(包括空数组)时表示多选。
render-month:
type: Array
Expand Down Expand Up @@ -80,17 +80,17 @@ props:
disable-past:
type: Boolean
default: false
en: if disable the past days
zh-CN: 禁止选择过去的日期,该选项可以与start-date同时使用
en: if disable the past days, can work with start-date
zh-CN: 禁止选择过去的日期,该选项可以与 start-date 同时使用
disable-future:
type: Boolean
default: false
en: if disable future days
zh-CN: 禁止选择未来的日期,该选项可以end-date同时使用
en: if disable future days, can work with end-date
zh-CN: 禁止选择未来的日期,该选项可以 end-date 同时使用
marks:
version: v2.6.0
type: Array
en: (beta)style marks for specified date list
en: (beta) style marks for specified date list
zh-CN: (beta) 自定义日期标记
slots:
each-day:
Expand Down
23 changes: 22 additions & 1 deletion src/components/inline-x-number/metas.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
icon: '&#xe605;'
props:
width:
type: String
default: 50px
en: width for number
zh-CN: 数字所占据的宽度
button-style:
type: String
default: square
en: button style, can be 'round'
zh-CN: 按钮样式,可选['round']
min:
type: Number
default: ''
en: min value
zh-CN: 最小值
max:
type: number
default: ''
en: max value
zh-CN: 最大值
changes:
v2.5.2:
en:
- '[feature] now inline-x-number is available'
zh-CN:
- '[feature] 单独的 inline-x-number 组件可以正常使用了'
- '[feature] 单独的 inline-x-number 组件可以正常使用了'
6 changes: 3 additions & 3 deletions src/components/load-more/metas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ props:
en: if show loading icon
zh-CN: 是否显示 loading 图标
tip:
en: text
en: tip text. Show dot if there is no text and loading icon
zh-CN: 提示文字,如果没有显示图标也没有显示文字,则显示点
background-color:
type: String
default: '#ffffff'
en: background color
en: background color. Recommend to use @load-more-tip-background-color for global
zh-CN: 背景颜色,需要配置以让文字与背景完全融合。推荐通过设置 less 变量 @load-more-tip-background-color 全局修改
changes:
v2.6.0:
Expand All @@ -23,4 +23,4 @@ changes:
en:
- '[feature] Add `load-more` component'
zh-CN:
- '[feature] 增加`load-more`组件'
- '[feature] 增加`load-more`组件'
Loading