|
@@ -11,6 +11,14 @@
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { inject } from 'vue'
|
|
import { inject } from 'vue'
|
|
|
|
|
|
|
|
|
|
+const props = defineProps({
|
|
|
|
|
+ link: String,
|
|
|
|
|
+ linkType: {
|
|
|
|
|
+ type: String,
|
|
|
|
|
+ default: 'navigateTo'
|
|
|
|
|
+ },
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
const emits = defineEmits(['click'])
|
|
const emits = defineEmits(['click'])
|
|
|
|
|
|
|
|
const gird = inject('fsGrid', {})
|
|
const gird = inject('fsGrid', {})
|
|
@@ -18,6 +26,11 @@ const gird = inject('fsGrid', {})
|
|
|
const { border, padding, bgColor, radius } = gird
|
|
const { border, padding, bgColor, radius } = gird
|
|
|
|
|
|
|
|
const handleClick = () => {
|
|
const handleClick = () => {
|
|
|
|
|
+ if (props.link) {
|
|
|
|
|
+ uni[props.linkType]({
|
|
|
|
|
+ url: props.link
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
emits('click')
|
|
emits('click')
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|