mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: text组件增加点击链接弹框
This commit is contained in:
@@ -15,7 +15,10 @@
|
||||
|
||||
background-color:${backgroundColor}`"
|
||||
>
|
||||
{{ option.dataset }}
|
||||
<n-button v-if="link" @click="click" text>
|
||||
{{ dataset }}
|
||||
</n-button>
|
||||
<span v-else>{{ dataset }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -35,6 +38,7 @@ const props = defineProps({
|
||||
|
||||
const { w, h } = toRefs(props.chartConfig.attr)
|
||||
const {
|
||||
link,
|
||||
dataset,
|
||||
fontColor,
|
||||
fontSize,
|
||||
@@ -68,6 +72,11 @@ watch(
|
||||
useChartDataFetch(props.chartConfig, useChartEditStore, (newData: string) => {
|
||||
option.dataset = newData
|
||||
})
|
||||
|
||||
//打开链接
|
||||
const click = () => {
|
||||
window.open(link.value)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user