@supermapgis/vue-iclient-leaflet 11.2.0 → 11.3.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 (174) hide show
  1. package/dist/iclient-leaflet-vue.css +23 -9
  2. package/dist/iclient-leaflet-vue.js +21687 -44393
  3. package/dist/iclient-leaflet-vue.min.css +2 -2
  4. package/dist/iclient-leaflet-vue.min.js +39 -293
  5. package/lib/_assets/iconfont/icon-sm-components.css +21 -7
  6. package/lib/_assets/iconfont/icon-sm-components.ttf +0 -0
  7. package/lib/_assets/iconfont/icon-sm-components.woff +0 -0
  8. package/lib/_assets/iconfont/icon-sm-components.woff2 +0 -0
  9. package/lib/_lang/en.js +21 -9
  10. package/lib/_lang/index.js +22 -22
  11. package/lib/_lang/zh.js +21 -9
  12. package/lib/_mixin/AntdRender.js +15 -17
  13. package/lib/_mixin/Card.js +10 -11
  14. package/lib/_mixin/GridLayer.js +4 -4
  15. package/lib/_mixin/Layer.js +4 -4
  16. package/lib/_mixin/Options.js +2 -2
  17. package/lib/_mixin/Popper.js +2 -2
  18. package/lib/_mixin/Theme.js +13 -15
  19. package/lib/_mixin/ThirdService.js +15 -16
  20. package/lib/_mixin/TileLayer.js +4 -4
  21. package/lib/_mixin/Timer.js +8 -9
  22. package/lib/_mixin/VmUpdater.js +10 -11
  23. package/lib/_mixin/map-events.js +8 -9
  24. package/lib/_mixin/map-getter.js +13 -14
  25. package/lib/_types/AddressMatchParameter.js +2 -2
  26. package/lib/_types/GeoJSONParamter.js +2 -2
  27. package/lib/_types/RestDataParameter.js +5 -6
  28. package/lib/_types/RestMapParameter.js +5 -6
  29. package/lib/_types/RestParameter.js +2 -2
  30. package/lib/_types/event/BaseTypes.js +2 -2
  31. package/lib/_types/event/Event.js +4 -4
  32. package/lib/_types/event/Events.js +10 -10
  33. package/lib/_types/event/Pixel.js +2 -2
  34. package/lib/_types/event/Util.js +2 -2
  35. package/lib/_types/iPortalDataParameter.js +3 -2
  36. package/lib/_types/iServerBaseParameter.js +3 -2
  37. package/lib/_types/iServerDataParameter.js +5 -6
  38. package/lib/_types/iServerMapParameter.js +5 -6
  39. package/lib/_types/index.js +18 -18
  40. package/lib/_types/map-event.js +6 -6
  41. package/lib/_utils/EchartsDataService.js +24 -24
  42. package/lib/_utils/RestService.js +1345 -1149
  43. package/lib/_utils/epsg-define.js +45 -34
  44. package/lib/_utils/get-features.js +23 -10
  45. package/lib/_utils/global-event.js +6 -6
  46. package/lib/_utils/iPortalDataService.js +1368 -1147
  47. package/lib/_utils/iServerRestService.js +1527 -1278
  48. package/lib/_utils/props-binder.js +2 -2
  49. package/lib/_utils/statistics.js +8 -17
  50. package/lib/_utils/style/color/colorPalette.js +4 -4
  51. package/lib/_utils/style/color/serialColors.js +8 -8
  52. package/lib/_utils/style/theme/chart.js +1344 -1147
  53. package/lib/_utils/style/theme/set-theme.js +10 -10
  54. package/lib/_utils/style/theme/theme.json +6 -6
  55. package/lib/_utils/util.js +12 -12
  56. package/lib/_utils/vue-types/utils.js +2 -2
  57. package/lib/attribute-panel/style/attribute-panel.css +1 -0
  58. package/lib/attribute-panel/style/css.js +7 -0
  59. package/lib/attribute-panel/style/index.js +7 -0
  60. package/lib/avatar/index.js +25 -25
  61. package/lib/border/index.js +77 -77
  62. package/lib/breadcrumb/index.js +47 -41
  63. package/lib/button/index.js +53 -50
  64. package/lib/card/index.js +47 -41
  65. package/lib/chart/index.js +1441 -1242
  66. package/lib/checkbox/index.js +36 -33
  67. package/lib/collapse/index.js +39 -36
  68. package/lib/collapse-card/index.js +71 -76
  69. package/lib/color-picker/index.js +48 -49
  70. package/lib/date-picker/index.js +107 -95
  71. package/lib/dropdown/index.js +27 -27
  72. package/lib/empty/index.js +27 -27
  73. package/lib/icon/index.js +25 -25
  74. package/lib/identify/index.js +67 -68
  75. package/lib/iframe/index.js +31 -31
  76. package/lib/image/index.js +226 -42
  77. package/lib/image/style/image.css +1 -1
  78. package/lib/index.js +4 -4
  79. package/lib/indicator/index.js +70 -67
  80. package/lib/init.js +8 -8
  81. package/lib/input/index.js +150 -135
  82. package/lib/input-number/index.js +100 -97
  83. package/lib/layout/index.js +72 -60
  84. package/lib/liquid-fill/index.js +73 -73
  85. package/lib/marker/index.js +45 -46
  86. package/lib/menu/index.js +47 -41
  87. package/lib/message/index.js +3 -3
  88. package/lib/message/style/message.css +1 -1
  89. package/lib/modal/index.js +67 -67
  90. package/lib/modal/style/modal.css +1 -1
  91. package/lib/notification/index.js +6 -6
  92. package/lib/notification/style/notification.css +1 -1
  93. package/lib/pagination/index.js +34 -34
  94. package/lib/popup/index.js +47 -48
  95. package/lib/progress/index.js +440 -440
  96. package/lib/radio/index.js +48 -42
  97. package/lib/select/index.js +47 -41
  98. package/lib/slider/index.js +27 -27
  99. package/lib/slideshow/index.js +103 -160
  100. package/lib/spin/index.js +30 -30
  101. package/lib/steps/index.js +35 -32
  102. package/lib/switch/index.js +25 -25
  103. package/lib/table/index.js +50 -44
  104. package/lib/table/style/table.css +1 -1
  105. package/lib/table-popup/index.js +43 -37
  106. package/lib/table-popup/style/table-popup.css +1 -1
  107. package/lib/tabs/index.js +35 -32
  108. package/lib/text/index.js +39 -39
  109. package/lib/tile-layer/index.js +37 -38
  110. package/lib/time-line/index.js +41 -43
  111. package/lib/time-picker/index.js +27 -27
  112. package/lib/time-range/index.js +47 -49
  113. package/lib/time-slider/index.js +67 -69
  114. package/lib/time-text/index.js +31 -31
  115. package/lib/tooltip/index.js +25 -25
  116. package/lib/tooltip/style/tooltip.css +1 -0
  117. package/lib/transfer/index.js +27 -27
  118. package/lib/tree/index.js +48 -42
  119. package/lib/tree-select/index.js +37 -34
  120. package/lib/video-player/index.js +102 -151
  121. package/lib/video-player/style/video-player.css +1 -1
  122. package/lib/web-map/index.js +2339 -106
  123. package/package.json +3 -5
  124. package/src/common/_assets/iconfont/icon-sm-components.css +21 -7
  125. package/src/common/_assets/iconfont/icon-sm-components.ttf +0 -0
  126. package/src/common/_assets/iconfont/icon-sm-components.woff +0 -0
  127. package/src/common/_assets/iconfont/icon-sm-components.woff2 +0 -0
  128. package/src/common/_lang/en.js +19 -8
  129. package/src/common/_lang/zh.js +19 -7
  130. package/src/common/_mixin/Card.ts +1 -1
  131. package/src/common/_types/iPortalDataParameter.js +1 -0
  132. package/src/common/_types/iServerBaseParameter.ts +3 -0
  133. package/src/common/_utils/epsg-define.js +32 -27
  134. package/src/common/_utils/get-features.js +13 -2
  135. package/src/common/_utils/iPortalDataService.js +14 -3
  136. package/src/common/_utils/iServerRestService.js +144 -78
  137. package/src/common/_utils/statistics.js +6 -14
  138. package/src/common/_utils/style/theme/theme.json +6 -6
  139. package/src/common/attribute-panel/AttributePanel.vue +58 -0
  140. package/src/common/attribute-panel/__test__/AttributePanel.spec.js +39 -0
  141. package/src/common/attribute-panel/index.js +9 -0
  142. package/src/common/attribute-panel/style/attribute-panel.scss +35 -0
  143. package/src/common/attribute-panel/style/index.js +4 -0
  144. package/src/common/collapse-card/style/collapse-card.scss +2 -2
  145. package/src/common/iframe/Iframe.vue +1 -1
  146. package/src/common/image/Image.vue +68 -6
  147. package/src/common/image/style/image.scss +32 -0
  148. package/src/common/message/style/message.scss +1 -0
  149. package/src/common/modal/style/modal.scss +36 -0
  150. package/src/common/notification/style/notification.scss +9 -0
  151. package/src/common/slideshow/Slideshow.vue +42 -95
  152. package/src/common/slideshow/Swiper.js +1 -1
  153. package/src/common/table/style/table.scss +36 -0
  154. package/src/common/table-popup/TablePopup.vue +5 -0
  155. package/src/common/tooltip/style/tooltip.scss +3 -0
  156. package/src/common/video-player/VideoPlayer.vue +4 -41
  157. package/src/common/video-player/style/video-player.scss +1 -1
  158. package/src/leaflet/entrys.json +0 -2
  159. package/src/leaflet/package.json +3 -5
  160. package/src/leaflet/web-map/WebMap.vue +4 -4
  161. package/src/leaflet/web-map/WebMapViewModel.ts +64 -17
  162. package/static/libs/iclient-common/iclient-common-webmapv2base.js +2 -0
  163. package/static/libs/iclient-common/iclient-common.js +1 -1
  164. package/static/libs/iclient-leaflet/iclient-leaflet.min.js +5 -1738
  165. package/lib/_assets/iconfont/icon-sm-components.eot +0 -0
  166. package/lib/_assets/iconfont/icon-sm-components.svg +0 -197
  167. package/lib/_mixin/WebMapBase.js +0 -3467
  168. package/lib/_utils/WebMapService.js +0 -1607
  169. package/src/common/_assets/iconfont/icon-sm-components.eot +0 -0
  170. package/src/common/_assets/iconfont/icon-sm-components.svg +0 -197
  171. package/src/common/_utils/WebMapService.ts +0 -1292
  172. package/src/common/web-map/WebMapBase.ts +0 -1178
  173. package/src/common/web-map/config/MunicipalCenter.json +0 -1
  174. package/src/common/web-map/config/ProvinceCenter.json +0 -1
@@ -1,22 +1,36 @@
1
1
  <template>
2
2
  <div class="sm-component-image" :style="[getBackgroundStyle, getTextColorStyle]">
3
- <a
4
- :class="['sm-component-image__link', realHref ? '': 'sm-component-image__noLink']"
5
- :href="realHref"
6
- :target="target"
7
- >
8
- <div v-if="src" class="sm-component-image__content" :style="[repeatStyle,imgUrl]"></div>
3
+ <a :class="['sm-component-image__link']" :href="realHref" @click="handleLinkClick" :target="target">
4
+ <div v-if="src" @click="startPreview" class="sm-component-image__content" :style="[repeatStyle, imgUrl]">
5
+ <!-- 用img标签确保没有给定宽高时,能使用src图片的宽高 -->
6
+ <img :src="src" style="visibility: hidden; max-width: 100%; max-height: 100%" />
7
+ </div>
9
8
  <i v-else class="sm-components-icon-tupian sm-component-image__defaultImg"></i>
10
9
  </a>
10
+ <sm-modal
11
+ v-model="previewVisible"
12
+ :zIndex="1009"
13
+ centered
14
+ width="50%"
15
+ :dialogClass="fullScreenStyle.dialogClass"
16
+ :dialogStyle="fullScreenStyle.dialogStyle"
17
+ :bodyStyle="fullScreenStyle.bodyStyle"
18
+ :footer="null"
19
+ >
20
+ <img :src="src" @click="endPreview" :style="{ 'object-fit': 'contain', width: '100%', height: '100%' }" />
21
+ </sm-modal>
11
22
  </div>
12
23
  </template>
13
24
 
14
25
  <script>
15
26
  import Theme from 'vue-iclient/src/common/_mixin/Theme';
16
27
  import { parseUrl } from 'vue-iclient/src/common/_utils/util';
28
+ import SmModal from 'vue-iclient/src/common/modal/Modal.vue';
29
+ import Message from 'vue-iclient/src/common/message/index.js';
17
30
 
18
31
  export default {
19
32
  name: 'SmImage',
33
+ components: { SmModal },
20
34
  mixins: [Theme],
21
35
  props: {
22
36
  src: {
@@ -30,6 +44,10 @@ export default {
30
44
  type: String,
31
45
  default: ''
32
46
  },
47
+ previewMode: {
48
+ type: String,
49
+ default: 'none'
50
+ },
33
51
  target: {
34
52
  type: String,
35
53
  default: '_self'
@@ -37,12 +55,18 @@ export default {
37
55
  },
38
56
  data() {
39
57
  return {
58
+ previewVisible: false,
40
59
  repeatOption: {
41
60
  center: {
42
61
  backgroundRepeat: 'no-repeat',
43
62
  backgroundPosition: 'center',
44
63
  backgroundSize: 'contain'
45
64
  },
65
+ left: {
66
+ backgroundRepeat: 'no-repeat',
67
+ backgroundPosition: 'left center',
68
+ backgroundSize: 'contain'
69
+ },
46
70
  noRepeat: {
47
71
  backgroundSize: '100% 100%',
48
72
  backgroundRepeat: 'no-repeat'
@@ -63,6 +87,27 @@ export default {
63
87
  };
64
88
  },
65
89
  computed: {
90
+ fullScreenStyle() {
91
+ return this.previewMode === 'full'
92
+ ? {
93
+ dialogStyle: {
94
+ backgroundColor: 'transparent',
95
+ height: '100%'
96
+ },
97
+ dialogClass: 'sm-component-image__full',
98
+ bodyStyle: {
99
+ padding: 0,
100
+ width: '100%',
101
+ height: '100%'
102
+ }
103
+ }
104
+ : {
105
+ dialogClass: 'sm-component-image__preview',
106
+ bodyStyle: {
107
+ padding: 0
108
+ }
109
+ };
110
+ },
66
111
  repeatStyle() {
67
112
  return this.repeatOption[this.repeat];
68
113
  },
@@ -78,6 +123,23 @@ export default {
78
123
  }
79
124
  return href;
80
125
  }
126
+ },
127
+ methods: {
128
+ handleLinkClick(e) {
129
+ if (!this.href) {
130
+ e.preventDefault();
131
+ }
132
+ },
133
+ startPreview() {
134
+ if (this.previewMode === 'none') {
135
+ return;
136
+ }
137
+ Message.info(this.previewMode === 'popup' ? this.$t('info.pressEscToExit') : this.$t('info.pressEscOrClickToExit'), 3);
138
+ this.previewVisible = true;
139
+ },
140
+ endPreview() {
141
+ this.previewVisible = false;
142
+ }
81
143
  }
82
144
  };
83
145
  </script>
@@ -17,6 +17,38 @@
17
17
  cursor: pointer;
18
18
  }
19
19
  }
20
+ @include e(preview) {
21
+ .sm-component-modal-content {
22
+ .sm-component-modal-close {
23
+ margin-left: -64px;
24
+ .sm-component-modal-close-x {
25
+ font-size: 40px;
26
+ }
27
+ }
28
+
29
+ }
30
+ }
31
+ @include e(full) {
32
+ width: 100% !important;
33
+ padding: 0 !important;
34
+ .sm-component-modal-content {
35
+ background-color: transparent !important;
36
+ box-shadow: none !important;
37
+ width: 100%;
38
+ height: 100%;
39
+ .sm-component-modal-close {
40
+ display: none;
41
+ }
42
+ .sm-component-modal-close {
43
+ margin-left: -64px;
44
+ .sm-component-modal-close-x {
45
+ font-size: 40px;
46
+ }
47
+ }
48
+
49
+ }
50
+ }
51
+
20
52
  @include e(noLink){
21
53
  pointer-events: none;
22
54
  }
@@ -4,6 +4,7 @@
4
4
  @include b(message) {
5
5
  &-notice-content {
6
6
  background: $message-background;
7
+ color: $text-color-active;
7
8
  }
8
9
 
9
10
  &-error .#{$iconfont-css-prefix} {
@@ -3,12 +3,32 @@
3
3
  @import '../../_utils/style/theme/theme.scss';
4
4
 
5
5
  @include b (modal) {
6
+ $modal-prefix: &;
7
+
6
8
  @include e(content, '-') {
7
9
  background-color: $modal-content-bg;
10
+
11
+ #{$modal-prefix}-header {
12
+ padding: 14px 24px;
13
+ border-color: $border-color-secondary;
14
+ #{$modal-prefix}-title {
15
+ line-height: 24px;
16
+ }
17
+ }
18
+ #{$modal-prefix}-footer {
19
+ padding: 10px 24px;
20
+ border-color: $border-color-secondary;
21
+ }
8
22
  }
9
23
 
10
24
  @include e(close, '-') {
11
25
  color: $text-color-secondary;
26
+ &-x {
27
+ line-height: 52px;
28
+ height: 52px;
29
+ width: 64px;
30
+ }
31
+
12
32
  }
13
33
 
14
34
  @include e(confirm, '-') {
@@ -19,5 +39,21 @@
19
39
  &-confirm &-body > .#{$iconfont-css-prefix} {
20
40
  color: $warning-color;
21
41
  }
42
+ &-body &-title {
43
+ line-height: 24px;
44
+ }
45
+ &-body {
46
+ .#{$iconfont-css-prefix} {
47
+ margin-right: 12px;
48
+ font-size: 24px;
49
+
50
+ + #{$modal-prefix}-title + #{$modal-prefix}-content {
51
+ margin-left: 36px;
52
+ }
53
+ }
54
+ }
55
+ #{$modal-prefix}-body {
56
+ padding: 20px 24px;
57
+ }
22
58
  }
23
59
  }
@@ -3,7 +3,9 @@
3
3
 
4
4
  @include b(notification) {
5
5
  &-notice {
6
+ $notice-prefix: &;
6
7
  background: $message-background;
8
+ padding: 20px 24px 24px;
7
9
 
8
10
  &-message {
9
11
  color: $heading-color;
@@ -11,6 +13,7 @@
11
13
 
12
14
  @at-root {
13
15
  .#{$iconfont-css-prefix}#{&}-icon {
16
+ margin-left: 0;
14
17
  &-warning {
15
18
  color: $warning-color;
16
19
  }
@@ -26,5 +29,11 @@
26
29
  color: $text-color;
27
30
  }
28
31
  }
32
+
33
+ &-with-icon {
34
+ #{$notice-prefix}-message, #{$notice-prefix}-description {
35
+ margin-left: 36px;
36
+ }
37
+ }
29
38
  }
30
39
  }
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import type { CreateElement, VNode } from 'vue';
2
+ import type { CreateElement } from 'vue';
3
3
  import Theme from 'vue-iclient/src/common/_mixin/Theme';
4
4
  import Swiper from './Swiper';
5
5
  import BaseCard from 'vue-iclient/src/common/_mixin/Card';
@@ -11,22 +11,23 @@ import { addListener, removeListener } from 'resize-detector';
11
11
  import 'swiper/swiper-bundle.min.css';
12
12
 
13
13
  interface swiperOptionsType {
14
- initialSlide: Number;
15
- direction: String;
16
- speed: Number;
17
- loopedSlides: Number;
18
- loop: Boolean;
19
- grabCursor: Boolean;
20
- mousewheel: Boolean;
21
- keyboard: Boolean;
22
- autoplay: Boolean | Object;
23
- effect: String;
14
+ initialSlide: number;
15
+ direction: string;
16
+ speed: number;
17
+ loopedSlides: number;
18
+ loop: boolean;
19
+ grabCursor: boolean;
20
+ mousewheel: boolean;
21
+ keyboard: boolean;
22
+ autoplay: boolean | Object;
23
+ effect: string;
24
24
  navigation?: Object;
25
25
  pagination?: Object;
26
26
  scrollbar?: Object;
27
- observer: Boolean;
28
- observeParents: Boolean;
29
- observeSlideChildren: Boolean;
27
+ observer: boolean;
28
+ observeParents: boolean;
29
+ observeSlideChildren: boolean;
30
+ on: Object;
30
31
  }
31
32
 
32
33
  @Component({
@@ -39,7 +40,7 @@ interface swiperOptionsType {
39
40
  class Slideshow extends Mixins(Theme, BaseCard) {
40
41
  __resizeHandler: Function;
41
42
  swiper: any;
42
- isRefresh: boolean = true;
43
+ swiperCmptKey: number = +new Date();
43
44
  manualUpdateProps: string[] = [
44
45
  'speed',
45
46
  'loop',
@@ -52,8 +53,6 @@ class Slideshow extends Mixins(Theme, BaseCard) {
52
53
  'direction'
53
54
  ];
54
55
 
55
- activeIndexData: number = 0;
56
-
57
56
  // 当 loop 为 true && effect 为 cube, 幻灯片页数等于3会出现重叠。
58
57
  loopedSlides: number = 3;
59
58
 
@@ -89,7 +88,7 @@ class Slideshow extends Mixins(Theme, BaseCard) {
89
88
 
90
89
  get swiperOptions() {
91
90
  let options: swiperOptionsType = {
92
- initialSlide: this.defaultActiveIndex,
91
+ initialSlide: this.activeIndex ?? this.defaultActiveIndex,
93
92
  direction: this.direction,
94
93
  speed: this.speed,
95
94
  loop: this.loop,
@@ -101,7 +100,10 @@ class Slideshow extends Mixins(Theme, BaseCard) {
101
100
  effect: this.effect,
102
101
  observer: true,
103
102
  observeParents: true,
104
- observeSlideChildren: true
103
+ observeSlideChildren: true,
104
+ on: {
105
+ init: this.slideInit
106
+ }
105
107
  };
106
108
  this.navigation && (options.navigation = this.navigation);
107
109
  this.pagination && (options.pagination = this.pagination);
@@ -134,13 +136,7 @@ class Slideshow extends Mixins(Theme, BaseCard) {
134
136
  this.autoResizeHandler();
135
137
  }
136
138
 
137
- created() {
138
- this.activeIndexData = this.defaultActiveIndex || this.activeIndex;
139
- }
140
-
141
139
  mounted() {
142
- // @ts-ignore
143
- this.swiper = this.$refs.mySwiper.$swiper;
144
140
  this.watchOptions();
145
141
  this.autoResizeHandler();
146
142
  }
@@ -150,6 +146,12 @@ class Slideshow extends Mixins(Theme, BaseCard) {
150
146
  removeListener(this.$el, this.__resizeHandler);
151
147
  }
152
148
 
149
+ slideInit(swiper: any) {
150
+ this.swiper = swiper;
151
+ this.goTo(this.swiperOptions.initialSlide, 0);
152
+ this.$emit('init', swiper);
153
+ }
154
+
153
155
  slideChange() {
154
156
  let changeParameter = {
155
157
  progress: this.swiper.progress,
@@ -159,62 +161,11 @@ class Slideshow extends Mixins(Theme, BaseCard) {
159
161
  };
160
162
  this.$emit('change', changeParameter);
161
163
  this.$emit('indexChange', this.swiper.realIndex);
162
- this.activeIndexData = this.swiper.realIndex;
163
164
  }
164
165
 
165
166
  _activeIndexChangedHandler(newIndex: number) {
166
- const prevActiveIndexData = this.activeIndexData;
167
- if (prevActiveIndexData === newIndex) {
168
- return;
169
- }
170
- this.activeIndexData = newIndex;
171
- if (this.loop) {
172
- const changeType = this._getChangeType(newIndex, prevActiveIndexData);
173
- if (['next', 'loopToFirst'].includes(changeType)) {
174
- this.next();
175
- return;
176
- }
177
- if (['prev', 'loopToLast'].includes(changeType)) {
178
- this.prev();
179
- return;
180
- }
181
- }
182
- this.goTo(newIndex, this.speed);
183
- }
184
-
185
- _getChangeType(newIndex, oldIndex) {
186
- const childrenLength = this._getChildrenLength();
187
- const offset = newIndex - oldIndex;
188
- if (offset === 1) {
189
- return 'next';
190
- }
191
- if (offset === -1) {
192
- return 'prev';
193
- }
194
- if (oldIndex === childrenLength - 1 && newIndex === 0) {
195
- return 'loopToFirst';
196
- }
197
- if (oldIndex === 0 && newIndex === childrenLength - 1) {
198
- return 'loopToLast';
199
- }
200
- return 'jump';
201
- }
202
-
203
- _observerUpdate(swiper, mutationRecord) {
204
- if (mutationRecord.type === 'childList') {
205
- this.goTo(this.activeIndexData, 0);
206
- this.$emit('childrenlistchange');
207
- }
208
- }
209
-
210
- _reload() {
211
- this.isRefresh = false;
212
167
  this.$nextTick(() => {
213
- this.isRefresh = true;
214
- this.$nextTick(() => {
215
- // @ts-ignore
216
- this.swiper = this.$refs.mySwiper.$swiper;
217
- });
168
+ this.goTo(newIndex, 0);
218
169
  });
219
170
  }
220
171
 
@@ -231,7 +182,7 @@ class Slideshow extends Mixins(Theme, BaseCard) {
231
182
  this.swiper.slidePrev(speed);
232
183
  }
233
184
 
234
- goTo(index: number, speed?: number) {
185
+ goTo(index: number, speed: number) {
235
186
  if (this.swiper) {
236
187
  this.loop ? this.swiper.slideToLoop(index, speed) : this.swiper.slideTo(index, speed);
237
188
  }
@@ -255,7 +206,7 @@ class Slideshow extends Mixins(Theme, BaseCard) {
255
206
  item,
256
207
  function (newVal, oldVal) {
257
208
  if (!isequal(newVal, oldVal)) {
258
- this._reload();
209
+ this.swiperCmptKey = +new Date();
259
210
  }
260
211
  },
261
212
  { deep: true }
@@ -313,23 +264,19 @@ class Slideshow extends Mixins(Theme, BaseCard) {
313
264
  textColor: this.textColor,
314
265
  splitLine: this.splitLine
315
266
  };
316
- let SwiperCompt: VNode | null = null;
317
- if (this.isRefresh) {
318
- SwiperCompt = h(
319
- // @ts-ignore
320
- Swiper,
321
- {
322
- domProps: { realIndex: this.activeIndex },
323
- props: { options: this.swiperOptions },
324
- on: {
325
- slideChange: this.slideChange,
326
- observerUpdate: this._observerUpdate
327
- },
328
- ref: 'mySwiper'
267
+ const SwiperCompt = h(
268
+ // @ts-ignore
269
+ Swiper,
270
+ {
271
+ domProps: { realIndex: this.activeIndex },
272
+ props: { options: this.swiperOptions },
273
+ on: {
274
+ slideChange: this.slideChange
329
275
  },
330
- slots
331
- );
332
- }
276
+ key: this.swiperCmptKey
277
+ },
278
+ slots
279
+ );
333
280
  return h(
334
281
  'sm-collapse-card',
335
282
  {
@@ -26,4 +26,4 @@ SwiperClass.use([
26
26
  const { Swiper, SwiperSlide } = getAwesomeSwiper(SwiperClass);
27
27
 
28
28
  export default Swiper;
29
- export { SwiperSlide };
29
+ export { SwiperSlide, SwiperClass };
@@ -7,6 +7,7 @@
7
7
 
8
8
  &-thead > tr > th {
9
9
  background: $table-header-bg;
10
+ position: relative;
10
11
  // .#{$iconfont-css-prefix}-filter,
11
12
  // #{$table-prefix}-filter-icon {
12
13
  // color: $table-header-icon-color;
@@ -116,6 +117,41 @@
116
117
  }
117
118
  }
118
119
  }
120
+ &:not(&-bordered) {
121
+ #{$table-prefix}-thead > tr > th::after {
122
+ content: "";
123
+ position: absolute;
124
+ top: 50%;
125
+ right: 0;
126
+ width: 1px;
127
+ height: 14px;
128
+ background-color: $border-color-secondary;
129
+ transform: translateY(-50%);
130
+ }
131
+ }
132
+
133
+ &-thead > tr > th,
134
+ &-tbody > tr > td {
135
+ padding: 13px 24px;
136
+ }
137
+
138
+ &-middle {
139
+ > #{$table-prefix}-content > #{$table-prefix}-body > table {
140
+ > #{$table-prefix}-thead > tr > th,
141
+ > #{$table-prefix}-tbody > tr > td {
142
+ padding: 9px 24px;
143
+ }
144
+ }
145
+ }
146
+
147
+ &-small {
148
+ > #{$table-prefix}-content > #{$table-prefix}-body > table {
149
+ > #{$table-prefix}-thead > tr > th,
150
+ > #{$table-prefix}-tbody > tr > td {
151
+ padding: 5px 24px;
152
+ }
153
+ }
154
+ }
119
155
 
120
156
  // &-selection {
121
157
  // .#{$iconfont-css-prefix}-down {
@@ -9,6 +9,7 @@
9
9
  :columns="columns"
10
10
  :rowKey="(record, index) => index"
11
11
  :pagination="false"
12
+ :showHeader="showHeader"
12
13
  />
13
14
  </div>
14
15
  </template>
@@ -39,6 +40,10 @@ export default {
39
40
  splitLine: {
40
41
  type: Boolean,
41
42
  default: true
43
+ },
44
+ showHeader: {
45
+ type: Boolean,
46
+ default: true
42
47
  }
43
48
  },
44
49
  watch: {
@@ -2,4 +2,7 @@
2
2
  @import '../../_utils/style/theme/theme.scss';
3
3
 
4
4
  @include b (tooltip) {
5
+ &-inner {
6
+ padding: 6px 12px;
7
+ }
5
8
  }
@@ -6,7 +6,6 @@
6
6
  :options="playerOptions"
7
7
  :playsinline="true"
8
8
  :data-autoplay="autoplay"
9
- :data-isLive="isRtmp"
10
9
  :data-popupplay="`${options.popupToPlay}`"
11
10
  :events = "['fullscreenchange']"
12
11
  @play="onPlayerPlay($event)"
@@ -30,7 +29,6 @@
30
29
  :options="modalPlayerOptions"
31
30
  :playsinline="true"
32
31
  :data-autoplay="autoplay"
33
- :data-isLive="isRtmp"
34
32
  :data-popupplay="`${options.popupToPlay}`"
35
33
  @play="onModalPlayerPlay($event)"
36
34
  @loadeddata="onModalPlayerLoadeddata($event)"
@@ -49,7 +47,6 @@ import flvjs from 'flv.js';
49
47
  import 'videojs-flvjs-es6';
50
48
  import 'videojs-flash';
51
49
  import { videoPlayer } from 'vue-videojs7';
52
- import clonedeep from 'lodash.clonedeep';
53
50
  import SmModal from 'vue-iclient/src/common/modal/main';
54
51
  import Message from 'vue-iclient/src/common/message/index.js';
55
52
 
@@ -98,8 +95,6 @@ class SmVideoPlayer extends Vue {
98
95
 
99
96
  @Prop({ default: 'https://vjs.zencdn.net/swf/5.4.2/video-js.swf' }) swf: string;
100
97
 
101
- @Prop({ default: 3000 }) replayTime: number; // 黑屏重新播放rtmp
102
-
103
98
  @Prop({ default: false }) isFullscreen: Boolean;
104
99
 
105
100
  @Prop({ default: 'origin' }) ratio: String;
@@ -118,10 +113,6 @@ class SmVideoPlayer extends Vue {
118
113
  poster?:string; // 封面
119
114
  };
120
115
 
121
- get isRtmp() {
122
- return this.checkUrl(this.url) && this.url.includes('rtmp://');
123
- }
124
-
125
116
  get isFlv() {
126
117
  if (!flvjs && this.checkUrl(this.url) && this.url.includes('.flv')) {
127
118
  console.error(this.$t('warning.flvPlayer'));
@@ -158,7 +149,6 @@ class SmVideoPlayer extends Vue {
158
149
  @Watch('url')
159
150
  urlChanged() {
160
151
  this.handlePlayerOptions();
161
- this.replayRtmp();
162
152
  }
163
153
 
164
154
  @Watch('playerOptions')
@@ -197,9 +187,6 @@ class SmVideoPlayer extends Vue {
197
187
  this.smPlayer = this.$refs.videoPlayer && this.$refs.videoPlayer.player;
198
188
  // @ts-ignore
199
189
  this.modalVideoPlayer = this.$refs.modalVideoPlayer && this.$refs.modalVideoPlayer.player;
200
- setTimeout(() => {
201
- this.replayRtmp();
202
- });
203
190
  const player = this.modalVisible ? this.modalVideoPlayer : this.smPlayer;
204
191
  if (player) {
205
192
  player.muted(this.options.muted);
@@ -211,24 +198,6 @@ class SmVideoPlayer extends Vue {
211
198
  });
212
199
  }
213
200
 
214
- replayRtmp(player = this.player) {
215
- if (this.isRtmp && player && player.el_) {
216
- player.one('play', () => {
217
- // @ts-ignore
218
- this.timer = setTimeout(() => {
219
- // @ts-ignore
220
- clearTimeout(this.timer);
221
- player.reset();
222
- player.src(clonedeep(this.playerOptions.sources));
223
- }, this.replayTime);
224
- });
225
- player.one('canplay', () => {
226
- // @ts-ignore
227
- clearTimeout(this.timer);
228
- });
229
- }
230
- }
231
-
232
201
  clearSrc() {
233
202
  if (this.playerOptions.sources) {
234
203
  this.playerOptions.sources[0].src = '';
@@ -289,7 +258,7 @@ class SmVideoPlayer extends Vue {
289
258
  },
290
259
  notSupportedMessage: this.$t('warning.unavailableVideo')
291
260
  };
292
- if (!this.url.includes('rtmp') && this.url.includes('.flv')) {
261
+ if (this.url.includes('.flv')) {
293
262
  commonOptions.techOrder = ['html5', 'flvjs'];
294
263
  // @ts-ignore
295
264
  commonOptions.sources[0].type = 'video/x-flv';
@@ -298,16 +267,11 @@ class SmVideoPlayer extends Vue {
298
267
  // @ts-ignore
299
268
  commonOptions.sources[0].type = 'video/mp4';
300
269
  }
301
- if (this.url.includes('rtmp')) {
302
- // @ts-ignore
303
- commonOptions.techOrder = ['flash', 'html5'];
304
- commonOptions.sources[0].type = 'rtmp/flv';
305
- }
306
270
  if (this.url.includes('.m3u8')) {
307
271
  // @ts-ignore
308
272
  commonOptions.sources[0].type = 'application/x-mpegURL';
309
273
  }
310
- this.playerOptions = Object.assign({}, commonOptions, { autoplay: this.isRtmp || options.autoplay });
274
+ this.playerOptions = Object.assign({}, commonOptions, { autoplay: options.autoplay });
311
275
  this.modalPlayerOptions = Object.assign({}, commonOptions, { autoplay: true, preload: 'none', height: '600' });
312
276
  return commonOptions;
313
277
  }
@@ -388,8 +352,7 @@ class SmVideoPlayer extends Vue {
388
352
  url.indexOf('mp4') < 0 &&
389
353
  url.indexOf('webm') < 0 &&
390
354
  url.indexOf('m3u8') < 0 &&
391
- url.indexOf('flv') < 0 &&
392
- url.indexOf('rtmp') < 0)
355
+ url.indexOf('flv') < 0)
393
356
  ) {
394
357
  match = false;
395
358
  } else {
@@ -402,7 +365,7 @@ class SmVideoPlayer extends Vue {
402
365
  if (!str) return false;
403
366
  const isFilePath = this.isMatchFileUrl(str);
404
367
  if(isFilePath) return true;
405
- const reg = new RegExp('(https?|http|file|ftp|rtmp)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]');
368
+ const reg = new RegExp('(https?|http|file|ftp)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]');
406
369
  return reg.test(str);
407
370
  }
408
371