matrix_components 2.0.303 → 2.0.305
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.
|
@@ -47052,9 +47052,6 @@ const _hoisted_5$1 = {
|
|
|
47052
47052
|
class: "dialog-footer"
|
|
47053
47053
|
};
|
|
47054
47054
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
47055
|
-
...{
|
|
47056
|
-
name: "DialogPlus"
|
|
47057
|
-
},
|
|
47058
47055
|
__name: "NsDialog",
|
|
47059
47056
|
props: {
|
|
47060
47057
|
class: {
|
|
@@ -47063,7 +47060,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
47063
47060
|
},
|
|
47064
47061
|
title: {
|
|
47065
47062
|
type: String,
|
|
47066
|
-
default: "
|
|
47063
|
+
default: ""
|
|
47067
47064
|
},
|
|
47068
47065
|
width: {
|
|
47069
47066
|
type: [Number, String],
|
|
@@ -47186,13 +47183,13 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
47186
47183
|
},
|
|
47187
47184
|
setup(__props) {
|
|
47188
47185
|
useCssVars((_ctx) => ({
|
|
47189
|
-
"
|
|
47190
|
-
"
|
|
47191
|
-
"
|
|
47192
|
-
"
|
|
47193
|
-
"
|
|
47194
|
-
"
|
|
47195
|
-
"
|
|
47186
|
+
"03d1e268": __props.modalColor,
|
|
47187
|
+
"66b60ff0": _height.value,
|
|
47188
|
+
"82142824": dialogPosition.value.left,
|
|
47189
|
+
"6941dc8e": dialogPosition.value.top,
|
|
47190
|
+
"31dbe626": tbPadding.value,
|
|
47191
|
+
"79fd3a56": lrPadding.value,
|
|
47192
|
+
"212479e5": _centerHeight.value
|
|
47196
47193
|
}));
|
|
47197
47194
|
const asyncDom = computed(() => {
|
|
47198
47195
|
var _a2;
|
|
@@ -47224,6 +47221,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
47224
47221
|
const props = __props;
|
|
47225
47222
|
const componentRef = ref$1(null);
|
|
47226
47223
|
const currentOption = reactive({ ...props.option });
|
|
47224
|
+
const currentTitle = ref$1(props.title);
|
|
47227
47225
|
const currentWidth = ref$1(props.width);
|
|
47228
47226
|
const currentHeight = ref$1(props.height);
|
|
47229
47227
|
const currentX = ref$1(props.x);
|
|
@@ -47314,11 +47312,22 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
47314
47312
|
},
|
|
47315
47313
|
{ deep: true }
|
|
47316
47314
|
);
|
|
47315
|
+
watch(
|
|
47316
|
+
() => props.title,
|
|
47317
|
+
(newVal) => {
|
|
47318
|
+
currentTitle.value = newVal;
|
|
47319
|
+
},
|
|
47320
|
+
{ immediate: true }
|
|
47321
|
+
);
|
|
47317
47322
|
onMounted(() => {
|
|
47318
47323
|
if (props.dialogInstance) {
|
|
47319
47324
|
const instance = props.dialogInstance;
|
|
47320
47325
|
instance.updateOption = (newOption) => {
|
|
47321
|
-
|
|
47326
|
+
if (newOption.title !== void 0) {
|
|
47327
|
+
currentTitle.value = newOption.title;
|
|
47328
|
+
}
|
|
47329
|
+
const { title, ...otherOptions } = newOption;
|
|
47330
|
+
Object.assign(currentOption, otherOptions);
|
|
47322
47331
|
};
|
|
47323
47332
|
instance.close = () => {
|
|
47324
47333
|
closeDialog();
|
|
@@ -47456,7 +47465,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
47456
47465
|
...props.headerEvents,
|
|
47457
47466
|
close: closeDialog
|
|
47458
47467
|
})), null, 16)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
47459
|
-
createTextVNode(toDisplayString(
|
|
47468
|
+
createTextVNode(toDisplayString(currentTitle.value), 1)
|
|
47460
47469
|
], 64))
|
|
47461
47470
|
]),
|
|
47462
47471
|
createElementVNode("div", _hoisted_4$1, [
|
|
@@ -47546,7 +47555,7 @@ const NsDialog = (data, modal = true, appendTo = "#app") => {
|
|
|
47546
47555
|
modal,
|
|
47547
47556
|
...data
|
|
47548
47557
|
};
|
|
47549
|
-
const containerId = uniqueId("dialog-");
|
|
47558
|
+
const containerId = (data == null ? void 0 : data.id) || uniqueId("dialog-");
|
|
47550
47559
|
const container = document.createElement("div");
|
|
47551
47560
|
container.setAttribute("id", containerId);
|
|
47552
47561
|
document.querySelector(appendTo).appendChild(container);
|