ai.touchui-vue 1.38.0 → 1.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ai.touchui-vue.common.js +337 -193
- package/lib/date-picker.js +22 -15
- package/lib/float.js +39 -9
- package/lib/import.js +19 -11
- package/lib/index.js +1 -1
- package/lib/input.js +4 -7
- package/lib/progress.js +8 -2
- package/lib/select.js +210 -96
- package/lib/theme/css/theme/B-Design.css +1 -1
- package/lib/theme/css/theme/aiplan.css +1 -1
- package/lib/theme/css/theme/aiplangd.css +1 -1
- package/lib/theme/css/theme/chbn.css +1 -1
- package/lib/theme/css/theme/default.css +1 -1
- package/lib/theme/css/theme/dt.css +1 -1
- package/lib/theme/css/theme/ecloud.css +1 -1
- package/lib/theme/css/theme/hongkong.css +1 -1
- package/lib/theme/css/theme/logistics.css +1 -1
- package/lib/theme/css/theme/narrow.css +1 -1
- package/lib/theme/css/theme/sdpf.css +1 -1
- package/lib/theme/css/theme/upc.css +1 -1
- package/lib/theme/css/theme/website.css +1 -1
- package/lib/theme/css/theme/workbench-gz.css +1 -1
- package/lib/theme/css/theme/zj.css +1 -1
- package/lib/utils/validate.js +4 -22
- package/package.json +1 -1
- package/packages/date-picker/src/.DS_Store +0 -0
- package/packages/date-picker/src/date-picker.vue +15 -9
- package/packages/float/src/main.vue +37 -7
- package/packages/import/src/import.vue +1 -1
- package/packages/input/src/input.vue +2 -5
- package/packages/progress/src/progress.vue +5 -0
- package/packages/select/src/select.vue +95 -19
- package/packages/theme/lib/css/theme/B-Design.css +1 -1
- package/packages/theme/lib/css/theme/aiplan.css +1 -1
- package/packages/theme/lib/css/theme/aiplangd.css +1 -1
- package/packages/theme/lib/css/theme/chbn.css +1 -1
- package/packages/theme/lib/css/theme/default.css +1 -1
- package/packages/theme/lib/css/theme/dt.css +1 -1
- package/packages/theme/lib/css/theme/ecloud.css +1 -1
- package/packages/theme/lib/css/theme/hongkong.css +1 -1
- package/packages/theme/lib/css/theme/logistics.css +1 -1
- package/packages/theme/lib/css/theme/narrow.css +1 -1
- package/packages/theme/lib/css/theme/sdpf.css +1 -1
- package/packages/theme/lib/css/theme/upc.css +1 -1
- package/packages/theme/lib/css/theme/website.css +1 -1
- package/packages/theme/lib/css/theme/workbench-gz.css +1 -1
- package/packages/theme/lib/css/theme/zj.css +1 -1
- package/packages/theme/src/less/element/pic.less +1 -0
- package/packages/theme/src/less/element/progress.less +1 -1
- package/packages/theme/src/less/element/select.less +8 -0
- package/src/index.js +1 -1
- package/src/utils/validate.js +4 -22
package/lib/date-picker.js
CHANGED
|
@@ -615,7 +615,7 @@ module.exports = require("ai.touchui-vue/lib/locale");
|
|
|
615
615
|
// ESM COMPAT FLAG
|
|
616
616
|
__webpack_require__.r(__webpack_exports__);
|
|
617
617
|
|
|
618
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/date-picker.vue?vue&type=template&id=
|
|
618
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/date-picker/src/date-picker.vue?vue&type=template&id=ed2db97a
|
|
619
619
|
var render = function () {
|
|
620
620
|
var _vm = this
|
|
621
621
|
var _h = _vm.$createElement
|
|
@@ -769,7 +769,7 @@ var staticRenderFns = []
|
|
|
769
769
|
render._withStripped = true
|
|
770
770
|
|
|
771
771
|
|
|
772
|
-
// CONCATENATED MODULE: ./packages/date-picker/src/date-picker.vue?vue&type=template&id=
|
|
772
|
+
// CONCATENATED MODULE: ./packages/date-picker/src/date-picker.vue?vue&type=template&id=ed2db97a
|
|
773
773
|
|
|
774
774
|
// EXTERNAL MODULE: external "ai.touchui-vue/lib/locale"
|
|
775
775
|
var locale_ = __webpack_require__(3);
|
|
@@ -1576,6 +1576,13 @@ var date_ = __webpack_require__(90);
|
|
|
1576
1576
|
|
|
1577
1577
|
immediate: true
|
|
1578
1578
|
},
|
|
1579
|
+
iValue: {
|
|
1580
|
+
handler: function handler(val) {
|
|
1581
|
+
this.$emit('change', val);
|
|
1582
|
+
},
|
|
1583
|
+
|
|
1584
|
+
immediate: true
|
|
1585
|
+
},
|
|
1579
1586
|
displayFormat: {
|
|
1580
1587
|
handler: function handler(fmt) {
|
|
1581
1588
|
this.displayFormatRegExp = new RegExp('^' + String(fmt).replace(/\-|\//g, '\\-').replace(/[a-zA-Z]/g, '\\d') + '$');
|
|
@@ -1591,7 +1598,7 @@ var date_ = __webpack_require__(90);
|
|
|
1591
1598
|
}
|
|
1592
1599
|
if (this.value) {
|
|
1593
1600
|
this.iValue = this.value;
|
|
1594
|
-
this.$emit('change', this.value)
|
|
1601
|
+
// this.$emit('change', this.value)
|
|
1595
1602
|
}
|
|
1596
1603
|
},
|
|
1597
1604
|
mounted: function mounted() {
|
|
@@ -1605,7 +1612,7 @@ var date_ = __webpack_require__(90);
|
|
|
1605
1612
|
},
|
|
1606
1613
|
handleDisplayChange: function handleDisplayChange(value) {
|
|
1607
1614
|
this.datedisplay = value;
|
|
1608
|
-
this.$emit('change', this.datedisplay)
|
|
1615
|
+
// this.$emit('change', this.datedisplay)
|
|
1609
1616
|
},
|
|
1610
1617
|
handleDisplayBlur: function handleDisplayBlur() {
|
|
1611
1618
|
var _this = this;
|
|
@@ -1622,7 +1629,7 @@ var date_ = __webpack_require__(90);
|
|
|
1622
1629
|
if (!_this.displayFormatRegExp.test(_this.datedisplay)) {
|
|
1623
1630
|
_this.datedisplay = _this.formatDate(new Date(_this.datedisplay), _this.displayFormat, _this.datedisplay);
|
|
1624
1631
|
_this.iValue = _this.formatDate(new Date(_this.datedisplay), _this.displayFormat, _this.datedisplay);
|
|
1625
|
-
|
|
1632
|
+
// this.$emit('change', this.iValue)
|
|
1626
1633
|
} else {
|
|
1627
1634
|
_this.changeValue(_this.getDateFromValue(_this.datedisplay, _this.displayFormat), _this.datedisplay);
|
|
1628
1635
|
}
|
|
@@ -1650,7 +1657,7 @@ var date_ = __webpack_require__(90);
|
|
|
1650
1657
|
this.datedisplay = value.split(' ').length > 1 ? value.split(' ')[1] : value;
|
|
1651
1658
|
this.iValue = value.split(' ').length > 1 ? value.split(' ')[1] : value;
|
|
1652
1659
|
}
|
|
1653
|
-
this.$emit('change', this.iValue)
|
|
1660
|
+
// this.$emit('change', this.iValue)
|
|
1654
1661
|
} else {
|
|
1655
1662
|
var _flag = isNaN(new Date(value).getTime()); // 判断是否可以使用 2022-05 如果不可用,则替换为 2022/05
|
|
1656
1663
|
if (_flag) {
|
|
@@ -1658,15 +1665,15 @@ var date_ = __webpack_require__(90);
|
|
|
1658
1665
|
}
|
|
1659
1666
|
this.datedisplay = this.formatDate(new Date(value), this.displayFormat, oldVal);
|
|
1660
1667
|
this.iValue = this.formatDate(new Date(value), this.valueFormat, oldVal);
|
|
1661
|
-
this.$emit('change', this.iValue)
|
|
1668
|
+
// this.$emit('change', this.iValue)
|
|
1662
1669
|
}
|
|
1663
1670
|
},
|
|
1664
1671
|
clear: function clear() {
|
|
1665
|
-
|
|
1672
|
+
// const oldVal = this.iValue // 失去焦点时原本就是空的情况不应该 change
|
|
1666
1673
|
this.iValue = '';
|
|
1667
|
-
if (oldVal) {
|
|
1668
|
-
|
|
1669
|
-
}
|
|
1674
|
+
// if (oldVal) {
|
|
1675
|
+
// this.$emit('change', this.iValue)
|
|
1676
|
+
// }
|
|
1670
1677
|
if (!this.$pc) {
|
|
1671
1678
|
this.$refs.layer.close();
|
|
1672
1679
|
}
|
|
@@ -1801,8 +1808,8 @@ var date_ = __webpack_require__(90);
|
|
|
1801
1808
|
});
|
|
1802
1809
|
// CONCATENATED MODULE: ./packages/date-picker/src/date-picker.vue?vue&type=script&lang=js
|
|
1803
1810
|
/* harmony default export */ var src_date_pickervue_type_script_lang_js = (date_pickervue_type_script_lang_js);
|
|
1804
|
-
// EXTERNAL MODULE: ./packages/date-picker/src/date-picker.vue?vue&type=style&index=0&id=
|
|
1805
|
-
var
|
|
1811
|
+
// EXTERNAL MODULE: ./packages/date-picker/src/date-picker.vue?vue&type=style&index=0&id=ed2db97a&prod&lang=css
|
|
1812
|
+
var date_pickervue_type_style_index_0_id_ed2db97a_prod_lang_css = __webpack_require__(95);
|
|
1806
1813
|
|
|
1807
1814
|
// CONCATENATED MODULE: ./packages/date-picker/src/date-picker.vue
|
|
1808
1815
|
|
|
@@ -1855,8 +1862,8 @@ module.exports = require("ai.touchui-vue/lib/utils/date");
|
|
|
1855
1862
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1856
1863
|
|
|
1857
1864
|
"use strict";
|
|
1858
|
-
/* harmony import */ var
|
|
1859
|
-
/* harmony import */ var
|
|
1865
|
+
/* harmony import */ var _node_modules_style_loader_dist_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_date_picker_vue_vue_type_style_index_0_id_ed2db97a_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19);
|
|
1866
|
+
/* harmony import */ var _node_modules_style_loader_dist_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_date_picker_vue_vue_type_style_index_0_id_ed2db97a_prod_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_date_picker_vue_vue_type_style_index_0_id_ed2db97a_prod_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
1860
1867
|
/* unused harmony reexport * */
|
|
1861
1868
|
|
|
1862
1869
|
|
package/lib/float.js
CHANGED
|
@@ -199,7 +199,7 @@ function normalizeComponent(
|
|
|
199
199
|
// ESM COMPAT FLAG
|
|
200
200
|
__webpack_require__.r(__webpack_exports__);
|
|
201
201
|
|
|
202
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/float/src/main.vue?vue&type=template&id=
|
|
202
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/float/src/main.vue?vue&type=template&id=4bac6de2
|
|
203
203
|
var render = function () {
|
|
204
204
|
var _vm = this
|
|
205
205
|
var _h = _vm.$createElement
|
|
@@ -241,7 +241,7 @@ var staticRenderFns = []
|
|
|
241
241
|
render._withStripped = true
|
|
242
242
|
|
|
243
243
|
|
|
244
|
-
// CONCATENATED MODULE: ./packages/float/src/main.vue?vue&type=template&id=
|
|
244
|
+
// CONCATENATED MODULE: ./packages/float/src/main.vue?vue&type=template&id=4bac6de2
|
|
245
245
|
|
|
246
246
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/float/src/main.vue?vue&type=script&lang=js
|
|
247
247
|
//
|
|
@@ -334,6 +334,10 @@ render._withStripped = true
|
|
|
334
334
|
dy: {
|
|
335
335
|
type: [String, Number],
|
|
336
336
|
default: 0
|
|
337
|
+
},
|
|
338
|
+
maxHeight: {
|
|
339
|
+
type: [Number, String],
|
|
340
|
+
default: ''
|
|
337
341
|
}
|
|
338
342
|
},
|
|
339
343
|
data: function data() {
|
|
@@ -515,7 +519,7 @@ render._withStripped = true
|
|
|
515
519
|
clearTimeout(timer);
|
|
516
520
|
}, 0);
|
|
517
521
|
} else if (this.link) {
|
|
518
|
-
this.$refs.content.style.height = ''
|
|
522
|
+
// this.$refs.content.style.height = '100em'
|
|
519
523
|
this.$nextTick(function () {
|
|
520
524
|
// 宽度设置
|
|
521
525
|
if (!_this.width) {
|
|
@@ -676,9 +680,35 @@ render._withStripped = true
|
|
|
676
680
|
}
|
|
677
681
|
|
|
678
682
|
// 设置内容高度
|
|
683
|
+
var flag = true;
|
|
684
|
+
if (_this.maxHeight) {
|
|
685
|
+
var heig = _this.maxHeight * _this.$TouchUI.em();
|
|
686
|
+
if (useSpace > heig) {
|
|
687
|
+
flag = false;
|
|
688
|
+
_this.$refs.content.style.height = heig + 'px';
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
if (!flag) {
|
|
692
|
+
return false;
|
|
693
|
+
}
|
|
679
694
|
if (useSpace < contentHeight) {
|
|
680
695
|
_this.isOver = true;
|
|
681
696
|
_this.$refs.content.style.height = useSpace + 'px';
|
|
697
|
+
} else {
|
|
698
|
+
if (_this.$refs.content.children[0] && _this.$refs.content.children[0].className.includes('to-scroll')) {
|
|
699
|
+
var count = 0;
|
|
700
|
+
var arr = _this.$refs.content.children[0].children[0].children;
|
|
701
|
+
for (var i = 0; i < arr.length; i++) {
|
|
702
|
+
count += arr[i].offsetHeight;
|
|
703
|
+
}
|
|
704
|
+
if (useSpace > count) {
|
|
705
|
+
_this.isOver = false;
|
|
706
|
+
_this.$refs.content.style.height = count + 2 + 'px';
|
|
707
|
+
} else {
|
|
708
|
+
_this.isOver = true;
|
|
709
|
+
_this.$refs.content.style.height = useSpace + 'px';
|
|
710
|
+
}
|
|
711
|
+
}
|
|
682
712
|
}
|
|
683
713
|
}
|
|
684
714
|
});
|
|
@@ -713,9 +743,9 @@ render._withStripped = true
|
|
|
713
743
|
var _this3 = this;
|
|
714
744
|
|
|
715
745
|
// 重置 content 高度,这样下次打开的时候才好重新计算是否超过整体高度
|
|
716
|
-
if (!this.height) {
|
|
717
|
-
|
|
718
|
-
}
|
|
746
|
+
// if (!this.height) {
|
|
747
|
+
// this.$refs.content.style.height = ''
|
|
748
|
+
// }
|
|
719
749
|
this.isOver = false;
|
|
720
750
|
|
|
721
751
|
// 关闭 float 后,移除事件监听
|
|
@@ -728,9 +758,9 @@ render._withStripped = true
|
|
|
728
758
|
this.$emit('beforeClose');
|
|
729
759
|
this.show = false;
|
|
730
760
|
this.opened = false;
|
|
731
|
-
if (this.$refs.content && this.$refs.content.style.height !== 'auto' && (this.iposition === 'top' || this.iposition === 'bottom') && !this.height) {
|
|
732
|
-
|
|
733
|
-
}
|
|
761
|
+
// if (this.$refs.content && this.$refs.content.style.height !== 'auto' && (this.iposition === 'top' || this.iposition === 'bottom') && !this.height) {
|
|
762
|
+
// this.$refs.content.style.height = 'auto'
|
|
763
|
+
// }
|
|
734
764
|
this.$emit('closed');
|
|
735
765
|
setTimeout(function () {
|
|
736
766
|
if (_this3.lazy) {
|
package/lib/import.js
CHANGED
|
@@ -213,7 +213,7 @@ module.exports = require("ai.touchui-vue/lib/mixins/locale");
|
|
|
213
213
|
// ESM COMPAT FLAG
|
|
214
214
|
__webpack_require__.r(__webpack_exports__);
|
|
215
215
|
|
|
216
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/import/src/import.vue?vue&type=template&id=
|
|
216
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/import/src/import.vue?vue&type=template&id=d002b4ae
|
|
217
217
|
var render = function () {
|
|
218
218
|
var _vm = this
|
|
219
219
|
var _h = _vm.$createElement
|
|
@@ -254,16 +254,24 @@ var render = function () {
|
|
|
254
254
|
),
|
|
255
255
|
]
|
|
256
256
|
)
|
|
257
|
-
: _c(
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
257
|
+
: _c(
|
|
258
|
+
"to-icon",
|
|
259
|
+
_vm._b(
|
|
260
|
+
{
|
|
261
|
+
ref: "button",
|
|
262
|
+
attrs: { link: "", value: "import", mode: "none" },
|
|
263
|
+
on: {
|
|
264
|
+
click: function ($event) {
|
|
265
|
+
$event.stopPropagation()
|
|
266
|
+
return _vm.$refs.float.toggle("button")
|
|
267
|
+
},
|
|
268
|
+
},
|
|
264
269
|
},
|
|
265
|
-
|
|
266
|
-
|
|
270
|
+
"to-icon",
|
|
271
|
+
_vm.$attrs,
|
|
272
|
+
false
|
|
273
|
+
)
|
|
274
|
+
),
|
|
267
275
|
_c(
|
|
268
276
|
"to-float",
|
|
269
277
|
{
|
|
@@ -419,7 +427,7 @@ var staticRenderFns = []
|
|
|
419
427
|
render._withStripped = true
|
|
420
428
|
|
|
421
429
|
|
|
422
|
-
// CONCATENATED MODULE: ./packages/import/src/import.vue?vue&type=template&id=
|
|
430
|
+
// CONCATENATED MODULE: ./packages/import/src/import.vue?vue&type=template&id=d002b4ae
|
|
423
431
|
|
|
424
432
|
// EXTERNAL MODULE: external "ai.touchui-vue/lib/mixins/emitter"
|
|
425
433
|
var emitter_ = __webpack_require__(87);
|