commit
924cadb22f
101 changed files with 1275 additions and 940 deletions
|
@ -31,7 +31,7 @@
|
|||
|
||||
## Who's using iView
|
||||
|
||||
- [TalkingData](http://www.talkingdata.com/)
|
||||
- [TalkingData 腾云天下](http://www.talkingdata.com/)
|
||||
- [Alibaba 阿里巴巴](http://www.alibaba.com/)
|
||||
- [Baidu 百度](https://www.baidu.com/)
|
||||
- [Tencent 腾讯](https://www.tencent.com/)
|
||||
|
@ -41,7 +41,7 @@
|
|||
- [Meituan 美团](http://www.meituan.com/)
|
||||
- [Sina 新浪](http://www.sina.com.cn/)
|
||||
- [iFLYTEK 科大讯飞](http://www.iflytek.com/)
|
||||
- [同程艺龙](https://www.ly.com/)
|
||||
- [LY 同程艺龙](https://www.ly.com/)
|
||||
|
||||
> If your company or products use iView, welcome to click [here](https://github.com/iview/iview/issues/2143) to leave a message.
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ const merge = require('webpack-merge');
|
|||
const webpackBaseConfig = require('./webpack.base.config.js');
|
||||
const CompressionPlugin = require('compression-webpack-plugin');
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
|
||||
process.env.NODE_ENV = 'production';
|
||||
|
||||
|
@ -35,7 +36,7 @@ module.exports = merge(webpackBaseConfig, {
|
|||
}),
|
||||
new UglifyJsPlugin({
|
||||
parallel: true,
|
||||
sourceMap: true,
|
||||
sourceMap: true
|
||||
}),
|
||||
new CompressionPlugin({
|
||||
asset: '[path].gz[query]',
|
||||
|
@ -43,6 +44,12 @@ module.exports = merge(webpackBaseConfig, {
|
|||
test: /\.(js|css)$/,
|
||||
threshold: 10240,
|
||||
minRatio: 0.8
|
||||
})
|
||||
}),
|
||||
new CopyWebpackPlugin([
|
||||
{
|
||||
from: path.resolve(__dirname, './../types'),
|
||||
to: path.resolve(__dirname, './../dist/types')
|
||||
}
|
||||
])
|
||||
]
|
||||
});
|
||||
|
|
61
dist/iview.js
vendored
61
dist/iview.js
vendored
|
@ -12827,8 +12827,8 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_picker_vue__ = __webpack_require__(141);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_picker_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_picker_vue__);
|
||||
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_picker_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_picker_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_bcd2ee0a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_picker_vue__ = __webpack_require__(386);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_bcd2ee0a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_picker_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_bcd2ee0a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_picker_vue__);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_91aba0aa_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_picker_vue__ = __webpack_require__(386);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_91aba0aa_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_picker_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_91aba0aa_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_picker_vue__);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
|
||||
/* script */
|
||||
|
||||
|
@ -12846,8 +12846,8 @@ var __vue_module_identifier__ = null
|
|||
|
||||
var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
|
||||
__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_picker_vue___default.a,
|
||||
__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_bcd2ee0a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_picker_vue__["render"],
|
||||
__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_bcd2ee0a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_picker_vue__["staticRenderFns"],
|
||||
__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_91aba0aa_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_picker_vue__["render"],
|
||||
__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_91aba0aa_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_picker_vue__["staticRenderFns"],
|
||||
__vue_template_functional__,
|
||||
__vue_styles__,
|
||||
__vue_scopeId__,
|
||||
|
@ -13535,7 +13535,6 @@ exports.default = {
|
|||
var visible = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
||||
var type = arguments[2];
|
||||
|
||||
dates = this.parseDate(dates);
|
||||
if (this.multiple) {
|
||||
var pickedTimeStamp = dates.getTime();
|
||||
var indexOfPickedDate = this.internalValue.findIndex(function (date) {
|
||||
|
@ -13555,6 +13554,7 @@ exports.default = {
|
|||
return new Date(ts);
|
||||
}.bind(this));
|
||||
} else {
|
||||
dates = this.parseDate(dates);
|
||||
this.internalValue = Array.isArray(dates) ? dates : [dates];
|
||||
}
|
||||
|
||||
|
@ -13752,7 +13752,8 @@ exports.default = {
|
|||
watch: {
|
||||
value: function value(newVal) {
|
||||
this.dates = newVal;
|
||||
this.panelDate = this.startDate || (this.multiple ? this.dates[this.dates.length - 1] : this.dates[0]) || new Date();
|
||||
var panelDate = this.multiple ? this.dates[this.dates.length - 1] : this.startDate || this.dates[0];
|
||||
this.panelDate = panelDate || new Date();
|
||||
},
|
||||
currentView: function currentView(_currentView) {
|
||||
var _this2 = this;
|
||||
|
@ -13776,7 +13777,7 @@ exports.default = {
|
|||
var isDifferentYear = date.getFullYear() !== this.panelDate.getFullYear();
|
||||
var isDifferentMonth = isDifferentYear || date.getMonth() !== this.panelDate.getMonth();
|
||||
if (isDifferentYear || isDifferentMonth) {
|
||||
this.panelDate = date;
|
||||
if (!this.multiple) this.panelDate = date;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -16415,16 +16416,18 @@ exports.default = {
|
|||
},
|
||||
labelStyles: function labelStyles() {
|
||||
var style = {};
|
||||
var labelWidth = this.labelWidth || this.form.labelWidth;
|
||||
if (labelWidth) {
|
||||
var labelWidth = this.labelWidth === 0 || this.labelWidth ? this.labelWidth : this.form.labelWidth;
|
||||
|
||||
if (labelWidth || labelWidth === 0) {
|
||||
style.width = String(labelWidth) + 'px';
|
||||
}
|
||||
return style;
|
||||
},
|
||||
contentStyles: function contentStyles() {
|
||||
var style = {};
|
||||
var labelWidth = this.labelWidth || this.form.labelWidth;
|
||||
if (labelWidth) {
|
||||
var labelWidth = this.labelWidth === 0 || this.labelWidth ? this.labelWidth : this.form.labelWidth;
|
||||
|
||||
if (labelWidth || labelWidth === 0) {
|
||||
style.marginLeft = String(labelWidth) + 'px';
|
||||
}
|
||||
return style;
|
||||
|
@ -23889,7 +23892,10 @@ exports.default = {
|
|||
(0, _newArrowCheck3.default)(this, _this8);
|
||||
|
||||
if (index === i) {
|
||||
[].concat((0, _toConsumableArray3.default)(el.children)).forEach(function (child) {
|
||||
[].concat((0, _toConsumableArray3.default)(el.children)).filter(function (child) {
|
||||
(0, _newArrowCheck3.default)(this, _this8);
|
||||
return child.classList.contains(prefixCls + '-tabpane');
|
||||
}.bind(this)).forEach(function (child) {
|
||||
(0, _newArrowCheck3.default)(this, _this8);
|
||||
return child.style.visibility = 'visible';
|
||||
}.bind(this));
|
||||
|
@ -23901,7 +23907,10 @@ exports.default = {
|
|||
setTimeout(function () {
|
||||
(0, _newArrowCheck3.default)(this, _this8);
|
||||
|
||||
[].concat((0, _toConsumableArray3.default)(el.children)).forEach(function (child) {
|
||||
[].concat((0, _toConsumableArray3.default)(el.children)).filter(function (child) {
|
||||
(0, _newArrowCheck3.default)(this, _this8);
|
||||
return child.classList.contains(prefixCls + '-tabpane');
|
||||
}.bind(this)).forEach(function (child) {
|
||||
(0, _newArrowCheck3.default)(this, _this8);
|
||||
return child.style.visibility = 'hidden';
|
||||
}.bind(this));
|
||||
|
@ -26490,7 +26499,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|||
}
|
||||
|
||||
var API = (0, _extends3.default)({
|
||||
version: '3.0.0',
|
||||
version: '3.0.1',
|
||||
locale: _index2.default.use,
|
||||
i18n: _index2.default.i18n,
|
||||
install: install,
|
||||
|
@ -30832,8 +30841,8 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_vue__ = __webpack_require__(142);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_vue__);
|
||||
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5df1b13a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_vue__ = __webpack_require__(399);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5df1b13a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5df1b13a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_vue__);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6c43856e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_vue__ = __webpack_require__(399);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6c43856e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6c43856e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_vue__);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
|
||||
/* script */
|
||||
|
||||
|
@ -30851,8 +30860,8 @@ var __vue_module_identifier__ = null
|
|||
|
||||
var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
|
||||
__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_vue___default.a,
|
||||
__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5df1b13a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_vue__["render"],
|
||||
__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5df1b13a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_vue__["staticRenderFns"],
|
||||
__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6c43856e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_vue__["render"],
|
||||
__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6c43856e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_vue__["staticRenderFns"],
|
||||
__vue_template_functional__,
|
||||
__vue_styles__,
|
||||
__vue_scopeId__,
|
||||
|
@ -32370,8 +32379,8 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_item_vue__ = __webpack_require__(172);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_item_vue__);
|
||||
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_item_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_item_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_23e09f48_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_item_vue__ = __webpack_require__(431);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_23e09f48_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_23e09f48_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_item_vue__);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_16b20e1a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_item_vue__ = __webpack_require__(431);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_16b20e1a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_16b20e1a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_item_vue__);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
|
||||
/* script */
|
||||
|
||||
|
@ -32389,8 +32398,8 @@ var __vue_module_identifier__ = null
|
|||
|
||||
var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
|
||||
__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_item_vue___default.a,
|
||||
__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_23e09f48_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_item_vue__["render"],
|
||||
__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_23e09f48_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_item_vue__["staticRenderFns"],
|
||||
__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_16b20e1a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_item_vue__["render"],
|
||||
__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_16b20e1a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_item_vue__["staticRenderFns"],
|
||||
__vue_template_functional__,
|
||||
__vue_styles__,
|
||||
__vue_scopeId__,
|
||||
|
@ -39023,8 +39032,8 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tabs_vue__ = __webpack_require__(222);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tabs_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tabs_vue__);
|
||||
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tabs_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tabs_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_1d6714d0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tabs_vue__ = __webpack_require__(539);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_1d6714d0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tabs_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_1d6714d0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tabs_vue__);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8b45d978_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tabs_vue__ = __webpack_require__(539);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8b45d978_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tabs_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8b45d978_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tabs_vue__);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
|
||||
/* script */
|
||||
|
||||
|
@ -39042,8 +39051,8 @@ var __vue_module_identifier__ = null
|
|||
|
||||
var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
|
||||
__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tabs_vue___default.a,
|
||||
__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_1d6714d0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tabs_vue__["render"],
|
||||
__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_1d6714d0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tabs_vue__["staticRenderFns"],
|
||||
__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8b45d978_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tabs_vue__["render"],
|
||||
__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8b45d978_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tabs_vue__["staticRenderFns"],
|
||||
__vue_template_functional__,
|
||||
__vue_styles__,
|
||||
__vue_scopeId__,
|
||||
|
|
2
dist/iview.js.map
vendored
2
dist/iview.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/iview.min.js
vendored
2
dist/iview.min.js
vendored
File diff suppressed because one or more lines are too long
BIN
dist/iview.min.js.gz
vendored
BIN
dist/iview.min.js.gz
vendored
Binary file not shown.
2
dist/iview.min.js.map
vendored
2
dist/iview.min.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/styles/iview.css
vendored
2
dist/styles/iview.css
vendored
File diff suppressed because one or more lines are too long
|
@ -67,6 +67,7 @@ nav {
|
|||
<li><router-link to="/divider">Divider</router-link></li>
|
||||
<li><router-link to="/time">Time</router-link></li>
|
||||
<li><router-link to="/cell">Cell</router-link></li>
|
||||
<li><router-link to="/drawer">Drawer</router-link></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<router-view></router-view>
|
||||
|
|
|
@ -225,6 +225,10 @@ const router = new VueRouter({
|
|||
{
|
||||
path: '/cell',
|
||||
component: (resolve) => require(['./routers/cell.vue'], resolve)
|
||||
},
|
||||
{
|
||||
path: '/drawer',
|
||||
component: (resolve) => require(['./routers/drawer.vue'], resolve)
|
||||
}
|
||||
]
|
||||
});
|
||||
|
|
|
@ -1,152 +1,17 @@
|
|||
<template>
|
||||
<div style="margin: 100px;">
|
||||
{{color}}
|
||||
<!--<Input placeholder="请输入..." size="large" style="width: 50px;"></Input>-->
|
||||
<color-picker
|
||||
v-model="color"
|
||||
placement="bottom-start"
|
||||
@on-change="c1"
|
||||
@on-active-change="c2"></color-picker>
|
||||
<Input value="hello" style="display: inline-block" />
|
||||
<Date-picker
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
style="width: 200px"></Date-picker>
|
||||
<color-picker
|
||||
ref="xxx"
|
||||
v-model="color"
|
||||
:recommend="true"
|
||||
format="rgb"
|
||||
alpha
|
||||
@on-change="onChange"
|
||||
@on-active-change="onActiveChange"></color-picker>
|
||||
<color-picker
|
||||
v-model="color2"
|
||||
:alpha="true"
|
||||
:recommend="false"
|
||||
format="hsv"></color-picker>
|
||||
<!--<Date-picker type="date" placeholder="选择日期" style="width: 200px"></Date-picker>-->
|
||||
<color-picker
|
||||
v-model="color"
|
||||
placement="bottom-start"
|
||||
></color-picker>
|
||||
<Date-picker
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
style="width: 200px"></Date-picker>
|
||||
<color-picker
|
||||
ref="yyy"
|
||||
:colors="colors"
|
||||
v-model="color"
|
||||
format="rgb"
|
||||
alpha></color-picker>
|
||||
<Button @click="setColor">set color</Button>
|
||||
|
||||
<br><br><br><br>
|
||||
{{openState}}
|
||||
<ColorPicker
|
||||
v-model="color7"
|
||||
:hue="false"
|
||||
@on-open-change="onOpenChange"></ColorPicker>
|
||||
<ColorPicker
|
||||
v-model="color7"
|
||||
:hue="false"
|
||||
:hide-drop-down="hideDropDown"
|
||||
@on-open-change="onOpenChange"></ColorPicker>
|
||||
|
||||
<br><br><br><br>
|
||||
<ColorPicker
|
||||
v-model="color7"
|
||||
disabled></ColorPicker>
|
||||
{{ color1 }}
|
||||
<ColorPicker v-model="color1" />
|
||||
<ColorPicker v-model="color2" :editable="false"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {},
|
||||
|
||||
data() {
|
||||
return {
|
||||
color: 'rgba(12,34,255,.85)',
|
||||
color2: '',
|
||||
color7: '#19be6b',
|
||||
openState: false,
|
||||
colors: [
|
||||
'#2d8cf0',
|
||||
'#19be6b',
|
||||
'#ff9900',
|
||||
'#ed3f14',
|
||||
'#00b5ff',
|
||||
'#19c919',
|
||||
'#f9e31c',
|
||||
'#ea1a1a',
|
||||
'#9b1dea',
|
||||
'#00c2b1',
|
||||
'#ac7a33',
|
||||
'#1d35ea',
|
||||
'#8bc34a',
|
||||
'#f16b62',
|
||||
'#ea4ca3',
|
||||
'#0d94aa',
|
||||
'#febd79',
|
||||
'#5d4037',
|
||||
'#00bcd4',
|
||||
'#f06292',
|
||||
'#cddc39',
|
||||
'#607d8b',
|
||||
'#000000',
|
||||
'#ffffff',
|
||||
'#2d8cf0',
|
||||
'#19be6b',
|
||||
'#ff9900',
|
||||
'#ed3f14',
|
||||
'#00b5ff',
|
||||
'#19c919',
|
||||
'#f9e31c',
|
||||
'#ea1a1a',
|
||||
'#9b1dea',
|
||||
'#00c2b1',
|
||||
'#ac7a33',
|
||||
'#1d35ea',
|
||||
'#8bc34a',
|
||||
'#f16b62',
|
||||
'#ea4ca3',
|
||||
'#0d94aa',
|
||||
'#febd79',
|
||||
'#5d4037',
|
||||
],
|
||||
hideDropDown: false,
|
||||
};
|
||||
},
|
||||
|
||||
computed: {},
|
||||
|
||||
mounted() {
|
||||
setInterval(this.toggleShowHide, 2000);
|
||||
},
|
||||
|
||||
methods: {
|
||||
setColor() {
|
||||
this.color = '#26bc77';
|
||||
},
|
||||
c1(d) {
|
||||
console.log(d);
|
||||
},
|
||||
c2(d) {
|
||||
console.log(d);
|
||||
},
|
||||
onOpenChange(state) {
|
||||
this.openState = state;
|
||||
},
|
||||
onChange(d) {
|
||||
console.log(d);
|
||||
},
|
||||
onActiveChange(d) {
|
||||
console.log(d);
|
||||
},
|
||||
toggleShowHide() {
|
||||
this.hideDropDown = !this.hideDropDown;
|
||||
},
|
||||
},
|
||||
};
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
color1: '#19be6b',
|
||||
color2: ''
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
219
examples/routers/drawer.vue
Normal file
219
examples/routers/drawer.vue
Normal file
|
@ -0,0 +1,219 @@
|
|||
<template>
|
||||
<div>
|
||||
<Button @click="visible = true">show1</Button>
|
||||
<Button @click="visible2 = true">show2</Button>
|
||||
<Button @click="visible3 = true">show3</Button>
|
||||
|
||||
<div style="width: 500px;height:500px;background: green;position: relative;">
|
||||
|
||||
</div>
|
||||
|
||||
<Drawer v-model="visible" width="70" title="抽屉标题" :styles="styles" @on-close="handleClose">
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<Button @click="visible2 = true">show2</Button>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
</Drawer>
|
||||
|
||||
|
||||
<Drawer v-model="visible2" title="抽屉标题" placement="right">
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容22</p>
|
||||
</Drawer>
|
||||
<Drawer v-model="visible3" placement="left">
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容</p>
|
||||
<p>一些内容22</p>
|
||||
</Drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
visible2: false,
|
||||
visible3: false,
|
||||
styles: {
|
||||
height: 'calc(100% - 55px)',
|
||||
paddingBottom: '53px',
|
||||
},
|
||||
ms: {
|
||||
backgroundColor: 'rgba(255,0,255,0.5)'
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleClose () {
|
||||
this.$Message.info('关闭了');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
body{
|
||||
height: 2000px;
|
||||
}
|
||||
</style>
|
|
@ -54,7 +54,24 @@
|
|||
<InputNumber v-model="value3" style="width: 200px" placeholder="Enter something..."></InputNumber> -->
|
||||
|
||||
|
||||
<InputNumber v-model="valueNull" style="width: 200px" :min='0' :max='10000' :precision='2' ></InputNumber>
|
||||
<InputNumber v-model="valueNull" style="width: 200px" :min='1' :max='10000' :precision='2' ></InputNumber>
|
||||
<InputNumber v-model="valueNull" style="width: 200px" ></InputNumber>
|
||||
<div style="margin:10px 0px">
|
||||
<InputNumber :activeChange="false" v-model="valueNull" style="width: 200px" :min='1' :max='10000' :precision='2' ></InputNumber>
|
||||
<InputNumber :activeChange="false" v-model="valueNull" style="width: 200px" ></InputNumber>
|
||||
</div>
|
||||
<div style="margin:10px 0px">
|
||||
<InputNumber
|
||||
:max="10000"
|
||||
v-model="value9"
|
||||
:formatter="value => `$ ${value}`.replace(/B(?=(d{3})+(?!d))/g, ',')"
|
||||
:parser="value => value.replace(/\$s?|(,*)/g, '')"></InputNumber>
|
||||
<InputNumber
|
||||
:max="100"
|
||||
v-model="value10"
|
||||
:formatter="value => `${value}%`"
|
||||
:parser="value => value.replace('%', '')"></InputNumber>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -68,16 +85,18 @@
|
|||
formatter: (value) => `$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ','),
|
||||
parser: (value) => value.replace(/\$\s?|(,*)/g, ''),
|
||||
formatter2: (value) => `${value}%`,
|
||||
parser2: (value) => value.replace('%', '')
|
||||
}
|
||||
parser2: (value) => value.replace('%', ''),
|
||||
value9: 1000,
|
||||
value10: 100
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
focus (e) {
|
||||
e.target.select()
|
||||
e.target.select();
|
||||
},
|
||||
change (v) {
|
||||
console.log(v)
|
||||
console.log(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -1,46 +1,45 @@
|
|||
<template>
|
||||
<Menu active-name="1-2" :open-names="['1']">
|
||||
<Submenu name="1">
|
||||
<Menu mode="horizontal" :theme="theme1" active-name="3-4" @on-select="hs">
|
||||
<MenuItem name="1" to="/button" target="_blank">
|
||||
<Icon type="ios-paper" />
|
||||
内容管理
|
||||
</MenuItem>
|
||||
<MenuItem name="2">
|
||||
<Icon type="ios-people" />
|
||||
用户管理
|
||||
</MenuItem>
|
||||
<Submenu name="3">
|
||||
<template slot="title">
|
||||
<Icon type="ios-analytics"></Icon>
|
||||
Navigation One
|
||||
<Icon type="ios-stats" />
|
||||
统计分析
|
||||
</template>
|
||||
<MenuGroup title="Item 1">
|
||||
<MenuItem name="1-1">我是菜单一</MenuItem>
|
||||
<MenuItem name="1-2">我是菜单二</MenuItem>
|
||||
<MenuGroup title="使用">
|
||||
<MenuItem name="3-1">新增和启动</MenuItem>
|
||||
<MenuItem name="3-2">活跃分析</MenuItem>
|
||||
<MenuItem name="3-3">时段分析</MenuItem>
|
||||
</MenuGroup>
|
||||
<MenuGroup title="Item 2">
|
||||
<MenuItem name="1-3">我是菜单三</MenuItem>
|
||||
<MenuItem name="1-4">我是菜单四</MenuItem>
|
||||
<MenuGroup title="留存">
|
||||
<MenuItem name="3-4">用户留存</MenuItem>
|
||||
<MenuItem name="3-5">流失用户</MenuItem>
|
||||
</MenuGroup>
|
||||
</Submenu>
|
||||
<Submenu name="2">
|
||||
<template slot="title">
|
||||
<Icon type="ios-filing"></Icon>
|
||||
Navigation Two
|
||||
</template>
|
||||
<MenuItem name="2-1">我是菜单五</MenuItem>
|
||||
<MenuItem name="2-2">我是菜单六</MenuItem>
|
||||
<Submenu name="3">
|
||||
<template slot="title">Submenu</template>
|
||||
<MenuItem name="3-1">我是菜单七</MenuItem>
|
||||
<MenuItem name="3-2">我是菜单八</MenuItem>
|
||||
</Submenu>
|
||||
</Submenu>
|
||||
<Submenu name="4">
|
||||
<template slot="title">
|
||||
<Icon type="ios-gear"></Icon>
|
||||
Navigation Three
|
||||
</template>
|
||||
<MenuItem name="4-1">Option 9</MenuItem>
|
||||
<MenuItem name="4-2">Option 10</MenuItem>
|
||||
<MenuItem name="4-3">Option 11</MenuItem>
|
||||
<MenuItem name="4-4">Option 12</MenuItem>
|
||||
</Submenu>
|
||||
<MenuItem name="4">
|
||||
<Icon type="ios-construct" />
|
||||
综合设置
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
data () {
|
||||
return {
|
||||
theme1: 'light'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
hs (n) {
|
||||
console.log(n);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,43 +1,21 @@
|
|||
<template>
|
||||
<div>
|
||||
<Button @click="instance('info')">Info</Button>
|
||||
<Button @click="instance('success')">Success</Button>
|
||||
<Button @click="instance('warning')">Warning</Button>
|
||||
<Button @click="instance('error')">Error</Button>
|
||||
<Button @click="modal12 = true">Open the first modal</Button>
|
||||
<Button @click="modal13 = true">Open the second modal</Button>
|
||||
<Modal v-model="modal12" draggable scrollable title="Modal 1">
|
||||
<div>This is the first modal</div>
|
||||
</Modal>
|
||||
<Modal v-model="modal13" draggable scrollable title="Modal 2">
|
||||
<div>This is the second modal</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
instance (type) {
|
||||
const title = 'Title';
|
||||
const content = '<p>Content of dialog</p><p>Content of dialog</p>';
|
||||
switch (type) {
|
||||
case 'info':
|
||||
this.$Modal.info({
|
||||
title: title,
|
||||
content: content
|
||||
});
|
||||
break;
|
||||
case 'success':
|
||||
this.$Modal.success({
|
||||
title: title,
|
||||
content: content
|
||||
});
|
||||
break;
|
||||
case 'warning':
|
||||
this.$Modal.warning({
|
||||
title: title,
|
||||
content: content
|
||||
});
|
||||
break;
|
||||
case 'error':
|
||||
this.$Modal.error({
|
||||
title: title,
|
||||
content: content
|
||||
});
|
||||
break;
|
||||
}
|
||||
data () {
|
||||
return {
|
||||
modal12: false,
|
||||
modal13: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,77 +1,5 @@
|
|||
<!--<template>-->
|
||||
<!--<Tabs value="name1" :animated="false">-->
|
||||
<!--<Tab-pane label="test" name="test">-->
|
||||
<!--<Tabs type="card" v-bind:animated="true">-->
|
||||
<!--<Tab-pane label="标签2一">标签2一的内容</Tab-pane>-->
|
||||
<!--<Tab-pane label="标签2二">标签2二的内容</Tab-pane>-->
|
||||
<!--<Tab-pane label="标签2三">标签2三的内容</Tab-pane>-->
|
||||
<!--</Tabs>-->
|
||||
<!--</Tab-pane>-->
|
||||
<!--<Tab-pane :label="label1" name="name1">-->
|
||||
<!--<Table :columns="columns1" :data="data1"></Table>-->
|
||||
<!--</Tab-pane>-->
|
||||
<!--<Tab-pane label="标签二" name="name2">-->
|
||||
<!--<Table :columns="columns1" :data="data1"></Table>-->
|
||||
<!--</Tab-pane>-->
|
||||
<!--<Tab-pane label="标签三" name="name3">-->
|
||||
<!--<Table :columns="columns1" :data="data1"></Table>-->
|
||||
<!--</Tab-pane>-->
|
||||
<!--</Tabs>-->
|
||||
<!--</template>-->
|
||||
<!--<script>-->
|
||||
<!--export default {-->
|
||||
<!--data () {-->
|
||||
<!--return {-->
|
||||
<!--label1: (h) => {-->
|
||||
<!--return h('div', [-->
|
||||
<!--h('span', '标签一'),-->
|
||||
<!--h('Button', 'button')-->
|
||||
<!--]);-->
|
||||
<!--},-->
|
||||
<!--columns1: [-->
|
||||
<!--{-->
|
||||
<!--title: '姓名',-->
|
||||
<!--key: 'name'-->
|
||||
<!--},-->
|
||||
<!--{-->
|
||||
<!--title: '年龄',-->
|
||||
<!--key: 'age'-->
|
||||
<!--},-->
|
||||
<!--{-->
|
||||
<!--title: '地址',-->
|
||||
<!--key: 'address'-->
|
||||
<!--}-->
|
||||
<!--],-->
|
||||
<!--data1: [-->
|
||||
<!--{-->
|
||||
<!--name: '王小明',-->
|
||||
<!--age: 18,-->
|
||||
<!--address: '北京市朝阳区芍药居'-->
|
||||
<!--},-->
|
||||
<!--{-->
|
||||
<!--name: '张小刚',-->
|
||||
<!--age: 25,-->
|
||||
<!--address: '北京市海淀区西二旗'-->
|
||||
<!--},-->
|
||||
<!--{-->
|
||||
<!--name: '李小红',-->
|
||||
<!--age: 30,-->
|
||||
<!--address: '上海市浦东新区世纪大道'-->
|
||||
<!--},-->
|
||||
<!--{-->
|
||||
<!--name: '周小伟',-->
|
||||
<!--age: 26,-->
|
||||
<!--address: '深圳市南山区深南大道'-->
|
||||
<!--}-->
|
||||
<!--]-->
|
||||
<!--}-->
|
||||
<!--}-->
|
||||
<!--}-->
|
||||
<!--</script>-->
|
||||
|
||||
|
||||
<!-- <template>
|
||||
<Tabs type="card" closable @on-tab-remove="handleTabRemove">
|
||||
<template>
|
||||
<Tabs type="card" closable @on-tab-remove="handleTabRemove" :beforeRemove="handleBeforeRemove">
|
||||
<TabPane label="标签一" v-if="tab0">标签一的内容</TabPane>
|
||||
<TabPane label="标签二" v-if="tab1">标签二的内容</TabPane>
|
||||
<TabPane label="标签三" v-if="tab2">标签三的内容</TabPane>
|
||||
|
@ -89,129 +17,23 @@
|
|||
methods: {
|
||||
handleTabRemove (name) {
|
||||
this['tab' + name] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script> -->
|
||||
|
||||
<!--<template>-->
|
||||
<!--<div>-->
|
||||
<!--<Button type="ghost" @click="toFirst" size="small">to first</Button>-->
|
||||
<!--<Button type="ghost" @click="toLast" size="small">to last</Button>-->
|
||||
<!--<Tabs type="card" :animated="animated" v-model="activeTab">-->
|
||||
<!--<TabPane v-for="tab in tabs" :key="tab" :label="'标签' + tab" :name="tab+''" closable>标签{{ tab }}</TabPane>-->
|
||||
<!--<div slot="extra">-->
|
||||
<!--<Button type="ghost" @click="handleTabsAdd" size="small">增加</Button>-->
|
||||
<!--</div>-->
|
||||
<!--</Tabs>-->
|
||||
<!--</div>-->
|
||||
<!--</template>-->
|
||||
<!--<script>-->
|
||||
<!--export default {-->
|
||||
<!--data () {-->
|
||||
<!--return {-->
|
||||
<!--tabs: 2,-->
|
||||
<!--activeTab:"2",-->
|
||||
<!--animated:true-->
|
||||
<!--}-->
|
||||
<!--},-->
|
||||
<!--methods: {-->
|
||||
<!--handleTabsAdd () {-->
|
||||
<!--this.tabs ++;-->
|
||||
<!--this.activeTab = this.tabs + '';-->
|
||||
<!--},-->
|
||||
<!--toFirst () {-->
|
||||
<!--this.activeTab = '1';-->
|
||||
<!--},-->
|
||||
<!--toLast () {-->
|
||||
<!--this.activeTab = this.tabs+'';-->
|
||||
<!--}-->
|
||||
<!--}-->
|
||||
<!--}-->
|
||||
<!--</script>-->
|
||||
|
||||
<!--<template>-->
|
||||
<!--<div>-->
|
||||
<!--<Tabs type="card">-->
|
||||
<!--<TabPane v-for="tab in tabs" :key="tab" :label="'标签' + tab">标签{{ tab }}</TabPane>-->
|
||||
<!--</Tabs>-->
|
||||
<!--<Button type="ghost" @click="handleTabsAdd" size="small">增加</Button>-->
|
||||
<!--<Button type="ghost" @click="handleTabsMin" size="small">减少</Button>-->
|
||||
<!--</div>-->
|
||||
<!--</template>-->
|
||||
<!--<script>-->
|
||||
<!--export default {-->
|
||||
<!--data () {-->
|
||||
<!--return {-->
|
||||
<!--tabs: 2-->
|
||||
<!--}-->
|
||||
<!--},-->
|
||||
<!--methods: {-->
|
||||
<!--handleTabsAdd () {-->
|
||||
<!--this.tabs ++;-->
|
||||
<!--},-->
|
||||
<!--handleTabsMin () {-->
|
||||
<!--this.tabs --;-->
|
||||
<!--}-->
|
||||
<!--}-->
|
||||
<!--}-->
|
||||
<!--</script>-->
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<i-input></i-input>
|
||||
<Button type="ghost" @click="handleTabsAdd" size="small" slot="extra">增加</Button>
|
||||
|
||||
<hr style="margin: 10px 0;">
|
||||
<Tabs type="card">
|
||||
<TabPane v-for="tab in tabs" :key="tab" :label="'Tab' + tab">
|
||||
<div>
|
||||
<h3>Some text...</h3>
|
||||
<i-button>Some focusable content...{{ tab }}</i-button>
|
||||
</div>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
<Tabs type="card">
|
||||
<TabPane label="标签一">标签一的内容</TabPane>
|
||||
<TabPane label="标签二" disabled>标签二的内容</TabPane>
|
||||
<TabPane label="标签三">标签三的内容</TabPane>
|
||||
</Tabs>
|
||||
<tabs v-model="name" type="card" @on-click="handleClick">
|
||||
<tab-pane name="a" label="标签一">
|
||||
<div>1</div>
|
||||
</tab-pane>
|
||||
<tab-pane name="b" label="标签二">
|
||||
<div>2</div>
|
||||
</tab-pane>
|
||||
<tab-pane name="c" label="标签三">
|
||||
<div>3</div>
|
||||
</tab-pane>
|
||||
<tab-pane name="d" label="标签四">
|
||||
<div>4</div>
|
||||
</tab-pane>
|
||||
<tab-pane name="e" label="标签五">
|
||||
<div>5</div>
|
||||
</tab-pane>
|
||||
</tabs>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
tabs: 2,
|
||||
name: 'b',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTabsAdd () {
|
||||
this.tabs ++;
|
||||
},
|
||||
handleClick (name) {
|
||||
console.log(name);
|
||||
handleBeforeRemove (index) {
|
||||
console.log(index);
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$Modal.confirm({
|
||||
title: 'Title',
|
||||
content: '<p>Content of dialog</p><p>Content of dialog</p>',
|
||||
onOk: () => {
|
||||
resolve();
|
||||
},
|
||||
onCancel: () => {
|
||||
reject();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
|
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iview",
|
||||
"version": "2.14.1",
|
||||
"version": "3.0.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iview",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"title": "iView",
|
||||
"description": "A high quality UI components Library with Vue.js",
|
||||
"homepage": "http://www.iviewui.com",
|
||||
|
@ -14,6 +14,7 @@
|
|||
"framework"
|
||||
],
|
||||
"main": "dist/iview.js",
|
||||
"typings": "types/index.d.ts",
|
||||
"files": [
|
||||
"dist",
|
||||
"src"
|
||||
|
@ -111,7 +112,8 @@
|
|||
"vue-template-compiler": "^2.5.16",
|
||||
"webpack": "^3.11.0",
|
||||
"webpack-dev-server": "^2.11.1",
|
||||
"webpack-merge": "^3.0.0"
|
||||
"webpack-merge": "^3.0.0",
|
||||
"copy-webpack-plugin": "^4.5.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.9.1",
|
||||
|
|
|
@ -82,7 +82,12 @@
|
|||
@picker-color="handleSelectColor"></recommend-colors>
|
||||
</div>
|
||||
<div :class="[prefixCls + '-confirm']">
|
||||
<span :class="[prefixCls + '-confirm-color']">{{formatColor}}</span>
|
||||
<span :class="confirmColorClasses">
|
||||
<template v-if="editable">
|
||||
<i-input :value="formatColor" size="small" @on-enter="handleEditColor" @on-blur="handleEditColor"></i-input>
|
||||
</template>
|
||||
<template v-else>{{formatColor}}</template>
|
||||
</span>
|
||||
<i-button
|
||||
ref="clear"
|
||||
:tabindex="0"
|
||||
|
@ -118,6 +123,7 @@ import RecommendColors from './recommend-colors.vue';
|
|||
import Saturation from './saturation.vue';
|
||||
import Hue from './hue.vue';
|
||||
import Alpha from './alpha.vue';
|
||||
import iInput from '../input/input.vue';
|
||||
import Locale from '../../mixins/locale';
|
||||
import {oneOf} from '../../utils/assist';
|
||||
import Emitter from '../../mixins/emitter';
|
||||
|
@ -127,7 +133,7 @@ import {changeColor, toRGBAString} from './utils';
|
|||
export default {
|
||||
name: 'ColorPicker',
|
||||
|
||||
components: {Drop, RecommendColors, Saturation, Hue, Alpha},
|
||||
components: {Drop, RecommendColors, Saturation, Hue, Alpha, iInput},
|
||||
|
||||
directives: {clickOutside, TransferDom},
|
||||
|
||||
|
@ -209,6 +215,10 @@ export default {
|
|||
type: String,
|
||||
default: undefined,
|
||||
},
|
||||
editable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
|
@ -334,6 +344,14 @@ export default {
|
|||
|
||||
return saturationColors.hex;
|
||||
},
|
||||
confirmColorClasses () {
|
||||
return [
|
||||
`${this.prefixCls}-confirm-color`,
|
||||
{
|
||||
[`${this.prefixCls}-confirm-color-editable`]: this.editable
|
||||
}
|
||||
];
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
@ -419,6 +437,10 @@ export default {
|
|||
this.val = changeColor(color);
|
||||
this.$emit('on-active-change', this.formatColor);
|
||||
},
|
||||
handleEditColor (event) {
|
||||
const value = event.target.value;
|
||||
this.handleSelectColor(value);
|
||||
},
|
||||
handleFirstTab(event) {
|
||||
if (event.shiftKey) {
|
||||
event.preventDefault();
|
||||
|
|
|
@ -260,8 +260,8 @@
|
|||
},
|
||||
setPanelDates(leftPanelDate){
|
||||
this.leftPanelDate = leftPanelDate;
|
||||
const rightPanelDate = new Date(leftPanelDate.getFullYear(), leftPanelDate.getMonth() + 1, leftPanelDate.getDate());
|
||||
this.rightPanelDate = this.splitPanels ? new Date(Math.max(this.dates[1], rightPanelDate)) : rightPanelDate;
|
||||
const rightPanelDate = new Date(leftPanelDate.getFullYear(), leftPanelDate.getMonth() + 1, 1);
|
||||
this.rightPanelDate = this.splitPanels ? new Date(Math.max(this.dates[1].getTime(), rightPanelDate.getTime())) : rightPanelDate;
|
||||
},
|
||||
panelLabelConfig (direction) {
|
||||
const locale = this.t('i.locale');
|
||||
|
@ -312,9 +312,18 @@
|
|||
} else {
|
||||
// keep the panels together
|
||||
const otherPanel = panel === 'left' ? 'right' : 'left';
|
||||
const otherCurrent = new Date(this[`${otherPanel}PanelDate`]);
|
||||
otherCurrent[`set${type}`](otherCurrent[`get${type}`]() + increment);
|
||||
this[`${otherPanel}PanelDate`] = otherCurrent;
|
||||
const currentDate = this[`${otherPanel}PanelDate`];
|
||||
const temp = new Date(currentDate);
|
||||
|
||||
if (type === 'Month') {
|
||||
const nextMonthLastDate = new Date(
|
||||
temp.getFullYear(), temp.getMonth() + increment + 1, 0
|
||||
).getDate();
|
||||
temp.setDate(Math.min(nextMonthLastDate, temp.getDate()));
|
||||
}
|
||||
|
||||
temp[`set${type}`](temp[`get${type}`]() + increment);
|
||||
this[`${otherPanel}PanelDate`] = temp;
|
||||
}
|
||||
},
|
||||
showYearPicker (panel) {
|
||||
|
|
|
@ -318,7 +318,9 @@
|
|||
if (this.readonly) return;
|
||||
this.isFocused = true;
|
||||
if (e && e.type === 'focus') return; // just focus, don't open yet
|
||||
this.visible = true;
|
||||
if(!this.disabled){
|
||||
this.visible = true;
|
||||
}
|
||||
},
|
||||
handleBlur (e) {
|
||||
if (this.internalFocus){
|
||||
|
|
223
src/components/drawer/drawer.vue
Normal file
223
src/components/drawer/drawer.vue
Normal file
|
@ -0,0 +1,223 @@
|
|||
<template>
|
||||
<div v-transfer-dom :data-transfer="transfer">
|
||||
<transition name="fade">
|
||||
<div :class="maskClasses" :style="maskStyle" v-show="visible" v-if="mask" @click="handleMask"></div>
|
||||
</transition>
|
||||
<div :class="wrapClasses" @click="handleWrapClick">
|
||||
<transition :name="'move-' + placement">
|
||||
<div :class="classes" :style="mainStyles" v-show="visible">
|
||||
<div :class="contentClasses" ref="content">
|
||||
<a class="ivu-drawer-close" v-if="closable" @click="close">
|
||||
<slot name="close">
|
||||
<Icon type="ios-close"></Icon>
|
||||
</slot>
|
||||
</a>
|
||||
<div :class="[prefixCls + '-header']" v-if="showHead"><slot name="header"><div :class="[prefixCls + '-header-inner']">{{ title }}</div></slot></div>
|
||||
<div :class="[prefixCls + '-body']" :style="styles"><slot></slot></div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Icon from '../icon';
|
||||
import { oneOf } from '../../utils/assist';
|
||||
import TransferDom from '../../directives/transfer-dom';
|
||||
import Emitter from '../../mixins/emitter';
|
||||
import ScrollbarMixins from '../modal/mixins-scrollbar';
|
||||
|
||||
const prefixCls = 'ivu-drawer';
|
||||
|
||||
export default {
|
||||
name: 'Drawer',
|
||||
mixins: [ Emitter, ScrollbarMixins ],
|
||||
components: { Icon },
|
||||
directives: { TransferDom },
|
||||
props: {
|
||||
value: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
title: {
|
||||
type: String
|
||||
},
|
||||
width: {
|
||||
type: [Number, String],
|
||||
default: 256
|
||||
},
|
||||
closable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
maskClosable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
mask: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
maskStyle: {
|
||||
type: Object
|
||||
},
|
||||
styles: {
|
||||
type: Object
|
||||
},
|
||||
scrollable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
placement: {
|
||||
validator (value) {
|
||||
return oneOf(value, ['left', 'right']);
|
||||
},
|
||||
default: 'right'
|
||||
},
|
||||
zIndex: {
|
||||
type: Number,
|
||||
default: 1000
|
||||
},
|
||||
transfer: {
|
||||
type: Boolean,
|
||||
default () {
|
||||
return !this.$IVIEW || this.$IVIEW.transfer === '' ? true : this.$IVIEW.transfer;
|
||||
}
|
||||
},
|
||||
className: {
|
||||
type: String
|
||||
},
|
||||
inner: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
prefixCls: prefixCls,
|
||||
visible: this.value,
|
||||
wrapShow: false,
|
||||
showHead: true,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
wrapClasses () {
|
||||
return [
|
||||
`${prefixCls}-wrap`,
|
||||
{
|
||||
[`${prefixCls}-hidden`]: !this.wrapShow,
|
||||
[`${this.className}`]: !!this.className,
|
||||
[`${prefixCls}-no-mask`]: !this.mask,
|
||||
[`${prefixCls}-wrap-inner`]: this.inner
|
||||
}
|
||||
];
|
||||
},
|
||||
mainStyles () {
|
||||
let style = {};
|
||||
|
||||
const width = parseInt(this.width);
|
||||
|
||||
const styleWidth = {
|
||||
width: width <= 100 ? `${width}%` : `${width}px`
|
||||
};
|
||||
|
||||
Object.assign(style, styleWidth);
|
||||
|
||||
return style;
|
||||
},
|
||||
contentClasses () {
|
||||
return [
|
||||
`${prefixCls}-content`,
|
||||
{
|
||||
[`${prefixCls}-content-no-mask`]: !this.mask
|
||||
}
|
||||
];
|
||||
},
|
||||
classes () {
|
||||
return [
|
||||
`${prefixCls}`,
|
||||
`${prefixCls}-${this.placement}`,
|
||||
{
|
||||
[`${prefixCls}-no-header`]: !this.showHead,
|
||||
[`${prefixCls}-inner`]: this.inner
|
||||
}
|
||||
];
|
||||
},
|
||||
maskClasses () {
|
||||
return [
|
||||
`${prefixCls}-mask`,
|
||||
{
|
||||
[`${prefixCls}-mask-inner`]: this.inner
|
||||
}
|
||||
];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close () {
|
||||
this.visible = false;
|
||||
this.$emit('input', false);
|
||||
this.$emit('on-close');
|
||||
},
|
||||
handleMask () {
|
||||
if (this.maskClosable && this.mask) {
|
||||
this.close();
|
||||
}
|
||||
},
|
||||
handleWrapClick (event) {
|
||||
// use indexOf,do not use === ,because ivu-modal-wrap can have other custom className
|
||||
const className = event.target.getAttribute('class');
|
||||
if (className && className.indexOf(`${prefixCls}-wrap`) > -1) this.handleMask();
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
if (this.visible) {
|
||||
this.wrapShow = true;
|
||||
}
|
||||
|
||||
let showHead = true;
|
||||
|
||||
if (this.$slots.header === undefined && !this.title) {
|
||||
showHead = false;
|
||||
}
|
||||
|
||||
this.showHead = showHead;
|
||||
},
|
||||
beforeDestroy () {
|
||||
this.removeScrollEffect();
|
||||
},
|
||||
watch: {
|
||||
value (val) {
|
||||
this.visible = val;
|
||||
},
|
||||
visible (val) {
|
||||
if (val === false) {
|
||||
this.timer = setTimeout(() => {
|
||||
this.wrapShow = false;
|
||||
this.removeScrollEffect();
|
||||
}, 300);
|
||||
} else {
|
||||
if (this.timer) clearTimeout(this.timer);
|
||||
this.wrapShow = true;
|
||||
if (!this.scrollable) {
|
||||
this.addScrollEffect();
|
||||
}
|
||||
}
|
||||
this.broadcast('Table', 'on-visible-change', val);
|
||||
this.broadcast('Slider', 'on-visible-change', val); // #2852
|
||||
this.$emit('on-visible-change', val);
|
||||
},
|
||||
scrollable (val) {
|
||||
if (!val) {
|
||||
this.addScrollEffect();
|
||||
} else {
|
||||
this.removeScrollEffect();
|
||||
}
|
||||
},
|
||||
title (val) {
|
||||
if (this.$slots.header === undefined) {
|
||||
this.showHead = !!val;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
3
src/components/drawer/index.js
Normal file
3
src/components/drawer/index.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
import Drawer from './drawer.vue';
|
||||
|
||||
export default Drawer;
|
|
@ -3,13 +3,11 @@
|
|||
<div :class="handlerClasses">
|
||||
<a
|
||||
@click="up"
|
||||
@mousedown="preventDefault"
|
||||
:class="upClasses">
|
||||
<span :class="innerUpClasses" @click="preventDefault"></span>
|
||||
</a>
|
||||
<a
|
||||
@click="down"
|
||||
@mousedown="preventDefault"
|
||||
:class="downClasses">
|
||||
<span :class="innerDownClasses" @click="preventDefault"></span>
|
||||
</a>
|
||||
|
@ -82,6 +80,10 @@
|
|||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
activeChange:{
|
||||
type:Boolean,
|
||||
default:true
|
||||
},
|
||||
value: {
|
||||
type: Number,
|
||||
default: 1
|
||||
|
@ -252,7 +254,16 @@
|
|||
setValue (val) {
|
||||
// 如果 step 是小数,且没有设置 precision,是有问题的
|
||||
if (val && !isNaN(this.precision)) val = Number(Number(val).toFixed(this.precision));
|
||||
|
||||
|
||||
const {min, max} = this;
|
||||
if (val!==null) {
|
||||
if (val > max) {
|
||||
val = max;
|
||||
} else if (val < min) {
|
||||
val = min;
|
||||
}
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.currentValue = val;
|
||||
this.$emit('input', val);
|
||||
|
@ -278,42 +289,32 @@
|
|||
}
|
||||
},
|
||||
change (event) {
|
||||
|
||||
if (event.type == 'input' && !this.activeChange) return;
|
||||
let val = event.target.value.trim();
|
||||
if (this.parser) {
|
||||
val = this.parser(val);
|
||||
}
|
||||
|
||||
if (event.type == 'input' && val.match(/^\-?\.?$|\.$/)) return; // prevent fire early if decimal. If no more input the change event will fire later
|
||||
|
||||
const {min, max} = this;
|
||||
|
||||
const isEmptyString = val.length === 0;
|
||||
val = Number(val);
|
||||
|
||||
if(isEmptyString){
|
||||
this.setValue(null);
|
||||
return;
|
||||
}
|
||||
if (event.type == 'change'){
|
||||
if (val === this.currentValue && val > min && val < max) return; // already fired change for input event
|
||||
}
|
||||
if (event.type == 'input' && val.match(/^\-?\.?$|\.$/)) return; // prevent fire early if decimal. If no more input the change event will fire later
|
||||
|
||||
val = Number(val);
|
||||
|
||||
if (!isNaN(val) && !isEmptyString) {
|
||||
if (!isNaN(val)) {
|
||||
this.currentValue = val;
|
||||
|
||||
if (event.type == 'input' && val < min) return; // prevent fire early in case user is typing a bigger number. Change will handle this otherwise.
|
||||
if (val > max) {
|
||||
this.setValue(max);
|
||||
} else if (val < min) {
|
||||
this.setValue(min);
|
||||
} else {
|
||||
this.setValue(val);
|
||||
}
|
||||
this.setValue(val);
|
||||
} else {
|
||||
event.target.value = this.currentValue;
|
||||
}
|
||||
},
|
||||
changeVal (val) {
|
||||
val = Number(val);
|
||||
//this.setValue(val);
|
||||
if (!isNaN(val)) {
|
||||
const step = this.step;
|
||||
|
||||
|
|
|
@ -57,9 +57,11 @@
|
|||
handleClickItem (event, new_window = false) {
|
||||
if (this.disabled) return;
|
||||
|
||||
if (new_window) {
|
||||
if (new_window || this.target === '_blank') {
|
||||
// 如果是 new_window,直接新开窗口就行,无需发送状态
|
||||
this.handleCheckClick(event, new_window);
|
||||
let parentMenu = findComponentUpward(this, 'Menu');
|
||||
if (parentMenu) parentMenu.handleEmitSelectEvent(this.name);
|
||||
} else {
|
||||
let parent = findComponentUpward(this, 'Submenu');
|
||||
|
||||
|
|
|
@ -127,6 +127,9 @@
|
|||
else item.opened = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
handleEmitSelectEvent (name) {
|
||||
this.$emit('on-select', name);
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// used for Modal & $Spin
|
||||
// used for Modal & $Spin & Drawer
|
||||
import { getScrollBarSize } from '../../utils/assist';
|
||||
export default {
|
||||
methods: {
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<transition :name="transitionNames[1]">
|
||||
<div :class="maskClasses" v-show="visible" v-if="showMask" @click="handleMask"></div>
|
||||
</transition>
|
||||
<div :class="wrapClasses" @click="handleWrapClick">
|
||||
<div :class="wrapClasses" :style="wrapStyles" @click="handleWrapClick">
|
||||
<transition :name="transitionNames[0]" @after-leave="animationFinish">
|
||||
<div :class="classes" :style="mainStyles" v-show="visible">
|
||||
<div :class="contentClasses" ref="content" :style="contentStyles">
|
||||
<div :class="contentClasses" ref="content" :style="contentStyles" @click="handleClickModal">
|
||||
<a :class="[prefixCls + '-close']" v-if="closable" @click="close">
|
||||
<slot name="close">
|
||||
<Icon type="ios-close"></Icon>
|
||||
|
@ -38,6 +38,9 @@
|
|||
import ScrollbarMixins from './mixins-scrollbar';
|
||||
|
||||
import { on, off } from '../../utils/dom';
|
||||
import { findComponentsDownward } from '../../utils/assist';
|
||||
|
||||
import { modalIndex, modalIncrease } from './q';
|
||||
|
||||
const prefixCls = 'ivu-modal';
|
||||
|
||||
|
@ -114,7 +117,11 @@
|
|||
draggable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
zIndex: {
|
||||
type: Number,
|
||||
default: 1000
|
||||
},
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
@ -129,7 +136,8 @@
|
|||
dragX: null,
|
||||
dragY: null,
|
||||
dragging: false
|
||||
}
|
||||
},
|
||||
modalIndex: this.handleGetModalIndex(), // for Esc close the top modal
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -143,6 +151,11 @@
|
|||
}
|
||||
];
|
||||
},
|
||||
wrapStyles () {
|
||||
return {
|
||||
zIndex: this.modalIndex + this.zIndex
|
||||
};
|
||||
},
|
||||
maskClasses () {
|
||||
return `${prefixCls}-mask`;
|
||||
},
|
||||
|
@ -247,7 +260,15 @@
|
|||
EscClose (e) {
|
||||
if (this.visible && this.closable) {
|
||||
if (e.keyCode === 27) {
|
||||
this.close();
|
||||
const $Modals = findComponentsDownward(this.$root, 'Modal').filter(item => item.$data.visible && item.$props.closable);
|
||||
|
||||
const $TopModal = $Modals.sort((a, b) => {
|
||||
return a.$data.modalIndex < b.$data.modalIndex ? 1 : -1;
|
||||
})[0];
|
||||
|
||||
setTimeout(() => {
|
||||
$TopModal.close();
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -298,6 +319,13 @@
|
|||
this.dragData.dragging = false;
|
||||
off(window, 'mousemove', this.handleMoveMove);
|
||||
off(window, 'mouseup', this.handleMoveEnd);
|
||||
},
|
||||
handleGetModalIndex () {
|
||||
modalIncrease();
|
||||
return modalIndex;
|
||||
},
|
||||
handleClickModal () {
|
||||
this.modalIndex = this.handleGetModalIndex();
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
|
@ -332,6 +360,8 @@
|
|||
this.removeScrollEffect();
|
||||
}, 300);
|
||||
} else {
|
||||
this.modalIndex = this.handleGetModalIndex();
|
||||
|
||||
if (this.timer) clearTimeout(this.timer);
|
||||
this.wrapShow = true;
|
||||
if (!this.scrollable) {
|
||||
|
|
7
src/components/modal/q.js
Normal file
7
src/components/modal/q.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
let modalIndex = 0;
|
||||
|
||||
function modalIncrease() {
|
||||
modalIndex++;
|
||||
}
|
||||
|
||||
export {modalIndex, modalIncrease};
|
|
@ -155,16 +155,23 @@
|
|||
on(document, 'mousemove', this.handleMove);
|
||||
on(document, 'mouseup', this.handleUp);
|
||||
this.$emit('on-move-start');
|
||||
},
|
||||
computeOffset(){
|
||||
this.offset = (this.valueIsPx ? this.px2percent(this.value, this.$refs.outerWrapper[this.offsetSize]) : this.value) * 10000 / 100;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value () {
|
||||
this.offset = (this.valueIsPx ? this.px2percent(this.value, this.$refs.outerWrapper[this.offsetSize]) : this.value) * 10000 / 100;
|
||||
this.computeOffset();
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.$nextTick(() => {
|
||||
this.offset = (this.valueIsPx ? this.px2percent(this.value, this.$refs.outerWrapper[this.offsetSize]) : this.value) * 10000 / 100;
|
||||
this.computeOffset();
|
||||
});
|
||||
|
||||
window.addEventListener('resize', ()=>{
|
||||
this.computeOffset();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
@ -91,7 +91,8 @@
|
|||
closable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
beforeRemove: Function,
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
@ -247,6 +248,21 @@
|
|||
this.handleChange(index);
|
||||
},
|
||||
handleRemove (index) {
|
||||
if (!this.beforeRemove) {
|
||||
return this.handleRemoveTab(index);
|
||||
}
|
||||
|
||||
const before = this.beforeRemove(index);
|
||||
|
||||
if (before && before.then) {
|
||||
before.then(() => {
|
||||
this.handleRemoveTab(index);
|
||||
});
|
||||
} else {
|
||||
this.handleRemoveTab(index);
|
||||
}
|
||||
},
|
||||
handleRemoveTab (index) {
|
||||
const tabs = this.getTabs();
|
||||
const tab = tabs[index];
|
||||
tab.$destroy();
|
||||
|
|
|
@ -19,6 +19,7 @@ import ColorPicker from './components/color-picker';
|
|||
import Content from './components/content';
|
||||
import DatePicker from './components/date-picker';
|
||||
import Divider from './components/divider';
|
||||
import Drawer from './components/drawer';
|
||||
import Dropdown from './components/dropdown';
|
||||
import Footer from './components/footer';
|
||||
import Form from './components/form';
|
||||
|
@ -85,6 +86,7 @@ const components = {
|
|||
Content: Content,
|
||||
DatePicker,
|
||||
Divider,
|
||||
Drawer,
|
||||
Dropdown,
|
||||
DropdownItem: Dropdown.Item,
|
||||
DropdownMenu: Dropdown.Menu,
|
||||
|
|
|
@ -289,6 +289,10 @@
|
|||
position: absolute;
|
||||
top: 11px;
|
||||
left: 8px;
|
||||
|
||||
&-editable{
|
||||
top: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
95
src/styles/components/drawer.less
Normal file
95
src/styles/components/drawer.less
Normal file
|
@ -0,0 +1,95 @@
|
|||
@drawer-prefix-cls: ~"@{css-prefix}drawer";
|
||||
|
||||
.@{drawer-prefix-cls} {
|
||||
width: auto;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
|
||||
&-inner{
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
&-left{
|
||||
left: 0;
|
||||
}
|
||||
&-right{
|
||||
right: 0;
|
||||
}
|
||||
|
||||
&-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
&-wrap {
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: @zindex-drawer;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
outline: 0;
|
||||
|
||||
&-inner{
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
|
||||
&-wrap * {
|
||||
box-sizing: border-box;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
&-mask {
|
||||
.mask;
|
||||
&-inner{
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
|
||||
&-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background-color: #fff;
|
||||
border: 0;
|
||||
background-clip: padding-box;
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,.15);
|
||||
|
||||
&-no-mask{
|
||||
pointer-events: auto;
|
||||
}
|
||||
}
|
||||
|
||||
&-header {
|
||||
.content-header;
|
||||
}
|
||||
|
||||
&-close {
|
||||
z-index: 1;
|
||||
.content-close(1px, 31px);
|
||||
}
|
||||
|
||||
&-body {
|
||||
width: 100%;
|
||||
height: calc(~'100% - 51px');
|
||||
padding: 16px;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
word-wrap: break-word;
|
||||
position: absolute;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
&-no-header &-body{
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&-no-mask{
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
|
@ -49,3 +49,4 @@
|
|||
@import "anchor";
|
||||
@import "time";
|
||||
@import "cell";
|
||||
@import "drawer";
|
|
@ -17,6 +17,7 @@
|
|||
z-index: @zindex-select;
|
||||
&-transfer{
|
||||
z-index: @zindex-transfer;
|
||||
width: auto;
|
||||
}
|
||||
&.@{transfer-no-max-height} {
|
||||
max-height: none;
|
||||
|
|
|
@ -166,6 +166,7 @@
|
|||
@zindex-back-top : 10;
|
||||
@zindex-select : 900;
|
||||
@zindex-modal : 1000;
|
||||
@zindex-drawer : 1000;
|
||||
@zindex-message : 1010;
|
||||
@zindex-notification : 1010;
|
||||
@zindex-tooltip : 1060;
|
||||
|
|
6
types/iview/affix.d.ts → types/affix.d.ts
vendored
6
types/iview/affix.d.ts → types/affix.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Affix extends Vue {
|
||||
export declare class Affix extends Vue {
|
||||
/**
|
||||
* 距离窗口顶部达到指定偏移量后触发
|
||||
* @default 0
|
6
types/iview/alert.d.ts → types/alert.d.ts
vendored
6
types/iview/alert.d.ts → types/alert.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Alert extends Vue {
|
||||
export declare class Alert extends Vue {
|
||||
/**
|
||||
* 警告提示样式,可选值为info、success、warning、error
|
||||
* @default info
|
8
types/iview/anchor.d.ts → types/anchor.d.ts
vendored
8
types/iview/anchor.d.ts → types/anchor.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Anchor extends Vue {
|
||||
export declare class Anchor extends Vue {
|
||||
/**
|
||||
* 固定模式
|
||||
* @default true
|
||||
|
@ -48,7 +48,7 @@ export interface Anchor extends Vue {
|
|||
$emit(eventName: 'on-change', []): this;
|
||||
}
|
||||
|
||||
export interface AnchorLink extends Vue {
|
||||
export declare class AnchorLink extends Vue {
|
||||
/**
|
||||
* 锚点链接
|
||||
* @default
|
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface AutoComplete extends Vue {
|
||||
export declare class AutoComplete extends Vue {
|
||||
/**
|
||||
* 绑定的值,可使用 v-model 双向绑定
|
||||
*/
|
6
types/iview/avatar.d.ts → types/avatar.d.ts
vendored
6
types/iview/avatar.d.ts → types/avatar.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Avatar extends Vue {
|
||||
export declare class Avatar extends Vue {
|
||||
/**
|
||||
* 指定头像的形状,可选值为 circle、square
|
||||
* @default circle
|
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface BackTop extends Vue {
|
||||
export declare class BackTop extends Vue {
|
||||
/**
|
||||
* 页面滚动高度达到该值时才显示BackTop组件
|
||||
* @default 400
|
6
types/iview/badge.d.ts → types/badge.d.ts
vendored
6
types/iview/badge.d.ts → types/badge.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Badge extends Vue {
|
||||
export declare class Badge extends Vue {
|
||||
/**
|
||||
* 显示的数字,大于overflowCount时,显示${overflowCount}+,为 0 时隐藏
|
||||
*/
|
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Breadcrumb extends Vue {
|
||||
export declare class Breadcrumb extends Vue {
|
||||
/**
|
||||
* 自定义分隔符
|
||||
* @default /
|
||||
|
@ -12,7 +12,7 @@ export interface Breadcrumb extends Vue {
|
|||
separator?: string;
|
||||
}
|
||||
|
||||
export interface BreadcrumbItem extends Vue {
|
||||
export declare class BreadcrumbItem extends Vue {
|
||||
/**
|
||||
* 链接,不传则没有链接
|
||||
*/
|
8
types/iview/button.d.ts → types/button.d.ts
vendored
8
types/iview/button.d.ts → types/button.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Button extends Vue {
|
||||
export declare class Button extends Vue {
|
||||
/**
|
||||
* 按钮类型,可选值为 default、primary、dashed、text、info、success、warning、error或者不设置
|
||||
* @default default
|
||||
|
@ -68,7 +68,7 @@ export interface Button extends Vue {
|
|||
target?: '_blank' | '_self' | '_parent' | '_top';
|
||||
}
|
||||
|
||||
export interface ButtonGroup extends Vue {
|
||||
export declare class ButtonGroup extends Vue {
|
||||
/**
|
||||
* 按钮组合大小,可选值为large、small、default或者不设置
|
||||
* @default default
|
6
types/iview/card.d.ts → types/card.d.ts
vendored
6
types/iview/card.d.ts → types/card.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Card extends Vue {
|
||||
export declare class Card extends Vue {
|
||||
/**
|
||||
* 是否显示边框,建议在灰色背景下使用
|
||||
* @default true
|
10
types/iview/carousel.d.ts → types/carousel.d.ts
vendored
10
types/iview/carousel.d.ts → types/carousel.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Carousel extends Vue {
|
||||
export declare class Carousel extends Vue {
|
||||
/**
|
||||
* 幻灯片的索引,从 0 开始,可以使用 v-model 双向绑定数据
|
||||
* @default 0
|
||||
|
@ -58,4 +58,8 @@ export interface Carousel extends Vue {
|
|||
* 幻灯片切换时触发,目前激活的幻灯片的索引,原幻灯片的索引
|
||||
*/
|
||||
$emit(eventName: 'on-change', oldValue: number, value: number): this;
|
||||
}
|
||||
|
||||
export declare class CarouselItem extends Vue {
|
||||
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Cascader extends Vue {
|
||||
export declare class Cascader extends Vue {
|
||||
/**
|
||||
* 可选项的数据源,格式参照示例说明
|
||||
* @default []
|
8
types/iview/cell.d.ts → types/cell.d.ts
vendored
8
types/iview/cell.d.ts → types/cell.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Cell extends Vue {
|
||||
export declare class Cell extends Vue {
|
||||
/**
|
||||
* 用来标识这一项
|
||||
*/
|
||||
|
@ -72,7 +72,7 @@ export interface Cell extends Vue {
|
|||
}
|
||||
}
|
||||
|
||||
export interface CellGroup extends Vue {
|
||||
export declare class CellGroup extends Vue {
|
||||
/**
|
||||
* 点击单元格时触发
|
||||
*
|
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Checkbox extends Vue {
|
||||
export declare class Checkbox extends Vue {
|
||||
/**
|
||||
* 只在单独使用时有效。可以使用 v-model 双向绑定数据
|
||||
* @default false
|
||||
|
@ -44,7 +44,7 @@ export interface Checkbox extends Vue {
|
|||
$emit(eventName: 'on-change', value: boolean): this;
|
||||
}
|
||||
|
||||
export interface CheckboxGroup extends Vue {
|
||||
export declare class CheckboxGroup extends Vue {
|
||||
/**
|
||||
* 指定选中项目的集合,可以使用 v-model 双向绑定数据
|
||||
* @default []
|
6
types/iview/circle.d.ts → types/circle.d.ts
vendored
6
types/iview/circle.d.ts → types/circle.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Circle extends Vue {
|
||||
export declare class Circle extends Vue {
|
||||
/**
|
||||
* 百分比
|
||||
* @default 0
|
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Collapse extends Vue {
|
||||
export declare class Collapse extends Vue {
|
||||
/**
|
||||
* 当前激活的面板的 name,可以使用 v-model 双向绑定
|
||||
*/
|
||||
|
@ -26,7 +26,7 @@ export interface Collapse extends Vue {
|
|||
$emit(eventName: 'on-change', []): this;
|
||||
}
|
||||
|
||||
export interface CollapsePanel extends Vue {
|
||||
export declare class CollapsePanel extends Vue {
|
||||
/**
|
||||
* 当前面板的 name,与 Collapse的value对应,不填为索引值
|
||||
* @default index的值
|
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface ColorPicker extends Vue {
|
||||
export declare class ColorPicker extends Vue {
|
||||
/**
|
||||
* 绑定的值,可使用 v-model 双向绑定
|
||||
*/
|
8
types/content.d.ts
vendored
Normal file
8
types/content.d.ts
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue from 'vue';
|
||||
|
||||
export declare class Content extends Vue {
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface DatePicker extends Vue {
|
||||
export declare class DatePicker extends Vue {
|
||||
/**
|
||||
* 显示类型,可选值为 date、daterange、datetime、datetimerange、year、month'|'默认值date
|
||||
*/
|
||||
|
@ -138,7 +138,7 @@ export interface DatePicker extends Vue {
|
|||
};
|
||||
}
|
||||
|
||||
export interface DatePickerOptions extends Vue {
|
||||
export declare class DatePickerOptions extends Vue {
|
||||
/**
|
||||
* 设置快捷选项,每项内容:
|
||||
* text:显示的文案
|
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Divider extends Vue {
|
||||
export declare class Divider extends Vue {
|
||||
/**
|
||||
* 水平还是垂直类型,可选值为 horizontal 或 vertical
|
||||
* @default horizontal
|
8
types/drawer.d.ts
vendored
Normal file
8
types/drawer.d.ts
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue from 'vue';
|
||||
|
||||
export declare class Drawer extends Vue {
|
||||
}
|
11
types/iview/dropdown.d.ts → types/dropdown.d.ts
vendored
11
types/iview/dropdown.d.ts → types/dropdown.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Dropdown extends Vue {
|
||||
export declare class Dropdown extends Vue {
|
||||
/**
|
||||
* 触发方式,可选值为 hover(悬停)click(点击)contextMenu(右键)custom(自定义),使用 custom 时,需配合 visible 一起使用
|
||||
* @default hover
|
||||
|
@ -56,7 +56,10 @@ export interface Dropdown extends Vue {
|
|||
};
|
||||
}
|
||||
|
||||
export interface DropdownItem extends Vue {
|
||||
export declare class DropdownMenu extends Vue {
|
||||
}
|
||||
|
||||
export declare class DropdownItem extends Vue {
|
||||
/**
|
||||
* 用来标识这一项
|
||||
*/
|
8
types/footer.d.ts
vendored
Normal file
8
types/footer.d.ts
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue from 'vue';
|
||||
|
||||
export declare class Footer extends Vue {
|
||||
}
|
8
types/iview/form.d.ts → types/form.d.ts
vendored
8
types/iview/form.d.ts → types/form.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Form extends Vue {
|
||||
export declare class Form extends Vue {
|
||||
/**
|
||||
* 表单数据对象
|
||||
*/
|
||||
|
@ -46,7 +46,7 @@ export interface Form extends Vue {
|
|||
resetFields(): void;
|
||||
}
|
||||
|
||||
export interface FormItem extends Vue {
|
||||
export declare class FormItem extends Vue {
|
||||
/**
|
||||
* 对应表单域 model 里的字段
|
||||
*/
|
8
types/iview/grid.d.ts → types/grid.d.ts
vendored
8
types/iview/grid.d.ts → types/grid.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface GridRow extends Vue {
|
||||
export declare class Row extends Vue {
|
||||
/**
|
||||
* 栅格间距,单位 px,左右平分
|
||||
* @default 0
|
||||
|
@ -28,7 +28,7 @@ export interface GridRow extends Vue {
|
|||
'class-name'?: string;
|
||||
}
|
||||
|
||||
export interface GridCol extends Vue {
|
||||
export declare class Col extends Vue {
|
||||
/**
|
||||
* 栅格的占位格数,可选值为0~24的整数,为 0 时,相当于display:none
|
||||
*/
|
8
types/header.d.ts
vendored
Normal file
8
types/header.d.ts
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue from 'vue';
|
||||
|
||||
export declare class Header extends Vue {
|
||||
}
|
6
types/iview/icon.d.ts → types/icon.d.ts
vendored
6
types/iview/icon.d.ts → types/icon.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Icon extends Vue {
|
||||
export declare class Icon extends Vue {
|
||||
/**
|
||||
* 图标的名称
|
||||
*/
|
10
types/index.d.ts
vendored
Normal file
10
types/index.d.ts
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import iView from './iview';
|
||||
|
||||
export default iView;
|
||||
export as namespace iView;
|
||||
|
||||
export * from './iview.components';
|
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface InputNumber extends Vue {
|
||||
export declare class InputNumber extends Vue {
|
||||
/**
|
||||
* 最大值,默认值Infinity
|
||||
*/
|
6
types/iview/input.d.ts → types/input.d.ts
vendored
6
types/iview/input.d.ts → types/input.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Input extends Vue {
|
||||
export declare class Input extends Vue {
|
||||
/**
|
||||
* 输入框类型,可选值为 text、password、textarea、url、email、date
|
||||
* @default text
|
91
types/iview.components.d.ts
vendored
Normal file
91
types/iview.components.d.ts
vendored
Normal file
|
@ -0,0 +1,91 @@
|
|||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue from 'vue';
|
||||
|
||||
export { Affix } from './affix';
|
||||
export { Alert } from './alert';
|
||||
export { Anchor, AnchorLink } from './anchor';
|
||||
export { AutoComplete } from './auto-complete';
|
||||
export { Avatar } from './avatar';
|
||||
export { BackTop } from './back-top';
|
||||
export { Badge } from './badge';
|
||||
export { Breadcrumb, BreadcrumbItem } from './breadcrumb';
|
||||
export { Button, ButtonGroup } from './button';
|
||||
export { Card } from './card';
|
||||
export { Carousel, CarouselItem } from './carousel';
|
||||
export { Cascader } from './cascader';
|
||||
export { Cell, CellGroup } from './cell';
|
||||
export { Checkbox, CheckboxGroup } from './checkbox';
|
||||
export { Circle, Circle as ICircle } from './circle';
|
||||
export { Collapse, CollapsePanel } from './collapse';
|
||||
export { ColorPicker } from './color-picker';
|
||||
export { Content } from './content';
|
||||
export { DatePicker } from './date-picker';
|
||||
export { Divider } from './divider';
|
||||
export { Drawer } from './drawer';
|
||||
export { Dropdown, DropdownMenu, DropdownItem } from './dropdown';
|
||||
export { Footer } from './footer';
|
||||
export { Form, FormItem } from './form';
|
||||
export { Header } from './header';
|
||||
export { Icon } from './icon';
|
||||
export { Input } from './input';
|
||||
export { InputNumber } from './input-number';
|
||||
export { Scroll } from './scroll';
|
||||
export { Split } from './split';
|
||||
export { Layout } from './layout';
|
||||
export { LoadingBar } from './loading-bar';
|
||||
export { Menu, MenuGroup, MenuItem, MenuSub } from './menu';
|
||||
export { Message } from './message';
|
||||
export { Modal } from './modal';
|
||||
export { Notice } from './notice';
|
||||
export { Page } from './page';
|
||||
export { Poptip } from './poptip';
|
||||
export { Progress } from './progress';
|
||||
export { Radio, RadioGroup } from './radio';
|
||||
export { Rate } from './rate';
|
||||
export { Sider } from './sider';
|
||||
export { Slider } from './slider';
|
||||
export { Spin } from './spin';
|
||||
export { Steps, StepsStep } from './steps';
|
||||
export { Switch, Switch as ISwitch } from './switch';
|
||||
export { Table } from './table';
|
||||
export { Tabs, TabsPane } from './tabs';
|
||||
export { Tag } from './tag';
|
||||
export { Time } from './time';
|
||||
export { Timeline, TimelineItem } from './timeline';
|
||||
export { TimePicker } from './time-picker';
|
||||
export { Tooltip } from './tooltip';
|
||||
export { Transfer } from './transfer';
|
||||
export { Tree } from './tree';
|
||||
export { Upload } from './upload';
|
||||
export { Row, Col } from './grid';
|
||||
export { Select, Option, OptionGroup } from './select';
|
||||
|
||||
declare const API: {
|
||||
version: string;
|
||||
locale: (l) => void;
|
||||
i18n: (fn) => void;
|
||||
install: (
|
||||
Vue: Vue,
|
||||
opts: {
|
||||
locale?: any;
|
||||
i18n?: any;
|
||||
size?: any;
|
||||
transfer?: any;
|
||||
}
|
||||
) => void;
|
||||
lang: (code: string) => void;
|
||||
};
|
||||
|
||||
export default API;
|
||||
|
||||
declare module 'vue/types/vue' {
|
||||
interface Vue {
|
||||
$IVIEW?: {
|
||||
size?: string;
|
||||
transfer?: string;
|
||||
};
|
||||
}
|
||||
}
|
6
types/iview.d.ts
vendored
Normal file
6
types/iview.d.ts
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
import { PluginFunction } from 'vue';
|
||||
|
||||
interface IView extends PluginFunction<any> {}
|
||||
|
||||
declare const iView: IView;
|
||||
export default iView;
|
237
types/iview/index.d.ts
vendored
237
types/iview/index.d.ts
vendored
|
@ -1,237 +0,0 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode, PluginFunction } from "vue";
|
||||
|
||||
import { Affix } from "./affix";
|
||||
import { Alert } from "./alert";
|
||||
import { Anchor, AnchorLink } from "./anchor";
|
||||
import { AutoComplete } from "./auto-complete";
|
||||
import { Avatar } from "./avatar";
|
||||
import { BackTop } from "./back-top";
|
||||
import { Badge } from "./badge";
|
||||
import { Breadcrumb, BreadcrumbItem } from "./breadcrumb";
|
||||
import { Button, ButtonGroup } from "./button";
|
||||
import { Card } from "./card";
|
||||
import { Carousel } from "./carousel";
|
||||
import { Cascader } from "./cascader";
|
||||
import { Cell, CellGroup } from "./cell";
|
||||
import { Checkbox, CheckboxGroup } from "./checkbox";
|
||||
import { Circle } from "./circle";
|
||||
import { Collapse, CollapsePanel } from "./collapse";
|
||||
import { ColorPicker } from "./color-picker";
|
||||
import { DatePicker, DatePickerOptions } from "./date-picker";
|
||||
import { Divider } from "./divider";
|
||||
import { Dropdown, DropdownItem } from "./dropdown";
|
||||
import { Form, FormItem } from "./form";
|
||||
import { GridRow, GridCol } from "./grid";
|
||||
import { Icon } from "./icon";
|
||||
import { Input } from "./input";
|
||||
import { InputNumber } from "./input-number";
|
||||
import { Layout } from "./layout";
|
||||
import { LoadingBarInstance, LoadingBarConfig } from "./loading-bar";
|
||||
import { Menu, MenuItem, Submenu, MenuGroup } from "./menu";
|
||||
import { MessageInstance, MessageConfig } from "./message";
|
||||
import { Modal, ModalInstance, ModalConfig } from "./modal";
|
||||
import { NoticeInstance, NoticeConfig, NoticeGlobalConfig } from "./notice";
|
||||
import { Page } from "./page";
|
||||
import { Poptip } from "./poptip";
|
||||
import { Progress } from "./progress";
|
||||
import { Radio, RadioGroup } from "./radio";
|
||||
import { Rate } from "./rate";
|
||||
import { Scroll } from "./scroll";
|
||||
import { Select, SelectOption, SelectOptionGroup } from "./select";
|
||||
import { Spin } from "./spin";
|
||||
import { Split } from "./split";
|
||||
import { Steps, Step } from "./steps";
|
||||
import { Switch } from "./switch";
|
||||
import { Table, TableColumn, TableRenderCreateElementData, TableRenderCreateElementResult, TableColumnRenderParams, TableExportCsvParams } from "./table";
|
||||
import { Tabs, TabPane } from "./tabs";
|
||||
import { Tag } from "./tag";
|
||||
import { Time } from "./time";
|
||||
import { Timeline, TimelineItem } from "./timeline";
|
||||
import { TimePicker } from "./time-picker";
|
||||
import { Tooltip } from "./tooltip";
|
||||
import { Transfer } from "./transfer";
|
||||
import { Tree, TreeChild } from "./tree";
|
||||
import { Upload } from "./upload";
|
||||
|
||||
declare namespace IView {
|
||||
type IAffix = Affix;
|
||||
type IAlert = Alert;
|
||||
type IAnchor = Anchor;
|
||||
type IAnchorLink = AnchorLink;
|
||||
type IAutoComplete = AutoComplete;
|
||||
type IAvatar = Avatar;
|
||||
type IBackTop = BackTop;
|
||||
type IBadge = Badge;
|
||||
type IBreadcrumb = Breadcrumb;
|
||||
type IBreadcrumbItem = BreadcrumbItem;
|
||||
type IButton = Button;
|
||||
type IButtonGroup = ButtonGroup;
|
||||
type ICard = Card;
|
||||
type ICarousel = Carousel;
|
||||
type ICascader = Cascader;
|
||||
type ICell = Cell;
|
||||
type ICellGroup = CellGroup;
|
||||
type ICheckbox = Checkbox;
|
||||
type ICheckboxGroup = CheckboxGroup;
|
||||
type ICircle = Circle;
|
||||
type ICollapse = Collapse;
|
||||
type ICollapsePanel = CollapsePanel;
|
||||
type IColorPicker = ColorPicker;
|
||||
type IDatePicker = DatePicker;
|
||||
type IDatePickerOptions = DatePickerOptions;
|
||||
type IDivider = Divider;
|
||||
type IDropdown = Dropdown;
|
||||
type IDropdownItem = DropdownItem;
|
||||
type IForm = Form;
|
||||
type IFormItem = FormItem;
|
||||
type IGridCol = GridCol;
|
||||
type IGridRow = GridRow;
|
||||
type IIcon = Icon;
|
||||
type IInput = Input;
|
||||
type IInputNumber = InputNumber;
|
||||
type ILayout = Layout;
|
||||
type ILoadingBarInstance = LoadingBarInstance;
|
||||
type ILoadingBarConfig = LoadingBarConfig;
|
||||
type IMenu = Menu;
|
||||
type IMenuGroup = MenuGroup;
|
||||
type IMenuItem = MenuItem;
|
||||
type IMessageConfig = MessageConfig;
|
||||
type IMessageInstance = MessageInstance;
|
||||
type IModal = Modal;
|
||||
type IModalConfig = ModalConfig;
|
||||
type IModalInstance = ModalInstance;
|
||||
type INoticeConfig = NoticeConfig;
|
||||
type INoticeGlobalConfig = NoticeGlobalConfig;
|
||||
type INoticeInstance = NoticeInstance;
|
||||
type IPage = Page;
|
||||
type IPoptip = Poptip;
|
||||
type IProgress = Progress;
|
||||
type IRadio = Radio;
|
||||
type IRadioGroup = RadioGroup;
|
||||
type IRate = Rate;
|
||||
type IScroll = Scroll;
|
||||
type ISelect = Select;
|
||||
type ISelectOption = SelectOption;
|
||||
type ISelectOptionGroup = SelectOptionGroup;
|
||||
type ISpin = Spin;
|
||||
type ISplit = Split;
|
||||
type IStep = Step;
|
||||
type ISteps = Steps;
|
||||
type ISubmenu = Submenu;
|
||||
type ISwitch = Switch;
|
||||
type ITable = Table;
|
||||
type ITableColumn = TableColumn;
|
||||
type ITableColumnRenderParams = TableColumnRenderParams;
|
||||
type ITableExportCsvParams = TableExportCsvParams;
|
||||
type ITableRenderCreateElementData = TableRenderCreateElementData;
|
||||
type ITableRenderCreateElementResult = TableRenderCreateElementResult;
|
||||
type ITabPane = TabPane;
|
||||
type ITabs = Tabs;
|
||||
type ITag = Tag;
|
||||
type ITime = Time;
|
||||
type ITimeline = Timeline;
|
||||
type ITimelineItem = TimelineItem;
|
||||
type ITimePicker = TimePicker;
|
||||
type ITooltip = Tooltip;
|
||||
type ITransfer = Transfer;
|
||||
type ITree = Tree;
|
||||
type ITreeChild = TreeChild;
|
||||
type IUpload = Upload;
|
||||
}
|
||||
|
||||
declare interface IView extends PluginFunction<any> {
|
||||
readonly IAffix: Affix;
|
||||
readonly IAlert: Alert;
|
||||
readonly IAnchor: Anchor;
|
||||
readonly IAnchorLink: AnchorLink;
|
||||
readonly IAutoComplete: AutoComplete;
|
||||
readonly IAvatar: Avatar;
|
||||
readonly IBackTop: BackTop;
|
||||
readonly IBadge: Badge;
|
||||
readonly IBreadcrumb: Breadcrumb;
|
||||
readonly IBreadcrumbItem: BreadcrumbItem;
|
||||
readonly IButton: Button;
|
||||
readonly IButtonGroup: ButtonGroup;
|
||||
readonly ICard: Card;
|
||||
readonly ICarousel: Carousel;
|
||||
readonly ICascader: Cascader;
|
||||
readonly ICell: Cell;
|
||||
readonly ICellGroup: CellGroup;
|
||||
readonly ICheckbox: Checkbox;
|
||||
readonly ICheckboxGroup: CheckboxGroup;
|
||||
readonly ICircle: Circle;
|
||||
readonly ICollapse: Collapse;
|
||||
readonly ICollapsePanel: CollapsePanel;
|
||||
readonly IColorPicker: ColorPicker;
|
||||
readonly IDatePicker: DatePicker;
|
||||
readonly IDatePickerOptions: DatePickerOptions;
|
||||
readonly IDivider: Divider;
|
||||
readonly IDropdown: Dropdown;
|
||||
readonly IDropdownItem: DropdownItem;
|
||||
readonly IForm: Form;
|
||||
readonly IFormItem: FormItem;
|
||||
readonly IGridCol: GridCol;
|
||||
readonly IGridRow: GridRow;
|
||||
readonly IIcon: Icon;
|
||||
readonly IInput: Input;
|
||||
readonly IInputNumber: InputNumber;
|
||||
readonly ILayout: Layout;
|
||||
readonly ILoadingBarInstance: LoadingBarInstance;
|
||||
readonly ILoadingBarConfig: LoadingBarConfig;
|
||||
readonly IMenu: Menu;
|
||||
readonly IMenuGroup: MenuGroup;
|
||||
readonly IMenuItem: MenuItem;
|
||||
readonly IMessageConfig: MessageConfig;
|
||||
readonly IMessageInstance: MessageInstance;
|
||||
readonly IModal: Modal;
|
||||
readonly IModalConfig: ModalConfig;
|
||||
readonly IModalInstance: ModalInstance;
|
||||
readonly INoticeConfig: NoticeConfig;
|
||||
readonly INoticeGlobalConfig: NoticeGlobalConfig;
|
||||
readonly INoticeInstance: NoticeInstance;
|
||||
readonly IPage: Page;
|
||||
readonly IPoptip: Poptip;
|
||||
readonly IProgress: Progress;
|
||||
readonly IRadio: Radio;
|
||||
readonly IRadioGroup: RadioGroup;
|
||||
readonly IRate: Rate;
|
||||
readonly IScroll: Scroll;
|
||||
readonly ISelect: Select;
|
||||
readonly ISelectOption: SelectOption;
|
||||
readonly ISelectOptionGroup: SelectOptionGroup;
|
||||
readonly ISpin: Spin;
|
||||
readonly ISplit: Split;
|
||||
readonly IStep: Step;
|
||||
readonly ISteps: Steps;
|
||||
readonly ISubmenu: Submenu;
|
||||
readonly ISwitch: Switch;
|
||||
readonly ITable: Table;
|
||||
readonly ITableColumn: TableColumn;
|
||||
readonly ITableColumnRenderParams: TableColumnRenderParams;
|
||||
readonly ITableExportCsvParams: TableExportCsvParams;
|
||||
readonly ITableRenderCreateElementData: TableRenderCreateElementData;
|
||||
readonly ITableRenderCreateElementResult: TableRenderCreateElementResult;
|
||||
readonly ITabPane: TabPane;
|
||||
readonly ITabs: Tabs;
|
||||
readonly ITag: Tag;
|
||||
readonly ITime: Time;
|
||||
readonly ITimeline: Timeline;
|
||||
readonly ITimelineItem: TimelineItem;
|
||||
readonly ITimePicker: TimePicker;
|
||||
readonly ITooltip: Tooltip;
|
||||
readonly ITransfer: Transfer;
|
||||
readonly ITree: Tree;
|
||||
readonly ITreeChild: TreeChild;
|
||||
readonly IUpload: Upload;
|
||||
}
|
||||
|
||||
export default IView;
|
||||
|
||||
declare module 'iview/types/iview' {
|
||||
const iView: IView;
|
||||
export default iView;
|
||||
}
|
4
types/iview/iview.d.ts
vendored
4
types/iview/iview.d.ts
vendored
|
@ -1,4 +0,0 @@
|
|||
declare module 'iview' {
|
||||
const iView: any;
|
||||
export default iView;
|
||||
}
|
6
types/iview/layout.d.ts → types/layout.d.ts
vendored
6
types/iview/layout.d.ts → types/layout.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Layout extends Vue {
|
||||
export declare class Layout extends Vue {
|
||||
/**
|
||||
* 触发响应式布局的断点,可选值为xs,sm,md,lg,xl或xxl,若不设此属性则不会触发响应式布局。
|
||||
* {
|
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface LoadingBarInstance {
|
||||
export declare class LoadingBar {
|
||||
/**
|
||||
* 开始从 0 显示进度条,并自动加载进度
|
||||
*/
|
||||
|
@ -33,7 +33,7 @@ export interface LoadingBarInstance {
|
|||
destroy(): void;
|
||||
}
|
||||
|
||||
export interface LoadingBarConfig {
|
||||
export declare class LoadingBarConfig {
|
||||
/**
|
||||
* 进度条的颜色,默认为 iView 主色
|
||||
* @default primary
|
||||
|
@ -51,11 +51,11 @@ export interface LoadingBarConfig {
|
|||
height?: number;
|
||||
}
|
||||
|
||||
declare module "vue/types/vue" {
|
||||
declare module 'vue/types/vue' {
|
||||
interface Vue {
|
||||
/**
|
||||
* 加载进度条
|
||||
*/
|
||||
$Loading?: LoadingBarInstance;
|
||||
$Loading?: LoadingBar;
|
||||
}
|
||||
}
|
12
types/iview/menu.d.ts → types/menu.d.ts
vendored
12
types/iview/menu.d.ts → types/menu.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Menu extends Vue {
|
||||
export declare class Menu extends Vue {
|
||||
/**
|
||||
* 菜单类型,可选值为 horizontal(水平) 和 vertical(垂直)
|
||||
* @default vertical
|
||||
|
@ -52,7 +52,7 @@ export interface Menu extends Vue {
|
|||
updateActiveName(): void;
|
||||
}
|
||||
|
||||
export interface MenuItem extends Vue {
|
||||
export declare class MenuItem extends Vue {
|
||||
/**
|
||||
* 菜单项的唯一标识,必填
|
||||
*/
|
||||
|
@ -73,7 +73,7 @@ export interface MenuItem extends Vue {
|
|||
target?: '_blank' | '_self' | '_parent' | '_top';
|
||||
}
|
||||
|
||||
export interface Submenu extends Vue {
|
||||
export declare class MenuSub extends Vue {
|
||||
/**
|
||||
* 子菜单的唯一标识,必填
|
||||
*/
|
||||
|
@ -93,7 +93,7 @@ export interface Submenu extends Vue {
|
|||
};
|
||||
}
|
||||
|
||||
export interface MenuGroup extends Vue {
|
||||
export declare class MenuGroup extends Vue {
|
||||
/**
|
||||
* 分组标题
|
||||
* @default 空
|
10
types/iview/message.d.ts → types/message.d.ts
vendored
10
types/iview/message.d.ts → types/message.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode, CreateElement } from "vue";
|
||||
|
||||
export interface MessageInstance {
|
||||
export declare class Message {
|
||||
/**
|
||||
* 消息
|
||||
* @param config MessageConfig为相关配置,string为待显示的内容
|
||||
|
@ -41,7 +41,7 @@ export interface MessageInstance {
|
|||
destroy(): void;
|
||||
}
|
||||
|
||||
export interface MessageConfig {
|
||||
export declare class MessageConfig {
|
||||
/**
|
||||
* 提示内容
|
||||
*/
|
||||
|
@ -71,12 +71,12 @@ export interface MessageConfig {
|
|||
duration?: number;
|
||||
}
|
||||
|
||||
declare module "vue/types/vue" {
|
||||
declare module 'vue/types/vue' {
|
||||
interface Vue {
|
||||
/**
|
||||
* 全局提示
|
||||
*/
|
||||
$Message?: MessageInstance;
|
||||
$Message?: Message;
|
||||
}
|
||||
}
|
||||
|
12
types/iview/modal.d.ts → types/modal.d.ts
vendored
12
types/iview/modal.d.ts → types/modal.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Modal {
|
||||
export declare class Modal {
|
||||
/**
|
||||
* 对话框是否显示,可使用 v-model 双向绑定数据。
|
||||
* @default false
|
||||
|
@ -123,7 +123,7 @@ export interface Modal {
|
|||
};
|
||||
}
|
||||
|
||||
export interface ModalInstance {
|
||||
export declare class ModalInstance {
|
||||
/**
|
||||
* 消息
|
||||
* @param config ModalConfig为相关配置,string为待显示的内容
|
||||
|
@ -155,7 +155,7 @@ export interface ModalInstance {
|
|||
remove(): void;
|
||||
}
|
||||
|
||||
export interface ModalConfig {
|
||||
export declare class ModalConfig {
|
||||
/**
|
||||
* 标题或者Element选择器字符串
|
||||
*/
|
||||
|
@ -208,7 +208,7 @@ export interface ModalConfig {
|
|||
onCancel?: () => void;
|
||||
}
|
||||
|
||||
declare module "vue/types/vue" {
|
||||
declare module 'vue/types/vue' {
|
||||
interface Vue {
|
||||
/**
|
||||
* 对话框
|
12
types/iview/notice.d.ts → types/notice.d.ts
vendored
12
types/iview/notice.d.ts → types/notice.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode, CreateElement } from "vue";
|
||||
|
||||
export interface NoticeInstance {
|
||||
export declare class Notice {
|
||||
/**
|
||||
* 打开
|
||||
* @param config NoticeConfig为相关配置,string为待显示的内容
|
||||
|
@ -44,7 +44,7 @@ export interface NoticeInstance {
|
|||
destroy(): void;
|
||||
}
|
||||
|
||||
export interface NoticeConfig {
|
||||
export declare class NoticeConfig {
|
||||
/**
|
||||
* 通知提醒的标题
|
||||
*/
|
||||
|
@ -71,7 +71,7 @@ export interface NoticeConfig {
|
|||
onClose?: Function;
|
||||
}
|
||||
|
||||
export interface NoticeGlobalConfig {
|
||||
export declare class NoticeGlobalConfig {
|
||||
/**
|
||||
* 通知组件距离顶端的距离,单位像素 默认24
|
||||
*/
|
||||
|
@ -82,11 +82,11 @@ export interface NoticeGlobalConfig {
|
|||
duration?: number;
|
||||
}
|
||||
|
||||
declare module "vue/types/vue" {
|
||||
declare module 'vue/types/vue' {
|
||||
interface Vue {
|
||||
/**
|
||||
* 通知提醒
|
||||
*/
|
||||
$Notice?: NoticeInstance;
|
||||
$Notice?: Notice;
|
||||
}
|
||||
}
|
6
types/iview/page.d.ts → types/page.d.ts
vendored
6
types/iview/page.d.ts → types/page.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Page extends Vue {
|
||||
export declare class Page extends Vue {
|
||||
/**
|
||||
* 当前页码,支持 .sync 修饰符
|
||||
* @default 1
|
6
types/iview/poptip.d.ts → types/poptip.d.ts
vendored
6
types/iview/poptip.d.ts → types/poptip.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Poptip extends Vue {
|
||||
export declare class Poptip extends Vue {
|
||||
/**
|
||||
* 触发方式,可选值为hover(悬停)click(点击)focus(聚焦),
|
||||
* 在 confirm 模式下,只有 click 有效
|
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Progress extends Vue {
|
||||
export declare class Progress extends Vue {
|
||||
/**
|
||||
* 百分比
|
||||
* @default 0
|
8
types/iview/radio.d.ts → types/radio.d.ts
vendored
8
types/iview/radio.d.ts → types/radio.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Radio extends Vue {
|
||||
export declare class Radio extends Vue {
|
||||
/**
|
||||
* 只在单独使用时有效。可以使用 v-model 双向绑定数据
|
||||
* @default false
|
||||
|
@ -39,7 +39,7 @@ export interface Radio extends Vue {
|
|||
$emit(eventName: 'on-change', arg: string | number | boolean): this;
|
||||
}
|
||||
|
||||
export interface RadioGroup extends Vue {
|
||||
export declare class RadioGroup extends Vue {
|
||||
/**
|
||||
* 指定当前选中的项目数据。可以使用 v-model 双向绑定数据
|
||||
*/
|
6
types/iview/rate.d.ts → types/rate.d.ts
vendored
6
types/iview/rate.d.ts → types/rate.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Rate extends Vue {
|
||||
export declare class Rate extends Vue {
|
||||
/**
|
||||
* star总数
|
||||
* @default 5
|
6
types/iview/scroll.d.ts → types/scroll.d.ts
vendored
6
types/iview/scroll.d.ts → types/scroll.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Scroll extends Vue {
|
||||
export declare class Scroll extends Vue {
|
||||
/**
|
||||
* 滚动区域的高度,单位像素
|
||||
* @default 300
|
16
types/iview/select.d.ts → types/select.d.ts
vendored
16
types/iview/select.d.ts → types/select.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Select extends Vue {
|
||||
export declare class Select extends Vue {
|
||||
/**
|
||||
* 指定选中项目的 value 值,可以使用 v-model 双向绑定数据。
|
||||
* 单选时只接受 String 或 Number,多选时只接受 Array
|
||||
|
@ -74,10 +74,10 @@ export interface Select extends Vue {
|
|||
*/
|
||||
'label-in-value'?: boolean;
|
||||
/**
|
||||
* 弹窗的展开方向,可选值为 bottom 和 top
|
||||
* @default bottom
|
||||
* 弹窗的展开方向,可选值为 top、bottom、top-start、bottom-start、top-end、bottom-end
|
||||
* @default bottom-start
|
||||
*/
|
||||
placement?: 'bottom' | 'top';
|
||||
placement?: 'bottom' | 'top' | 'top-start' | 'bottom-start' | 'top-end' | 'bottom-end';
|
||||
/**
|
||||
* 是否将弹层放置于 body 内,在 Tabs、带有 fixed 的 Table 列内使用时,
|
||||
* 建议添加此属性,它将不受父级样式影响,从而达到更好的效果
|
||||
|
@ -114,7 +114,7 @@ export interface Select extends Vue {
|
|||
clearSingleSelect(): void;
|
||||
}
|
||||
|
||||
export interface SelectOption extends Vue {
|
||||
export declare class Option extends Vue {
|
||||
/**
|
||||
* 选项值,默认根据此属性值进行筛选,必填
|
||||
*/
|
||||
|
@ -132,7 +132,7 @@ export interface SelectOption extends Vue {
|
|||
disabled?: boolean;
|
||||
}
|
||||
|
||||
export interface SelectOptionGroup extends Vue {
|
||||
export declare class OptionGroup extends Vue {
|
||||
/**
|
||||
* 分组的组名
|
||||
* @default 空
|
8
types/sider.d.ts
vendored
Normal file
8
types/sider.d.ts
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue from 'vue';
|
||||
|
||||
export declare class Sider extends Vue {
|
||||
}
|
6
types/iview/slider.d.ts → types/slider.d.ts
vendored
6
types/iview/slider.d.ts → types/slider.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Slider extends Vue {
|
||||
export declare class Slider extends Vue {
|
||||
/**
|
||||
* 滑块选定的值,可以使用 v-model 双向绑定数据。普通模式下,数据格式为数字,
|
||||
* 在双滑块模式下,数据格式为长度是2的数组,且每项都为数字,
|
15
types/iview/spin.d.ts → types/spin.d.ts
vendored
15
types/iview/spin.d.ts → types/spin.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Spin extends Vue {
|
||||
export declare class Spin extends Vue {
|
||||
/**
|
||||
* Spin尺寸,可选值为large和small或者不设置
|
||||
*/
|
||||
|
@ -23,4 +23,13 @@ export interface Spin extends Vue {
|
|||
*/
|
||||
'': VNode[];
|
||||
};
|
||||
}
|
||||
|
||||
declare module 'vue/types/vue' {
|
||||
interface Vue {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
$Spin?: Spin;
|
||||
}
|
||||
}
|
6
types/iview/split.d.ts → types/split.d.ts
vendored
6
types/iview/split.d.ts → types/split.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Split extends Vue {
|
||||
export declare class Split extends Vue {
|
||||
/**
|
||||
* 面板位置,可以是 0~1 代表百分比,或具体数值的像素,可用 v-model 双向绑定
|
||||
* @default 0.5
|
8
types/iview/steps.d.ts → types/steps.d.ts
vendored
8
types/iview/steps.d.ts → types/steps.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Steps extends Vue {
|
||||
export declare class Steps extends Vue {
|
||||
/**
|
||||
* 当前步骤,从 0 开始计数
|
||||
* @default 0
|
||||
|
@ -26,7 +26,7 @@ export interface Steps extends Vue {
|
|||
direction?: 'horizontal' | 'vertical';
|
||||
}
|
||||
|
||||
export interface Step extends Vue {
|
||||
export declare class StepsStep extends Vue {
|
||||
/**
|
||||
* 步骤的状态,可选值为wait、process、finish、error,不设置时自动判断
|
||||
* @default process
|
6
types/iview/switch.d.ts → types/switch.d.ts
vendored
6
types/iview/switch.d.ts → types/switch.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Switch extends Vue {
|
||||
export declare class Switch extends Vue {
|
||||
/**
|
||||
* 指定当前是否选中,可以使用 v-model 双向绑定数据
|
||||
* @default false
|
18
types/iview/table.d.ts → types/table.d.ts
vendored
18
types/iview/table.d.ts → types/table.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Table extends Vue {
|
||||
export declare class Table extends Vue {
|
||||
/**
|
||||
* 显示的结构化数据,其中,字段 cellClassName 用于设置任意单元格的样式名称,
|
||||
* 因此数据不能使用该字段,详见示例特定样式。
|
||||
|
@ -163,7 +163,7 @@ export interface Table extends Vue {
|
|||
};
|
||||
}
|
||||
|
||||
export interface TableColumn {
|
||||
export declare class TableColumn {
|
||||
/**
|
||||
* 列类型,可选值为 index、selection、expand、html
|
||||
*/
|
||||
|
@ -279,7 +279,7 @@ export interface TableColumn {
|
|||
children?: object[];
|
||||
}
|
||||
|
||||
export interface TableRenderCreateElementData {
|
||||
export declare class TableRenderCreateElementData {
|
||||
/**
|
||||
* 和`v-bind:class`一样的 API
|
||||
*/
|
||||
|
@ -329,7 +329,7 @@ export interface TableRenderCreateElementData {
|
|||
ref?: string
|
||||
}
|
||||
|
||||
export interface TableColumnRenderParams {
|
||||
export declare class TableColumnRenderParams {
|
||||
/**
|
||||
* 当前行数据
|
||||
*/
|
||||
|
@ -344,7 +344,7 @@ export interface TableColumnRenderParams {
|
|||
index?: number;
|
||||
}
|
||||
|
||||
export interface TableRenderCreateElementResult {
|
||||
export declare class TableRenderCreateElementResult {
|
||||
child?: object;
|
||||
children?: Array<any>;
|
||||
componentInstance?: object;
|
||||
|
@ -366,7 +366,7 @@ export interface TableRenderCreateElementResult {
|
|||
text?: object;
|
||||
}
|
||||
|
||||
export interface TableColumnRenderHeadParams {
|
||||
export declare class TableColumnRenderHeadParams {
|
||||
/**
|
||||
* 当前列数据
|
||||
*/
|
||||
|
@ -377,7 +377,7 @@ export interface TableColumnRenderHeadParams {
|
|||
index?: number;
|
||||
}
|
||||
|
||||
export interface TableExportCsvParams {
|
||||
export declare class TableExportCsvParams {
|
||||
/**
|
||||
* 文件名,默认为 table.csv
|
||||
*/
|
8
types/iview/tabs.d.ts → types/tabs.d.ts
vendored
8
types/iview/tabs.d.ts → types/tabs.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Tabs extends Vue {
|
||||
export declare class Tabs extends Vue {
|
||||
/**
|
||||
* 当前激活 tab 面板的 name,可以使用 v-model 双向绑定数据
|
||||
* @default 默认为第一项的 name
|
||||
|
@ -54,7 +54,7 @@ export interface Tabs extends Vue {
|
|||
};
|
||||
}
|
||||
|
||||
export interface TabPane extends Vue {
|
||||
export declare class TabsPane extends Vue {
|
||||
/**
|
||||
* 用于标识当前面板,对应 value,默认为其索引值
|
||||
*/
|
6
types/iview/tag.d.ts → types/tag.d.ts
vendored
6
types/iview/tag.d.ts → types/tag.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Tag extends Vue {
|
||||
export declare class Tag extends Vue {
|
||||
/**
|
||||
* 标签是否可以关闭
|
||||
* @default false
|
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface TimePicker extends Vue {
|
||||
export declare class TimePicker extends Vue {
|
||||
/**
|
||||
* 显示类型,可选值为 time、timerange
|
||||
* @default time
|
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Time extends Vue {
|
||||
export declare class Time extends Vue {
|
||||
/**
|
||||
* 需要对比的时间,可以是时间戳或 Date 类型
|
||||
*/
|
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Timeline extends Vue {
|
||||
export declare class Timeline extends Vue {
|
||||
/**
|
||||
* 指定是否最后一个节点为幽灵节点
|
||||
* @default false
|
||||
|
@ -12,7 +12,7 @@ export interface Timeline extends Vue {
|
|||
pending?: boolean;
|
||||
}
|
||||
|
||||
export interface TimelineItem extends Vue {
|
||||
export declare class TimelineItem extends Vue {
|
||||
/**
|
||||
* 圆圈颜色,可选值为blue、red、green,或自定义色值
|
||||
* @default blue
|
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Tooltip extends Vue {
|
||||
export declare class Tooltip extends Vue {
|
||||
/**
|
||||
* 显示的内容
|
||||
* @default 空
|
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Transfer extends Vue {
|
||||
export declare class Transfer extends Vue {
|
||||
/**
|
||||
* 数据源,其中的数据将会被渲染到左边一栏中,targetKeys 中指定的除外。
|
||||
* @default []
|
8
types/iview/tree.d.ts → types/tree.d.ts
vendored
8
types/iview/tree.d.ts → types/tree.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Tree extends Vue {
|
||||
export declare class Tree extends Vue {
|
||||
/**
|
||||
* 可嵌套的节点属性的数组,生成 tree 的数据
|
||||
*/
|
||||
|
@ -62,7 +62,7 @@ export interface Tree extends Vue {
|
|||
getSelectedNodes(): void;
|
||||
}
|
||||
|
||||
export interface TreeChild extends Vue {
|
||||
export declare class TreeChild extends Vue {
|
||||
/**
|
||||
* 标题
|
||||
*/
|
6
types/iview/upload.d.ts → types/upload.d.ts
vendored
6
types/iview/upload.d.ts → types/upload.d.ts
vendored
|
@ -1,10 +1,10 @@
|
|||
// Type definitions for iview 3.0.0
|
||||
// Type definitions for iview 3.0.1
|
||||
// Project: https://github.com/iview/iview
|
||||
// Definitions by: yangdan
|
||||
// Definitions: https://github.com/yangdan8/iview.git
|
||||
import Vue, { VNode } from "vue";
|
||||
import Vue from 'vue';
|
||||
|
||||
export interface Upload extends Vue {
|
||||
export declare class Upload extends Vue {
|
||||
/**
|
||||
* 上传的地址,必填
|
||||
*/
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue