diff --git a/.github/workflow/deploy.yml b/.github/workflow/deploy.yml new file mode 100644 index 000000000..229071059 --- /dev/null +++ b/.github/workflow/deploy.yml @@ -0,0 +1,35 @@ +name: deploy + +on: + push: + branches: + - master + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 10 + - name: NPM Install and Test + run: | + npm install + npm run test + npm run compile + npm run build:gh-pages + - name: Publish + uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} + - name: Deploy to gh-pages + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + BRANCH: gh-pages + FOLDER: dist diff --git a/.github/workflow/test.yml b/.github/workflow/test.yml new file mode 100644 index 000000000..266e6433b --- /dev/null +++ b/.github/workflow/test.yml @@ -0,0 +1,22 @@ +name: test + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: NPM Install and Test + run: | + npm install + npm run test diff --git a/CHANGELOG.md b/CHANGELOG.md index 699386789..f450a1c01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,34 @@ # 更新日志 +## 2.12.0 + +- 新增 `` 水印组件 [#121](https://github.com/XiaoMi/hiui/issues/121) +- 修复 `` 多选模式下在禁用状态复选框样式异常的问题 [#1014](https://github.com/XiaoMi/hiui/issues/1014) +- 修复 `` 可搜索模式下自动获取输入框焦点 [#925](https://github.com/XiaoMi/hiui/issues/925) +- 优化 `` 轮播定位交互,并新增 showPages 是否显示页码指示器 [#925](https://github.com/XiaoMi/hiui/issues/925) +- 修复 `` 多选出现双滚动条的样式问题 [#920](https://github.com/XiaoMi/hiui/issues/920) -- 修复 `, - ]} > 一些消息 一些消息 diff --git a/docs/demo/watermark/section-base.jsx b/docs/demo/watermark/section-base.jsx new file mode 100755 index 000000000..72ad8a86d --- /dev/null +++ b/docs/demo/watermark/section-base.jsx @@ -0,0 +1,34 @@ +import React from 'react' +import DocViewer from '../../../libs/doc-viewer' +import Watermark from '../../../components/watermark' +import logo from '../../../site/static/img/logo.png' +const prefix = 'watermark-base' +const desc = '' +const code = `import React from 'react' +import Watermark from '@hi-ui/hiui/es/Watermark'\n +class Demo extends React.Component { + constructor(props) { + super(props) + this.options = {logo: logo, content: ['HIUI', '做中台,就用 HIUI'],density:'high'} + } + render () { + return ( + +
+ + ) + } +}` + +const DemoBase = () => ( + ) +export default DemoBase diff --git a/docs/zh-CN/components/alert.mdx b/docs/zh-CN/components/alert.mdx index 72f84f0a2..cc1bd8e56 100755 --- a/docs/zh-CN/components/alert.mdx +++ b/docs/zh-CN/components/alert.mdx @@ -1,4 +1,4 @@ -# Alert 警告 +# Alert 警告提示 作用于页面的内容区域的提示,非触发类信息 @@ -38,9 +38,9 @@ import DemoAutoClose from '../../demo/alert/section-autoClose.jsx' | 参数 | 说明 | 类型 | 可选值 | 默认值 | | --------- | ------------------------ | ----------------------- | ------------------------------------------- | ------ | -| type | 警告框类型 | string | 'info' \| 'success' \| 'error' \| 'warning' | 'info' | -| title | 警告框标题 | string | - | - | -| content | 警告框内容 | string | - | - | +| type | 警告提示类型 | string | 'info' \| 'success' \| 'error' \| 'warning' | 'info' | +| title | 警告提示标题 | string | - | - | +| content | 警告提示内容 | string | - | - | | closeable | 是否可关闭 | boolean | true \| false | false | | onClose | 关闭事件触发时的回调 | (e: MouseEvent) => void | - | - | | duration | 自动关闭时间,单位为毫秒 | number \| null | - | null | diff --git a/docs/zh-CN/components/carousel.mdx b/docs/zh-CN/components/carousel.mdx index cfdb4d53d..9419689f7 100644 --- a/docs/zh-CN/components/carousel.mdx +++ b/docs/zh-CN/components/carousel.mdx @@ -28,3 +28,4 @@ import DemoImage from '../../demo/carousel/section-icon.jsx' | showDots | 是否显示分页指示器 | boolean | true \| false | false | | showArrows | 是否显示箭头指示器 | boolean | true \| false | false | | defaultActive | 默认激活索引,从 0 开始 | number | - | 0 | +| showPages | 是否显示页码指示器 | boolean | true \| false | false | diff --git a/docs/zh-CN/components/changelog.mdx b/docs/zh-CN/components/changelog.mdx index 699386789..f450a1c01 100644 --- a/docs/zh-CN/components/changelog.mdx +++ b/docs/zh-CN/components/changelog.mdx @@ -1,10 +1,34 @@ # 更新日志 +## 2.12.0 + +- 新增 `` 水印组件 [#121](https://github.com/XiaoMi/hiui/issues/121) +- 修复 `` 多选模式下在禁用状态复选框样式异常的问题 [#1014](https://github.com/XiaoMi/hiui/issues/1014) +- 修复 `` 可搜索模式下自动获取输入框焦点 [#925](https://github.com/XiaoMi/hiui/issues/925) +- 优化 `` 轮播定位交互,并新增 showPages 是否显示页码指示器 [#925](https://github.com/XiaoMi/hiui/issues/925) +- 修复 `` 多选出现双滚动条的样式问题 [#920](https://github.com/XiaoMi/hiui/issues/920) -- 修复 `