Skip to content

Commit

Permalink
fix: 修复在浏览器环境需要特殊加上.default 的问题以及样式展示上的一些问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaofan9 committed Jul 5, 2022
1 parent 4579232 commit ccddd82
Show file tree
Hide file tree
Showing 14 changed files with 14,772 additions and 20,132 deletions.
4 changes: 2 additions & 2 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { Reflect } = require('core-js');
const merge = require('merge');
const sass = require('gulp-sass')(require('sass'));
const sassGlob = require('gulp-sass-glob');
const cssnano = require('gulp-cssnano');
const cleanCSS = require('gulp-clean-css');

const packageFoldPath = './';
const cssFoldPath = './dist';
Expand All @@ -27,7 +27,7 @@ function package() {

function css() {
return src("./src/style/index.scss").pipe(sassGlob())
.pipe(sass()).pipe(cssnano()).pipe(dest(cssFoldPath));
.pipe(sass()).pipe(cleanCSS()).pipe(dest(cssFoldPath));
}

exports.default = series(css, package)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

- ~~1.x 版本,支持 vue2(已完成)~~
- ~~2.x 版本,将进行支持 vue3,计划通过 date-week-range@next 方式升级使用。~~
- 等待vue3稳定,将会把主版本从 v1 切换至 v2 ,master 分支亦将会同步成 v2 分支。
- ~~等待vue3稳定,将会把主版本从 v1 切换至 v2 ,master 分支亦将会同步成 v2 分支。~~

### 注意

Expand Down
1 change: 1 addition & 0 deletions build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const output = {
filename: "index.min.js",
libraryTarget: "umd",
library: "DateWeekRange",
libraryExport: 'default',
umdNamedDefine: true,
globalObject: "typeof self !== 'undefined' ? self : this"
};
Expand Down
2 changes: 1 addition & 1 deletion dist/index.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.esm.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/tags.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"date-week-range":{"attributes":["model-value","readonly","disabled","size","editable","clearable","placeholder","start-placeholder","end-placeholder","format","align","popper-class","range-separator","default-value","default-time","name","unlink-panels","prefix-icon","clear-icon","validate-event","disabled-date","shortcuts","change","blur","focus"],"description":"This is a week range selector.\n\n[Docs](https://element-plus.org/#/en-US/component/el-date-picker#events)"}}
{"date-week-range":{"attributes":["model-value","readonly","disabled","size","editable","clearable","placeholder","start-placeholder","end-placeholder","format","align","popper-class","range-separator","default-value","default-time","name","unlink-panels","prefix-icon","clear-icon","validate-event","disabled-date","shortcuts","change","blur","focus"],"description":"This is a week range selector.\n\n[Docs](https://element-plus.org/#/en-US/component/el-date-picker#dateweekrange)"}}
2 changes: 1 addition & 1 deletion dist/web-types.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"$schema":"http://json.schemastore.org/web-types","framework":"vue","name":"date-week-range","version":"2.0.2","contributions":{"html":{"types-syntax":"typescript","description-markup":"markdown","tags":[{"name":"date-week-range","description":"This is a week range selector.","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#dateweekrange","attributes":[{"name":"model-value","description":"binding value","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"date","kind":"expression"}},{"name":"readonly","description":"whether DatePicker is read only","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"false","value":{"type":"boolean","kind":"expression"}},{"name":"disabled","description":"whether DatePicker is disabled","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"false","value":{"type":"boolean","kind":"expression"}},{"name":"size","description":"size of Input","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"large","value":{"type":"string","kind":"expression"}},{"name":"editable","description":"whether the input is editable","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"true","value":{"type":"boolean","kind":"expression"}},{"name":"clearable","description":"whether to show clear button","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"true","value":{"type":"boolean","kind":"expression"}},{"name":"placeholder","description":"placeholder in non-range mode","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"string","kind":"expression"}},{"name":"start-placeholder","description":"placeholder for the start date in range mode","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"string","kind":"expression"}},{"name":"end-placeholder","description":"placeholder for the end date in range mode","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"string","kind":"expression"}},{"name":"format","description":"format of the displayed value in the input box","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"YYYY-MM-DD","value":{"type":"string","kind":"expression"}},{"name":"align","description":"alignment","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"left"},{"name":"popper-class","description":"custom class name for DatePicker's dropdown","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"string","kind":"expression"}},{"name":"range-separator","description":"range separator","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"'-'","value":{"type":"string","kind":"expression"}},{"name":"default-value","description":"optional, default date of the calendar","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"date","kind":"expression"}},{"name":"default-time","description":"optional, the time value to use when selecting date range","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"date[]","kind":"expression"}},{"name":"name","description":"same as `name` in native input","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"string","kind":"expression"}},{"name":"unlink-panels","description":"unlink two date-panels in range-picker","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"false","value":{"type":"boolean","kind":"expression"}},{"name":"prefix-icon","description":"Custom prefix icon class","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"el-icon-date","value":{"type":"string","kind":"expression"}},{"name":"clear-icon","description":"Custom clear icon class","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"el-icon-circle-close","value":{"type":"string","kind":"expression"}},{"name":"validate-event","description":"whether to trigger form validation","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"true","value":{"type":"boolean","kind":"expression"}},{"name":"disabled-date","description":"a function determining if a date is disabled with that date as its parameter. Should return a Boolean","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"function","kind":"expression"}},{"name":"shortcuts","description":"an object array to set shortcut options","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"object[{ text: string|value: date }]","kind":"expression"}}],"events":[{"name":"change","description":"triggers when user confirms the value","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#events"},{"name":"blur","description":"triggers when Input blurs","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#events"},{"name":"focus","description":"triggers when Input focuses","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#events"}],"slots":[{"name":"range-separator","description":"custom range separator content","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#slots"}]}]}}}
{"$schema":"https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json","framework":"vue","name":"date-week-range","version":"2.0.3","contributions":{"html":{"types-syntax":"typescript","description-markup":"markdown","tags":[{"name":"date-week-range","source":{"module":"date-week-range","symbol":"DateWeekRange"},"description":"This is a week range selector.","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#dateweekrange","attributes":[{"name":"model-value","description":"binding value","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"date","kind":"expression"}},{"name":"readonly","description":"whether DatePicker is read only","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"false","value":{"type":"boolean","kind":"expression"}},{"name":"disabled","description":"whether DatePicker is disabled","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"false","value":{"type":"boolean","kind":"expression"}},{"name":"size","description":"size of Input","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"large","value":{"type":"string","kind":"expression"}},{"name":"editable","description":"whether the input is editable","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"true","value":{"type":"boolean","kind":"expression"}},{"name":"clearable","description":"whether to show clear button","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"true","value":{"type":"boolean","kind":"expression"}},{"name":"placeholder","description":"placeholder in non-range mode","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"string","kind":"expression"}},{"name":"start-placeholder","description":"placeholder for the start date in range mode","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"string","kind":"expression"}},{"name":"end-placeholder","description":"placeholder for the end date in range mode","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"string","kind":"expression"}},{"name":"format","description":"format of the displayed value in the input box","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"YYYY-MM-DD","value":{"type":"string","kind":"expression"}},{"name":"align","description":"alignment","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"left"},{"name":"popper-class","description":"custom class name for DatePicker's dropdown","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"string","kind":"expression"}},{"name":"range-separator","description":"range separator","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"'-'","value":{"type":"string","kind":"expression"}},{"name":"default-value","description":"optional, default date of the calendar","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"date","kind":"expression"}},{"name":"default-time","description":"optional, the time value to use when selecting date range","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"date[]","kind":"expression"}},{"name":"name","description":"same as `name` in native input","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"string","kind":"expression"}},{"name":"unlink-panels","description":"unlink two date-panels in range-picker","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"false","value":{"type":"boolean","kind":"expression"}},{"name":"prefix-icon","description":"Custom prefix icon class","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"el-icon-date","value":{"type":"string","kind":"expression"}},{"name":"clear-icon","description":"Custom clear icon class","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"el-icon-circle-close","value":{"type":"string","kind":"expression"}},{"name":"validate-event","description":"whether to trigger form validation","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","default":"true","value":{"type":"boolean","kind":"expression"}},{"name":"disabled-date","description":"a function determining if a date is disabled with that date as its parameter. Should return a Boolean","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"function","kind":"expression"}},{"name":"shortcuts","description":"an object array to set shortcut options","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#attributes","value":{"type":"object[{ text: string|value: date }]","kind":"expression"}}],"events":[{"name":"change","description":"triggers when user confirms the value","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#events"},{"name":"blur","description":"triggers when Input blurs","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#events"},{"name":"focus","description":"triggers when Input focuses","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#events"}],"slots":[{"name":"range-separator","description":"custom range separator content","doc-url":"https://element-plus.org/#/en-US/component/el-date-picker#slots"}]}]}}}
2 changes: 1 addition & 1 deletion helper/date-week-range.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This is a week range selector.
| placeholder | placeholder in non-range mode | string |||
| start-placeholder | placeholder for the start date in range mode | string |||
| end-placeholder | placeholder for the end date in range mode | string |||
| format | format of the displayed value in the input box | string | see [date formats](https://element-plus.org/#/en-US/component/date-picker#date-formats) | YYYY-MM-DD |
| format | format of the displayed value in the input box | string | see [date formats](https://element-plus.org/en-US/component/date-picker.html#date-formats) | YYYY-MM-DD |
| align | alignment || left/center/right | left |
| popper-class | custom class name for DatePicker's dropdown | string |||
| range-separator | range separator | string || '-' |
Expand Down
Loading

0 comments on commit ccddd82

Please sign in to comment.