Files
cneicy 42dfead9cd
前端验证 / verify (push) Failing after 15m3s
feat(ui): 优化控制台响应式布局与视觉体验
- 统一页面标题、圆角、字体和响应式断点,调整暗色主题及图表配色
- 新增表格列标签插件,在窄屏下将表格转换为卡片布局,优化实例、订单、工单等列表展示
- 支持移动端点击订单行进入详情,并完善订单凭据的打印布局
- 在财务中心展示本月及累计消费,补充充值关闭时的提示
- 优化工单详情布局,将附件上传入口整合至富文本编辑器工具栏
- 调整实例操作按钮、SSH 密钥操作及安全菜单图标
- 为多个页面显式导入 definePageMeta,完善页面元数据声明
2026-11-07 00:09:57 +08:00

130 lines
3.9 KiB
Vue

<script>
// 环形进度通过圆周长和描边偏移表达百分比,绘制时把输入限制在 0–100 范围。
import "~/assets/styles/RingProgress.CVwR7il5.css";
import { toDisplayString } from "vue";
import { createCommentVNode } from "vue";
import { computed } from "vue";
import { createElementBlock } from "vue";
import { createElementVNode } from "vue";
import { unref } from "vue";
import { defineComponent } from "vue";
import { openBlock } from "vue";
import { normalizeStyle } from "vue";
import { t as _plugin_vue_export_helper_t } from "~/lib/_plugin-vue_export-helper.js";
var u = [`width`, `height`, `viewBox`],
d = [`cx`, `cy`, `r`],
f = [`cx`, `cy`, `r`, `stroke-dasharray`, `stroke-dashoffset`, `transform`],
p = {
class: `ring-text`,
},
m = {
class: `ring-value`,
},
h = {
key: 0,
class: `ring-label`,
},
g = Object.assign(
_plugin_vue_export_helper_t(
defineComponent({
__name: `RingProgress`,
props: {
value: {},
label: {},
size: {
default: 112,
},
},
setup(o) {
let l = o,
g = computed(() => l.size / 2 - 8),
_ = computed(() => 2 * Math.PI * g.value),
v = computed(
() => _.value * (1 - Math.min(100, Math.max(0, l.value)) / 100),
);
return (n, l) => (
openBlock(),
createElementBlock(
`div`,
{
class: `ring`,
style: normalizeStyle({
width: `${o.size}px`,
height: `${o.size}px`,
}),
},
[
(openBlock(),
createElementBlock(
`svg`,
{
width: o.size,
height: o.size,
viewBox: `0 0 ${o.size} ${o.size}`,
},
[
createElementVNode(
`circle`,
{
cx: o.size / 2,
cy: o.size / 2,
r: unref(g),
fill: `none`,
stroke: `var(--p-content-border-color, #e2e8f0)`,
"stroke-width": 6,
},
null,
8,
d,
),
createElementVNode(
`circle`,
{
cx: o.size / 2,
cy: o.size / 2,
r: unref(g),
fill: `none`,
stroke: `#2563eb`,
"stroke-width": 6,
"stroke-linecap": `round`,
"stroke-dasharray": unref(_),
"stroke-dashoffset": unref(v),
transform: `rotate(-90 ${o.size / 2} ${o.size / 2})`,
class: `ring-bar`,
},
null,
8,
f,
),
],
8,
u,
)),
createElementVNode(`div`, p, [
createElementVNode(
`div`,
m,
toDisplayString(Math.round(o.value)) + `%`,
1,
),
o.label
? (openBlock(),
createElementBlock(`div`, h, toDisplayString(o.label), 1))
: createCommentVNode(``, !0),
]),
],
4,
)
);
},
}),
[[`__scopeId`, `data-v-bff6718d`]],
),
{
__name: `RingProgress`,
},
);
export {};
export default g;
</script>