web-component-gallery 2.3.10 → 2.3.11

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.
@@ -2,6 +2,9 @@ import PropTypes from 'ant-design-vue/es/_util/vue-types'
2
2
  import { Modal } from 'ant-design-vue/es'
3
3
  import IconFont from '../icon-font'
4
4
 
5
+ const MODAL_MODES = ['small', 'middle', 'large', 'max']
6
+ const HEADLESS_MODES = ['screen', 'headless-large']
7
+
5
8
  const ModalProps = {
6
9
  size: PropTypes.string.def('small'),
7
10
  title: PropTypes.string.def('标题'),
@@ -14,7 +17,6 @@ const ModalComp = {
14
17
  props: ModalProps,
15
18
  data() {
16
19
  return {
17
- modalModes: ['small', 'middle', 'large', 'max'],
18
20
  internalMode: this.size
19
21
  }
20
22
  },
@@ -28,9 +30,13 @@ const ModalComp = {
28
30
  window.open(this.$attrs.externalLink, '_blank')
29
31
  },
30
32
  handleConvert() {
31
- const currentIndex = this.modalModes.indexOf(this.internalMode)
32
- const isLastMode = currentIndex === this.modalModes.length - 1
33
- this.internalMode = isLastMode ? this.size : this.modalModes[currentIndex + 1]
33
+ const normalizedMode = this.internalMode === 'headless-large' ? 'large' : this.internalMode
34
+ const currentIndex = MODAL_MODES.indexOf(normalizedMode)
35
+ const isLastMode = currentIndex === MODAL_MODES.length - 1
36
+ this.internalMode = isLastMode ? this.size : MODAL_MODES[currentIndex + 1]
37
+ },
38
+ hasTitleBar() {
39
+ return !HEADLESS_MODES.includes(this.size)
34
40
  }
35
41
  },
36
42
  render() {
@@ -53,7 +59,7 @@ const ModalComp = {
53
59
  ...this.$listeners
54
60
  }}
55
61
  >
56
- {this.size !== 'screen' && (
62
+ {this.hasTitleBar() && (
57
63
  <div slot="title" class="AntModal__Title">
58
64
  <span>{this.title}</span>
59
65
  <div class="AntModal__Title__Blank">
@@ -18,6 +18,16 @@
18
18
  }
19
19
  }
20
20
 
21
+ &__headless-large {
22
+ .ant-modal {
23
+ .layout(1600px, 848px);
24
+
25
+ &-body {
26
+ padding: 0;
27
+ }
28
+ }
29
+ }
30
+
21
31
  &__max {
22
32
  .ant-modal {
23
33
  top: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-component-gallery",
3
- "version": "2.3.10",
3
+ "version": "2.3.11",
4
4
  "description": "基础vue、antdvue、less实现的私有组件库",
5
5
  "main": "dist/index.umd.js",
6
6
  "files": [