sh-view 2.8.0 → 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,276 +1,276 @@
1
- <template>
2
- <div class="sh-progress" :class="wrapClasses">
3
- <div class="sh-progress-outer">
4
- <div class="sh-progress-inner">
5
- <div class="sh-progress-bg" :style="bgStyle">
6
- <div v-if="textInside" class="sh-progress-inner-text">{{ percent }}%</div>
7
- </div>
8
- <div class="sh-progress-success-bg" :style="successBgStyle"></div>
9
- </div>
10
- </div>
11
- <span v-if="!hideInfo && !textInside" class="sh-progress-text">
12
- <slot>
13
- <span v-if="isStatus" class="sh-progress-text-inner">
14
- <sh-icon :type="statusIcon"></sh-icon>
15
- </span>
16
- <span v-else class="sh-progress-text-inner"> {{ percent }}% </span>
17
- </slot>
18
- </span>
19
- </div>
20
- </template>
21
- <script>
22
- import { defineComponent, computed, onBeforeMount, getCurrentInstance, ref, watch } from 'vue'
23
- export default defineComponent({
24
- name: 'ShProgress',
25
- props: {
26
- percent: {
27
- type: [Number, String],
28
- default: 0
29
- },
30
- successPercent: {
31
- type: Number,
32
- default: 0
33
- },
34
- status: {
35
- type: String,
36
- default: 'normal' // normal', 'active', 'wrong', 'success'
37
- },
38
- hideInfo: {
39
- type: Boolean,
40
- default: false
41
- },
42
- strokeWidth: {
43
- type: Number,
44
- default: 10
45
- },
46
- vertical: {
47
- type: Boolean,
48
- default: false
49
- },
50
- strokeColor: {
51
- type: [String, Array]
52
- },
53
- textInside: {
54
- type: Boolean,
55
- default: false
56
- }
57
- },
58
- emits: ['status-change'],
59
- setup(props, context) {
60
- const { emit, slots } = context
61
- const currentStatus = ref(props.status)
62
-
63
- const isStatus = computed(() => {
64
- return ['wrong', 'success'].includes(currentStatus.value)
65
- })
66
- const statusIcon = computed(() => {
67
- if (currentStatus.value === 'wrong') {
68
- return 'ios-close-circle'
69
- } else if (currentStatus.value === 'ios-checkmark-circle') {
70
- return 'ios-close-circle'
71
- }
72
- return ''
73
- })
74
- const bgStyle = computed(() => {
75
- const style = props.vertical ? { height: `${props.percent}%`, width: `${props.strokeWidth}px` } : { width: `${props.percent}%`, height: `${props.strokeWidth}px` }
76
- if (props.strokeColor) {
77
- if (typeof props.strokeColor === 'string') {
78
- style['background-color'] = props.strokeColor
79
- } else {
80
- style['background-image'] = `linear-gradient(to right, ${props.strokeColor[0]} 0%, ${props.strokeColor[1]} 100%)`
81
- }
82
- }
83
- return style
84
- })
85
- const successBgStyle = computed(() => {
86
- return props.vertical ? { height: `${props.successPercent}%`, width: `${props.strokeWidth}px` } : { width: `${props.successPercent}%`, height: `${props.strokeWidth}px` }
87
- })
88
- const wrapClasses = computed(() => {
89
- return {
90
- [`${currentStatus.value}`]: true,
91
- [`show-info`]: !props.hideInfo && !props.textInside,
92
- [`vertical`]: props.vertical
93
- }
94
- })
95
-
96
- const handleStatus = isDown => {
97
- if (isDown) {
98
- currentStatus.value = 'normal'
99
- emit('status-change', 'normal')
100
- } else {
101
- if (parseInt(props.percent, 10) === 100) {
102
- currentStatus.value = 'success'
103
- emit('status-change', 'success')
104
- }
105
- }
106
- }
107
-
108
- onBeforeMount(() => {
109
- handleStatus()
110
- })
111
- watch(
112
- () => props.percent,
113
- (val, oldVal) => {
114
- handleStatus(val < oldVal)
115
- }
116
- )
117
- watch(
118
- () => props.status,
119
- val => {
120
- currentStatus.value = val
121
- }
122
- )
123
-
124
- return {
125
- wrapClasses,
126
- bgStyle,
127
- successBgStyle,
128
- isStatus,
129
- statusIcon
130
- }
131
- }
132
- })
133
- </script>
134
-
135
- <style scoped lang="scss">
136
- .sh-progress {
137
- display: inline-block;
138
- width: 100%;
139
- position: relative;
140
- &.show-info {
141
- .sh-progress-outer {
142
- padding-right: 55px;
143
- margin-right: -55px;
144
- }
145
- }
146
- &.active {
147
- .sh-progress-bg:before {
148
- content: '';
149
- opacity: 0;
150
- position: absolute;
151
- top: 0;
152
- left: 0;
153
- right: 0;
154
- bottom: 0;
155
- background: #fff;
156
- border-radius: 10px;
157
- animation: progress-active 2s ease-in-out infinite;
158
- }
159
- }
160
- &.vertical {
161
- height: 100%;
162
- width: auto;
163
- .sh-progress-outer {
164
- height: 100%;
165
- width: auto;
166
- }
167
- .sh-progress-inner {
168
- height: 100%;
169
- width: auto;
170
- & > *,
171
- &:after {
172
- display: inline-block;
173
- vertical-align: bottom;
174
- }
175
- &:after {
176
- content: '';
177
- height: 100%;
178
- }
179
- }
180
- &.active {
181
- .sh-progress-bg:before {
182
- top: auto;
183
- animation: progress-active-vertical 2s ease-in-out infinite;
184
- }
185
- }
186
- }
187
- &.wrong {
188
- .sh-progress-bg {
189
- background-color: var(--vxe-danger-color);
190
- }
191
- .sh-progress-text {
192
- color: var(--vxe-danger-color);
193
- }
194
- }
195
- &.success {
196
- .sh-progress-bg {
197
- background-color: var(--vxe-success-color);
198
- }
199
- .sh-progress-text {
200
- color: var(--vxe-success-color);
201
- }
202
- }
203
- &-outer {
204
- display: inline-block;
205
- width: 100%;
206
- margin-right: 0;
207
- padding-right: 0;
208
- }
209
- &-inner {
210
- display: inline-block;
211
- width: 100%;
212
- background-color: #f3f3f3;
213
- border-radius: 100px;
214
- vertical-align: middle;
215
- position: relative;
216
- &-text {
217
- display: inline-block;
218
- vertical-align: top;
219
- color: #fff;
220
- font-size: 12px;
221
- margin: 0 6px;
222
- }
223
- }
224
- &-bg {
225
- text-align: right;
226
- border-radius: 100px;
227
- background-color: var(--vxe-primary-color);
228
- transition: all 1s linear;
229
- position: relative;
230
- &:after {
231
- content: '';
232
- display: inline-block;
233
- height: 100%;
234
- vertical-align: middle;
235
- }
236
- }
237
- &-success-bg {
238
- border-radius: 100px;
239
- background-color: var(--vxe-success-color);
240
- transition: all 1s linear;
241
- position: absolute;
242
- top: 0;
243
- left: 0;
244
- }
245
- &-text {
246
- display: inline-block;
247
- margin-left: 5px;
248
- text-align: left;
249
- font-size: 1em;
250
- vertical-align: middle;
251
- color: var(--vxe-font-color);
252
- }
253
- }
254
-
255
- @keyframes progress-active {
256
- 0% {
257
- opacity: 0.3;
258
- width: 0;
259
- }
260
- 100% {
261
- opacity: 0;
262
- width: 100%;
263
- }
264
- }
265
-
266
- @keyframes progress-active-vertical {
267
- 0% {
268
- opacity: 0.3;
269
- height: 0;
270
- }
271
- 100% {
272
- opacity: 0;
273
- height: 100%;
274
- }
275
- }
276
- </style>
1
+ <template>
2
+ <div class="sh-progress" :class="wrapClasses">
3
+ <div class="sh-progress-outer">
4
+ <div class="sh-progress-inner">
5
+ <div class="sh-progress-bg" :style="bgStyle">
6
+ <div v-if="textInside" class="sh-progress-inner-text">{{ percent }}%</div>
7
+ </div>
8
+ <div class="sh-progress-success-bg" :style="successBgStyle"></div>
9
+ </div>
10
+ </div>
11
+ <span v-if="!hideInfo && !textInside" class="sh-progress-text">
12
+ <slot>
13
+ <span v-if="isStatus" class="sh-progress-text-inner">
14
+ <sh-icon :type="statusIcon"></sh-icon>
15
+ </span>
16
+ <span v-else class="sh-progress-text-inner"> {{ percent }}% </span>
17
+ </slot>
18
+ </span>
19
+ </div>
20
+ </template>
21
+ <script>
22
+ import { defineComponent, computed, onBeforeMount, getCurrentInstance, ref, watch } from 'vue'
23
+ export default defineComponent({
24
+ name: 'ShProgress',
25
+ props: {
26
+ percent: {
27
+ type: [Number, String],
28
+ default: 0
29
+ },
30
+ successPercent: {
31
+ type: Number,
32
+ default: 0
33
+ },
34
+ status: {
35
+ type: String,
36
+ default: 'normal' // normal', 'active', 'wrong', 'success'
37
+ },
38
+ hideInfo: {
39
+ type: Boolean,
40
+ default: false
41
+ },
42
+ strokeWidth: {
43
+ type: Number,
44
+ default: 10
45
+ },
46
+ vertical: {
47
+ type: Boolean,
48
+ default: false
49
+ },
50
+ strokeColor: {
51
+ type: [String, Array]
52
+ },
53
+ textInside: {
54
+ type: Boolean,
55
+ default: false
56
+ }
57
+ },
58
+ emits: ['status-change'],
59
+ setup(props, context) {
60
+ const { emit, slots } = context
61
+ const currentStatus = ref(props.status)
62
+
63
+ const isStatus = computed(() => {
64
+ return ['wrong', 'success'].includes(currentStatus.value)
65
+ })
66
+ const statusIcon = computed(() => {
67
+ if (currentStatus.value === 'wrong') {
68
+ return 'ios-close-circle'
69
+ } else if (currentStatus.value === 'ios-checkmark-circle') {
70
+ return 'ios-close-circle'
71
+ }
72
+ return ''
73
+ })
74
+ const bgStyle = computed(() => {
75
+ const style = props.vertical ? { height: `${props.percent}%`, width: `${props.strokeWidth}px` } : { width: `${props.percent}%`, height: `${props.strokeWidth}px` }
76
+ if (props.strokeColor) {
77
+ if (typeof props.strokeColor === 'string') {
78
+ style['background-color'] = props.strokeColor
79
+ } else {
80
+ style['background-image'] = `linear-gradient(to right, ${props.strokeColor[0]} 0%, ${props.strokeColor[1]} 100%)`
81
+ }
82
+ }
83
+ return style
84
+ })
85
+ const successBgStyle = computed(() => {
86
+ return props.vertical ? { height: `${props.successPercent}%`, width: `${props.strokeWidth}px` } : { width: `${props.successPercent}%`, height: `${props.strokeWidth}px` }
87
+ })
88
+ const wrapClasses = computed(() => {
89
+ return {
90
+ [`${currentStatus.value}`]: true,
91
+ [`show-info`]: !props.hideInfo && !props.textInside,
92
+ [`vertical`]: props.vertical
93
+ }
94
+ })
95
+
96
+ const handleStatus = isDown => {
97
+ if (isDown) {
98
+ currentStatus.value = 'normal'
99
+ emit('status-change', 'normal')
100
+ } else {
101
+ if (parseInt(props.percent, 10) === 100) {
102
+ currentStatus.value = 'success'
103
+ emit('status-change', 'success')
104
+ }
105
+ }
106
+ }
107
+
108
+ onBeforeMount(() => {
109
+ handleStatus()
110
+ })
111
+ watch(
112
+ () => props.percent,
113
+ (val, oldVal) => {
114
+ handleStatus(val < oldVal)
115
+ }
116
+ )
117
+ watch(
118
+ () => props.status,
119
+ val => {
120
+ currentStatus.value = val
121
+ }
122
+ )
123
+
124
+ return {
125
+ wrapClasses,
126
+ bgStyle,
127
+ successBgStyle,
128
+ isStatus,
129
+ statusIcon
130
+ }
131
+ }
132
+ })
133
+ </script>
134
+
135
+ <style scoped lang="scss">
136
+ .sh-progress {
137
+ display: inline-block;
138
+ width: 100%;
139
+ position: relative;
140
+ &.show-info {
141
+ .sh-progress-outer {
142
+ padding-right: 55px;
143
+ margin-right: -55px;
144
+ }
145
+ }
146
+ &.active {
147
+ .sh-progress-bg:before {
148
+ content: '';
149
+ opacity: 0;
150
+ position: absolute;
151
+ top: 0;
152
+ left: 0;
153
+ right: 0;
154
+ bottom: 0;
155
+ background: #fff;
156
+ border-radius: 10px;
157
+ animation: progress-active 2s ease-in-out infinite;
158
+ }
159
+ }
160
+ &.vertical {
161
+ height: 100%;
162
+ width: auto;
163
+ .sh-progress-outer {
164
+ height: 100%;
165
+ width: auto;
166
+ }
167
+ .sh-progress-inner {
168
+ height: 100%;
169
+ width: auto;
170
+ & > *,
171
+ &:after {
172
+ display: inline-block;
173
+ vertical-align: bottom;
174
+ }
175
+ &:after {
176
+ content: '';
177
+ height: 100%;
178
+ }
179
+ }
180
+ &.active {
181
+ .sh-progress-bg:before {
182
+ top: auto;
183
+ animation: progress-active-vertical 2s ease-in-out infinite;
184
+ }
185
+ }
186
+ }
187
+ &.wrong {
188
+ .sh-progress-bg {
189
+ background-color: var(--vxe-danger-color);
190
+ }
191
+ .sh-progress-text {
192
+ color: var(--vxe-danger-color);
193
+ }
194
+ }
195
+ &.success {
196
+ .sh-progress-bg {
197
+ background-color: var(--vxe-success-color);
198
+ }
199
+ .sh-progress-text {
200
+ color: var(--vxe-success-color);
201
+ }
202
+ }
203
+ &-outer {
204
+ display: inline-block;
205
+ width: 100%;
206
+ margin-right: 0;
207
+ padding-right: 0;
208
+ }
209
+ &-inner {
210
+ display: inline-block;
211
+ width: 100%;
212
+ background-color: #f3f3f3;
213
+ border-radius: 100px;
214
+ vertical-align: middle;
215
+ position: relative;
216
+ &-text {
217
+ display: inline-block;
218
+ vertical-align: top;
219
+ color: #fff;
220
+ font-size: 12px;
221
+ margin: 0 6px;
222
+ }
223
+ }
224
+ &-bg {
225
+ text-align: right;
226
+ border-radius: 100px;
227
+ background-color: var(--vxe-primary-color);
228
+ transition: all 1s linear;
229
+ position: relative;
230
+ &:after {
231
+ content: '';
232
+ display: inline-block;
233
+ height: 100%;
234
+ vertical-align: middle;
235
+ }
236
+ }
237
+ &-success-bg {
238
+ border-radius: 100px;
239
+ background-color: var(--vxe-success-color);
240
+ transition: all 1s linear;
241
+ position: absolute;
242
+ top: 0;
243
+ left: 0;
244
+ }
245
+ &-text {
246
+ display: inline-block;
247
+ margin-left: 5px;
248
+ text-align: left;
249
+ font-size: 1em;
250
+ vertical-align: middle;
251
+ color: var(--vxe-font-color);
252
+ }
253
+ }
254
+
255
+ @keyframes progress-active {
256
+ 0% {
257
+ opacity: 0.3;
258
+ width: 0;
259
+ }
260
+ 100% {
261
+ opacity: 0;
262
+ width: 100%;
263
+ }
264
+ }
265
+
266
+ @keyframes progress-active-vertical {
267
+ 0% {
268
+ opacity: 0.3;
269
+ height: 0;
270
+ }
271
+ 100% {
272
+ opacity: 0;
273
+ height: 100%;
274
+ }
275
+ }
276
+ </style>