使用场景 ​
把已经获得的数值与单位清晰地展示。
基础用法与状态 ​
下列示例只使用本入口的实际公开能力。
基础用法与状态
<template>
<AsamStatistic
v-bind="{ title: '本地示例数量', value: 12345.67, precision: 2, suffix: '条' }"
/>
</template>
<script lang="ts" setup>
defineOptions({ name: 'AsamStatisticBasicDemo' });
import { AsamStatistic } from '@asam-ui/ui';
</script>
<template>
<AsamStatistic
v-bind="{ title: '本地示例数量', value: 12345.67, precision: 2, suffix: '条' }"
/>
</template>
<script setup>
defineOptions({ name: 'AsamStatisticBasicDemo' });
import { AsamStatistic } from '@asam-ui/ui';
</script>
使用约定 ​
value、precision、decimalSeparator/groupSeparator 或 formatter 控制显示;title/prefix/suffix 的属性或插槽组织说明和单位,valueStyle 定制数值样式。组件不获取或汇总业务数据,没有控件密度 size。
完整使用场景 ​
基础用法 ​
用于突出某个或某组数字时,如统计数值、金额、排名等,数值和标题前后都可以加icon、单位等元素。可以使用 vueuse 实现数值的变化动效
基础用法
<!-- 此演示还使用 @asam-ui/icons-vue,请按官网对应指南配置这些公开依赖。 -->
<template>
<AsamRow :gutter="16">
<AsamCol :xs="24" :sm="12" :md="6" class="text-center mb-4">
<AsamStatistic title="日活跃用户" :value="268500" />
</AsamCol>
<AsamCol :xs="24" :sm="12" :md="6" class="text-center mb-4">
<AsamStatistic :value="138">
<template #title>
<div style="display: inline-flex; align-items: center">
男女比例
<AsamIcon style="margin-left: 4px" :size="12">
<Male />
</AsamIcon>
</div>
</template>
<template #suffix>/100</template>
</AsamStatistic>
</AsamCol>
<AsamCol :xs="24" :sm="12" :md="6" class="text-center mb-4">
<AsamStatistic title="交易总数" :value="outputValue" />
</AsamCol>
<AsamCol :xs="24" :sm="12" :md="6" class="text-center mb-4">
<AsamStatistic title="反馈数量" :value="562">
<template #suffix>
<AsamIcon style="vertical-align: -0.125em">
<ChatLineRound />
</AsamIcon>
</template>
</AsamStatistic>
</AsamCol>
</AsamRow>
</template>
<script lang="ts" setup>
defineOptions({ name: 'AsamStatisticCapBasicDemo' });
import { AsamRow, AsamCol, AsamStatistic, AsamIcon } from '@asam-ui/ui';
import { ref } from 'vue';
import { onMounted, onBeforeUnmount } from 'vue';
import { ChatLineRound, Male } from '@asam-ui/icons-vue';
const outputValue = ref(0);
let frame = 0;
onMounted(() => {
const start = performance.now();
const animate = (now: number) => {
const progress = Math.min((now - start) / 1500, 1);
outputValue.value = Math.round(172000 * progress);
if (progress < 1) frame = requestAnimationFrame(animate);
};
frame = requestAnimationFrame(animate);
});
onBeforeUnmount(() => cancelAnimationFrame(frame));
</script>
<style scoped>
/* Local styles keep this sample runnable without a website utility-CSS preset. */
.text-center {
text-align: center;
}
.mb-4 {
margin-bottom: 1rem;
}
</style>
<!-- 此演示还使用 @asam-ui/icons-vue,请按官网对应指南配置这些公开依赖。 -->
<template>
<AsamRow :gutter="16">
<AsamCol :xs="24" :sm="12" :md="6" class="text-center mb-4">
<AsamStatistic title="日活跃用户" :value="268500" />
</AsamCol>
<AsamCol :xs="24" :sm="12" :md="6" class="text-center mb-4">
<AsamStatistic :value="138">
<template #title>
<div style="display: inline-flex; align-items: center">
男女比例
<AsamIcon style="margin-left: 4px" :size="12">
<Male />
</AsamIcon>
</div>
</template>
<template #suffix>/100</template>
</AsamStatistic>
</AsamCol>
<AsamCol :xs="24" :sm="12" :md="6" class="text-center mb-4">
<AsamStatistic title="交易总数" :value="outputValue" />
</AsamCol>
<AsamCol :xs="24" :sm="12" :md="6" class="text-center mb-4">
<AsamStatistic title="反馈数量" :value="562">
<template #suffix>
<AsamIcon style="vertical-align: -0.125em">
<ChatLineRound />
</AsamIcon>
</template>
</AsamStatistic>
</AsamCol>
</AsamRow>
</template>
<script setup>
defineOptions({ name: 'AsamStatisticCapBasicDemo' });
import { AsamRow, AsamCol, AsamStatistic, AsamIcon } from '@asam-ui/ui';
import { ref } from 'vue';
import { onMounted, onBeforeUnmount } from 'vue';
import { ChatLineRound, Male } from '@asam-ui/icons-vue';
const outputValue = ref(0);
let frame = 0;
onMounted(() => {
const start = performance.now();
const animate = (now) => {
const progress = Math.min((now - start) / 1500, 1);
outputValue.value = Math.round(172000 * progress);
if (progress < 1) frame = requestAnimationFrame(animate);
};
frame = requestAnimationFrame(animate);
});
onBeforeUnmount(() => cancelAnimationFrame(frame));
</script>
<style scoped>
/* Local styles keep this sample runnable without a website utility-CSS preset. */
.text-center {
text-align: center;
}
.mb-4 {
margin-bottom: 1rem;
}
</style>
倒计时 ​
倒计时组件,支持添加其他组件来控制。
倒计时
<!-- 此演示还使用 @asam-ui/icons-vue、dayjs,请按官网对应指南配置这些公开依赖。 -->
<template>
<AsamRow :gutter="16">
<AsamCol :xs="24" :sm="12" :md="8" class="text-center mb-4">
<AsamCountdown title="开始拖拽" :value="value" />
</AsamCol>
<AsamCol :xs="24" :sm="12" :md="8" class="text-center mb-4">
<AsamCountdown title="会员剩余时间" format="HH:mm:ss" :value="value1" />
<AsamButton class="countdown-footer" type="default" @click="reset"> 重置 </AsamButton>
</AsamCol>
<AsamCol :xs="24" :sm="12" :md="8" class="text-center mb-4">
<AsamCountdown format="DD [天] HH:mm:ss" :value="value2">
<template #title>
<div style="display: inline-flex; align-items: center">
<AsamIcon style="margin-right: 4px" :size="12">
<Calendar />
</AsamIcon>
距离下个月还有
</div>
</template>
</AsamCountdown>
<div class="countdown-footer">{{ value2.format('YYYY-MM-DD') }}</div>
</AsamCol>
</AsamRow>
</template>
<script lang="ts" setup>
defineOptions({ name: 'AsamStatisticCapCountdownDemo' });
import { AsamRow, AsamCol, AsamCountdown, AsamButton, AsamIcon } from '@asam-ui/ui';
import { ref } from 'vue';
import dayjs from 'dayjs';
import { Calendar } from '@asam-ui/icons-vue';
const value = ref(Date.now() + 1000 * 60 * 60 * 7);
const value1 = ref(Date.now() + 1000 * 60 * 60 * 24 * 2);
const value2 = ref(dayjs().add(1, 'month').startOf('month'));
function reset() {
value1.value = Date.now() + 1000 * 60 * 60 * 24 * 2;
}
</script>
<style scoped>
.countdown-footer {
margin-top: 8px;
}
</style>
<style scoped>
/* Local styles keep this sample runnable without a website utility-CSS preset. */
.text-center {
text-align: center;
}
.mb-4 {
margin-bottom: 1rem;
}
</style>
<!-- 此演示还使用 @asam-ui/icons-vue、dayjs,请按官网对应指南配置这些公开依赖。 -->
<template>
<AsamRow :gutter="16">
<AsamCol :xs="24" :sm="12" :md="8" class="text-center mb-4">
<AsamCountdown title="开始拖拽" :value="value" />
</AsamCol>
<AsamCol :xs="24" :sm="12" :md="8" class="text-center mb-4">
<AsamCountdown title="会员剩余时间" format="HH:mm:ss" :value="value1" />
<AsamButton class="countdown-footer" type="default" @click="reset"> 重置 </AsamButton>
</AsamCol>
<AsamCol :xs="24" :sm="12" :md="8" class="text-center mb-4">
<AsamCountdown format="DD [天] HH:mm:ss" :value="value2">
<template #title>
<div style="display: inline-flex; align-items: center">
<AsamIcon style="margin-right: 4px" :size="12">
<Calendar />
</AsamIcon>
距离下个月还有
</div>
</template>
</AsamCountdown>
<div class="countdown-footer">{{ value2.format('YYYY-MM-DD') }}</div>
</AsamCol>
</AsamRow>
</template>
<script setup>
defineOptions({ name: 'AsamStatisticCapCountdownDemo' });
import { AsamRow, AsamCol, AsamCountdown, AsamButton, AsamIcon } from '@asam-ui/ui';
import { ref } from 'vue';
import dayjs from 'dayjs';
import { Calendar } from '@asam-ui/icons-vue';
const value = ref(Date.now() + 1000 * 60 * 60 * 7);
const value1 = ref(Date.now() + 1000 * 60 * 60 * 24 * 2);
const value2 = ref(dayjs().add(1, 'month').startOf('month'));
function reset() {
value1.value = Date.now() + 1000 * 60 * 60 * 24 * 2;
}
</script>
<style scoped>
.countdown-footer {
margin-top: 8px;
}
</style>
<style scoped>
/* Local styles keep this sample runnable without a website utility-CSS preset. */
.text-center {
text-align: center;
}
.mb-4 {
margin-bottom: 1rem;
}
</style>
统计卡片 ​
卡片式用法展示,可以自由组合
统计卡片
<!-- 此演示还使用 @asam-ui/icons-vue,请按官网对应指南配置这些公开依赖。 -->
<template>
<AsamRow :gutter="16">
<AsamCol :xs="24" :sm="12" :md="8" class="mb-4">
<div class="statistic-card">
<AsamStatistic :value="98500">
<template #title>
<div style="display: inline-flex; align-items: center">
日活跃用户
<AsamTooltip
effect="dark"
content="一天内登录产品的用户数量"
placement="top"
>
<AsamIcon style="margin-left: 4px" :size="12">
<Warning />
</AsamIcon>
</AsamTooltip>
</div>
</template>
</AsamStatistic>
<div class="statistic-footer">
<div class="footer-item">
<span>相较昨日</span>
<span class="green">
24%
<AsamIcon>
<CaretTop />
</AsamIcon>
</span>
</div>
</div>
</div>
</AsamCol>
<AsamCol :xs="24" :sm="12" :md="8" class="mb-4">
<div class="statistic-card">
<AsamStatistic :value="693700">
<template #title>
<div style="display: inline-flex; align-items: center">
月活跃用户
<AsamTooltip
effect="dark"
content="一个月内登录产品的用户数量"
placement="top"
>
<AsamIcon style="margin-left: 4px" :size="12">
<Warning />
</AsamIcon>
</AsamTooltip>
</div>
</template>
</AsamStatistic>
<div class="statistic-footer">
<div class="footer-item">
<span>环比</span>
<span class="red">
12%
<AsamIcon>
<CaretBottom />
</AsamIcon>
</span>
</div>
</div>
</div>
</AsamCol>
<AsamCol :xs="24" :sm="12" :md="8" class="mb-4">
<div class="statistic-card">
<AsamStatistic :value="72000" title="今日新增交易">
<template #title>
<div style="display: inline-flex; align-items: center">今日新增交易</div>
</template>
</AsamStatistic>
<div class="statistic-footer">
<div class="footer-item">
<span>相较昨日</span>
<span class="green">
16%
<AsamIcon>
<CaretTop />
</AsamIcon>
</span>
</div>
<div class="footer-item">
<AsamIcon :size="14">
<ArrowRight />
</AsamIcon>
</div>
</div>
</div>
</AsamCol>
</AsamRow>
</template>
<script lang="ts" setup>
defineOptions({ name: 'AsamStatisticCapCardDemo' });
import { AsamRow, AsamCol, AsamStatistic, AsamTooltip, AsamIcon } from '@asam-ui/ui';
import { ArrowRight, CaretBottom, CaretTop, Warning } from '@asam-ui/icons-vue';
</script>
<style scoped>
/* stylelint-disable selector-pseudo-class-no-unknown -- Vue SFC compiler implements :deep and :global selectors. */
:global(h2#card-usage ~ .example .example-showcase) {
background-color: var(--el-fill-color) !important;
}
.el-statistic {
--el-statistic-content-font-size: 28px;
}
.statistic-card {
height: 100%;
padding: 20px;
border-radius: 4px;
background-color: var(--el-bg-color-overlay);
}
.statistic-footer {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
font-size: 12px;
color: var(--el-text-color-regular);
margin-top: 16px;
}
.statistic-footer .footer-item {
display: flex;
justify-content: space-between;
align-items: center;
}
.statistic-footer .footer-item span:last-child {
display: inline-flex;
align-items: center;
margin-left: 4px;
}
.green {
color: var(--el-color-success);
}
.red {
color: var(--el-color-error);
}
/* stylelint-enable selector-pseudo-class-no-unknown */
</style>
<style scoped>
/* Local styles keep this sample runnable without a website utility-CSS preset. */
.mb-4 {
margin-bottom: 1rem;
}
</style>
<!-- 兼容已发布 0.1.0-alpha.1 的深色浮层样式;仅修正 ASAM 颜色变量。 -->
<style>
:root .asam-tooltip.el-popper.is-dark, :root .asam-popper-content.el-popper.is-dark { --el-text-color-primary: var(--asam-color-text-primary); color: var(--asam-color-surface); }
</style>
<!-- 此演示还使用 @asam-ui/icons-vue,请按官网对应指南配置这些公开依赖。 -->
<template>
<AsamRow :gutter="16">
<AsamCol :xs="24" :sm="12" :md="8" class="mb-4">
<div class="statistic-card">
<AsamStatistic :value="98500">
<template #title>
<div style="display: inline-flex; align-items: center">
日活跃用户
<AsamTooltip
effect="dark"
content="一天内登录产品的用户数量"
placement="top"
>
<AsamIcon style="margin-left: 4px" :size="12">
<Warning />
</AsamIcon>
</AsamTooltip>
</div>
</template>
</AsamStatistic>
<div class="statistic-footer">
<div class="footer-item">
<span>相较昨日</span>
<span class="green">
24%
<AsamIcon>
<CaretTop />
</AsamIcon>
</span>
</div>
</div>
</div>
</AsamCol>
<AsamCol :xs="24" :sm="12" :md="8" class="mb-4">
<div class="statistic-card">
<AsamStatistic :value="693700">
<template #title>
<div style="display: inline-flex; align-items: center">
月活跃用户
<AsamTooltip
effect="dark"
content="一个月内登录产品的用户数量"
placement="top"
>
<AsamIcon style="margin-left: 4px" :size="12">
<Warning />
</AsamIcon>
</AsamTooltip>
</div>
</template>
</AsamStatistic>
<div class="statistic-footer">
<div class="footer-item">
<span>环比</span>
<span class="red">
12%
<AsamIcon>
<CaretBottom />
</AsamIcon>
</span>
</div>
</div>
</div>
</AsamCol>
<AsamCol :xs="24" :sm="12" :md="8" class="mb-4">
<div class="statistic-card">
<AsamStatistic :value="72000" title="今日新增交易">
<template #title>
<div style="display: inline-flex; align-items: center">今日新增交易</div>
</template>
</AsamStatistic>
<div class="statistic-footer">
<div class="footer-item">
<span>相较昨日</span>
<span class="green">
16%
<AsamIcon>
<CaretTop />
</AsamIcon>
</span>
</div>
<div class="footer-item">
<AsamIcon :size="14">
<ArrowRight />
</AsamIcon>
</div>
</div>
</div>
</AsamCol>
</AsamRow>
</template>
<script setup>
defineOptions({ name: 'AsamStatisticCapCardDemo' });
import { AsamRow, AsamCol, AsamStatistic, AsamTooltip, AsamIcon } from '@asam-ui/ui';
import { ArrowRight, CaretBottom, CaretTop, Warning } from '@asam-ui/icons-vue';
</script>
<style scoped>
/* stylelint-disable selector-pseudo-class-no-unknown -- Vue SFC compiler implements :deep and :global selectors. */
:global(h2#card-usage ~ .example .example-showcase) {
background-color: var(--el-fill-color) !important;
}
.el-statistic {
--el-statistic-content-font-size: 28px;
}
.statistic-card {
height: 100%;
padding: 20px;
border-radius: 4px;
background-color: var(--el-bg-color-overlay);
}
.statistic-footer {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
font-size: 12px;
color: var(--el-text-color-regular);
margin-top: 16px;
}
.statistic-footer .footer-item {
display: flex;
justify-content: space-between;
align-items: center;
}
.statistic-footer .footer-item span:last-child {
display: inline-flex;
align-items: center;
margin-left: 4px;
}
.green {
color: var(--el-color-success);
}
.red {
color: var(--el-color-error);
}
/* stylelint-enable selector-pseudo-class-no-unknown */
</style>
<style scoped>
/* Local styles keep this sample runnable without a website utility-CSS preset. */
.mb-4 {
margin-bottom: 1rem;
}
</style>
<!-- 兼容已发布 0.1.0-alpha.1 的深色浮层样式;仅修正 ASAM 颜色变量。 -->
<style>
:root .asam-tooltip.el-popper.is-dark, :root .asam-popper-content.el-popper.is-dark { --el-text-color-primary: var(--asam-color-text-primary); color: var(--asam-color-surface); }
</style>
API
属性 AsamStatisticProps
| 属性名 | 说明 | 类型 | 默认值 |
|---|---|---|---|
decimalSeparator | 设置小数点符号 | string | undefined | "." |
groupSeparator | 设置千分位标识符 | string | undefined | "," |
precision | 数字精度 | number | undefined | 0 |
formatter | 自定义数字格式化 | ((...args: any[]) => string | number) | undefined | — |
value | 目标时间 | (AsamStatisticProps)["value"] | 0 |
prefix | 倒计时值前缀 | string | undefined | — |
suffix | 倒计时后缀 | string | undefined | — |
title | 倒计时标题 | string | undefined | — |
valueStyle | 倒计时值的样式 | (AsamStatisticProps)["valueStyle"] | undefined |
key | — | PropertyKey | undefined | — |
ref | — | VNodeRef | undefined | — |
ref_for | — | boolean | undefined | — |
ref_key | — | string | undefined | — |
onVnodeBeforeMount | — | (AsamStatisticProps)["onVnodeBeforeMount"] | — |
onVnodeMounted | — | (AsamStatisticProps)["onVnodeMounted"] | — |
onVnodeBeforeUpdate | — | (AsamStatisticProps)["onVnodeBeforeUpdate"] | — |
onVnodeUpdated | — | (AsamStatisticProps)["onVnodeUpdated"] | — |
onVnodeBeforeUnmount | — | (AsamStatisticProps)["onVnodeBeforeUnmount"] | — |
onVnodeUnmounted | — | (AsamStatisticProps)["onVnodeUnmounted"] | — |
class | — | unknown | — |
style | — | unknown | — |
实例方法与状态 AsamStatisticExpose
| 属性名 | 说明 | 类型 | 默认值 |
|---|---|---|---|
$ | — | AsamStatisticExpose["$"] | — |
$data | — | AsamTableColumnExpose | — |
$props | — | AsamStatisticProps | — |
$attrs | — | AsamStatisticExpose["$attrs"] | — |
$refs | — | AsamStatisticExpose["$refs"] | — |
$slots | — | AsamStatisticSlots | — |
$root | — | 查看完整类型ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null | — |
$parent | — | 查看完整类型ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null | — |
$host | — | Element | null | — |
$emit | — | (event: string, ...args: any[]) => void | — |
$el | — | any | — |
$options | — | (AsamStatisticExpose)["$options"] | — |
$forceUpdate | — | () => void | — |
$nextTick | — | (AsamStatisticExpose)["$nextTick"] | — |
$watch | — | (AsamStatisticExpose)["$watch"] | — |
value | — | (AsamStatisticExpose)["value"] | — |
precision | — | number | — |
decimalSeparator | — | string | — |
groupSeparator | — | string | — |
valueStyle | — | (AsamStatisticExpose)["valueStyle"] | — |
title | 倒计时标题 | string | undefined | — |
formatter | 自定义数字格式化 | ((...args: any[]) => string | number) | undefined | — |
prefix | 倒计时值前缀 | string | undefined | — |
suffix | 倒计时后缀 | string | undefined | — |
displayValue | 当前显示值 | (AsamStatisticExpose)["displayValue"] | — |
$route | 当前规范化路由位置,详见 RouteLocationNormalizedLoaded。 | AsamStatisticExpose["$route"] | — |
$router | 应用使用的 Router 实例。 | AsamStatisticExpose["$router"] | — |
类型 AsamStatisticInstance
| 属性名 | 说明 | 类型 | 默认值 |
|---|---|---|---|
$ | — | AsamStatisticExpose["$"] | — |
$data | — | AsamTableColumnExpose | — |
$props | — | AsamStatisticProps | — |
$attrs | — | AsamStatisticExpose["$attrs"] | — |
$refs | — | AsamStatisticExpose["$refs"] | — |
$slots | — | AsamStatisticSlots | — |
$root | — | 查看完整类型ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null | — |
$parent | — | 查看完整类型ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null | — |
$host | — | Element | null | — |
$emit | — | (event: string, ...args: any[]) => void | — |
$el | — | any | — |
$options | — | (AsamStatisticInstance)["$options"] | — |
$forceUpdate | — | () => void | — |
$nextTick | — | (AsamStatisticInstance)["$nextTick"] | — |
$watch | — | (AsamStatisticInstance)["$watch"] | — |
value | — | (AsamStatisticInstance)["value"] | — |
precision | — | number | — |
decimalSeparator | — | string | — |
groupSeparator | — | string | — |
valueStyle | — | (AsamStatisticInstance)["valueStyle"] | — |
title | 倒计时标题 | string | undefined | — |
formatter | 自定义数字格式化 | ((...args: any[]) => string | number) | undefined | — |
prefix | 倒计时值前缀 | string | undefined | — |
suffix | 倒计时后缀 | string | undefined | — |
displayValue | 当前显示值 | (AsamStatisticInstance)["displayValue"] | — |
$route | 当前规范化路由位置,详见 RouteLocationNormalizedLoaded。 | AsamStatisticExpose["$route"] | — |
$router | 应用使用的 Router 实例。 | AsamStatisticExpose["$router"] | — |
插槽 AsamStatisticSlots
| 属性名 | 说明 | 类型 | 默认值 |
|---|---|---|---|
title | — | (AsamStatisticSlots)["title"] | — |
prefix | — | (AsamStatisticSlots)["prefix"] | — |
suffix | — | (AsamStatisticSlots)["suffix"] | — |
类型 AsamStatisticPropsPublic
| 属性名 | 说明 | 类型 | 默认值 |
|---|---|---|---|
title | — | string | undefined | — |
value | — | (AsamStatisticPropsPublic)["value"] | — |
formatter | — | Function | undefined | — |
prefix | — | string | undefined | — |
suffix | — | string | undefined | — |
valueStyle | — | (AsamStatisticPropsPublic)["valueStyle"] | — |
decimalSeparator | — | string | undefined | — |
groupSeparator | — | string | undefined | — |
precision | — | number | undefined | — |
关联组件
参数与事件补充说明
公开绑定参数,包含具备类型的事件监听器;默认值由运行时定义提供。
参数与事件说明
decimalSeparator
必填:否;声明来源:上游声明。
默认值与来源
"."(已安装运行时;已安装组件)固定上游文档默认:.(2.14.7;文档事实,实际默认以 ASAM 源码 / 安装包为准)
固定上游源码默认表达式:'.'(2.14.7;源码事实,未作为 ASAM 运行实测)
groupSeparator
必填:否;声明来源:上游声明。
默认值与来源
","(已安装运行时;已安装组件)固定上游文档默认:,(2.14.7;文档事实,实际默认以 ASAM 源码 / 安装包为准)
固定上游源码默认表达式:','(2.14.7;源码事实,未作为 ASAM 运行实测)
precision
必填:否;声明来源:上游声明。
默认值与来源
0(已安装运行时;已安装组件)固定上游文档默认:0(2.14.7;文档事实,实际默认以 ASAM 源码 / 安装包为准)
固定上游源码默认表达式:0(2.14.7;源码事实,未作为 ASAM 运行实测)
formatter
必填:否;声明来源:上游声明。
formatter 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(...args: any[]): string | number
默认值与来源
未知 / 未声明固定上游文档默认:未声明(2.14.7;文档事实,实际默认以 ASAM 源码 / 安装包为准)
value
必填:否;声明来源:上游声明。
默认值与来源
0(已安装运行时;已安装组件)固定上游文档默认:0(2.14.7;文档事实,实际默认以 ASAM 源码 / 安装包为准)
固定上游源码默认表达式:0(2.14.7;源码事实,未作为 ASAM 运行实测)
prefix
必填:否;声明来源:上游声明。
默认值与来源
未知 / 未声明固定上游文档默认:未声明(2.14.7;文档事实,实际默认以 ASAM 源码 / 安装包为准)
suffix
必填:否;声明来源:上游声明。
默认值与来源
未知 / 未声明固定上游文档默认:未声明(2.14.7;文档事实,实际默认以 ASAM 源码 / 安装包为准)
title
必填:否;声明来源:上游声明。
默认值与来源
未知 / 未声明固定上游文档默认:未声明(2.14.7;文档事实,实际默认以 ASAM 源码 / 安装包为准)
valueStyle
必填:否;声明来源:上游声明。
valueStyle 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
枚举:false
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
默认值与来源
undefined(已安装运行时;已安装组件)固定上游文档默认:未声明(2.14.7;文档事实,实际默认以 ASAM 源码 / 安装包为准)
固定上游源码默认表达式:undefined(2.14.7;源码事实,未作为 ASAM 运行实测)
key
必填:否;声明来源:依赖声明。
ref
必填:否;声明来源:依赖声明。
ref 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(ref: Element | ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null, refs: Record<string, any>): void
ref.value:any— 依赖声明ref.__@RefSymbol@8854:true— 依赖声明仅用于区分类型:保留在公开声明中,通过私有 Symbol 避免出现在编辑器自动补全中。
枚举:
true
ref_for
必填:否;声明来源:依赖声明。
ref_for 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
枚举:false / true
ref_key
必填:否;声明来源:依赖声明。
onVnodeBeforeMount
必填:否;声明来源:依赖声明。
onVnodeBeforeMount 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(vnode: VNode<RendererNode, RendererElement, { [key: string]: any; }>): void
onVnodeMounted
必填:否;声明来源:依赖声明。
onVnodeMounted 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(vnode: VNode<RendererNode, RendererElement, { [key: string]: any; }>): void
onVnodeBeforeUpdate
必填:否;声明来源:依赖声明。
onVnodeBeforeUpdate 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(vnode: VNode<RendererNode, RendererElement, { [key: string]: any; }>, oldVNode: VNode<RendererNode, RendererElement, { [key: string]: any; }>): void
onVnodeUpdated
必填:否;声明来源:依赖声明。
onVnodeUpdated 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(vnode: VNode<RendererNode, RendererElement, { [key: string]: any; }>, oldVNode: VNode<RendererNode, RendererElement, { [key: string]: any; }>): void
onVnodeBeforeUnmount
必填:否;声明来源:依赖声明。
onVnodeBeforeUnmount 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(vnode: VNode<RendererNode, RendererElement, { [key: string]: any; }>): void
onVnodeUnmounted
必填:否;声明来源:依赖声明。
onVnodeUnmounted 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(vnode: VNode<RendererNode, RendererElement, { [key: string]: any; }>): void
class
必填:否;声明来源:依赖声明。
style
必填:否;声明来源:依赖声明。
AsamStatisticProps 公开类型视图
import type { VNodeRef, ComponentPublicInstance, ComponentOptionsBase, ComponentProvideOptions, VNode, RendererNode, RendererElement } from 'vue';
import type { AsamStatisticProps, AsamStatisticExpose } from '@asam-ui/ui';
type PublicMember<T, K extends PropertyKey> = T extends unknown ? K extends keyof T ? T[K] : never : never;
// AsamStatisticProps
type PublicContract = {
readonly "decimalSeparator"?: string | undefined;
readonly "groupSeparator"?: string | undefined;
readonly "precision"?: number | undefined;
readonly "formatter"?: ((...args: any[]) => string | number) | undefined;
readonly "value"?: (AsamStatisticProps)["value"];
readonly "prefix"?: string | undefined;
readonly "suffix"?: string | undefined;
readonly "title"?: string | undefined;
readonly "valueStyle"?: (AsamStatisticProps)["valueStyle"];
"key"?: PropertyKey | undefined;
"ref"?: VNodeRef | undefined;
"ref_for"?: boolean | undefined;
"ref_key"?: string | undefined;
"onVnodeBeforeMount"?: (AsamStatisticProps)["onVnodeBeforeMount"];
"onVnodeMounted"?: (AsamStatisticProps)["onVnodeMounted"];
"onVnodeBeforeUpdate"?: (AsamStatisticProps)["onVnodeBeforeUpdate"];
"onVnodeUpdated"?: (AsamStatisticProps)["onVnodeUpdated"];
"onVnodeBeforeUnmount"?: (AsamStatisticProps)["onVnodeBeforeUnmount"];
"onVnodeUnmounted"?: (AsamStatisticProps)["onVnodeUnmounted"];
"class"?: unknown;
"style"?: unknown;
};
完整的上游实例,包含全部公开方法与响应式状态。
参数与事件说明
$
必填:是;声明来源:依赖声明。
$ 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$data
必填:是;声明来源:依赖声明。
$props
必填:是;声明来源:依赖声明。
$attrs
必填:是;声明来源:依赖声明。
$attrs 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$refs
必填:是;声明来源:依赖声明。
$refs 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$slots
必填:是;声明来源:依赖声明。
$root
必填:是;声明来源:依赖声明。
$parent
必填:是;声明来源:依赖声明。
$host
必填:是;声明来源:依赖声明。
$host 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
嵌套展开边界:大型实例类型;完整类型见公开类型视图。
$emit
必填:是;声明来源:依赖声明。
$emit 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(event: string, ...args: any[]): void
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$el
必填:是;声明来源:依赖声明。
$options
必填:是;声明来源:依赖声明。
$forceUpdate
必填:是;声明来源:依赖声明。
$forceUpdate 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(): void
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$nextTick
必填:是;声明来源:依赖声明。
$nextTick 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(): Promise<void>
事件参数:<T, R>(this: T, fn: (this: T) => R | Promise<R>): Promise<R>
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$watch
必填:是;声明来源:依赖声明。
$watch 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:<T extends string | ((...args: any) => any)>(source: T, cb: Parameters<Extract<NonNullable<(AsamStatisticExpose)["$watch"]>, (...args: never[]) => unknown>>[1], options?: WatchOptions<boolean> | undefined): WatchStopHandle
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
value
必填:是;声明来源:上游声明。
precision
必填:是;声明来源:上游声明。
decimalSeparator
必填:是;声明来源:上游声明。
groupSeparator
必填:是;声明来源:上游声明。
valueStyle
必填:是;声明来源:上游声明。
valueStyle 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
枚举:false
嵌套展开边界:大型实例类型;完整类型见公开类型视图。
title
必填:否;声明来源:上游声明。
formatter
必填:否;声明来源:上游声明。
formatter 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(...args: any[]): string | number
prefix
必填:否;声明来源:上游声明。
suffix
必填:否;声明来源:上游声明。
displayValue
必填:是;声明来源:上游声明。
$route
必填:是;声明来源:依赖声明。
$route 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
$route.matched:(NonNullable<AsamStatisticExpose["$route"]>)["matched"]— 依赖声明仅包含普通组件的 RouteLocationMatched 数组;懒加载组件已解析并替换 components 中的值,可直接展示路由,不包含重定向记录。此属性不可枚举。
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$route.name:(NonNullable<AsamStatisticExpose["$route"]>)["name"]— 依赖声明匹配路由记录的名称。
$route.fullPath:string— 依赖声明包含 search 和 hash 的完整位置字符串,使用百分号编码。
$route.query:(NonNullable<AsamStatisticExpose["$route"]>)["query"]— 依赖声明当前位置 search 属性的对象表示。
$route.hash:string— 依赖声明当前位置的哈希片段;存在时以 # 开头。
$route.redirectedFrom:(NonNullable<AsamStatisticExpose["$route"]>)["redirectedFrom"]— 依赖声明最终到达当前位置之前,最初尝试访问的位置。
$route.redirectedFrom.matched:PublicMember<NonNullable<(NonNullable<AsamStatisticExpose["$route"]>)["redirectedFrom"]>, "matched">— 依赖声明包含添加路由时原始组件的 RouteRecord 数组,也可能包含重定向记录,不能直接用于展示。此属性不可枚举。
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$route.redirectedFrom.fullPath:string— 依赖声明包含 search 和 hash 的完整位置字符串,使用百分号编码。
$route.redirectedFrom.query:PublicMember<NonNullable<(NonNullable<AsamStatisticExpose["$route"]>)["redirectedFrom"]>, "query">— 依赖声明当前位置 search 属性的对象表示。
$route.redirectedFrom.hash:string— 依赖声明当前位置的哈希片段;存在时以 # 开头。
$route.redirectedFrom.redirectedFrom:PublicMember<NonNullable<(NonNullable<AsamStatisticExpose["$route"]>)["redirectedFrom"]>, "redirectedFrom">— 依赖声明最终到达当前位置之前,最初尝试访问的位置。
嵌套展开边界:递归引用;完整类型见公开类型视图。
$route.redirectedFrom.name:PublicMember<NonNullable<(NonNullable<AsamStatisticExpose["$route"]>)["redirectedFrom"]>, "name">— 依赖声明匹配路由记录的名称。
$route.redirectedFrom.meta:PublicMember<NonNullable<(NonNullable<AsamStatisticExpose["$route"]>)["redirectedFrom"]>, "meta">— 依赖声明全部匹配路由记录合并后的 meta 属性。
$route.redirectedFrom.params:PublicMember<NonNullable<(NonNullable<AsamStatisticExpose["$route"]>)["redirectedFrom"]>, "params">— 依赖声明从 path 提取并解码后的参数对象。
$route.redirectedFrom.path:string— 依赖声明URL 中经过百分号编码的路径部分。
$route.redirectedFrom.replace:boolean | undefined— 依赖声明替换当前历史记录,而不是添加新记录。
枚举:
false/true$route.redirectedFrom.force:boolean | undefined— 依赖声明即使目标与当前位置相同,也触发导航;除非传入 replace: true,否则会添加一条历史记录。
枚举:
false/true$route.redirectedFrom.state:PublicMember<NonNullable<(NonNullable<AsamStatisticExpose["$route"]>)["redirectedFrom"]>, "state">— 依赖声明通过 History API 保存的状态;不能包含响应式值,也不允许 Symbol 等部分值。详情参见 https://developer.mozilla.org/zh-CN/docs/Web/API/History/state。
$route.meta:(NonNullable<AsamStatisticExpose["$route"]>)["meta"]— 依赖声明全部匹配路由记录合并后的 meta 属性。
$route.params:(NonNullable<AsamStatisticExpose["$route"]>)["params"]— 依赖声明从 path 提取并解码后的参数对象。
$route.path:string— 依赖声明URL 中经过百分号编码的路径部分。
$router
必填:是;声明来源:依赖声明。
$router 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
$router.options:(NonNullable<AsamStatisticExpose["$router"]>)["options"]— 依赖声明创建路由器时传入的原始配置对象。
$router.options.routes:(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["routes"]— 依赖声明需要添加到路由器的初始路由列表。
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$router.options.history:(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["history"]— 依赖声明路由器使用的历史记录实现。通常使用 createWebHistory,并配置服务器回退;createWebHashHistory 无需服务器配置,但搜索引擎无法处理其哈希路由,影响搜索优化。
$router.options.history.base:string— 依赖声明添加到每个 URL 前的基础路径;例如 base 为 /sub-folder 时,可将单页应用部署在域名的对应子目录。
嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.history.location:string— 依赖声明当前历史记录位置。
嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.history.state:(NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["history"]>)["state"]— 依赖声明当前历史记录状态。
嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.history.push:(NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["history"]>)["push"]— 依赖声明导航到指定位置;使用 HTML5 History 时,通过 history.pushState 实际更新 URL。
事件参数:
(to: string, data?: Parameters<Extract<NonNullable<(NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["history"]>)["push"]>, (...args: never[]) => unknown>>[1]): void嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.history.replace:(NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["history"]>)["replace"]— 依赖声明与 RouterHistory.push 类似,但调用 history.replaceState,而非 history.pushState。
事件参数:
(to: string, data?: Parameters<Extract<NonNullable<(NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["history"]>)["replace"]>, (...args: never[]) => unknown>>[1]): void嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.history.go:(delta: number, triggerListeners?: boolean) => void— 依赖声明按指定方向遍历历史记录。
事件参数:
(delta: number, triggerListeners?: boolean | undefined): void嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.history.listen:(NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["history"]>)["listen"]— 依赖声明为历史记录实现添加监听器;由浏览器前进、后退等外部导航,或传入 true 的 RouterHistory.back、RouterHistory.forward 触发。
事件参数:
(callback: Parameters<Extract<NonNullable<(NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["history"]>)["listen"]>, (...args: never[]) => unknown>>[0]): () => void嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.history.createHref:(location: AsamStatisticExpose["decimalSeparator"]) => string— 依赖声明生成用于链接元素的对应 href。
事件参数:
(location: string): string嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.history.destroy:() => void— 依赖声明清除历史记录实现注册的全部事件监听器。
事件参数:
(): void嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.scrollBehavior:(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["scrollBehavior"]— 依赖声明控制页面导航时滚动行为的函数;可返回 Promise 延迟滚动。
事件参数:
(to: Parameters<Extract<NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["scrollBehavior"]>, (...args: never[]) => unknown>>[0], from: AsamStatisticExpose["$route"], savedPosition: Parameters<Extract<NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["scrollBehavior"]>, (...args: never[]) => unknown>>[2]): ReturnType<Extract<NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["scrollBehavior"]>, (...args: never[]) => unknown>>$router.options.parseQuery:(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["parseQuery"]— 依赖声明自定义查询参数解析函数;与 EXPERIMENTAL_RouterOptions_Base.stringifyQuery 配套。
事件参数:
(search: string): ReturnType<Extract<NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["parseQuery"]>, (...args: never[]) => unknown>>$router.options.stringifyQuery:(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["stringifyQuery"]— 依赖声明自定义查询对象序列化函数;不要添加开头的 ?,与 parseQuery 的解析函数配套。
事件参数:
(query: Parameters<Extract<NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["stringifyQuery"]>, (...args: never[]) => unknown>>[0]): string$router.options.linkActiveClass:string | undefined— 依赖声明应用于激活 RouterLink 的默认类名;未指定时使用 router-link-active。
$router.options.linkExactActiveClass:string | undefined— 依赖声明应用于精确激活 RouterLink 的默认类名;未指定时使用 router-link-exact-active。
$router.options.end:boolean | undefined— 依赖声明是否在表达式末尾添加 $,使其匹配到路径结尾。
声明默认:
`true`(注释,实际运行默认以源码/安装包为准)枚举:
false/true$router.options.sensitive:boolean | undefined— 依赖声明使正则表达式区分大小写。
声明默认:
`false`(注释,实际运行默认以源码/安装包为准)枚举:
false/true$router.options.strict:boolean | undefined— 依赖声明是否禁止路径末尾的斜杠。
声明默认:
`false`(注释,实际运行默认以源码/安装包为准)枚举:
false/true
$router.addRoute:(NonNullable<AsamStatisticExpose["$router"]>)["addRoute"]— 依赖声明向已有路由添加子路由,或向路由器添加新的 RouteRecordRaw 路由记录。
事件参数完整签名见公开类型视图。
事件参数完整签名见公开类型视图。
$router.removeRoute:(NonNullable<AsamStatisticExpose["$router"]>)["removeRoute"]— 依赖声明按名称移除已有路由。
事件参数:
(name: Parameters<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["removeRoute"]>, (...args: never[]) => unknown>>[0]): void$router.clearRoutes:() => void— 依赖声明从路由器中删除全部路由。
事件参数:
(): void$router.currentRoute:ShallowRef<AsamStatisticExpose["$route"]>— 依赖声明当前 RouteLocationNormalized。
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$router.listening:boolean— 依赖声明允许关闭历史事件监听,这是用于微前端的底层 API。
枚举:
false/true$router.hasRoute:(NonNullable<AsamStatisticExpose["$router"]>)["hasRoute"]— 依赖声明检查指定名称的路由是否存在。
事件参数:
(name: Parameters<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["hasRoute"]>, (...args: never[]) => unknown>>[0]): boolean$router.getRoutes:(NonNullable<AsamStatisticExpose["$router"]>)["getRoutes"]— 依赖声明获取全部 RouteRecord 路由记录的完整列表。
事件参数:
(): ReturnType<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["getRoutes"]>, (...args: never[]) => unknown>>$router.resolve:(NonNullable<AsamStatisticExpose["$router"]>)["resolve"]— 依赖声明返回 RouteLocationRaw 的规范化位置,包含带基础路径的 href;默认使用 router.currentRoute 作为 currentLocation,仅在高级场景中覆盖。
事件参数完整签名见公开类型视图。
事件参数完整签名见公开类型视图。
$router.push:(NonNullable<AsamStatisticExpose["$router"]>)["push"]— 依赖声明通过向历史栈添加记录,以编程方式导航到新 URL。
事件参数:
(to: Parameters<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["push"]>, (...args: never[]) => unknown>>[0]): ReturnType<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["push"]>, (...args: never[]) => unknown>>$router.replace:(NonNullable<AsamStatisticExpose["$router"]>)["replace"]— 依赖声明通过替换历史栈中的当前记录,以编程方式导航到新 URL。
事件参数:
(to: Parameters<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["replace"]>, (...args: never[]) => unknown>>[0]): ReturnType<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["replace"]>, (...args: never[]) => unknown>>$router.back:() => void— 依赖声明通过 history.back() 在可用时后退,等价于 router.go(-1)。
事件参数:
(): void$router.forward:() => void— 依赖声明通过 history.forward() 在可用时前进,等价于 router.go(1)。
事件参数:
(): void$router.go:(delta: number) => void— 依赖声明通过调用 history.go() 在历史记录中前进或后退。
事件参数:
(delta: number): void$router.beforeEach:(NonNullable<AsamStatisticExpose["$router"]>)["beforeEach"]— 依赖声明添加每次导航之前执行的守卫,并返回移除此守卫的函数。
事件参数:
(guard: Parameters<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["beforeEach"]>, (...args: never[]) => unknown>>[0]): () => void$router.beforeResolve:(NonNullable<AsamStatisticExpose["$router"]>)["beforeResolve"]— 依赖声明添加导航确认之前执行的守卫,此时组件已获取且其他导航守卫已通过;返回移除此守卫的函数。
事件参数:
(guard: Parameters<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["beforeResolve"]>, (...args: never[]) => unknown>>[0]): () => void$router.afterEach:(NonNullable<AsamStatisticExpose["$router"]>)["afterEach"]— 依赖声明添加每次导航结束后执行的钩子,并返回移除此钩子的函数。
事件参数:
(guard: Parameters<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["afterEach"]>, (...args: never[]) => unknown>>[0]): () => void$router.onError:(NonNullable<AsamStatisticExpose["$router"]>)["onError"]— 依赖声明添加导航期间未捕获错误的处理函数,涵盖同步和异步异常、守卫返回或传给 next 的错误,以及路由异步组件解析错误。
事件参数:
(handler: Parameters<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["onError"]>, (...args: never[]) => unknown>>[0]): () => void$router.isReady:() => Promise<void>— 依赖声明返回在初次导航完成后兑现的 Promise,此时关联的异步进入钩子与异步组件均已解析;导航已完成时立即兑现。可用于保持服务端与客户端渲染一致;服务端需手动推入初始位置,客户端从 URL 自动读取。
事件参数:
(): Promise<void>$router.install:(app: App) => void— 依赖声明由 app.use(router) 自动调用,用户不应手动调用;客户端调用时会触发初次导航。
事件参数:
(app: App<any>): void
AsamStatisticExpose 公开类型视图
import type { ComponentPublicInstance, ComponentOptionsBase, ComponentProvideOptions, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, WatchOptions, WatchStopHandle, ShallowRef, App } from 'vue';
import type { AsamStatisticExpose, AsamTableColumnExpose, AsamStatisticProps, AsamStatisticSlots } from '@asam-ui/ui';
type PublicMember<T, K extends PropertyKey> = T extends unknown ? K extends keyof T ? T[K] : never : never;
// AsamStatisticExpose
type PublicContract = {
"$": AsamStatisticExpose["$"];
"$data": AsamTableColumnExpose;
"$props": AsamStatisticProps;
"$attrs": AsamStatisticExpose["$attrs"];
"$refs": AsamStatisticExpose["$refs"];
"$slots": AsamStatisticSlots;
"$root": ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null;
"$parent": ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null;
"$host": Element | null;
"$emit": (event: string, ...args: any[]) => void;
"$el": any;
"$options": (AsamStatisticExpose)["$options"];
"$forceUpdate": () => void;
"$nextTick": (AsamStatisticExpose)["$nextTick"];
"$watch": (AsamStatisticExpose)["$watch"];
readonly "value": (AsamStatisticExpose)["value"];
readonly "precision": number;
readonly "decimalSeparator": string;
readonly "groupSeparator": string;
readonly "valueStyle": (AsamStatisticExpose)["valueStyle"];
readonly "title"?: string | undefined;
readonly "formatter"?: ((...args: any[]) => string | number) | undefined;
readonly "prefix"?: string | undefined;
readonly "suffix"?: string | undefined;
"displayValue": (AsamStatisticExpose)["displayValue"];
"$route": AsamStatisticExpose["$route"];
"$router": AsamStatisticExpose["$router"];
};
参数与事件说明
$
必填:是;声明来源:依赖声明。
$ 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$data
必填:是;声明来源:依赖声明。
$props
必填:是;声明来源:依赖声明。
$attrs
必填:是;声明来源:依赖声明。
$attrs 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$refs
必填:是;声明来源:依赖声明。
$refs 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$slots
必填:是;声明来源:依赖声明。
$root
必填:是;声明来源:依赖声明。
$parent
必填:是;声明来源:依赖声明。
$host
必填:是;声明来源:依赖声明。
$host 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
嵌套展开边界:大型实例类型;完整类型见公开类型视图。
$emit
必填:是;声明来源:依赖声明。
$emit 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(event: string, ...args: any[]): void
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$el
必填:是;声明来源:依赖声明。
$options
必填:是;声明来源:依赖声明。
$forceUpdate
必填:是;声明来源:依赖声明。
$forceUpdate 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(): void
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$nextTick
必填:是;声明来源:依赖声明。
$nextTick 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(): Promise<void>
事件参数:<T, R>(this: T, fn: (this: T) => R | Promise<R>): Promise<R>
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$watch
必填:是;声明来源:依赖声明。
$watch 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:<T extends string | ((...args: any) => any)>(source: T, cb: Parameters<Extract<NonNullable<(AsamStatisticInstance)["$watch"]>, (...args: never[]) => unknown>>[1], options?: WatchOptions<boolean> | undefined): WatchStopHandle
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
value
必填:是;声明来源:上游声明。
precision
必填:是;声明来源:上游声明。
decimalSeparator
必填:是;声明来源:上游声明。
groupSeparator
必填:是;声明来源:上游声明。
valueStyle
必填:是;声明来源:上游声明。
valueStyle 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
枚举:false
嵌套展开边界:大型实例类型;完整类型见公开类型视图。
title
必填:否;声明来源:上游声明。
formatter
必填:否;声明来源:上游声明。
formatter 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(...args: any[]): string | number
prefix
必填:否;声明来源:上游声明。
suffix
必填:否;声明来源:上游声明。
displayValue
必填:是;声明来源:上游声明。
$route
必填:是;声明来源:依赖声明。
$route 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
$route.matched:(NonNullable<AsamStatisticExpose["$route"]>)["matched"]— 依赖声明仅包含普通组件的 RouteLocationMatched 数组;懒加载组件已解析并替换 components 中的值,可直接展示路由,不包含重定向记录。此属性不可枚举。
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$route.name:(NonNullable<AsamStatisticExpose["$route"]>)["name"]— 依赖声明匹配路由记录的名称。
$route.fullPath:string— 依赖声明包含 search 和 hash 的完整位置字符串,使用百分号编码。
$route.query:(NonNullable<AsamStatisticExpose["$route"]>)["query"]— 依赖声明当前位置 search 属性的对象表示。
$route.hash:string— 依赖声明当前位置的哈希片段;存在时以 # 开头。
$route.redirectedFrom:(NonNullable<AsamStatisticExpose["$route"]>)["redirectedFrom"]— 依赖声明最终到达当前位置之前,最初尝试访问的位置。
$route.redirectedFrom.matched:PublicMember<NonNullable<(NonNullable<AsamStatisticExpose["$route"]>)["redirectedFrom"]>, "matched">— 依赖声明包含添加路由时原始组件的 RouteRecord 数组,也可能包含重定向记录,不能直接用于展示。此属性不可枚举。
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$route.redirectedFrom.fullPath:string— 依赖声明包含 search 和 hash 的完整位置字符串,使用百分号编码。
$route.redirectedFrom.query:PublicMember<NonNullable<(NonNullable<AsamStatisticExpose["$route"]>)["redirectedFrom"]>, "query">— 依赖声明当前位置 search 属性的对象表示。
$route.redirectedFrom.hash:string— 依赖声明当前位置的哈希片段;存在时以 # 开头。
$route.redirectedFrom.redirectedFrom:PublicMember<NonNullable<(NonNullable<AsamStatisticExpose["$route"]>)["redirectedFrom"]>, "redirectedFrom">— 依赖声明最终到达当前位置之前,最初尝试访问的位置。
嵌套展开边界:递归引用;完整类型见公开类型视图。
$route.redirectedFrom.name:PublicMember<NonNullable<(NonNullable<AsamStatisticExpose["$route"]>)["redirectedFrom"]>, "name">— 依赖声明匹配路由记录的名称。
$route.redirectedFrom.meta:PublicMember<NonNullable<(NonNullable<AsamStatisticExpose["$route"]>)["redirectedFrom"]>, "meta">— 依赖声明全部匹配路由记录合并后的 meta 属性。
$route.redirectedFrom.params:PublicMember<NonNullable<(NonNullable<AsamStatisticExpose["$route"]>)["redirectedFrom"]>, "params">— 依赖声明从 path 提取并解码后的参数对象。
$route.redirectedFrom.path:string— 依赖声明URL 中经过百分号编码的路径部分。
$route.redirectedFrom.replace:boolean | undefined— 依赖声明替换当前历史记录,而不是添加新记录。
枚举:
false/true$route.redirectedFrom.force:boolean | undefined— 依赖声明即使目标与当前位置相同,也触发导航;除非传入 replace: true,否则会添加一条历史记录。
枚举:
false/true$route.redirectedFrom.state:PublicMember<NonNullable<(NonNullable<AsamStatisticExpose["$route"]>)["redirectedFrom"]>, "state">— 依赖声明通过 History API 保存的状态;不能包含响应式值,也不允许 Symbol 等部分值。详情参见 https://developer.mozilla.org/zh-CN/docs/Web/API/History/state。
$route.meta:(NonNullable<AsamStatisticExpose["$route"]>)["meta"]— 依赖声明全部匹配路由记录合并后的 meta 属性。
$route.params:(NonNullable<AsamStatisticExpose["$route"]>)["params"]— 依赖声明从 path 提取并解码后的参数对象。
$route.path:string— 依赖声明URL 中经过百分号编码的路径部分。
$router
必填:是;声明来源:依赖声明。
$router 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
$router.options:(NonNullable<AsamStatisticExpose["$router"]>)["options"]— 依赖声明创建路由器时传入的原始配置对象。
$router.options.routes:(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["routes"]— 依赖声明需要添加到路由器的初始路由列表。
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$router.options.history:(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["history"]— 依赖声明路由器使用的历史记录实现。通常使用 createWebHistory,并配置服务器回退;createWebHashHistory 无需服务器配置,但搜索引擎无法处理其哈希路由,影响搜索优化。
$router.options.history.base:string— 依赖声明添加到每个 URL 前的基础路径;例如 base 为 /sub-folder 时,可将单页应用部署在域名的对应子目录。
嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.history.location:string— 依赖声明当前历史记录位置。
嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.history.state:(NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["history"]>)["state"]— 依赖声明当前历史记录状态。
嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.history.push:(NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["history"]>)["push"]— 依赖声明导航到指定位置;使用 HTML5 History 时,通过 history.pushState 实际更新 URL。
事件参数:
(to: string, data?: Parameters<Extract<NonNullable<(NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["history"]>)["push"]>, (...args: never[]) => unknown>>[1]): void嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.history.replace:(NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["history"]>)["replace"]— 依赖声明与 RouterHistory.push 类似,但调用 history.replaceState,而非 history.pushState。
事件参数:
(to: string, data?: Parameters<Extract<NonNullable<(NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["history"]>)["replace"]>, (...args: never[]) => unknown>>[1]): void嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.history.go:(delta: number, triggerListeners?: boolean) => void— 依赖声明按指定方向遍历历史记录。
事件参数:
(delta: number, triggerListeners?: boolean | undefined): void嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.history.listen:(NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["history"]>)["listen"]— 依赖声明为历史记录实现添加监听器;由浏览器前进、后退等外部导航,或传入 true 的 RouterHistory.back、RouterHistory.forward 触发。
事件参数:
(callback: Parameters<Extract<NonNullable<(NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["history"]>)["listen"]>, (...args: never[]) => unknown>>[0]): () => void嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.history.createHref:(location: AsamStatisticExpose["decimalSeparator"]) => string— 依赖声明生成用于链接元素的对应 href。
事件参数:
(location: string): string嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.history.destroy:() => void— 依赖声明清除历史记录实现注册的全部事件监听器。
事件参数:
(): void嵌套展开边界:深度上限;完整类型见公开类型视图。
$router.options.scrollBehavior:(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["scrollBehavior"]— 依赖声明控制页面导航时滚动行为的函数;可返回 Promise 延迟滚动。
事件参数:
(to: Parameters<Extract<NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["scrollBehavior"]>, (...args: never[]) => unknown>>[0], from: AsamStatisticExpose["$route"], savedPosition: Parameters<Extract<NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["scrollBehavior"]>, (...args: never[]) => unknown>>[2]): ReturnType<Extract<NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["scrollBehavior"]>, (...args: never[]) => unknown>>$router.options.parseQuery:(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["parseQuery"]— 依赖声明自定义查询参数解析函数;与 EXPERIMENTAL_RouterOptions_Base.stringifyQuery 配套。
事件参数:
(search: string): ReturnType<Extract<NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["parseQuery"]>, (...args: never[]) => unknown>>$router.options.stringifyQuery:(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["stringifyQuery"]— 依赖声明自定义查询对象序列化函数;不要添加开头的 ?,与 parseQuery 的解析函数配套。
事件参数:
(query: Parameters<Extract<NonNullable<(NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["options"]>)["stringifyQuery"]>, (...args: never[]) => unknown>>[0]): string$router.options.linkActiveClass:string | undefined— 依赖声明应用于激活 RouterLink 的默认类名;未指定时使用 router-link-active。
$router.options.linkExactActiveClass:string | undefined— 依赖声明应用于精确激活 RouterLink 的默认类名;未指定时使用 router-link-exact-active。
$router.options.end:boolean | undefined— 依赖声明是否在表达式末尾添加 $,使其匹配到路径结尾。
声明默认:
`true`(注释,实际运行默认以源码/安装包为准)枚举:
false/true$router.options.sensitive:boolean | undefined— 依赖声明使正则表达式区分大小写。
声明默认:
`false`(注释,实际运行默认以源码/安装包为准)枚举:
false/true$router.options.strict:boolean | undefined— 依赖声明是否禁止路径末尾的斜杠。
声明默认:
`false`(注释,实际运行默认以源码/安装包为准)枚举:
false/true
$router.addRoute:(NonNullable<AsamStatisticExpose["$router"]>)["addRoute"]— 依赖声明向已有路由添加子路由,或向路由器添加新的 RouteRecordRaw 路由记录。
事件参数完整签名见公开类型视图。
事件参数完整签名见公开类型视图。
$router.removeRoute:(NonNullable<AsamStatisticExpose["$router"]>)["removeRoute"]— 依赖声明按名称移除已有路由。
事件参数:
(name: Parameters<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["removeRoute"]>, (...args: never[]) => unknown>>[0]): void$router.clearRoutes:() => void— 依赖声明从路由器中删除全部路由。
事件参数:
(): void$router.currentRoute:ShallowRef<AsamStatisticExpose["$route"]>— 依赖声明当前 RouteLocationNormalized。
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
$router.listening:boolean— 依赖声明允许关闭历史事件监听,这是用于微前端的底层 API。
枚举:
false/true$router.hasRoute:(NonNullable<AsamStatisticExpose["$router"]>)["hasRoute"]— 依赖声明检查指定名称的路由是否存在。
事件参数:
(name: Parameters<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["hasRoute"]>, (...args: never[]) => unknown>>[0]): boolean$router.getRoutes:(NonNullable<AsamStatisticExpose["$router"]>)["getRoutes"]— 依赖声明获取全部 RouteRecord 路由记录的完整列表。
事件参数:
(): ReturnType<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["getRoutes"]>, (...args: never[]) => unknown>>$router.resolve:(NonNullable<AsamStatisticExpose["$router"]>)["resolve"]— 依赖声明返回 RouteLocationRaw 的规范化位置,包含带基础路径的 href;默认使用 router.currentRoute 作为 currentLocation,仅在高级场景中覆盖。
事件参数完整签名见公开类型视图。
事件参数完整签名见公开类型视图。
$router.push:(NonNullable<AsamStatisticExpose["$router"]>)["push"]— 依赖声明通过向历史栈添加记录,以编程方式导航到新 URL。
事件参数:
(to: Parameters<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["push"]>, (...args: never[]) => unknown>>[0]): ReturnType<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["push"]>, (...args: never[]) => unknown>>$router.replace:(NonNullable<AsamStatisticExpose["$router"]>)["replace"]— 依赖声明通过替换历史栈中的当前记录,以编程方式导航到新 URL。
事件参数:
(to: Parameters<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["replace"]>, (...args: never[]) => unknown>>[0]): ReturnType<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["replace"]>, (...args: never[]) => unknown>>$router.back:() => void— 依赖声明通过 history.back() 在可用时后退,等价于 router.go(-1)。
事件参数:
(): void$router.forward:() => void— 依赖声明通过 history.forward() 在可用时前进,等价于 router.go(1)。
事件参数:
(): void$router.go:(delta: number) => void— 依赖声明通过调用 history.go() 在历史记录中前进或后退。
事件参数:
(delta: number): void$router.beforeEach:(NonNullable<AsamStatisticExpose["$router"]>)["beforeEach"]— 依赖声明添加每次导航之前执行的守卫,并返回移除此守卫的函数。
事件参数:
(guard: Parameters<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["beforeEach"]>, (...args: never[]) => unknown>>[0]): () => void$router.beforeResolve:(NonNullable<AsamStatisticExpose["$router"]>)["beforeResolve"]— 依赖声明添加导航确认之前执行的守卫,此时组件已获取且其他导航守卫已通过;返回移除此守卫的函数。
事件参数:
(guard: Parameters<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["beforeResolve"]>, (...args: never[]) => unknown>>[0]): () => void$router.afterEach:(NonNullable<AsamStatisticExpose["$router"]>)["afterEach"]— 依赖声明添加每次导航结束后执行的钩子,并返回移除此钩子的函数。
事件参数:
(guard: Parameters<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["afterEach"]>, (...args: never[]) => unknown>>[0]): () => void$router.onError:(NonNullable<AsamStatisticExpose["$router"]>)["onError"]— 依赖声明添加导航期间未捕获错误的处理函数,涵盖同步和异步异常、守卫返回或传给 next 的错误,以及路由异步组件解析错误。
事件参数:
(handler: Parameters<Extract<NonNullable<(NonNullable<AsamStatisticExpose["$router"]>)["onError"]>, (...args: never[]) => unknown>>[0]): () => void$router.isReady:() => Promise<void>— 依赖声明返回在初次导航完成后兑现的 Promise,此时关联的异步进入钩子与异步组件均已解析;导航已完成时立即兑现。可用于保持服务端与客户端渲染一致;服务端需手动推入初始位置,客户端从 URL 自动读取。
事件参数:
(): Promise<void>$router.install:(app: App) => void— 依赖声明由 app.use(router) 自动调用,用户不应手动调用;客户端调用时会触发初次导航。
事件参数:
(app: App<any>): void
AsamStatisticInstance 公开类型视图
import type { ComponentPublicInstance, ComponentOptionsBase, ComponentProvideOptions, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, WatchOptions, WatchStopHandle, ShallowRef, App } from 'vue';
import type { AsamStatisticInstance, AsamStatisticExpose, AsamTableColumnExpose, AsamStatisticProps, AsamStatisticSlots } from '@asam-ui/ui';
type PublicMember<T, K extends PropertyKey> = T extends unknown ? K extends keyof T ? T[K] : never : never;
// AsamStatisticInstance
type PublicContract = {
"$": AsamStatisticExpose["$"];
"$data": AsamTableColumnExpose;
"$props": AsamStatisticProps;
"$attrs": AsamStatisticExpose["$attrs"];
"$refs": AsamStatisticExpose["$refs"];
"$slots": AsamStatisticSlots;
"$root": ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null;
"$parent": ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null;
"$host": Element | null;
"$emit": (event: string, ...args: any[]) => void;
"$el": any;
"$options": (AsamStatisticInstance)["$options"];
"$forceUpdate": () => void;
"$nextTick": (AsamStatisticInstance)["$nextTick"];
"$watch": (AsamStatisticInstance)["$watch"];
readonly "value": (AsamStatisticInstance)["value"];
readonly "precision": number;
readonly "decimalSeparator": string;
readonly "groupSeparator": string;
readonly "valueStyle": (AsamStatisticInstance)["valueStyle"];
readonly "title"?: string | undefined;
readonly "formatter"?: ((...args: any[]) => string | number) | undefined;
readonly "prefix"?: string | undefined;
readonly "suffix"?: string | undefined;
"displayValue": (AsamStatisticInstance)["displayValue"];
"$route": AsamStatisticExpose["$route"];
"$router": AsamStatisticExpose["$router"];
};
作用域插槽保留上游实例契约。
参数与事件说明
title
必填:否;声明来源:上游声明。
title 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(props: AsamTableColumnExpose): any
prefix
必填:否;声明来源:上游声明。
prefix 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(props: AsamTableColumnExpose): any
suffix
必填:否;声明来源:上游声明。
suffix 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
事件参数:(props: AsamTableColumnExpose): any
AsamStatisticSlots 公开类型视图
import type { AsamStatisticSlots, AsamStatisticExpose, AsamTableColumnExpose } from '@asam-ui/ui';
// AsamStatisticSlots
type PublicContract = {
"title"?: (AsamStatisticSlots)["title"];
"prefix"?: (AsamStatisticSlots)["prefix"];
"suffix"?: (AsamStatisticSlots)["suffix"];
readonly [key: string]: import("vue").Slot<any> | undefined;
};
参数与事件说明
title
必填:否;声明来源:上游声明。
value
必填:否;声明来源:上游声明。
默认值与来源
未知 / 未声明固定上游源码默认表达式:0(2.14.7;源码事实,未作为 ASAM 运行实测)
formatter
必填:否;声明来源:上游声明。
formatter 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
formatter.apply:(this: Function, thisArg: any, argArray?: any) => any— 依赖声明调用函数,以指定对象作为 this,并使用指定数组作为函数参数。
事件参数:
(this: Function, thisArg: any, argArray?: any): any嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
formatter.call:(this: Function, thisArg: any, ...argArray: any[]) => any— 依赖声明调用对象方法,并以另一个对象作为当前 this。
事件参数:
(this: Function, thisArg: any, ...argArray: any[]): any嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
formatter.bind:(this: Function, thisArg: any, ...argArray: any[]) => any— 依赖声明创建具有相同函数体的绑定函数,将 this 绑定到指定对象,并设置初始参数。
事件参数:
(this: Function, thisArg: any, ...argArray: any[]): any嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
formatter.toString:() => string— 依赖声明返回函数的字符串表示。
事件参数:
(): string嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
formatter.prototype:any— 依赖声明formatter.length:number— 依赖声明formatter.arguments:any— 依赖声明formatter.caller:Function— 依赖声明嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
formatter.name:string— 依赖声明返回函数名称;函数名称只读,不能修改。
formatter.__@hasInstance@8888:(value: any) => boolean— 依赖声明当函数用作构造函数时,判断指定值是否继承自该函数;构造函数可以覆盖此方法,控制 instanceof 对实例的识别。
事件参数:
(value: any): boolean嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
prefix
必填:否;声明来源:上游声明。
suffix
必填:否;声明来源:上游声明。
valueStyle
必填:否;声明来源:上游声明。
valueStyle 参数与事件数据
下列为声明可读视图;可导入类型以公开类型视图为准。分支条件与父属性一致。
枚举:false
嵌套展开边界:框架 / 平台类型;完整类型见公开类型视图。
默认值与来源
未知 / 未声明固定上游源码默认表达式:undefined(2.14.7;源码事实,未作为 ASAM 运行实测)
decimalSeparator
必填:否;声明来源:上游声明。
默认值与来源
未知 / 未声明固定上游源码默认表达式:'.'(2.14.7;源码事实,未作为 ASAM 运行实测)
groupSeparator
必填:否;声明来源:上游声明。
默认值与来源
未知 / 未声明固定上游源码默认表达式:','(2.14.7;源码事实,未作为 ASAM 运行实测)
precision
必填:否;声明来源:上游声明。
默认值与来源
未知 / 未声明固定上游源码默认表达式:0(2.14.7;源码事实,未作为 ASAM 运行实测)
AsamStatisticPropsPublic 公开类型视图
import type { AsamStatisticPropsPublic, AsamStatisticProps, AsamStatisticExpose } from '@asam-ui/ui';
type PublicMember<T, K extends PropertyKey> = T extends unknown ? K extends keyof T ? T[K] : never : never;
// AsamStatisticPropsPublic
type PublicContract = {
readonly "title"?: string | undefined;
readonly "value"?: (AsamStatisticPropsPublic)["value"];
readonly "formatter"?: Function | undefined;
readonly "prefix"?: string | undefined;
readonly "suffix"?: string | undefined;
readonly "valueStyle"?: (AsamStatisticPropsPublic)["valueStyle"];
readonly "decimalSeparator"?: string | undefined;
readonly "groupSeparator"?: string | undefined;
readonly "precision"?: number | undefined;
};