jg-xh-ui
v1.0.20
Published
fostars's pc ui library
Readme
fostar's xh-ui
xh-ui 组件库是在element-ui的基础之上衍生的一个符合公司业务的ui组件库,在前端的业务需求中,统一使用此ui仓库作为基础组件开发;
组件文档生成
组件的参数会自动生成,开发者只需要写对应的demo即可;
组件注释写法 !!! 也可参考demo组件。
组件注释写法
:::demo
<template>
<div>
<div> 查看组件写法 </div>
<!-- @slot Use this slot header -->
<slot name="header"></slot>
<!--
@slot Modal footer
@binding item an item passed to the footer
-->
<slot name="footer"/>
</div>
</template>
<script>
export default {
props: {
/**
* Color of the button.
*/
color: {
type: String,
default: '#FCC'
},
/**
* initial value to be passed but undocumented
* @ignore
*/
initialvalue: {
type: Number,
default: 0
},
/**
* The size of the button allows only some values
* @values small, medium, large
*/
size: {
default: 'normal'
}
},
methods: {
emitSuccess() {
/**
* Success event.
*
* @event success
* @property {string} content content of the first prop passed to the event
* @property {object} example the demo example
*/
this.$emit('success', content, {
demo: 'example'
})
}
}
}
</script>:::
生成文档命令
- 更新所有组件
npm run docs- 更新某个组件
npm run docs:comp