qtsk-vue3 0.0.43 → 0.0.44
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/component.js
CHANGED
@@ -25,6 +25,7 @@ import Upload from './components/Upload/index.vue'
|
|
25
25
|
import Tooltip from './components/Tooltip/index.vue'
|
26
26
|
import Skeleton from './components/Skeleton/index.vue'
|
27
27
|
import Alert from './components/Alert/index.vue'
|
28
|
+
import PopConfirm from './components/PopConfirm/index.vue'
|
28
29
|
const components =
|
29
30
|
[
|
30
31
|
CommonButton,
|
@@ -53,6 +54,7 @@ const components =
|
|
53
54
|
Upload,
|
54
55
|
Tooltip,
|
55
56
|
Skeleton,
|
56
|
-
Alert
|
57
|
+
Alert,
|
58
|
+
PopConfirm
|
57
59
|
]
|
58
60
|
export default components
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<template>
|
2
|
+
<el-popconfirm
|
3
|
+
:title="title"
|
4
|
+
v-bind="$attrs"
|
5
|
+
@confirm="confirmEvent"
|
6
|
+
@cancel="cancelEvent"
|
7
|
+
>
|
8
|
+
<template #reference>
|
9
|
+
<slot></slot>
|
10
|
+
</template>
|
11
|
+
<template #actions>
|
12
|
+
<slot name="actions"></slot>
|
13
|
+
</template>
|
14
|
+
</el-popconfirm>
|
15
|
+
</template>
|
16
|
+
|
17
|
+
<script setup>
|
18
|
+
import { ElPopconfirm } from 'element-plus'
|
19
|
+
|
20
|
+
defineOptions({
|
21
|
+
name: 'PopConfirm'
|
22
|
+
})
|
23
|
+
const props = defineProps({
|
24
|
+
title: {
|
25
|
+
type: String,
|
26
|
+
default: '标题'
|
27
|
+
},
|
28
|
+
confirmButtonText: {
|
29
|
+
type: String,
|
30
|
+
default: '确认'
|
31
|
+
},
|
32
|
+
cancelButtonText: {
|
33
|
+
type: String,
|
34
|
+
default: '取消'
|
35
|
+
}
|
36
|
+
})
|
37
|
+
const emits = defineEmits(['confirm', 'cancel'])
|
38
|
+
const confirmEvent = () => {
|
39
|
+
console.log('confirm!')
|
40
|
+
emits('confirm')
|
41
|
+
}
|
42
|
+
const cancelEvent = () => {
|
43
|
+
console.log('cancel!')
|
44
|
+
emits('cancel')
|
45
|
+
}
|
46
|
+
</script>
|
47
|
+
|
48
|
+
<style lang="less" scoped>
|
49
|
+
:deep(.el-textarea__inner:focus), :deep(.el-input__wrapper.is-focus){
|
50
|
+
box-shadow: 0 0 0 1px var(--main-color) inset;
|
51
|
+
}
|
52
|
+
</style>
|