From 20eff3d38e6c22ec919c267591dc2a2c7ade383e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=A2=A6=E9=BE=99?= <649076408@qq.com> Date: Fri, 13 Dec 2019 16:02:00 +0800 Subject: [PATCH 1/3] docs($attr): modify --- src/maps/attrs/calendar/calendar.json | 5 + src/maps/attrs/checkbox/checkbox.json | 9 +- src/maps/attrs/datepicker/datepicker.json | 9 +- src/maps/attrs/input-number/input-number.json | 2 +- src/maps/attrs/input/input.json | 5 + src/maps/attrs/modal/modal.json | 5 + src/maps/attrs/page/page-jump.json | 10 ++ src/maps/attrs/page/page.json | 10 ++ src/maps/attrs/popconfirm/popconfirm.json | 5 + src/maps/attrs/scroll/scroll.json | 15 ++- src/maps/attrs/select/select.json | 9 +- src/maps/attrs/table/table.json | 10 -- src/maps/attrs/text/text.json | 49 ++++++++ src/maps/attrs/timepicker/timepicker.json | 105 ++++++++++++++++++ src/maps/water-attributes.js | 6 + src/maps/water-tags.json | 51 +++++---- 16 files changed, 257 insertions(+), 48 deletions(-) create mode 100644 src/maps/attrs/text/text.json create mode 100644 src/maps/attrs/timepicker/timepicker.json diff --git a/src/maps/attrs/calendar/calendar.json b/src/maps/attrs/calendar/calendar.json index 883e3ec..4f28f17 100644 --- a/src/maps/attrs/calendar/calendar.json +++ b/src/maps/attrs/calendar/calendar.json @@ -46,6 +46,11 @@ "optionType": "Number", "defaultValue": "0" }, + "w-calendar/pickerRender": { + "description": "自定义日期单元格的内容和样式", + "optionType": "Function", + "defaultValue": "-" + }, "w-calendar/change": { "description": "输入时触发的方法,返回 {当前月份,当前年代区间,当前年的区间,当前年,面板数据集,面板类型,面板的值}({nowMonth,nowRangeAge,nowRangeYear,nowYear,tableOptions,tableType,value})", "optionType": "Function", diff --git a/src/maps/attrs/checkbox/checkbox.json b/src/maps/attrs/checkbox/checkbox.json index 15d3796..7f5b74c 100644 --- a/src/maps/attrs/checkbox/checkbox.json +++ b/src/maps/attrs/checkbox/checkbox.json @@ -1,7 +1,12 @@ { "w-checkbox/value": { - "description": "选中的值", - "optionType": "Boolean, Number, String", + "description": "绑定值", + "optionType": "Number | String | Boolean", + "defaultValue": "-" + }, + "w-checkbox/label": { + "description": "设置选中的值", + "optionType": "Number | String | Boolean", "defaultValue": "-" }, "w-checkbox/disabled": { diff --git a/src/maps/attrs/datepicker/datepicker.json b/src/maps/attrs/datepicker/datepicker.json index a0890a2..37c2c0f 100644 --- a/src/maps/attrs/datepicker/datepicker.json +++ b/src/maps/attrs/datepicker/datepicker.json @@ -29,7 +29,7 @@ "optionType": "Boolean", "defaultValue": "true" }, - "w-calendar/type": { + "w-datepicker/type": { "description": "日历类型", "options": [ "week", @@ -86,7 +86,7 @@ "defaultValue": "top" }, "w-datepicker/interval": { - "description": "下拉框间距,单位 p", + "description": "下拉框间距,单位 px", "optionType": "Number", "defaultValue": "0" }, @@ -110,6 +110,11 @@ "optionType": "Function", "defaultValue": "-" }, + "w-datepicker/panelChange": { + "description": "点击面板的方法,返回 {面板类型,面板数据,当前月份,当前年份,当前年代,当前世纪}({tableType,tableOptions,nowMonth,nowYear,nowRangeYear,nowRangeAge,value})", + "optionType": "Function", + "defaultValue": "({tableType,tableOptions,nowMonth,nowYear,nowRangeYear,nowRangeAge,value}) => {}" + }, "w-datepicker/change": { "description": "输入时触发的方法,返回 {Event对象,处理过的值,格式的值,当前的对象,当前行}({ev,trueValue,value,item,dateWeek})", "optionType": "Function", diff --git a/src/maps/attrs/input-number/input-number.json b/src/maps/attrs/input-number/input-number.json index eb23981..363ef7a 100644 --- a/src/maps/attrs/input-number/input-number.json +++ b/src/maps/attrs/input-number/input-number.json @@ -1,5 +1,5 @@ { - "w-input/value": { + "w-input-number/value": { "description": "改变的值", "optionType": "String | Number", "defaultValue": "-" diff --git a/src/maps/attrs/input/input.json b/src/maps/attrs/input/input.json index 368e699..d798025 100644 --- a/src/maps/attrs/input/input.json +++ b/src/maps/attrs/input/input.json @@ -19,6 +19,11 @@ "optionType": "String", "defaultValue": "-" }, + "w-input/type": { + "description": "设置 input 原生的 type 值", + "optionType": "String", + "defaultValue": "text" + }, "w-input/size": { "description": "设置大小", "options": [ diff --git a/src/maps/attrs/modal/modal.json b/src/maps/attrs/modal/modal.json index d4f5931..473f621 100644 --- a/src/maps/attrs/modal/modal.json +++ b/src/maps/attrs/modal/modal.json @@ -19,6 +19,11 @@ "optionType": "Boolean", "defaultValue": "-" }, + "w-modal/closable": { + "description": "是否显示关闭按钮", + "optionType": "Boolean", + "defaultValue": "true" + }, "w-modal/esc": { "description": "是否支持键盘 esc 关闭", "optionType": "Boolean", diff --git a/src/maps/attrs/page/page-jump.json b/src/maps/attrs/page/page-jump.json index 5c703b6..fb2e430 100644 --- a/src/maps/attrs/page/page-jump.json +++ b/src/maps/attrs/page/page-jump.json @@ -4,6 +4,16 @@ "optionType": "Number", "defaultValue": "-" }, + "w-page-jump/size": { + "description": "设置大小", + "options": [ + "small", + "large", + "不设置" + ], + "optionType": "String", + "defaultValue": "-" + }, "w-page-jump/prefix": { "description": "设置前缀文案", "optionType": "String", diff --git a/src/maps/attrs/page/page.json b/src/maps/attrs/page/page.json index 0135597..694909f 100644 --- a/src/maps/attrs/page/page.json +++ b/src/maps/attrs/page/page.json @@ -14,6 +14,16 @@ "optionType": "String", "defaultValue": "-" }, + "w-page/size": { + "description": "设置大小", + "options": [ + "small", + "large", + "不设置" + ], + "optionType": "String", + "defaultValue": "-" + }, "w-page/total": { "description": "数据总数", "optionType": "Number", diff --git a/src/maps/attrs/popconfirm/popconfirm.json b/src/maps/attrs/popconfirm/popconfirm.json index f2a21ca..86c5ec9 100644 --- a/src/maps/attrs/popconfirm/popconfirm.json +++ b/src/maps/attrs/popconfirm/popconfirm.json @@ -72,5 +72,10 @@ "description": "点击取消触发,返回 状态 ( status )", "optionType": "Function", "defaultValue": "(status) => {}" + }, + "w-popcomfirm/before": { + "description": "确定之前触发的方法,返回 Promise 对象", + "optionType": "Function", + "defaultValue": "function() {return new Promise((resolve, reject) => {resolve();});}" } } \ No newline at end of file diff --git a/src/maps/attrs/scroll/scroll.json b/src/maps/attrs/scroll/scroll.json index 6ca60e7..295c8f7 100644 --- a/src/maps/attrs/scroll/scroll.json +++ b/src/maps/attrs/scroll/scroll.json @@ -14,11 +14,6 @@ "optionType": "Boolean", "defaultValue": "-" }, - "w-scroll/color": { - "description": "自定义默认图片的颜色", - "optionType": "String", - "defaultValue": "#333" - }, "w-scroll/openPull": { "description": "开启加载功能", "optionType": "Boolean", @@ -72,5 +67,15 @@ "description": "加载中触发的方法, 返回值: {Event对象,滚动的比例,滚动的距离,滚动的方向,事件触发类型}({ev, scrollScale, scrollChange, dir, eventType})", "optionType": "Function", "defaultValue": "({ev, scrollScale, scrollChange, dir, eventType}) => {}" + }, + "w-scroll/wrapClassName": { + "description": "wrap 自定义 class, 0.20.0 新增", + "optionType": "String | Object | Array", + "defaultValue": "-" + }, + "w-scroll/bodyClassName": { + "description": "body 自定义 class, 0.20.0 新增", + "optionType": "String | Object | Array", + "defaultValue": "-" } } \ No newline at end of file diff --git a/src/maps/attrs/select/select.json b/src/maps/attrs/select/select.json index 563bad8..031cbf3 100644 --- a/src/maps/attrs/select/select.json +++ b/src/maps/attrs/select/select.json @@ -69,7 +69,7 @@ "optionType": "String", "defaultValue": "-" }, - "w-select/prefix": { + "w-select/suffix": { "description": "选中的后缀", "optionType": "String", "defaultValue": "-" @@ -94,10 +94,15 @@ "defaultValue": "bottom" }, "w-select/interval": { - "description": "下拉框间距,单位 p", + "description": "下拉框间距,单位 px", "optionType": "Number", "defaultValue": "0" }, + "w-select/zIndex": { + "description": "下拉弹出的层级", + "optionType": "Number", + "defaultValue": "1" + }, "w-select/getContainer": { "description": "浮层渲染父节点,默认渲染到 body 上。支持返回 Promise", "optionType": "Function", diff --git a/src/maps/attrs/table/table.json b/src/maps/attrs/table/table.json index 01e837c..4816f08 100644 --- a/src/maps/attrs/table/table.json +++ b/src/maps/attrs/table/table.json @@ -44,16 +44,6 @@ "optionType": "Object", "defaultValue": "-" }, - "w-table/wrapClassName": { - "description": "wrap 的 class 名字 0.19.0 新增", - "optionType": "String | Object | Array", - "defaultValue": "-" - }, - "w-table/bodyClassName": { - "description": "body 的 class 名字 0.19.0 新增", - "optionType": "String | Object | Array", - "defaultValue": "-" - }, "w-table/header": { "description": "列头显示文字", "optionType": "Function", diff --git a/src/maps/attrs/text/text.json b/src/maps/attrs/text/text.json new file mode 100644 index 0000000..51220fa --- /dev/null +++ b/src/maps/attrs/text/text.json @@ -0,0 +1,49 @@ +{ + "w-text/disabled": { + "description": "设置禁用状态", + "optionType": "Boolean", + "defaultValue": "-" + }, + "w-text/strong": { + "description": "是否加粗", + "optionType": "Boolean", + "defaultValue": "-" + }, + "w-text/underline": { + "description": "是否添加下划线样式", + "optionType": "Boolean", + "defaultValue": "-" + }, + "w-text/mark": { + "description": "是否添加标记样式", + "optionType": "Boolean", + "defaultValue": "-" + }, + "w-text/code": { + "description": "是否添加代码样式", + "optionType": "Boolean", + "defaultValue": "-" + }, + "w-text/delete": { + "description": "是否添加删除线样式", + "optionType": "Boolean", + "defaultValue": "-" + }, + "w-text/type": { + "description": "文本类型", + "options": [ + "danger", + "warning", + "secondary", + "info", + "success" + ], + "optionType": "Boolean", + "defaultValue": "-" + }, + "w-text/markStyle": { + "description": "设置标记样式", + "optionType": "String | Object", + "defaultValue": "background-color: #ffe58f" + } +} \ No newline at end of file diff --git a/src/maps/attrs/timepicker/timepicker.json b/src/maps/attrs/timepicker/timepicker.json new file mode 100644 index 0000000..3f1dc76 --- /dev/null +++ b/src/maps/attrs/timepicker/timepicker.json @@ -0,0 +1,105 @@ +{ + "w-timepicker/value": { + "description": "绑定值", + "optionType": "Boolean", + "defaultValue": "moment().format('HH:mm:ss')" + }, + "w-timepicker/placeholder": { + "description": "输入框占位文本", + "optionType": "String", + "defaultValue": "-" + }, + "w-timepicker/size": { + "description": "设置大小", + "options": [ + "small", + "large", + "不设置" + ], + "optionType": "String", + "defaultValue": "-" + }, + "w-timepicker/format": { + "description": "显示在输入框中的格式,参考 moment 的日期格式", + "optionType": "String", + "defaultValue": "HH:mm:ss" + }, + "w-timepicker/valueFormat": { + "description": "绑定值的格式,参考 moment 的日期格式", + "optionType": "String", + "defaultValue": "HH:mm:ss" + }, + "w-timepicker/placement": { + "description": "气泡框位置", + "options": [ + "top", + "bottom", + "topLeft", + "topRight", + "bottomLeft", + "bottomRight" + ], + "optionType": "String", + "defaultValue": "top" + }, + "w-timepicker/interval": { + "description": "下拉框间距,单位 px", + "optionType": "Number", + "defaultValue": "0" + }, + "w-timepicker/editable": { + "description": "文本框可输入", + "optionType": "Boolean", + "defaultValue": "-" + }, + "w-timepicker/disabled": { + "description": "设置禁用状态", + "optionType": "Boolean", + "defaultValue": "-" + }, + "w-timepicker/open": { + "description": "控制弹层是否展开", + "optionType": "Boolean", + "defaultValue": "false" + }, + "w-timepicker/transfer": { + "description": "是否转移到 body 下", + "optionType": "Boolean", + "defaultValue": "true" + }, + "w-timepicker/clearable": { + "description": "是否显示清除按钮", + "optionType": "Boolean", + "defaultValue": "true" + }, + "w-timepicker/pickerStyle": { + "description": "面板样式", + "optionType": "String | Object", + "defaultValue": "-" + }, + "w-timepicker/disabledHourRender": { + "description": "禁用小时的渲染方法", + "optionType": "Function", + "defaultValue": "-" + }, + "w-timepicker/disabledMinuteRender": { + "description": "禁用分钟的渲染方法", + "optionType": "Function", + "defaultValue": "-" + }, + "w-timepicker/disabledSecondRender": { + "description": "禁用秒的渲染方法", + "optionType": "Function", + "defaultValue": "-" + }, + "w-timepicker/getContainer": { + "description": "浮层渲染父节点,默认渲染到 body 上。支持返回 Promise", + "optionType": "Function", + "defaultValue": "-" + }, + "w-datepicker/change": { + "description": "改变的方法,返回 {绑定值, 输入框显示值}({value, text})", + "optionType": "Function", + "defaultValue": "({value, text}) => {}" + } +} \ No newline at end of file diff --git a/src/maps/water-attributes.js b/src/maps/water-attributes.js index 2a842aa..70a5bdc 100644 --- a/src/maps/water-attributes.js +++ b/src/maps/water-attributes.js @@ -46,9 +46,13 @@ import * as checkTag from './attrs/tag/check-tag.json'; import * as newTag from './attrs/tag/new-tag.json'; import * as tag from './attrs/tag/tag.json'; +import * as text from './attrs/text/text.json'; + import * as timelineItem from './attrs/timeline/timeline-item.json'; import * as timeline from './attrs/timeline/timeline.json'; +import * as timepicker from './attrs/timepicker/timepicker.json'; + import * as tooltip from './attrs/tooltip/tooltip.json'; export default { @@ -87,7 +91,9 @@ export default { ...switchJson, ...table, ...tag, + ...text, ...timelineItem, ...timeline, + ...timepicker, ...tooltip, }; diff --git a/src/maps/water-tags.json b/src/maps/water-tags.json index 50bc20f..e0b5878 100644 --- a/src/maps/water-tags.json +++ b/src/maps/water-tags.json @@ -102,6 +102,16 @@ ], "description": "级联选择框。" }, + "w-check-tag": { + "attributes": [ + "value", + "disabled", + "loading", + "inline", + "size" + ], + "description": "高亮功能的标签。" + }, "w-checkbox": { "defaults": ["v-model"], "attributes": [ @@ -284,6 +294,20 @@ ], "description": "对话框。" }, + "w-new-tag": { + "attributes": [ + "value", + "disabled", + "loading", + "stop", + "size", + "placeholder", + "error", + "before", + "change" + ], + "description": "新建标签。" + }, "w-page": { "defaults": ["v-model"], "attributes": [ @@ -430,7 +454,7 @@ "description": "自定义滚动。" }, "w-select": { - "defaults": ["v-model"], + "defaults": ["v-model", "options"], "attributes": [ "value", "options", @@ -509,30 +533,6 @@ ], "description": "表格显示数据行。" }, - "w-check-tag": { - "attributes": [ - "value", - "disabled", - "loading", - "inline", - "size" - ], - "description": "高亮功能的标签。" - }, - "w-new-tag": { - "attributes": [ - "value", - "disabled", - "loading", - "stop", - "size", - "placeholder", - "error", - "before", - "change" - ], - "description": "新建标签。" - }, "w-tag": { "attributes": [ "disabled", @@ -549,7 +549,6 @@ }, "w-text": { "attributes": [ - "value", "disabled", "strong", "underline", From 5873047de4582020c6ee18cd45e0fb5ac2f99391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=A2=A6=E9=BE=99?= <649076408@qq.com> Date: Fri, 13 Dec 2019 16:03:17 +0800 Subject: [PATCH 2/3] 0.0.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 277d225..da1589b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-water-helper", "displayName": "vscode-water-helper", "description": "A vscode extension for WATER", - "version": "0.0.3", + "version": "0.0.4", "engines": { "vscode": "^1.40.0" }, From 1bf6111c1011723dfe4affd095a9cf76f2a93b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=A2=A6=E9=BE=99?= <649076408@qq.com> Date: Fri, 13 Dec 2019 16:06:26 +0800 Subject: [PATCH 3/3] docs($changelog): modify --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 5948bfc..9c4227d 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,13 @@ 自动补全的示例 +### 0.0.4 + +> 2019-12-13 + +- [fix] 修复遗漏的属性及标签。 + + ### 0.0.3 > 2019-12-13