ai.touchui-vue 1.37.0 → 1.38.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.
Files changed (41) hide show
  1. package/lib/ai.touchui-vue.common.js +38 -67
  2. package/lib/date-picker.js +13 -44
  3. package/lib/form.js +8 -8
  4. package/lib/index.js +1 -1
  5. package/lib/select.js +6 -4
  6. package/lib/theme/css/theme/B-Design.css +1 -1
  7. package/lib/theme/css/theme/aiplan.css +1 -1
  8. package/lib/theme/css/theme/aiplangd.css +1 -1
  9. package/lib/theme/css/theme/chbn.css +1 -1
  10. package/lib/theme/css/theme/default.css +1 -1
  11. package/lib/theme/css/theme/dt.css +1 -1
  12. package/lib/theme/css/theme/ecloud.css +1 -1
  13. package/lib/theme/css/theme/hongkong.css +1 -1
  14. package/lib/theme/css/theme/logistics.css +1 -1
  15. package/lib/theme/css/theme/narrow.css +1 -1
  16. package/lib/theme/css/theme/sdpf.css +1 -1
  17. package/lib/theme/css/theme/upc.css +1 -1
  18. package/lib/theme/css/theme/website.css +1 -1
  19. package/lib/theme/css/theme/workbench-gz.css +1 -1
  20. package/lib/theme/css/theme/zj.css +1 -1
  21. package/package.json +1 -1
  22. package/packages/date-picker/src/date-picker.vue +13 -44
  23. package/packages/form/src/form-item.vue +1 -1
  24. package/packages/select/src/select.vue +4 -2
  25. package/packages/theme/lib/css/theme/B-Design.css +1 -1
  26. package/packages/theme/lib/css/theme/aiplan.css +1 -1
  27. package/packages/theme/lib/css/theme/aiplangd.css +1 -1
  28. package/packages/theme/lib/css/theme/chbn.css +1 -1
  29. package/packages/theme/lib/css/theme/default.css +1 -1
  30. package/packages/theme/lib/css/theme/dt.css +1 -1
  31. package/packages/theme/lib/css/theme/ecloud.css +1 -1
  32. package/packages/theme/lib/css/theme/hongkong.css +1 -1
  33. package/packages/theme/lib/css/theme/logistics.css +1 -1
  34. package/packages/theme/lib/css/theme/narrow.css +1 -1
  35. package/packages/theme/lib/css/theme/sdpf.css +1 -1
  36. package/packages/theme/lib/css/theme/upc.css +1 -1
  37. package/packages/theme/lib/css/theme/website.css +1 -1
  38. package/packages/theme/lib/css/theme/workbench-gz.css +1 -1
  39. package/packages/theme/lib/css/theme/zj.css +1 -1
  40. package/packages/theme/src/less/component/msg.less +1 -1
  41. package/src/index.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai.touchui-vue",
3
- "version": "1.37.0",
3
+ "version": "1.38.0",
4
4
  "description": "TouchUI Component Library for Vue.js.",
5
5
  "main": "lib/ai.touchui-vue.common.js",
6
6
  "files": [
@@ -1,47 +1,10 @@
1
1
  <template>
2
- <to-input
3
- :id="id"
4
- ref="inputBox"
5
- class="to-date-picker"
6
- :required="required"
7
- :desc="desc"
8
- :color="color"
9
- :prefix="prefix"
10
- :suffix="suffix"
11
- :mode="mode"
12
- :prop-error-type="errorType"
13
- :prop-error-tip="errorTip"
14
- :fillet="fillet"
15
- :fillet-position="filletPosition"
16
- :value="datedisplay"
17
- :placeholder="placeholder"
18
- :readonly="disabled || !inputable"
19
- :sp-chars="spChars"
20
- :link="!inputable && !disabled"
21
- :clearable="clearable && !disabled"
22
- :width="width"
23
- :comparable="comparable"
24
- @focus="errorTip = '';$emit('focus',datedisplay)"
25
- @click="handleClick"
26
- @clear="clear()"
27
- @input="handleDisplayChange"
28
- @blur="handleDisplayBlur"
29
- >
30
- <to-icon v-if="type === 'time'" slot="suffix" :link="inputable" :class="disabled?'to-dis':''" mode="none" color="primary" value="time" @click="showLayer"></to-icon>
31
- <to-icon v-else slot="suffix" :link="inputable" :class="disabled?'to-dis':''" mode="none" color="primary" value="date" @click="showLayer"></to-icon>
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">
3
+ <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
+ <to-icon v-else slot="suffix" :link="inputable" :class="disabled ? 'to-dis' : ''" mode="none" color="primary" value="date" @click="showLayer"></to-icon>
32
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">
33
6
  <to-scroll v-if="$pc || showCalendar">
34
- <to-calendar
35
- ref="calendar"
36
- v-model="date"
37
- :time="time"
38
- :type="type"
39
- :min="min"
40
- :max="max"
41
- :before-change="beforeChange"
42
- @change="select"
43
- @close="$refs.layer.close()"
44
- >
7
+ <to-calendar ref="calendar" v-model="date" :time="time" :type="type" :min="min" :max="max" :before-change="beforeChange" @change="select" @close="$refs.layer.close()">
45
8
  </to-calendar>
46
9
  </to-scroll>
47
10
  <picker v-else v-model="date" :time="time" :type="type" :min="min" :max="max" @cancel="$refs.layer.close()" @change="select" @clear="clear()"></picker>
@@ -56,7 +19,7 @@ import { matchFormat } from 'ai.touchui-vue/src/utils/date'
56
19
  // import moment from 'moment';
57
20
  export default {
58
21
  name: 'ToDatePicker',
59
- components: {picker},
22
+ components: { picker },
60
23
  mixins: [Tip],
61
24
  componentName: 'ToDatePicker',
62
25
  model: {
@@ -417,7 +380,13 @@ export default {
417
380
  // 匹配 20250706
418
381
  /^\d{8}$/.test(dateStr) ||
419
382
  // 匹配 2025/07/06
420
- /^\d{4}\/\d{2}\/\d{2}$/.test(dateStr)
383
+ /^\d{4}\/\d{2}\/\d{2}$/.test(dateStr) ||
384
+ // 匹配 2025-10(年-月)
385
+ /^\d{4}-\d{2}$/.test(dateStr) ||
386
+ // 匹配 2025/10(年/月)
387
+ /^\d{4}\/\d{2}$/.test(dateStr) ||
388
+ // 匹配 202510(年月连写)
389
+ /^\d{6}$/.test(dateStr)
421
390
  );
422
391
  if (!isValidDate) {
423
392
  this.$emit('errTime')
@@ -428,7 +397,7 @@ export default {
428
397
  if (!fmt) {
429
398
  if (this.type === 'datetime') {
430
399
  fmt = 'yyyy-MM-dd HH:mm:ss'
431
- } else if (this.type === 'time') {
400
+ } else if (this.type === 'time') {
432
401
  fmt = 'HH:mm:ss'
433
402
  } else {
434
403
  fmt = 'yyyy-MM-dd'
@@ -2,7 +2,7 @@
2
2
  <li :class="setClass" :style="setStyle" @click="$emit('click')">
3
3
  <div class="content">
4
4
  <div v-if="label || $slots.label" ref="label" class="label" :class="setLabelClass">
5
- <div ref="labelText" class="text">{{ label }}<slot name="label"></slot></div>
5
+ <div ref="labelText" class="text"><slot name="label">{{ label }}</slot></div>
6
6
  <div v-if="$slots.tip && ToForm.type === 'list'" class="tip"><slot name="tip"></slot></div>
7
7
  </div>
8
8
  <div class="value">
@@ -972,14 +972,16 @@ export default {
972
972
  return true
973
973
  }
974
974
  if (this.filterable) {
975
- return item[this.iLabelText].includes(this.filterValue)
975
+ // return item[this.iLabelText].includes(this.filterValue)
976
+ return item[this.iLabelText].toLowerCase().includes(this.filterValue.toLowerCase())
976
977
  } else {
977
978
  return true
978
979
  }
979
980
  },
980
981
  multipleFilter(item) {
981
982
  if (this.filterable) {
982
- return item[this.iLabelText].includes(this.multipleFilterValue)
983
+ // return item[this.iLabelText].includes(this.multipleFilterValue)
984
+ return item[this.iLabelText].toLowerCase().includes(this.multipleFilterValue.toLowerCase())
983
985
  } else {
984
986
  return true
985
987
  }