sh-view 2.8.1 → 2.8.2

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 (91) hide show
  1. package/.eslintrc.js +25 -20
  2. package/other.js +8 -8
  3. package/package.json +9 -6
  4. package/packages/components/index.js +91 -91
  5. package/packages/components/sh-alert/alert.ts +30 -0
  6. package/packages/components/sh-alert/index.vue +143 -168
  7. package/packages/components/sh-badge/index.vue +242 -242
  8. package/packages/components/sh-calendar/index.vue +650 -650
  9. package/packages/components/sh-card/index.vue +148 -148
  10. package/packages/components/sh-code-editor/index.vue +19 -19
  11. package/packages/components/sh-col/index.vue +92 -92
  12. package/packages/components/sh-corner/index.vue +230 -230
  13. package/packages/components/sh-count-to/index.vue +131 -131
  14. package/packages/components/sh-date/index.vue +301 -301
  15. package/packages/components/sh-drawer/index.vue +579 -579
  16. package/packages/components/sh-drawer/scrollbar.js +78 -78
  17. package/packages/components/sh-empty/index.vue +42 -42
  18. package/packages/components/sh-form/js/props.js +76 -76
  19. package/packages/components/sh-form/js/useForm.js +229 -229
  20. package/packages/components/sh-header/index.vue +261 -260
  21. package/packages/components/sh-icon/css/default/ionicons.svg +869 -869
  22. package/packages/components/sh-icon/css/font/iconfont.json +247 -247
  23. package/packages/components/sh-icon/index.vue +41 -41
  24. package/packages/components/sh-image/index.vue +133 -133
  25. package/packages/components/sh-list/index.vue +146 -146
  26. package/packages/components/sh-loading/index.vue +53 -53
  27. package/packages/components/sh-modal/index.vue +188 -188
  28. package/packages/components/sh-noticebar/index.vue +215 -215
  29. package/packages/components/sh-poptip/index.vue +597 -597
  30. package/packages/components/sh-progress/index.vue +276 -276
  31. package/packages/components/sh-pull-refresh/index.vue +289 -289
  32. package/packages/components/sh-result/index.vue +114 -114
  33. package/packages/components/sh-row/index.vue +66 -66
  34. package/packages/components/sh-split/components/trigger.vue +33 -33
  35. package/packages/components/sh-split/index.vue +342 -342
  36. package/packages/components/sh-table/components/importModal.vue +363 -363
  37. package/packages/components/sh-table/components/sh-column.vue +68 -68
  38. package/packages/components/sh-table/js/excel_to_json.js +313 -313
  39. package/packages/components/sh-table/js/props.js +305 -305
  40. package/packages/components/sh-table/js/tableMethods.js +167 -167
  41. package/packages/components/sh-table/js/useTable.js +636 -636
  42. package/packages/components/sh-table/table.vue +217 -217
  43. package/packages/components/sh-tabs/index.vue +426 -426
  44. package/packages/components/sh-tag/index.vue +168 -168
  45. package/packages/components/sh-toolbar/index.vue +182 -182
  46. package/packages/components/sh-tree/components/table-tree.vue +289 -289
  47. package/packages/components/sh-tree/mixin/treeProps.js +122 -122
  48. package/packages/components/sh-upload/index.vue +535 -535
  49. package/packages/components/sh-water-fall/index.vue +80 -80
  50. package/packages/components/sh-water-mark/index.vue +96 -96
  51. package/packages/css/index.js +4 -4
  52. package/packages/directive/index.js +19 -19
  53. package/packages/directive/module/click-out.js +14 -14
  54. package/packages/directive/module/draggable.js +42 -42
  55. package/packages/directive/module/line-clamp.js +22 -22
  56. package/packages/directive/module/prevent-click.js +18 -18
  57. package/packages/directive/module/resize.js +14 -14
  58. package/packages/directive/module/ripple.js +166 -166
  59. package/packages/index.js +39 -39
  60. package/packages/mixin/index.js +86 -86
  61. package/packages/other/sh-cron-modal/components/cron-content.vue +294 -294
  62. package/packages/other/sh-cron-modal/index.vue +81 -81
  63. package/packages/other/sh-cron-modal/mixin/cron-emits.js +1 -1
  64. package/packages/other/sh-cron-modal/mixin/cron-props.js +9 -9
  65. package/packages/other/sh-cron-modal/tabs/cron-week-box.vue +126 -126
  66. package/packages/other/sh-menu/index.vue +326 -326
  67. package/packages/other/sh-menu/menu-group-content.vue +136 -136
  68. package/packages/other/sh-menu/menu-item-content.vue +71 -71
  69. package/packages/other/sh-menu-card/index.vue +250 -250
  70. package/packages/other/sh-menu-card/menu-box.vue +87 -87
  71. package/packages/other/sh-preview/components/sh-excel.vue +163 -163
  72. package/packages/other/sh-preview/js/data-hook.js +41 -41
  73. package/packages/other/sh-preview/js/data-props.js +15 -15
  74. package/packages/other/sh-system-tip/index.vue +115 -115
  75. package/packages/utils/resize.js +69 -70
  76. package/packages/utils/transfer-queue.js +12 -12
  77. package/packages/vxeTable/index.js +193 -184
  78. package/packages/vxeTable/plugins/export.js +450 -450
  79. package/packages/vxeTable/render/cell/vxe-render-img.vue +27 -27
  80. package/packages/vxeTable/render/cell/vxe-render-table.vue +51 -51
  81. package/packages/vxeTable/render/cell/vxe-render-time.vue +44 -44
  82. package/packages/vxeTable/render/cell/vxe-render-tree.vue +70 -70
  83. package/packages/vxeTable/render/filters/vxe-filter-input.vue +26 -26
  84. package/packages/vxeTable/render/filters/vxe-filter-time.vue +26 -26
  85. package/packages/vxeTable/render/globalRenders.jsx +514 -514
  86. package/packages/vxeTable/render/mixin/cell-hooks.js +198 -198
  87. package/packages/vxeTable/render/mixin/cell-props.js +23 -23
  88. package/packages/vxeTable/render/mixin/filter-hooks.js +46 -46
  89. package/tsconfig.json +25 -0
  90. package/types/component.d.ts +1 -0
  91. package/types/index.ts +0 -0
@@ -1,131 +1,131 @@
1
- <template>
2
- <div class="sh-count-to">
3
- <slot name="left"></slot>
4
- <span ref="countRef" class="count-up" :class="countClass"></span>
5
- <slot name="right"></slot>
6
- </div>
7
- </template>
8
-
9
- <script>
10
- import { defineComponent, ref, watch, onMounted, onUnmounted, computed } from 'vue'
11
- import { CountUp } from 'countup.js'
12
- export default defineComponent({
13
- name: 'ShCountTo',
14
- props: {
15
- start: {
16
- type: Number,
17
- default: 0
18
- },
19
- end: {
20
- type: Number
21
- },
22
- duration: {
23
- type: Number,
24
- default: 2
25
- },
26
- options: {
27
- type: Object,
28
- default() {
29
- return {}
30
- }
31
- },
32
- callback: {
33
- type: Function,
34
- default() {}
35
- },
36
- countClass: {
37
- type: [String, Object]
38
- }
39
- },
40
- setup(props, context) {
41
- let countUp = null
42
- const countRef = ref()
43
-
44
- const countOptions = computed(() => {
45
- return Object.assign(
46
- {
47
- startVal: props.start, // 开始的数字 一般设置0开始
48
- decimalPlaces: 0, // number类型 小数位,整数自动添.00
49
- duration: props.duration, // number类型 动画延迟秒数,默认值是2
50
- useGrouping: true, // boolean类型 是否开启逗号,默认true(1,000)false(1000)
51
- useEasing: true, // booleanl类型 动画缓动效果(ease),默认true
52
- smartEasingThreshold: 500, // numberl类型 大于这个数值的值开启平滑缓动
53
- smartEasingAmount: 300, // numberl类型
54
- separator: ',', // string 类型 分割用的符号
55
- decimal: '.', // string 类型 小数分割符合
56
- prefix: '', // sttring 类型 数字开头添加固定字符
57
- suffix: '', // sttring类型 数字末尾添加固定字符
58
- numerals: [] // Array类型 替换从0到9对应的字,也就是自定数字字符了,数组存储
59
- },
60
- props.options
61
- )
62
- })
63
-
64
- watch(
65
- () => props.end,
66
- value => {
67
- if (countUp && countUp.update) {
68
- countUp.update(value)
69
- }
70
- }
71
- )
72
-
73
- const init = () => {
74
- if (!countUp) {
75
- countUp = new CountUp(countRef.value, props.end, countOptions.value)
76
- countUp.start(() => {
77
- props.callback(countUp)
78
- })
79
- }
80
- }
81
-
82
- const destroy = () => {
83
- countUp = null
84
- }
85
-
86
- const countStart = callback => {
87
- if (countUp && countUp.start) {
88
- countUp.start(() => {
89
- callback && callback(countUp)
90
- })
91
- }
92
- }
93
-
94
- const countPause = () => {
95
- if (countUp && countUp.pauseResume) {
96
- countUp.pauseResume()
97
- }
98
- }
99
-
100
- const countReset = () => {
101
- if (countUp && countUp.reset) {
102
- countUp.reset()
103
- }
104
- }
105
-
106
- const countUpdate = newEndVal => {
107
- if (countUp && countUp.update) {
108
- countUp.update(newEndVal)
109
- }
110
- }
111
-
112
- onMounted(() => {
113
- init()
114
- })
115
-
116
- onUnmounted(() => {
117
- destroy()
118
- })
119
-
120
- return {
121
- countRef,
122
- countStart,
123
- countPause,
124
- countReset,
125
- countUpdate
126
- }
127
- }
128
- })
129
- </script>
130
-
131
- <style scoped lang="scss"></style>
1
+ <template>
2
+ <div class="sh-count-to">
3
+ <slot name="left"></slot>
4
+ <span ref="countRef" class="count-up" :class="countClass"></span>
5
+ <slot name="right"></slot>
6
+ </div>
7
+ </template>
8
+
9
+ <script>
10
+ import { defineComponent, ref, watch, onMounted, onUnmounted, computed } from 'vue'
11
+ import { CountUp } from 'countup.js'
12
+ export default defineComponent({
13
+ name: 'ShCountTo',
14
+ props: {
15
+ start: {
16
+ type: Number,
17
+ default: 0
18
+ },
19
+ end: {
20
+ type: Number
21
+ },
22
+ duration: {
23
+ type: Number,
24
+ default: 2
25
+ },
26
+ options: {
27
+ type: Object,
28
+ default() {
29
+ return {}
30
+ }
31
+ },
32
+ callback: {
33
+ type: Function,
34
+ default() {}
35
+ },
36
+ countClass: {
37
+ type: [String, Object]
38
+ }
39
+ },
40
+ setup(props, context) {
41
+ let countUp = null
42
+ const countRef = ref()
43
+
44
+ const countOptions = computed(() => {
45
+ return Object.assign(
46
+ {
47
+ startVal: props.start, // 开始的数字 一般设置0开始
48
+ decimalPlaces: 0, // number类型 小数位,整数自动添.00
49
+ duration: props.duration, // number类型 动画延迟秒数,默认值是2
50
+ useGrouping: true, // boolean类型 是否开启逗号,默认true(1,000)false(1000)
51
+ useEasing: true, // booleanl类型 动画缓动效果(ease),默认true
52
+ smartEasingThreshold: 500, // numberl类型 大于这个数值的值开启平滑缓动
53
+ smartEasingAmount: 300, // numberl类型
54
+ separator: ',', // string 类型 分割用的符号
55
+ decimal: '.', // string 类型 小数分割符合
56
+ prefix: '', // sttring 类型 数字开头添加固定字符
57
+ suffix: '', // sttring类型 数字末尾添加固定字符
58
+ numerals: [] // Array类型 替换从0到9对应的字,也就是自定数字字符了,数组存储
59
+ },
60
+ props.options
61
+ )
62
+ })
63
+
64
+ watch(
65
+ () => props.end,
66
+ value => {
67
+ if (countUp && countUp.update) {
68
+ countUp.update(value)
69
+ }
70
+ }
71
+ )
72
+
73
+ const init = () => {
74
+ if (!countUp) {
75
+ countUp = new CountUp(countRef.value, props.end, countOptions.value)
76
+ countUp.start(() => {
77
+ props.callback(countUp)
78
+ })
79
+ }
80
+ }
81
+
82
+ const destroy = () => {
83
+ countUp = null
84
+ }
85
+
86
+ const countStart = callback => {
87
+ if (countUp && countUp.start) {
88
+ countUp.start(() => {
89
+ callback && callback(countUp)
90
+ })
91
+ }
92
+ }
93
+
94
+ const countPause = () => {
95
+ if (countUp && countUp.pauseResume) {
96
+ countUp.pauseResume()
97
+ }
98
+ }
99
+
100
+ const countReset = () => {
101
+ if (countUp && countUp.reset) {
102
+ countUp.reset()
103
+ }
104
+ }
105
+
106
+ const countUpdate = newEndVal => {
107
+ if (countUp && countUp.update) {
108
+ countUp.update(newEndVal)
109
+ }
110
+ }
111
+
112
+ onMounted(() => {
113
+ init()
114
+ })
115
+
116
+ onUnmounted(() => {
117
+ destroy()
118
+ })
119
+
120
+ return {
121
+ countRef,
122
+ countStart,
123
+ countPause,
124
+ countReset,
125
+ countUpdate
126
+ }
127
+ }
128
+ })
129
+ </script>
130
+
131
+ <style scoped lang="scss"></style>