@opentiny/vue-drawer 2.28.0 → 2.30.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.
package/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import Drawer from './src/index';
1
+ import { default as Drawer } from './src/index';
2
2
  export default Drawer;
package/lib/index.js CHANGED
@@ -39,6 +39,12 @@ var drawerProps = _extends({}, $props, {
39
39
  return $constants;
40
40
  }
41
41
  },
42
+ appendToBody: {
43
+ type: Boolean,
44
+ default: function _default2() {
45
+ return false;
46
+ }
47
+ },
42
48
  visible: {
43
49
  type: Boolean,
44
50
  default: false
@@ -38,7 +38,7 @@ var __vue2_script = defineComponent({
38
38
  TinyButton: Button,
39
39
  IconClose: IconClose()
40
40
  },
41
- props: [].concat(props, ["visible", "title", "showHeader", "showFooter", "customClass", "placement", "width", "mask", "dragable", "maskClosable", "lockScroll", "flex", "beforeClose"]),
41
+ props: [].concat(props, ["visible", "appendToBody", "title", "showHeader", "showFooter", "customClass", "placement", "width", "mask", "dragable", "maskClosable", "lockScroll", "flex", "beforeClose"]),
42
42
  emits: ["update:visible", "open", "close", "confirm"],
43
43
  setup: function setup$1(props2, context) {
44
44
  return setup({
package/lib/pc.js CHANGED
@@ -54,8 +54,8 @@ var __vue2_script = defineComponent({
54
54
  }
55
55
  }
56
56
  },
57
- props: [].concat(props, ["visible", "title", "showHeader", "showFooter", "customClass", "placement", "width", "height", "mask", "dragable", "maskClosable", "lockScroll", "flex", "showClose", "zIndex", "beforeClose", "tipsProps", "customSlots", "closeOnPressEscape"]),
58
- emits: ["update:visible", "open", "close", "confirm", "drag"],
57
+ props: [].concat(props, ["visible", "appendToBody", "title", "showHeader", "showFooter", "customClass", "placement", "width", "height", "mask", "dragable", "maskClosable", "lockScroll", "flex", "showClose", "zIndex", "beforeClose", "tipsProps", "customSlots", "closeOnPressEscape"]),
58
+ emits: ["update:visible", "open", "close", "closed", "confirm", "drag"],
59
59
  setup: function setup$1(props2, context) {
60
60
  return setup({
61
61
  props: props2,
@@ -84,6 +84,9 @@ var render2 = function render3() {
84
84
  style: {
85
85
  zIndex: _vm.zIndex
86
86
  },
87
+ attrs: {
88
+ "aria-hidden": "true"
89
+ },
87
90
  on: {
88
91
  "click": function click($event) {
89
92
  return _vm.handleClose("mask");
@@ -92,6 +95,9 @@ var render2 = function render3() {
92
95
  }) : _vm._e()]), _c("transition", {
93
96
  attrs: {
94
97
  "name": "drawer-slide-" + _vm.placement
98
+ },
99
+ on: {
100
+ "after-leave": _vm.closed
95
101
  }
96
102
  }, [_c("div", {
97
103
  directives: [{
@@ -116,7 +122,9 @@ var render2 = function render3() {
116
122
  transform: _vm.state.visible ? "none" : null
117
123
  },
118
124
  attrs: {
119
- "data-tag": "tiny-drawer-main"
125
+ "data-tag": "tiny-drawer-main",
126
+ "aria-modal": "true",
127
+ "role": "dialog"
120
128
  }
121
129
  }, [_vm.dragable ? _c("div", {
122
130
  ref: "dragBar",
@@ -168,7 +176,11 @@ var render2 = function render3() {
168
176
  }
169
177
  }
170
178
  }, [_c("icon-close", {
171
- staticClass: "tiny-svg-size tiny-drawer__close"
179
+ staticClass: "tiny-svg-size tiny-drawer__close",
180
+ attrs: {
181
+ "role": "img",
182
+ "aria-label": "close"
183
+ }
172
184
  })], 1) : _vm._e()], 2) : _vm._e(), _c("div", {
173
185
  ref: "body",
174
186
  class: ["tiny-drawer__body", {
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@opentiny/vue-drawer",
3
- "version": "2.28.0",
3
+ "version": "2.30.0",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",
7
7
  "sideEffects": false,
8
8
  "type": "module",
9
9
  "dependencies": {
10
- "@opentiny/vue-button": "~2.28.0",
11
- "@opentiny/vue-tooltip": "~2.28.0",
12
- "@opentiny/vue-common": "~2.28.0",
13
- "@opentiny/vue-renderless": "~3.28.0",
14
- "@opentiny/vue-icon": "~2.28.0",
15
- "@opentiny/vue-theme": "~3.28.0"
10
+ "@opentiny/vue-button": "~2.30.0",
11
+ "@opentiny/vue-tooltip": "~2.30.0",
12
+ "@opentiny/vue-common": "~2.30.0",
13
+ "@opentiny/vue-renderless": "~3.30.0",
14
+ "@opentiny/vue-icon": "~2.30.0",
15
+ "@opentiny/vue-theme": "~3.30.0"
16
16
  },
17
17
  "license": "MIT",
18
18
  "types": "index.d.ts"
package/src/index.d.ts CHANGED
@@ -12,11 +12,15 @@ export declare const drawerProps: {
12
12
  DEFAULT_HEIGHT: string;
13
13
  };
14
14
  };
15
+ appendToBody: {
16
+ type: BooleanConstructor;
17
+ default: () => boolean;
18
+ };
15
19
  visible: {
16
20
  type: BooleanConstructor;
17
21
  default: boolean;
18
22
  };
19
- customClass: (StringConstructor | ArrayConstructor | ObjectConstructor)[];
23
+ customClass: (ArrayConstructor | ObjectConstructor | StringConstructor)[];
20
24
  placement: {
21
25
  type: StringConstructor;
22
26
  default: string;
package/src/service.d.ts CHANGED
@@ -27,5 +27,5 @@ export declare const defaultConfigs: {
27
27
  beforeClose: null;
28
28
  tipsProps: null;
29
29
  };
30
- declare const _default: (configs?: {}) => import("vue/types/vue").CombinedVueInstance<Record<never, any> & import("vue").default, object, object, object, Record<never, any>>;
30
+ declare const _default: (configs?: {}) => import('vue2/types/vue').CombinedVueInstance<Record<never, any> & import('../../../node_modules/vue2').default, object, object, object, Record<never, any>>;
31
31
  export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;
package/src/pc.vue.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;