@saooti/octopus-sdk 29.0.10 → 29.0.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.
package/README.md CHANGED
@@ -475,6 +475,7 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
475
475
  * 29.0.8 Nouvelle version api
476
476
  * 29.0.9 vue3
477
477
  * 29.0.10 vue3
478
+ * 29.0.11 Popover (encore il est dur ce popover)
478
479
 
479
480
 
480
481
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "29.0.10",
3
+ "version": "29.0.11",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -43,7 +43,7 @@ export default defineComponent({
43
43
  const instance = ref<Popover>()
44
44
  const titleRef = ref<HTMLElement>()
45
45
  const contentRef = ref<HTMLElement>()
46
- onMounted(() => {
46
+ function initPopover(){
47
47
  instance.value = new Popover(`#${props.target}`, {
48
48
  container: 'body',
49
49
  trigger: props.triggers,
@@ -62,6 +62,9 @@ export default defineComponent({
62
62
  if (props.disable) {
63
63
  instance.value.disable()
64
64
  }
65
+ }
66
+ onMounted(()=>{
67
+ initPopover();
65
68
  })
66
69
  useEventListener(target, 'show.bs.popover', () => emit('show'))
67
70
  useEventListener(target, 'shown.bs.popover', () => emit('shown'))
@@ -72,18 +75,32 @@ export default defineComponent({
72
75
  element,
73
76
  titleRef,
74
77
  contentRef,
75
- instance
78
+ instance,
79
+ initPopover
76
80
  }
77
81
  },
78
82
  watch:{
79
83
  disable(){
80
- debugger;
81
84
  if(!this.instance){ return; }
82
85
  if (this.disable) {
83
86
  this.instance.disable();
84
87
  } else {
85
88
  this.instance.enable();
86
89
  }
90
+ },
91
+ content(){
92
+ if(!this.instance){ return; }
93
+ this.$nextTick(() => {
94
+ this.instance?.dispose();
95
+ this.initPopover();
96
+ });
97
+ },
98
+ title(){
99
+ if(!this.instance){ return; }
100
+ this.$nextTick(() => {
101
+ this.instance?.dispose();
102
+ this.initPopover();
103
+ });
87
104
  }
88
105
  }
89
106