ai.touchui-vue 1.40.2 → 1.41.1
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/affix.js +2 -2
- package/lib/ai.touchui-vue.common.js +921 -829
- package/lib/align.js +2 -2
- package/lib/animation.js +2 -2
- package/lib/article.js +2 -2
- package/lib/box.js +2 -2
- package/lib/button.js +2 -2
- package/lib/calendar.js +2 -2
- package/lib/card-item.js +18 -18
- package/lib/card.js +2 -2
- package/lib/cascader.js +2 -2
- package/lib/center-scroll.js +2 -2
- package/lib/chat.js +4 -4
- package/lib/checkbox.js +2 -2
- package/lib/checkboxes.js +2 -2
- package/lib/collapse.js +12 -12
- package/lib/color.js +2 -2
- package/lib/countdown.js +2 -2
- package/lib/date-picker.js +127 -481
- package/lib/date-range.js +2 -2
- package/lib/dialog.js +2 -2
- package/lib/dis.js +2 -2
- package/lib/ellipsis.js +2 -2
- package/lib/emote.js +2 -2
- package/lib/export.js +2 -2
- package/lib/filter.js +2 -2
- package/lib/fix.js +2 -2
- package/lib/float.js +2 -2
- package/lib/flow.js +4 -4
- package/lib/form.js +2 -2
- package/lib/grid.js +2 -2
- package/lib/guider.js +2 -2
- package/lib/header.js +2 -2
- package/lib/hide.js +2 -2
- package/lib/icon.js +2 -2
- package/lib/import.js +6 -6
- package/lib/index.js +1 -1
- package/lib/input.js +10 -6
- package/lib/ip.js +2 -2
- package/lib/line.js +2 -2
- package/lib/loading.js +2 -2
- package/lib/longtap.js +2 -2
- package/lib/menu-icon.js +670 -673
- package/lib/message.js +2 -2
- package/lib/msg.js +2 -2
- package/lib/org.js +22 -22
- package/lib/padding.js +2 -2
- package/lib/page.js +2 -2
- package/lib/param.js +2 -2
- package/lib/pic.js +2 -2
- package/lib/popup.js +2 -2
- package/lib/progress.js +2 -2
- package/lib/range.js +10 -10
- package/lib/rate.js +2 -2
- package/lib/reverser.js +2 -2
- package/lib/scroll.js +2 -2
- package/lib/segment.js +2 -2
- package/lib/select.js +4 -4
- package/lib/size.js +2 -2
- package/lib/skeleton.js +2 -2
- package/lib/slide.js +2 -2
- package/lib/space.js +2 -2
- package/lib/step.js +2 -2
- package/lib/submit.js +2 -2
- package/lib/switch.js +2 -2
- package/lib/tab.js +2 -2
- package/lib/table.js +4 -4
- package/lib/tag.js +2 -2
- 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/timeline.js +2 -2
- package/lib/tip.js +2 -2
- package/lib/tooltip.js +2 -2
- package/lib/transfer.js +2 -2
- package/lib/tree.js +2 -2
- package/lib/upload.js +6 -6
- package/package.json +1 -1
- package/packages/date-picker/src/date-picker.vue +42 -13
- package/packages/date-picker/src/picker.vue +5 -1
- package/packages/input/src/input.vue +5 -2
- 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/component/calendar-dark.less +27 -1
- package/packages/theme/src/less/component/calendar.less +15 -11
- package/packages/theme/src/less/element/datePicker-dark.less +15 -0
- package/packages/theme/src/less/element/datePicker.less +17 -0
- package/packages/theme/src/less/theme/B-Design.less +2 -0
- package/packages/theme/src/less/theme/aiplan.less +2 -0
- package/packages/theme/src/less/theme/aiplangd.less +2 -0
- package/packages/theme/src/less/theme/chbn.less +2 -0
- package/packages/theme/src/less/theme/default.less +2 -0
- package/packages/theme/src/less/theme/dt.less +2 -0
- package/packages/theme/src/less/theme/ecloud.less +2 -0
- package/packages/theme/src/less/theme/hongkong.less +2 -0
- package/packages/theme/src/less/theme/logistics.less +2 -0
- package/packages/theme/src/less/theme/narrow.less +2 -0
- package/packages/theme/src/less/theme/sdpf.less +2 -0
- package/packages/theme/src/less/theme/upc.less +2 -0
- package/packages/theme/src/less/theme/website.less +2 -0
- package/packages/theme/src/less/theme/workbench-gz.less +2 -0
- package/packages/theme/src/less/theme/zj.less +2 -0
- package/src/index.js +64 -2
package/lib/timeline.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 373);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -192,7 +192,7 @@ function normalizeComponent(
|
|
|
192
192
|
|
|
193
193
|
/***/ }),
|
|
194
194
|
|
|
195
|
-
/***/
|
|
195
|
+
/***/ 373:
|
|
196
196
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
197
197
|
|
|
198
198
|
"use strict";
|
package/lib/tip.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 378);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -192,7 +192,7 @@ function normalizeComponent(
|
|
|
192
192
|
|
|
193
193
|
/***/ }),
|
|
194
194
|
|
|
195
|
-
/***/
|
|
195
|
+
/***/ 378:
|
|
196
196
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
197
197
|
|
|
198
198
|
"use strict";
|
package/lib/tooltip.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 379);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -192,7 +192,7 @@ function normalizeComponent(
|
|
|
192
192
|
|
|
193
193
|
/***/ }),
|
|
194
194
|
|
|
195
|
-
/***/
|
|
195
|
+
/***/ 379:
|
|
196
196
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
197
197
|
|
|
198
198
|
"use strict";
|
package/lib/transfer.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 358);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -192,7 +192,7 @@ function normalizeComponent(
|
|
|
192
192
|
|
|
193
193
|
/***/ }),
|
|
194
194
|
|
|
195
|
-
/***/
|
|
195
|
+
/***/ 358:
|
|
196
196
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
197
197
|
|
|
198
198
|
"use strict";
|
package/lib/tree.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 344);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -192,7 +192,7 @@ function normalizeComponent(
|
|
|
192
192
|
|
|
193
193
|
/***/ }),
|
|
194
194
|
|
|
195
|
-
/***/
|
|
195
|
+
/***/ 344:
|
|
196
196
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
197
197
|
|
|
198
198
|
"use strict";
|
package/lib/upload.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 357);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -199,7 +199,7 @@ module.exports = require("ai.touchui-vue/lib/utils/dom");
|
|
|
199
199
|
|
|
200
200
|
/***/ }),
|
|
201
201
|
|
|
202
|
-
/***/
|
|
202
|
+
/***/ 12:
|
|
203
203
|
/***/ (function(module, exports) {
|
|
204
204
|
|
|
205
205
|
module.exports = require("ai.touchui-vue/lib/utils/types");
|
|
@@ -818,7 +818,7 @@ module.exports = require("ai.touchui-vue/lib/locale");
|
|
|
818
818
|
|
|
819
819
|
/***/ }),
|
|
820
820
|
|
|
821
|
-
/***/
|
|
821
|
+
/***/ 357:
|
|
822
822
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
823
823
|
|
|
824
824
|
"use strict";
|
|
@@ -1586,10 +1586,10 @@ var filetransfer_ = __webpack_require__(6);
|
|
|
1586
1586
|
var filetransfer_default = /*#__PURE__*/__webpack_require__.n(filetransfer_);
|
|
1587
1587
|
|
|
1588
1588
|
// EXTERNAL MODULE: external "ai.touchui-vue/lib/utils/types"
|
|
1589
|
-
var types_ = __webpack_require__(
|
|
1589
|
+
var types_ = __webpack_require__(12);
|
|
1590
1590
|
|
|
1591
1591
|
// EXTERNAL MODULE: external "ai.touchui-vue/lib/utils/md5"
|
|
1592
|
-
var md5_ = __webpack_require__(
|
|
1592
|
+
var md5_ = __webpack_require__(87);
|
|
1593
1593
|
|
|
1594
1594
|
// EXTERNAL MODULE: external "ai.touchui-vue/lib/utils/sign"
|
|
1595
1595
|
var sign_ = __webpack_require__(9);
|
|
@@ -2561,7 +2561,7 @@ module.exports = require("ai.touchui-vue/lib/utils/util");
|
|
|
2561
2561
|
|
|
2562
2562
|
/***/ }),
|
|
2563
2563
|
|
|
2564
|
-
/***/
|
|
2564
|
+
/***/ 87:
|
|
2565
2565
|
/***/ (function(module, exports) {
|
|
2566
2566
|
|
|
2567
2567
|
module.exports = require("ai.touchui-vue/lib/utils/md5");
|
package/package.json
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<to-input :id="id" ref="inputBox" class="to-date-picker" :required="required" :desc="desc" :color="color" :prefix="prefix" :suffix="suffix" :mode="mode" :prop-error-type="errorType" :prop-error-tip="errorTip" :fillet="fillet" :fillet-position="filletPosition" :value="datedisplay" :placeholder="placeholder" :readonly="disabled || !inputable" :sp-chars="spChars" :link="!inputable && !disabled" :clearable="clearable && !disabled" :width="width" :comparable="comparable" @focus="errorTip = ''; $emit('focus', datedisplay)" @click="handleClick" @clear="clear()" @input="handleDisplayChange" @blur="handleDisplayBlur">
|
|
2
|
+
<to-input :id="id" ref="inputBox" class="to-date-picker" :required="required" :desc="desc" :color="color" :prefix="prefix" :suffix="suffix" :mode="mode" :prop-error-type="errorType" :prop-error-tip="errorTip" :fillet="fillet" :fillet-position="filletPosition" :value="datedisplay" :placeholder="placeholder" :readonly="disabled || !inputable" :sp-chars="spChars" :link="!inputable && !disabled" :clearable="clearable && inputable && !disabled ? true : clearable && !inputable && !disabled ? 'always' : false" :width="width" :comparable="comparable" @focus="errorTip = ''; $emit('focus', datedisplay)" @click="handleClick" @clear="clear()" @input="handleDisplayChange" @blur="handleDisplayBlur">
|
|
3
|
+
<!-- {{ clearable && inputable && !disabled ? true : clearable && !inputable && !disabled ? 'always' : false }} -->
|
|
3
4
|
<to-icon v-if="type === 'time'" slot="suffix" :link="inputable" :class="disabled ? 'to-dis' : ''" mode="none" color="primary" value="time" @click="showLayer"></to-icon>
|
|
4
5
|
<to-icon v-else slot="suffix" :link="inputable" :class="disabled ? 'to-dis' : ''" mode="none" color="primary" value="date" @click="showLayer"></to-icon>
|
|
5
|
-
<to-float ref="layer" :lazy="lazy" :slide="layerSlide" :position="layerPosition" :paddng="0.5" :width="$platform === 'pc' ? 23 : ''" :align="optionAlign ? optionAlign : $pc ? 'right' : 'auto'" @close="handleLayerClose">
|
|
6
|
+
<to-float ref="layer" class="to-date-picker-layer" :lazy="lazy" :slide="layerSlide" :position="layerPosition" :paddng="0.5" :width="$platform === 'pc' ? shortcuts && shortcuts.length && type !== 'time' ? 29 : 23 : ''" :align="optionAlign ? optionAlign : $pc ? 'right' : 'auto'" @close="handleLayerClose">
|
|
6
7
|
<to-scroll v-if="$pc || showCalendar">
|
|
7
|
-
<
|
|
8
|
-
|
|
8
|
+
<div class="wrapper">
|
|
9
|
+
<div v-if="shortcuts && shortcuts.length && type !== 'time'" class="shortcuts">
|
|
10
|
+
<ul>
|
|
11
|
+
<li v-for="(item, index) in shortcuts" :key="index" @click="handleShortcut(item)">
|
|
12
|
+
{{ item.label }}
|
|
13
|
+
</li>
|
|
14
|
+
</ul>
|
|
15
|
+
</div>
|
|
16
|
+
<to-calendar ref="calendar" v-model="date" :time="time" :type="type" :min="min" :max="max" :before-change="beforeChange" @change="select" @close="$refs.layer.close()"></to-calendar>
|
|
17
|
+
</div>
|
|
9
18
|
</to-scroll>
|
|
10
19
|
<picker v-else v-model="date" :time="time" :type="type" :min="min" :max="max" @cancel="$refs.layer.close()" @change="select" @clear="clear()"></picker>
|
|
11
20
|
</to-float>
|
|
@@ -160,6 +169,16 @@ export default {
|
|
|
160
169
|
clearable: {
|
|
161
170
|
type: Boolean,
|
|
162
171
|
default: true
|
|
172
|
+
},
|
|
173
|
+
shortcuts: {
|
|
174
|
+
type: [Array, Boolean],
|
|
175
|
+
default() {
|
|
176
|
+
if (this.$TouchUI.datePicker && this.$TouchUI.datePicker.shortcuts) {
|
|
177
|
+
return this.$TouchUI.datePicker.shortcuts(this)
|
|
178
|
+
} else {
|
|
179
|
+
return this.$TouchUI.datePicker.shortcuts
|
|
180
|
+
}
|
|
181
|
+
}
|
|
163
182
|
}
|
|
164
183
|
},
|
|
165
184
|
data() {
|
|
@@ -186,8 +205,10 @@ export default {
|
|
|
186
205
|
this.datedisplay = ''
|
|
187
206
|
} else {
|
|
188
207
|
// 检查数据是否和 valueFormat 相匹配,避免报错
|
|
208
|
+
if (this.isDate(val)) {
|
|
209
|
+
val = this.formatDate(val, this.valueFormat, '')
|
|
210
|
+
}
|
|
189
211
|
let newValue = val.trim().substring(0, this.valueFormat.length)
|
|
190
|
-
|
|
191
212
|
if (!matchFormat(newValue, this.valueFormat)) { return }
|
|
192
213
|
if (this.type === 'time') {
|
|
193
214
|
this.date = this.getDateFromValue(newValue, 'yyyy-MM-dd HH:mm:ss')
|
|
@@ -204,8 +225,7 @@ export default {
|
|
|
204
225
|
iValue: {
|
|
205
226
|
handler(val) {
|
|
206
227
|
this.$emit('change', val)
|
|
207
|
-
}
|
|
208
|
-
immediate: true
|
|
228
|
+
}
|
|
209
229
|
},
|
|
210
230
|
displayFormat: {
|
|
211
231
|
handler(fmt) {
|
|
@@ -228,6 +248,9 @@ export default {
|
|
|
228
248
|
// this.$refs.layer.open()
|
|
229
249
|
},
|
|
230
250
|
methods: {
|
|
251
|
+
isDate(obj) {
|
|
252
|
+
return Object.prototype.toString.call(obj) === '[object Date]';
|
|
253
|
+
},
|
|
231
254
|
handleLayerClose() {
|
|
232
255
|
this.$refs.calendar.timeLayer = false
|
|
233
256
|
this.$refs.calendar.monthLayer = false
|
|
@@ -435,13 +458,19 @@ export default {
|
|
|
435
458
|
},
|
|
436
459
|
focus() {
|
|
437
460
|
this.$refs.inputBox.focus()
|
|
461
|
+
},
|
|
462
|
+
handleShortcut(item) {
|
|
463
|
+
if (item && item.value && typeof item.value === 'function') {
|
|
464
|
+
const date = item.value.call(this);
|
|
465
|
+
if (date === null) {
|
|
466
|
+
this.clear();
|
|
467
|
+
} else {
|
|
468
|
+
const formattedDate = this.formatDate(date, this.valueFormat, '');
|
|
469
|
+
this.date = this.getDateFromValue(formattedDate, this.valueFormat);
|
|
470
|
+
this.select(formattedDate);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
438
473
|
}
|
|
439
474
|
}
|
|
440
475
|
};
|
|
441
476
|
</script>
|
|
442
|
-
|
|
443
|
-
<style>
|
|
444
|
-
.to-date-picker.to-dis>.to-icon-date {
|
|
445
|
-
pointer-events: none;
|
|
446
|
-
}
|
|
447
|
-
</style>
|
|
@@ -301,7 +301,11 @@ export default {
|
|
|
301
301
|
} else if (this.type === 'time') {
|
|
302
302
|
this.$emit('change', `${this.hour}:${this.minute}:${this.second}`)
|
|
303
303
|
} else {
|
|
304
|
-
|
|
304
|
+
if (this.day) {
|
|
305
|
+
this.$emit('change', `${this.year}-${this.month}-${this.day}`)
|
|
306
|
+
} else {
|
|
307
|
+
this.$emit('change', `${this.year}-${this.month}`)
|
|
308
|
+
}
|
|
305
309
|
}
|
|
306
310
|
},
|
|
307
311
|
clear() {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
@change="inputChange"
|
|
59
59
|
/>
|
|
60
60
|
<span v-if="clearable || suggestion || $slots.default || $slots.suffix || suffix || step" class="to-inputSuffix">
|
|
61
|
-
<to-icon v-if="!readonly &&
|
|
61
|
+
<to-icon v-if="(clearable === true && !readonly) || (clearable === 'always' && readonly)" v-show="clearVisible" class="to-inputClear" color="default" :mode="iconMode" link value="close" @click.stop="clear()"></to-icon>
|
|
62
62
|
<to-icon v-if="step" v-dis="Number(data) === Number(max) || readonly" :value="stepIconMode ? 'fold' : 'add'" link color="primary" mode="none" @mousedown.native="increase"></to-icon>
|
|
63
63
|
<span v-if="suffix" class="to-inputText">{{ suffix }}</span>
|
|
64
64
|
<slot name="suffix"></slot>
|
|
@@ -205,7 +205,10 @@ export default {
|
|
|
205
205
|
},
|
|
206
206
|
|
|
207
207
|
// 基本功能-----------
|
|
208
|
-
clearable:
|
|
208
|
+
clearable: {
|
|
209
|
+
type: [Boolean, String],
|
|
210
|
+
default: true
|
|
211
|
+
},
|
|
209
212
|
preventFocus: Boolean,
|
|
210
213
|
comparable: Boolean,
|
|
211
214
|
value: {
|