Merge pull request #7899 from dataease/pr@dev-v2_query_com

fix(查询组件): 查询组件年范围测试
This commit is contained in:
dataeaseShu 2024-01-30 10:46:01 +08:00 committed by GitHub
commit d99c639235
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 22 additions and 15 deletions

View File

@ -24,7 +24,7 @@
"axios": "^1.3.3",
"crypto-js": "^4.1.1",
"dayjs": "^1.11.9",
"element-plus-secondary": "^0.4.16",
"element-plus-secondary": "^0.5.1",
"element-resize-detector": "^1.2.4",
"file-saver": "^2.0.5",
"html-to-image": "^1.11.11",

View File

@ -149,7 +149,6 @@ const init = () => {
'end-config'
)
console.log('startTime, endTime', startTime, endTime)
selectValue.value = [startTime, endTime]
}
@ -165,7 +164,7 @@ const formatDate = computed(() => {
<template>
<el-date-picker
disabled
v-if="rendering && config.timeGranularityMultiple !== 'yearrange'"
v-if="rendering"
v-model="selectValue"
:type="config.timeGranularityMultiple"
:prefix-icon="Calendar"
@ -174,15 +173,4 @@ const formatDate = computed(() => {
:start-placeholder="$t('datasource.start_time')"
:end-placeholder="$t('datasource.end_time')"
/>
<el-date-picker
v-else
disabled
v-model="selectValue"
type="yearrange"
:prefix-icon="Calendar"
format="YYYY"
:range-separator="$t('cron.to')"
:start-placeholder="$t('datasource.start_time')"
:end-placeholder="$t('datasource.end_time')"
/>
</template>

View File

@ -27,6 +27,13 @@ export const routes: AppRouteRecordRaw[] = [
meta: {},
component: () => import('@/views/login/index.vue')
},
{
path: '/home',
name: 'home',
hidden: true,
meta: {},
component: () => import('@/views/home/index.vue')
},
{
path: '/dvCanvas',
name: 'dvCanvas',

View File

@ -1 +1,13 @@
<template>home</template>
<script lang="ts" setup>
import { type DateModelType } from 'element-plus-secondary'
import { ref } from 'vue'
const selectValue = ref<[DateModelType, DateModelType]>([new Date(), new Date()])
</script>
<template>
<div>
<el-date-picker v-model="selectValue" type="yearrange" format="YYYY" />
</div>
</template>
<style lang="less" scoped></style>