Skip to content

Commit d89b918

Browse files
committed
Pushing new bundle
1 parent 2bd05b6 commit d89b918

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

dist/vue-a11y-dialog.esm.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,10 @@ const _sfc_main = {
178178
type: String,
179179
required: true
180180
},
181-
appRoot: {
182-
type: String,
183-
required: true
184-
},
185181
dialogRoot: {
186182
type: String,
187-
required: true
183+
default: "body",
184+
required: false
188185
},
189186
classNames: {
190187
type: Object,
@@ -223,12 +220,12 @@ const _sfc_main = {
223220
}
224221
}
225222
},
226-
emits: ["dialogRef"],
223+
emits: ["dialog-ref"],
227224
setup(props, { emit }) {
228225
let dialog;
229226
const rootElement = ref(null);
230227
const portalTarget = computed(() => {
231-
return props.dialogRoot || props.appRoot;
228+
return props.dialogRoot || "body";
232229
});
233230
const fullTitleId = computed(() => {
234231
return props.titleId || `${props.id}-title`;
@@ -238,8 +235,8 @@ const _sfc_main = {
238235
});
239236
const instantiateDialog = async () => {
240237
await nextTick();
241-
dialog = new A11yDialog$1(rootElement.value, portalTarget.value || props.appRoot);
242-
emit("dialogRef", dialog);
238+
dialog = new A11yDialog$1(rootElement.value);
239+
emit("dialog-ref", dialog);
243240
};
244241
onMounted(() => {
245242
instantiateDialog();
@@ -251,7 +248,7 @@ const _sfc_main = {
251248
if (dialog) {
252249
dialog.destroy();
253250
}
254-
emit("dialogRef");
251+
emit("dialog-ref");
255252
});
256253
return {
257254
dialog,

dist/vue-a11y-dialog.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Demo.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
}
8080
},
8181
assignDialogRef(dialog) {
82-
console.log('ref', dialog)
8382
this.dialog = dialog
8483
},
8584
// Tests using alertdialog role and opening modal

0 commit comments

Comments
 (0)