@v-c/notification 2.0.0-rc.3 → 2.0.0-rc.4

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.
@@ -12,7 +12,7 @@ var Content = /* @__PURE__ */ defineComponent((props, { slots, expose }) => {
12
12
  const contentPrefixCls = `${listPrefixCls}-content`;
13
13
  const contentStyle = {
14
14
  ...style,
15
- height,
15
+ height: `${height}px`,
16
16
  "--top-notificiation-height": `${topNoticeHeight}px`,
17
17
  "--top-notificiation-width": `${topNoticeWidth}px`
18
18
  };
@@ -23,38 +23,16 @@ var Content = /* @__PURE__ */ defineComponent((props, { slots, expose }) => {
23
23
  }, [slots.default?.()]);
24
24
  };
25
25
  }, {
26
- props: {
27
- listPrefixCls: {
28
- type: String,
29
- required: true
30
- },
31
- height: {
32
- type: Number,
33
- required: true
34
- },
35
- topNoticeHeight: {
36
- type: Number,
37
- required: false,
38
- default: void 0
39
- },
40
- topNoticeWidth: {
41
- type: Number,
42
- required: false,
43
- default: void 0
44
- },
45
- className: {
46
- type: String,
47
- required: false,
48
- default: void 0
49
- },
50
- style: {
51
- type: Object,
52
- required: false,
53
- default: void 0
54
- }
55
- },
56
26
  name: "NotificationListContent",
57
- inheritAttrs: false
27
+ inheritAttrs: false,
28
+ props: [
29
+ "listPrefixCls",
30
+ "height",
31
+ "topNoticeHeight",
32
+ "topNoticeWidth",
33
+ "className",
34
+ "style"
35
+ ]
58
36
  });
59
37
  //#endregion
60
38
  export { Content as default };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@v-c/notification",
3
3
  "type": "module",
4
- "version": "2.0.0-rc.3",
4
+ "version": "2.0.0-rc.4",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -39,9 +39,14 @@ const Content = defineComponent<ContentProps>(
39
39
  prevHeight = height
40
40
 
41
41
  const contentPrefixCls = `${listPrefixCls}-content`
42
+ // Force height to a string so Vue's style patcher always re-applies the
43
+ // unit. Passing a plain number (e.g. 0 → 216) was getting silently
44
+ // skipped during patch — the CSS variables on the same vnode style
45
+ // were applied, but `height: 216` was not patched onto the DOM until
46
+ // a manual `inst.update()` was invoked.
42
47
  const contentStyle: ContentStyle = {
43
48
  ...style,
44
- height,
49
+ height: `${height}px`,
45
50
  '--top-notificiation-height': `${topNoticeHeight}px`,
46
51
  '--top-notificiation-width': `${topNoticeWidth}px`,
47
52
  }
@@ -60,6 +65,11 @@ const Content = defineComponent<ContentProps>(
60
65
  {
61
66
  name: 'NotificationListContent',
62
67
  inheritAttrs: false,
68
+ // Declare runtime props so Vue tracks reactive reads inside the render
69
+ // closure. Without this, `props.height` in `const { height } = props`
70
+ // does not subscribe to updates, so the rendered `height: 0px` stays
71
+ // stale even after position recomputes with measured node sizes.
72
+ props: ['listPrefixCls', 'height', 'topNoticeHeight', 'topNoticeWidth', 'className', 'style'] as any,
63
73
  },
64
74
  )
65
75