mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-09 07:33:12 +08:00
feat: 倒计时组件支持接口轮训,修改ts定义错误的写法
This commit is contained in:
parent
82d9867aab
commit
4c5d674838
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div ref="vChartRef">
|
||||||
<n-countdown
|
<n-countdown
|
||||||
ref="countdownRef"
|
ref="countdownRef"
|
||||||
:duration="totalDuration"
|
:duration="totalDuration"
|
||||||
@ -79,6 +79,8 @@ import { CreateComponentType } from '@/packages/index.d'
|
|||||||
import { Flipper } from '@/components/Pages/Flipper'
|
import { Flipper } from '@/components/Pages/Flipper'
|
||||||
import { OptionType } from './config'
|
import { OptionType } from './config'
|
||||||
import { CountdownInst, CountdownProps } from 'naive-ui/es/countdown/src/Countdown'
|
import { CountdownInst, CountdownProps } from 'naive-ui/es/countdown/src/Countdown'
|
||||||
|
import { useChartDataFetch } from '@/hooks'
|
||||||
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
chartConfig: {
|
chartConfig: {
|
||||||
@ -174,6 +176,10 @@ watch(
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
updateTotalDuration()
|
updateTotalDuration()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore, (newData: any) => {
|
||||||
|
props.chartConfig.option.dataset = newData
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
4
src/packages/index.d.ts
vendored
4
src/packages/index.d.ts
vendored
@ -27,9 +27,9 @@ export type ConfigType = {
|
|||||||
// 标题
|
// 标题
|
||||||
title: string
|
title: string
|
||||||
// 分类
|
// 分类
|
||||||
category: ChatCategoryEnum
|
category: string
|
||||||
// 分类名称
|
// 分类名称
|
||||||
categoryName: ChatCategoryEnumName
|
categoryName: string
|
||||||
// 所属包
|
// 所属包
|
||||||
package: PackagesCategoryEnum
|
package: PackagesCategoryEnum
|
||||||
// 归类
|
// 归类
|
||||||
|
Loading…
x
Reference in New Issue
Block a user