vue2-components-plus 1.0.23 → 1.0.26
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.
|
@@ -72,7 +72,7 @@ const refreshInstances = () => {
|
|
|
72
72
|
|
|
73
73
|
const openDialog = (options = {}) => {
|
|
74
74
|
if (!window.NsDialog) {
|
|
75
|
-
proxy
|
|
75
|
+
proxy.$message.error('NsDialog 尚未挂载到全局')
|
|
76
76
|
return
|
|
77
77
|
}
|
|
78
78
|
const offset = openIndex.value * 24
|
|
@@ -139,7 +139,7 @@ const openReadonlyDialog = () => {
|
|
|
139
139
|
|
|
140
140
|
const updateDialogOption = () => {
|
|
141
141
|
if (!dialogInstances.value.length) {
|
|
142
|
-
proxy
|
|
142
|
+
proxy.$message.warning('请先打开一个弹窗')
|
|
143
143
|
return
|
|
144
144
|
}
|
|
145
145
|
const lastInstance = dialogInstances.value[dialogInstances.value.length - 1]
|
|
@@ -150,21 +150,21 @@ const updateDialogOption = () => {
|
|
|
150
150
|
hintText: lastReadOnly.value ? '已通过 updateOption 切换为只读。' : '已通过 updateOption 切换为编辑。',
|
|
151
151
|
width: lastReadOnly.value ? '880px' : '960px',
|
|
152
152
|
})
|
|
153
|
-
proxy
|
|
153
|
+
proxy.$message.success('已更新最后一个弹窗配置')
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
const callDialogMethod = async () => {
|
|
157
157
|
if (!dialogInstances.value.length) {
|
|
158
|
-
proxy
|
|
158
|
+
proxy.$message.warning('请先打开一个弹窗')
|
|
159
159
|
return
|
|
160
160
|
}
|
|
161
161
|
const lastInstance = dialogInstances.value[dialogInstances.value.length - 1]
|
|
162
162
|
const result = await lastInstance.callMethod('getFormData')
|
|
163
163
|
if (result === false) {
|
|
164
|
-
proxy
|
|
164
|
+
proxy.$message.warning('弹窗内表单还未通过校验')
|
|
165
165
|
return
|
|
166
166
|
}
|
|
167
|
-
proxy
|
|
167
|
+
proxy.$message.success('已调用内部组件方法并获取结果')
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
const closeDialog = (instance) => {
|
|
@@ -174,7 +174,7 @@ const closeDialog = (instance) => {
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
const closeAllDialogs = () => {
|
|
177
|
-
if (typeof proxy
|
|
177
|
+
if (typeof proxy.$closeAllNsDialog === 'function') {
|
|
178
178
|
proxy.$closeAllNsDialog()
|
|
179
179
|
} else if (typeof window.closeAllNsDialog === 'function') {
|
|
180
180
|
window.closeAllNsDialog()
|
|
@@ -189,7 +189,7 @@ const closeAllDialogs = () => {
|
|
|
189
189
|
|
|
190
190
|
const handleInnerButtonClick = (payload) => {
|
|
191
191
|
const keys = payload ? Object.keys(payload) : []
|
|
192
|
-
proxy
|
|
192
|
+
proxy.$message.info(`收到弹窗内容事件,共 ${keys.length} 个字段`)
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
onMounted(() => {
|