sh-view 2.4.5 → 2.4.6
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/package.json
CHANGED
|
@@ -53,7 +53,7 @@ import { defineComponent, watch, ref } from 'vue'
|
|
|
53
53
|
export default defineComponent({
|
|
54
54
|
name: 'ShModal',
|
|
55
55
|
props: {
|
|
56
|
-
|
|
56
|
+
modelValue: {
|
|
57
57
|
type: Boolean
|
|
58
58
|
},
|
|
59
59
|
id: {
|
|
@@ -147,11 +147,11 @@ export default defineComponent({
|
|
|
147
147
|
default: '取消'
|
|
148
148
|
}
|
|
149
149
|
},
|
|
150
|
-
emits: ['show', 'hide', 'zoom', 'confirm', 'close'
|
|
150
|
+
emits: ['update:modelValue', 'show', 'hide', 'zoom', 'confirm', 'close'],
|
|
151
151
|
setup(props, context) {
|
|
152
152
|
const { emit, slots } = context
|
|
153
153
|
const modalRef = ref()
|
|
154
|
-
const modalVisible = ref(props.
|
|
154
|
+
const modalVisible = ref(props.modelValue)
|
|
155
155
|
|
|
156
156
|
// 弹窗显示回调
|
|
157
157
|
const onModalShow = () => {
|
|
@@ -172,11 +172,11 @@ export default defineComponent({
|
|
|
172
172
|
// 取消操作
|
|
173
173
|
const onModalClose = () => {
|
|
174
174
|
emit('close')
|
|
175
|
-
emit('update:
|
|
175
|
+
emit('update:modelValue', false)
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
watch(
|
|
179
|
-
() => props.
|
|
179
|
+
() => props.modelValue,
|
|
180
180
|
value => {
|
|
181
181
|
modalVisible.value = value
|
|
182
182
|
}
|