Skip to content

Commit

Permalink
update: 所有组件版本+1 ,文档更新组件示例地址
Browse files Browse the repository at this point in the history
  • Loading branch information
mehaotian committed May 12, 2021
1 parent 17f966d commit 2d16ec5
Show file tree
Hide file tree
Showing 115 changed files with 342 additions and 76 deletions.
71 changes: 41 additions & 30 deletions plugin/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const util = require('../build/util.js')
const buildReadme = require('../build/build-readme.js')
const root = path.join(__dirname,'..')
const modulesId = process.env.UNI_MODULES_ID
// const modulesId = 'uni-icons'
// const modulesId = 'uni-forms'
const comName = modulesId.replace(/uni-/, '')
const comPath = path.join(root, 'uni_modules')
// console.error('upload.js - modulesId :' + modulesId);
Expand Down Expand Up @@ -44,47 +44,58 @@ if (modulesId === 'uni-ui') {
} else {
// 将组件拷贝到临时目录
util.copyDir(getModulesPath(modulesId), path.join(tempExamplePath, 'uni_modules', modulesId))
handlePageJson(comName, tempExamplePath)
// 获取关联组件
if (packageJson && packageJson.uni_modules && packageJson.uni_modules.dependencies.length > 0) {
relationComponents = packageJson.uni_modules.dependencies
}
// 同步依赖组件
if (relationComponents && relationComponents.length > 0) {
relationComponents.reduce((promise, item) => {
return new Promise((resolve, reject) => {
util.copyDir(getModulesPath(item), path.join(tempExamplePath, 'uni_modules', item))
resolve()
})
}, Promise.resolve([])).then(res => {
// console.error('所有依赖组件同步完成');
setPageComponents(modulesId, comName)
}).catch((err)=>{
console.log('error',err);
})
} else {
setPageComponents(modulesId, comName)
}
handlePageJson(comName, tempExamplePath)
// 同步页面使用的组件
setPageComponents(modulesId, comName)
// 同步组件依赖的组间
syncRelyOn(modulesId)
}

function setPageComponents(modulesId, comName) {
const pagePath = path.join(root, 'pages', 'vue', comName, comName + '.vue')
const pageContent = fs.readFileSync(pagePath).toString()
const pageContents = getComName(pageContent)
// console.error('组件名称:' + pageContents);

if (pageContents.length > 0) {
pageContents.reduce((promise, item) => {
const inputPath = getModulesPath(item)
pageContents.reduce((promise, item) => {
const inputPath = getModulesPath(item)
const exists = fs.existsSync(inputPath)
if (item === modulesId || !exists) return promise
return new Promise((resolve, reject) => {
util.copyDir(inputPath, path.join(tempExamplePath, 'uni_modules', item))
if (item === modulesId || !exists) return promise
return new Promise((resolve, reject) => {
util.copyDir(inputPath, path.join(tempExamplePath, 'uni_modules', item))
resolve()
}).then(()=>{
syncRelyOn(item)
})
}, Promise.resolve([])).then(res => {
// console.error('所有依赖组件同步完成');
// console.log('所有依赖组件同步完成');
})
}
}

function syncRelyOn(modulesName){
const packageJson = getPackage(modulesName, comPath)
let relationComponents = []
// 获取关联组件
if (packageJson && packageJson.uni_modules && packageJson.uni_modules.dependencies.length > 0) {
relationComponents = packageJson.uni_modules.dependencies
}
// 同步依赖组件
if (relationComponents && relationComponents.length > 0) {
return relationComponents.reduce((promise, item) => {
return new Promise((resolve, reject) => {
util.copyDir(getModulesPath(item), path.join(tempExamplePath, 'uni_modules', item))
resolve()
}).then(()=>{
syncRelyOn(item)
})
}, Promise.resolve([])).then(res => {
// console.error('所有依赖组件同步完成');
// setPageComponents(modulesId, comName)
}).catch((err)=>{
// console.log('error',err);
})
}
return Promise.resolve()
}

/**
Expand Down
2 changes: 2 additions & 0 deletions uni_modules/uni-badge/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 1.1.1(2021-05-12)
- 新增 组件示例地址
## 1.1.0(2021-05-12)
- 新增 uni-badge 的 absolute 属性,支持定位
- 新增 uni-badge 的 offset 属性,支持定位偏移
Expand Down
2 changes: 1 addition & 1 deletion uni_modules/uni-badge/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "uni-badge",
"displayName": "uni-badge 数字角标",
"version": "1.1.0",
"version": "1.1.1",
"description": "数字角标(徽章)组件,在元素周围展示消息提醒,一般用于列表、九宫格、按钮等地方。",
"keywords": [
"",
Expand Down
2 changes: 2 additions & 0 deletions uni_modules/uni-calendar/changelog.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
## 1.3.16(2021-05-12)
- 新增 组件示例地址
## 1.3.15(2021-02-04)
- 调整为uni_modules目录规范
2 changes: 1 addition & 1 deletion uni_modules/uni-calendar/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "uni-calendar",
"displayName": "uni-calendar 日历",
"version": "1.3.15",
"version": "1.3.16",
"description": "日历组件",
"keywords": [
"uni-ui",
Expand Down
5 changes: 5 additions & 0 deletions uni_modules/uni-calendar/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,8 @@ export default {





## 组件示例

点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/calendar/calendar](https://hellouniapp.dcloud.net.cn/pages/extUI/calendar/calendar)
2 changes: 2 additions & 0 deletions uni_modules/uni-card/changelog.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
## 1.1.7(2021-05-12)
- 新增 组件示例地址
## 1.1.6(2021-02-04)
- 调整为uni_modules目录规范
2 changes: 1 addition & 1 deletion uni_modules/uni-card/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "uni-card",
"displayName": "uni-card 卡片",
"version": "1.1.6",
"version": "1.1.7",
"description": "Card 组件,提供常见的卡片样式。",
"keywords": [
"uni-ui",
Expand Down
6 changes: 5 additions & 1 deletion uni_modules/uni-card/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,8 @@

|插槽称名 |说明 |
|:-: |:-: |
|footer |卡片底部插槽 |
|footer |卡片底部插槽 |

## 组件示例

点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/card/card](https://hellouniapp.dcloud.net.cn/pages/extUI/card/card)
2 changes: 2 additions & 0 deletions uni_modules/uni-collapse/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 1.1.7(2021-05-12)
- 新增 组件示例地址
## 1.1.6(2021-02-05)
- 优化 组件引用关系,通过uni_modules引用组件
## 1.1.5(2021-02-05)
Expand Down
2 changes: 1 addition & 1 deletion uni_modules/uni-collapse/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "uni-collapse",
"displayName": "uni-collapse 折叠面板",
"version": "1.1.6",
"version": "1.1.7",
"description": "Collapse 组件,可以折叠 / 展开的内容区域。",
"keywords": [
"",
Expand Down
6 changes: 5 additions & 1 deletion uni_modules/uni-collapse/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,8 @@
|thumb |String |- |标题左侧缩略图 |
|disabled |Boolean|false |是否禁用 |
|open |Boolean|false |是否展开面板 |
|showAnimation |Boolean |false |开启动画 |
|showAnimation |Boolean |false |开启动画 |

## 组件示例

点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/collapse/collapse](https://hellouniapp.dcloud.net.cn/pages/extUI/collapse/collapse)
2 changes: 2 additions & 0 deletions uni_modules/uni-combox/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 0.0.6(2021-05-12)
- 新增 组件示例地址
## 0.0.5(2021-04-21)
- 优化 添加依赖 uni-icons, 导入后自动下载依赖
## 0.0.4(2021-02-05)
Expand Down
2 changes: 1 addition & 1 deletion uni_modules/uni-combox/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "uni-combox",
"displayName": "uni-combox 组合框",
"version": "0.0.5",
"version": "0.0.6",
"description": "可以选择也可以输入的表单项 ",
"keywords": [
"uni-ui",
Expand Down
5 changes: 5 additions & 0 deletions uni_modules/uni-combox/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@





## 组件示例

点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/combox/combox](https://hellouniapp.dcloud.net.cn/pages/extUI/combox/combox)
2 changes: 2 additions & 0 deletions uni_modules/uni-countdown/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 1.0.4(2021-05-12)
- 新增 组件示例地址
## 1.0.3(2021-05-08)
- 修复 uni-countdown 不能控制倒计时的 bug
## 1.0.2(2021-02-04)
Expand Down
2 changes: 1 addition & 1 deletion uni_modules/uni-countdown/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "uni-countdown",
"displayName": "uni-countdown 倒计时",
"version": "1.0.3",
"version": "1.0.4",
"description": "CountDown 倒计时组件",
"keywords": [
"uni-ui",
Expand Down
2 changes: 2 additions & 0 deletions uni_modules/uni-data-checkbox/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 0.1.5(2021-05-12)
- 新增 组件示例地址
## 0.1.4(2021-04-09)
- 修复 nvue 下无法选中的问题
## 0.1.3(2021-03-22)
Expand Down
2 changes: 1 addition & 1 deletion uni_modules/uni-data-checkbox/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "uni-data-checkbox",
"displayName": "uni-data-checkbox 数据选择器",
"version": "0.1.4",
"version": "0.1.5",
"description": "通过数据驱动的单选框和复选框",
"keywords": [
"uni-ui",
Expand Down
5 changes: 5 additions & 0 deletions uni_modules/uni-data-checkbox/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,8 @@ export default {
| @change| 选中状态改变时触发事件 | - |




## 组件示例

点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/data-checkbox/data-checkbox](https://hellouniapp.dcloud.net.cn/pages/extUI/data-checkbox/data-checkbox)
2 changes: 2 additions & 0 deletions uni_modules/uni-data-picker/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 0.3.3(2021-05-12)
- 新增 组件示例地址
## 0.3.2(2021-04-22)
- 修复 非树形数据有 where 属性查询报错的问题
## 0.3.1(2021-04-15)
Expand Down
2 changes: 1 addition & 1 deletion uni_modules/uni-data-picker/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "uni-data-picker",
"displayName": "uni-data-picker 数据驱动的picker选择器",
"version": "0.3.2",
"version": "0.3.3",
"description": "Picker选择器",
"keywords": [
"uni-ui",
Expand Down
5 changes: 5 additions & 0 deletions uni_modules/uni-data-picker/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,8 @@
</script>

```


## 组件示例

点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/data-picker/data-picker](https://hellouniapp.dcloud.net.cn/pages/extUI/data-picker/data-picker)
2 changes: 2 additions & 0 deletions uni_modules/uni-dateformat/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 0.0.4(2021-05-12)
- 新增 组件示例地址
## 0.0.3(2021-02-04)
- 调整为uni_modules目录规范
- 修复 iOS 平台日期格式化出错的问题
2 changes: 1 addition & 1 deletion uni_modules/uni-dateformat/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "uni-dateformat",
"displayName": "uni-dateformat 日期格式化",
"version": "0.0.3",
"version": "0.0.4",
"description": "日期格式化组件,可以将日期格式化为1分钟前、刚刚等形式",
"keywords": [
"uni-ui",
Expand Down
5 changes: 5 additions & 0 deletions uni_modules/uni-dateformat/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,8 @@ format接收字符以及含义如下:
|SSS |三位毫秒(不足三位在前面补0) |
|S |毫秒,不自动补0 |



## 组件示例

点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/dateformat/dateformat](https://hellouniapp.dcloud.net.cn/pages/extUI/dateformat/dateformat)
2 changes: 2 additions & 0 deletions uni_modules/uni-datetime-picker/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 2.0.4(2021-05-12)
- 新增 组件示例地址
## 2.0.3(2021-05-10)
- 修复 ios 下不识别 '-' 日期格式的 bug
- 优化 pc 下弹出层添加边框和阴影
Expand Down
2 changes: 1 addition & 1 deletion uni_modules/uni-datetime-picker/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "uni-datetime-picker",
"displayName": "uni-datetime-picker 日期选择器",
"version": "2.0.3",
"version": "2.0.4",
"description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择",
"keywords": [
"uni-datetime-picker",
Expand Down
6 changes: 5 additions & 1 deletion uni_modules/uni-datetime-picker/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,8 @@ range|选择器类型 |

|事件名称 |说明 |返回值 |
|:-: |:-: |:-: |
|change |确定日期时间时触发的事件,参数为当前选择的日期对象 | 单选返回日期字符串,如:'2010-02-3';范围选返回日期字符串数组,如:['2020-10-1', '2021-4-1'] |
|change |确定日期时间时触发的事件,参数为当前选择的日期对象 | 单选返回日期字符串,如:'2010-02-3';范围选返回日期字符串数组,如:['2020-10-1', '2021-4-1'] |

## 组件示例

点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/datetime-picker/datetime-picker](https://hellouniapp.dcloud.net.cn/pages/extUI/datetime-picker/datetime-picker)
2 changes: 2 additions & 0 deletions uni_modules/uni-drawer/changelog.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
## 1.0.7(2021-05-12)
- 新增 组件示例地址
## 1.0.6(2021-02-04)
- 调整为uni_modules目录规范
2 changes: 1 addition & 1 deletion uni_modules/uni-drawer/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "uni-drawer",
"displayName": "uni-drawer 抽屉",
"version": "1.0.6",
"version": "1.0.7",
"description": "抽屉式导航,用于展示侧滑菜单,侧滑导航。",
"keywords": [
"uni-ui",
Expand Down
5 changes: 5 additions & 0 deletions uni_modules/uni-drawer/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,8 @@
|close |关闭抽屉 |-|
## 组件示例
点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/drawer/drawer](https://hellouniapp.dcloud.net.cn/pages/extUI/drawer/drawer)
2 changes: 2 additions & 0 deletions uni_modules/uni-easyinput/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 0.0.12(2021-05-12)
- 新增 组件示例地址
## 0.0.11(2021-05-07)
- 修复 input-border 属性不生效的问题
## 0.0.10(2021-04-30)
Expand Down
2 changes: 1 addition & 1 deletion uni_modules/uni-easyinput/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "uni-easyinput",
"displayName": "uni-easyinput 增强输入框",
"version": "0.0.11",
"version": "0.0.12",
"description": "Easyinput 组件是对原生input组件的增强",
"keywords": [
"uni-ui",
Expand Down
5 changes: 5 additions & 0 deletions uni_modules/uni-easyinput/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,8 @@ easyinput 组件是对原生input组件的增强 ,是专门为配合表单组
|@iconClick |点击图标时触发 | prefix/suffix |




## 组件示例

点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/easyinput/easyinput](https://hellouniapp.dcloud.net.cn/pages/extUI/easyinput/easyinput)
2 changes: 2 additions & 0 deletions uni_modules/uni-fab/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 1.0.7(2021-05-12)
- 新增 组件示例地址
## 1.0.6(2021-02-05)
- 调整为uni_modules目录规范
- 优化 按钮背景色调整
Expand Down
2 changes: 1 addition & 1 deletion uni_modules/uni-fab/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "uni-fab",
"displayName": "uni-fab 悬浮按钮",
"version": "1.0.6",
"version": "1.0.7",
"description": "悬浮按钮 fab button ,点击可展开一个图标按钮菜单。",
"keywords": [
"uni-ui",
Expand Down
Loading

0 comments on commit 2d16ec5

Please sign in to comment.