dlzn-ui 2.0.53 → 2.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{provider-CwykAGOx.css → provider-BBCGISR5.css} +1 -1
- package/chunks/{AssignUser-CJFt5Q1h.mjs → AssignUser-DFGKVyHA.mjs} +3 -3
- package/chunks/{BasicInfo-CJNldTAG.mjs → BasicInfo-oYAekSwI.mjs} +1 -1
- package/chunks/{ColumnInfo-Be56uLyo.mjs → ColumnInfo-CVSldNXs.mjs} +2 -2
- package/chunks/{Common-CFfc_3CV.mjs → Common-DDWrIunx.mjs} +1 -1
- package/chunks/{Day-goCJrrD_.mjs → Day-Che8kW_B.mjs} +1 -1
- package/chunks/{DictTypeDetail-C-LVM-Mf.mjs → DictTypeDetail-vPGWHXOl.mjs} +2 -2
- package/chunks/{GenInfo-1KrHcY4D.mjs → GenInfo-BcwpyZSj.mjs} +1 -1
- package/chunks/{Hour-B0FYcjAM.mjs → Hour-BoXdhMMY.mjs} +1 -1
- package/chunks/{Import-BTaQ_XRL.mjs → Import-BVbnDZt3.mjs} +2 -2
- package/chunks/{Index-DLWQRcwf.mjs → Index-C1v5EsZk.mjs} +1 -1
- package/chunks/{Index-NwyOfjbd.mjs → Index-CnjpeIQL.mjs} +1 -1
- package/chunks/{Index-CIuzrUvW.mjs → Index-CxEYiUa-.mjs} +1 -1
- package/chunks/{Index-DWMWEc1h.mjs → Index-xoyD_qOp.mjs} +1 -1
- package/chunks/{IndexItem-BGiKCAsP.mjs → IndexItem-BT-IQMY5.mjs} +1 -1
- package/chunks/{Log-3YYKqTZ2.mjs → Log-DOEaFtk1.mjs} +2 -2
- package/chunks/{LoginBg-Bk4XiQcv.mjs → LoginBg-YM4US_NO.mjs} +1 -1
- package/chunks/{Minute-DUu_mOOe.mjs → Minute-BJpoCyM8.mjs} +1 -1
- package/chunks/{Month-Gvd1GX2j.mjs → Month-UU1z-xQV.mjs} +1 -1
- package/chunks/{Preview-BrOs3WhB.mjs → Preview-SqQ2UnMr.mjs} +1 -1
- package/chunks/{Second-D022qvS-.mjs → Second-BOsQlzmK.mjs} +1 -1
- package/chunks/{SelectDept-B1D0kuQH.mjs → SelectDept-DJciskzT.mjs} +1 -1
- package/chunks/{SelectMenu-DHUb3_VU.mjs → SelectMenu-7XAtNOza.mjs} +1 -1
- package/chunks/{SelectUser-CAFBcwTn.mjs → SelectUser-ChPXL5SD.mjs} +2 -2
- package/chunks/{UserInfo-CqWhc6yw.mjs → UserInfo-Bzdeuht7.mjs} +1 -1
- package/chunks/{app-CEhN8Ot6.mjs → app-CouSbYl9.mjs} +1 -1
- package/chunks/auto-complete-WniYblq6.mjs +77 -0
- package/chunks/{custom-page-list-BSixJAQP.mjs → custom-page-list-ijqPjUG8.mjs} +4 -4
- package/chunks/{custom-page-table-BTWOfn8t.mjs → custom-page-table-CUlGWxoP.mjs} +2 -2
- package/chunks/{overview-D_sf7DL1.mjs → overview-ZgCAiVFV.mjs} +1 -1
- package/chunks/{page-list-PgB5MGIt.mjs → page-list-DsgM0XRF.mjs} +3 -3
- package/chunks/{page-query-CkhudpAH.mjs → page-query-D-9Bfc2i.mjs} +1 -1
- package/chunks/{page-table-C53YrGik.mjs → page-table-BNO8b2RS.mjs} +3 -3
- package/chunks/{pagination-DjeMHIma.mjs → pagination-CQP7D64K.mjs} +1 -1
- package/chunks/{provider-CkV8UD3o.mjs → provider-Bb25LOJZ.mjs} +13 -5
- package/chunks/{table-Bu1WKJn0.mjs → table-v44larO2.mjs} +1 -1
- package/components/app/index.mjs +1 -1
- package/components/app/src/app.mjs +1 -1
- package/components/auto-complete/index.d.ts +2 -0
- package/components/auto-complete/index.mjs +2 -0
- package/components/auto-complete/src/auto-complete.d.ts +12 -0
- package/components/auto-complete/src/auto-complete.mjs +2 -0
- package/components/auto-complete/src/auto-complete.vue.d.ts +10 -0
- package/components/button/index.mjs +1 -1
- package/components/button/src/button.mjs +1 -1
- package/components/checkbox-group/index.mjs +1 -1
- package/components/checkbox-group/src/checkbox-group.mjs +1 -1
- package/components/cron/index.mjs +1 -1
- package/components/cron/src/Common.mjs +1 -1
- package/components/cron/src/Day.mjs +1 -1
- package/components/cron/src/Hour.mjs +1 -1
- package/components/cron/src/Minute.mjs +1 -1
- package/components/cron/src/Month.mjs +1 -1
- package/components/cron/src/Picker.mjs +6 -6
- package/components/cron/src/Second.mjs +1 -1
- package/components/cron/src/cron.mjs +1 -1
- package/components/custom-page-list/index.mjs +1 -1
- package/components/custom-page-list/src/custom-page-list.mjs +1 -1
- package/components/custom-page-table/index.mjs +1 -1
- package/components/custom-page-table/src/custom-page-table.mjs +1 -1
- package/components/form/index.mjs +1 -1
- package/components/form/src/form.mjs +1 -1
- package/components/index.mjs +9 -9
- package/components/overview/index.mjs +1 -1
- package/components/overview/src/DicLabel/Index.mjs +1 -1
- package/components/overview/src/IndexItem.mjs +1 -1
- package/components/overview/src/overview.mjs +1 -1
- package/components/page-list/index.mjs +1 -1
- package/components/page-list/src/page-list.d.ts +8 -8
- package/components/page-list/src/page-list.mjs +1 -1
- package/components/page-query/index.mjs +1 -1
- package/components/page-query/src/page-query.mjs +1 -1
- package/components/page-table/index.mjs +1 -1
- package/components/page-table/src/page-table.mjs +1 -1
- package/components/pagination/index.mjs +1 -1
- package/components/pagination/src/pagination.mjs +1 -1
- package/components/provider/index.mjs +1 -1
- package/components/provider/src/Provider.mjs +1 -1
- package/components/radio-group/index.mjs +1 -1
- package/components/radio-group/src/radio-group.mjs +1 -1
- package/components/select/index.mjs +1 -1
- package/components/select/src/select.mjs +1 -1
- package/components/select-sys-user/index.mjs +1 -1
- package/components/select-sys-user/src/Picker.mjs +2 -2
- package/components/select-sys-user/src/select-sys-user.mjs +1 -1
- package/components/table/index.mjs +1 -1
- package/components/table/src/table.mjs +1 -1
- package/components/tree/index.mjs +1 -1
- package/components/tree/src/tree.mjs +1 -1
- package/components/tree-select/index.mjs +1 -1
- package/components/tree-select/src/tree-select.mjs +1 -1
- package/components/upload/index.mjs +1 -1
- package/components/upload/src/upload.mjs +1 -1
- package/hooks/useDicOptions/index.mjs +1 -1
- package/hooks/useSysUser/index.mjs +1 -1
- package/layout/Entry.mjs +1 -1
- package/layout/Home.mjs +48 -26
- package/layout/Home1.mjs +31 -0
- package/layout/Home1.vue.d.ts +3 -0
- package/layout/Login.mjs +2 -2
- package/layout/NotFound.mjs +1 -1
- package/layout/index.mjs +2 -0
- package/layout/modules/Aside.mjs +1 -1
- package/layout/modules/Breadcrumb.mjs +1 -1
- package/layout/modules/Header.mjs +1 -1
- package/layout/modules/LoginBg.mjs +1 -1
- package/layout/modules/LoginBgBak.mjs +7 -1
- package/layout/profile/Index.mjs +2 -2
- package/layout/profile/ResetPwd.mjs +1 -1
- package/layout/profile/UserInfo.mjs +1 -1
- package/layout/vueBits/Grainient.mjs +140 -0
- package/layout/vueBits/Grainient.vue.d.ts +52 -0
- package/layout/vueBits/LightRays.vue.d.ts +1 -1
- package/layout/vueBits/Prism.vue.d.ts +5 -5
- package/main.mjs +2 -2
- package/package.json +1 -1
- package/plugins/autoImport/$alova/index.mjs +1 -1
- package/plugins/autoImport/$confirm/index.mjs +1 -1
- package/plugins/autoImport/$dialog/index.mjs +1 -1
- package/plugins/autoImport/$drawer/index.mjs +1 -1
- package/plugins/captcha/captcha.mjs +1 -1
- package/plugins/captcha/index.mjs +1 -1
- package/plugins/initialize/webUpdateNotify.mjs +1 -1
- package/plugins/tableRenders/cell/Buttons/Index.mjs +1 -1
- package/plugins/tableRenders/cell/DicLabel/Index.mjs +1 -1
- package/plugins/tableRenders/cell/Select/Index.mjs +1 -1
- package/plugins/tableRenders/cell/index.mjs +3 -3
- package/proj-template/.cursor/rules/type-check-after-edit.mdc +17 -0
- package/proj-template/.cursor/skills/refactor-page-list/SKILL.md +61 -6
- package/proj-template/.cursor/skills/refactor-page-list/examples.md +118 -0
- package/proj-template/package.json +37 -0
- package/proj-template/pnpm-workspace.yaml +0 -1
- package/router/index.mjs +1 -1
- package/store/modules/common.mjs +1 -1
- package/store/modules/login.mjs +1 -1
- package/store/modules/recentRouters.mjs +1 -1
- package/store/modules/router.mjs +1 -1
- package/store/modules/user.mjs +1 -1
- package/utils/tree.d.ts +2 -1
- package/utils/tree.mjs +8 -5
- package/views/monitor/cache/index.mjs +2 -2
- package/views/monitor/cacheList/index.mjs +2 -2
- package/views/monitor/logininfor/index.mjs +2 -2
- package/views/monitor/online/index.mjs +2 -2
- package/views/monitor/operlog/index.mjs +2 -2
- package/views/monitor/server/index.mjs +2 -2
- package/views/system/config/index.mjs +2 -2
- package/views/system/dept/index.mjs +2 -2
- package/views/system/dept/utils.mjs +1 -1
- package/views/system/dict/index.mjs +3 -3
- package/views/system/dict/modules/DictTypeDetail.mjs +1 -1
- package/views/system/menu/index.mjs +2 -2
- package/views/system/menu/utils.mjs +1 -1
- package/views/system/notice/index.mjs +2 -2
- package/views/system/post/index.mjs +2 -2
- package/views/system/role/index.mjs +5 -5
- package/views/system/role/modules/AssignUser.mjs +1 -1
- package/views/system/role/modules/SelectDept.mjs +1 -1
- package/views/system/role/modules/SelectMenu.mjs +1 -1
- package/views/system/role/modules/SelectUser.mjs +1 -1
- package/views/system/user/index.mjs +3 -3
- package/views/tool/gen/editTable/index.mjs +4 -4
- package/views/tool/gen/editTable/modules/BasicInfo.mjs +1 -1
- package/views/tool/gen/editTable/modules/ColumnInfo.mjs +1 -1
- package/views/tool/gen/editTable/modules/GenInfo.mjs +1 -1
- package/views/tool/gen/index.mjs +4 -4
- package/views/tool/gen/modules/Import.mjs +1 -1
- package/views/tool/gen/modules/Preview.mjs +1 -1
- package/views/tool/job/index.mjs +3 -3
- package/views/tool/job/modules/Log.mjs +1 -1
- package/proj-template/patches/omi@7.7.13.patch +0 -15
package/layout/Home1.mjs
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { o as e } from "../chunks/provider-Bb25LOJZ.mjs";
|
|
2
|
+
import { t } from "../chunks/table-v44larO2.mjs";
|
|
3
|
+
import "../components/table/index.mjs";
|
|
4
|
+
import { createElementBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, openBlock as o, ref as s, unref as c } from "vue";
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region ../../packages/dlzn-ui/layout/Home1.vue
|
|
7
|
+
var l = /* @__PURE__ */ a({
|
|
8
|
+
__name: "Home1",
|
|
9
|
+
setup(a) {
|
|
10
|
+
let l = [{
|
|
11
|
+
component: "TColorPicker",
|
|
12
|
+
model: "color"
|
|
13
|
+
}, {
|
|
14
|
+
component: "TCron",
|
|
15
|
+
model: "model"
|
|
16
|
+
}], u = s([{ color: "#000000" }]), d = [{
|
|
17
|
+
cell: { component: "ColorPicker" },
|
|
18
|
+
colKey: "color",
|
|
19
|
+
title: "Color"
|
|
20
|
+
}];
|
|
21
|
+
return (a, s) => (o(), n("div", null, [r("div", null, [i(c(e), {
|
|
22
|
+
disabled: "",
|
|
23
|
+
items: l
|
|
24
|
+
}), i(c(t), {
|
|
25
|
+
columns: d,
|
|
26
|
+
data: u.value
|
|
27
|
+
}, null, 8, ["data"])])]));
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
//#endregion
|
|
31
|
+
export { l as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
package/layout/Login.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { B as e, j as t, n, o as r } from "../chunks/provider-
|
|
1
|
+
import { B as e, j as t, n, o as r } from "../chunks/provider-Bb25LOJZ.mjs";
|
|
2
2
|
import { t as i } from "../chunks/icon-DcFIQ_yG.mjs";
|
|
3
3
|
import "../components/icon/index.mjs";
|
|
4
4
|
import a from "../plugins/autoImport/$msg/index.mjs";
|
|
5
5
|
import { t as o } from "../chunks/gradient-text-BAIl_tKw.mjs";
|
|
6
6
|
import "../components/gradient-text/index.mjs";
|
|
7
7
|
import s from "../plugins/captcha/index.mjs";
|
|
8
|
-
import { t as c } from "../chunks/LoginBg-
|
|
8
|
+
import { t as c } from "../chunks/LoginBg-YM4US_NO.mjs";
|
|
9
9
|
import { computed as l, createBlock as u, createCommentVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, onMounted as h, openBlock as g, unref as _, useTemplateRef as v, withCtx as y } from "vue";
|
|
10
10
|
import { useRouter as b } from "vue-router";
|
|
11
11
|
//#endregion
|
package/layout/NotFound.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "../chunks/provider-
|
|
1
|
+
import { n as e } from "../chunks/provider-Bb25LOJZ.mjs";
|
|
2
2
|
import { createBlock as t, createTextVNode as n, createVNode as r, defineComponent as i, openBlock as a, unref as o, withCtx as s } from "vue";
|
|
3
3
|
import { Empty as c } from "tdesign-vue-next";
|
|
4
4
|
import { useRouter as l } from "vue-router";
|
package/layout/index.mjs
CHANGED
|
@@ -3,6 +3,7 @@ var t = {
|
|
|
3
3
|
.../* @__PURE__ */ Object.assign({
|
|
4
4
|
"./Entry.vue": () => import("./Entry.mjs"),
|
|
5
5
|
"./Home.vue": () => import("./Home.mjs"),
|
|
6
|
+
"./Home1.vue": () => import("./Home1.mjs"),
|
|
6
7
|
"./Login.vue": () => import("./Login.mjs"),
|
|
7
8
|
"./NotFound.vue": () => import("./NotFound.mjs"),
|
|
8
9
|
"./modules/LoginBg.vue": () => import("./modules/LoginBg.mjs"),
|
|
@@ -11,6 +12,7 @@ var t = {
|
|
|
11
12
|
"./profile/Index.vue": () => import("./profile/Index.mjs"),
|
|
12
13
|
"./profile/ResetPwd.vue": () => import("./profile/ResetPwd.mjs"),
|
|
13
14
|
"./profile/UserInfo.vue": () => import("./profile/UserInfo.mjs"),
|
|
15
|
+
"./vueBits/Grainient.vue": () => import("./vueBits/Grainient.mjs"),
|
|
14
16
|
"./vueBits/LightRays.vue": () => import("./vueBits/LightRays.mjs"),
|
|
15
17
|
"./vueBits/Plasma.vue": () => import("./vueBits/Plasma.mjs"),
|
|
16
18
|
"./vueBits/Prism.vue": () => import("./vueBits/Prism.mjs")
|
package/layout/modules/Aside.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { I as e } from "../../chunks/provider-
|
|
1
|
+
import { I as e } from "../../chunks/provider-Bb25LOJZ.mjs";
|
|
2
2
|
export { e as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { F as e } from "../../chunks/provider-
|
|
1
|
+
import { F as e } from "../../chunks/provider-Bb25LOJZ.mjs";
|
|
2
2
|
export { e as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as e } from "../../chunks/provider-
|
|
1
|
+
import { A as e } from "../../chunks/provider-Bb25LOJZ.mjs";
|
|
2
2
|
export { e as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../chunks/LoginBg-
|
|
1
|
+
import { t as e } from "../../chunks/LoginBg-YM4US_NO.mjs";
|
|
2
2
|
export { e as default };
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import e from "../../hooks/usePrimaryColor/index.mjs";
|
|
2
2
|
import { computed as t, createBlock as n, createElementBlock as r, createElementVNode as i, defineAsyncComponent as a, defineComponent as o, guardReactiveProps as s, h as c, normalizeProps as l, openBlock as u, renderSlot as d, resolveDynamicComponent as f, unref as p } from "vue";
|
|
3
3
|
//#region ../../packages/dlzn-ui/layout/modules/LoginBgBak.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var m = { class: "relative flex h-full items-center justify-center" }, h = { class: "absolute z-4" }, g = "
|
|
4
|
+
var m = { class: "relative flex h-full items-center justify-center" }, h = { class: "absolute z-4" }, g = "Grainient", _ = /* @__PURE__ */ o({
|
|
5
5
|
__name: "LoginBgBak",
|
|
6
6
|
setup(o) {
|
|
7
7
|
let _ = /* #__PURE__ */ Object.assign({
|
|
8
|
+
"../vueBits/Grainient.vue": () => import("../vueBits/Grainient.mjs"),
|
|
8
9
|
"../vueBits/LightRays.vue": () => import("../vueBits/LightRays.mjs"),
|
|
9
10
|
"../vueBits/Plasma.vue": () => import("../vueBits/Plasma.mjs"),
|
|
10
11
|
"../vueBits/Prism.vue": () => import("../vueBits/Prism.mjs")
|
|
11
12
|
}), v = t(() => {
|
|
12
13
|
let t = e();
|
|
13
14
|
return {
|
|
15
|
+
Grainient: {
|
|
16
|
+
color1: "#FF9FFC",
|
|
17
|
+
color2: "#5227FF",
|
|
18
|
+
color3: "#B497CF"
|
|
19
|
+
},
|
|
14
20
|
LightRays: {
|
|
15
21
|
distortion: .05,
|
|
16
22
|
followMouse: !0,
|
package/layout/profile/Index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { S as e, a as t } from "../../chunks/provider-
|
|
1
|
+
import { S as e, a as t } from "../../chunks/provider-Bb25LOJZ.mjs";
|
|
2
2
|
import { isFalsy as n } from "../../utils/boolean.mjs";
|
|
3
3
|
import "../../chunks/utils-ag05P503.mjs";
|
|
4
4
|
import { t as r } from "../../chunks/card-Domqu1Hz.mjs";
|
|
5
5
|
import "../../components/card/index.mjs";
|
|
6
6
|
import { t as i } from "../../chunks/tab-panel-yh4fFZ2r.mjs";
|
|
7
7
|
import "../../components/tab-panel/index.mjs";
|
|
8
|
-
import { t as a } from "../../chunks/UserInfo-
|
|
8
|
+
import { t as a } from "../../chunks/UserInfo-Bzdeuht7.mjs";
|
|
9
9
|
import { Fragment as o, computed as s, createBlock as c, createElementBlock as l, createVNode as u, defineComponent as d, markRaw as f, openBlock as p, provide as m, ref as h, renderList as g, resolveDynamicComponent as _, unref as v, withCtx as y } from "vue";
|
|
10
10
|
import { List as b, ListItem as x, ListItemMeta as S, Tabs as C } from "tdesign-vue-next";
|
|
11
11
|
import { useRequest as w } from "alova/client";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e } from "../../chunks/provider-
|
|
1
|
+
import { a as e } from "../../chunks/provider-Bb25LOJZ.mjs";
|
|
2
2
|
export { e as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../chunks/UserInfo-
|
|
1
|
+
import { t as e } from "../../chunks/UserInfo-Bzdeuht7.mjs";
|
|
2
2
|
export { e as default };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { createElementBlock as e, defineComponent as t, normalizeClass as n, onBeforeUnmount as r, onMounted as i, openBlock as a, useTemplateRef as o, watch as s } from "vue";
|
|
2
|
+
import { Mesh as c, Program as l, Renderer as u, Triangle as d } from "ogl";
|
|
3
|
+
//#region ../../packages/dlzn-ui/layout/vueBits/Grainient.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var f = "#version 300 es\nin vec2 position;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n}\n", p = "#version 300 es\nprecision highp float;\nuniform vec2 iResolution;\nuniform float iTime;\nuniform float uTimeSpeed;\nuniform float uColorBalance;\nuniform float uWarpStrength;\nuniform float uWarpFrequency;\nuniform float uWarpSpeed;\nuniform float uWarpAmplitude;\nuniform float uBlendAngle;\nuniform float uBlendSoftness;\nuniform float uRotationAmount;\nuniform float uNoiseScale;\nuniform float uGrainAmount;\nuniform float uGrainScale;\nuniform float uGrainAnimated;\nuniform float uContrast;\nuniform float uGamma;\nuniform float uSaturation;\nuniform vec2 uCenterOffset;\nuniform float uZoom;\nuniform vec3 uColor1;\nuniform vec3 uColor2;\nuniform vec3 uColor3;\nout vec4 fragColor;\n#define S(a,b,t) smoothstep(a,b,t)\nmat2 Rot(float a){float s=sin(a),c=cos(a);return mat2(c,-s,s,c);} \nvec2 hash(vec2 p){p=vec2(dot(p,vec2(2127.1,81.17)),dot(p,vec2(1269.5,283.37)));return fract(sin(p)*43758.5453);} \nfloat noise(vec2 p){vec2 i=floor(p),f=fract(p),u=f*f*(3.0-2.0*f);float n=mix(mix(dot(-1.0+2.0*hash(i+vec2(0.0,0.0)),f-vec2(0.0,0.0)),dot(-1.0+2.0*hash(i+vec2(1.0,0.0)),f-vec2(1.0,0.0)),u.x),mix(dot(-1.0+2.0*hash(i+vec2(0.0,1.0)),f-vec2(0.0,1.0)),dot(-1.0+2.0*hash(i+vec2(1.0,1.0)),f-vec2(1.0,1.0)),u.x),u.y);return 0.5+0.5*n;}\nvoid mainImage(out vec4 o, vec2 C){\n float t=iTime*uTimeSpeed;\n vec2 uv=C/iResolution.xy;\n float ratio=iResolution.x/iResolution.y;\n vec2 tuv=uv-0.5+uCenterOffset;\n tuv/=max(uZoom,0.001);\n\n float degree=noise(vec2(t*0.1,tuv.x*tuv.y)*uNoiseScale);\n tuv.y*=1.0/ratio;\n tuv*=Rot(radians((degree-0.5)*uRotationAmount+180.0));\n tuv.y*=ratio;\n\n float frequency=uWarpFrequency;\n float ws=max(uWarpStrength,0.001);\n float amplitude=uWarpAmplitude/ws;\n float warpTime=t*uWarpSpeed;\n tuv.x+=sin(tuv.y*frequency+warpTime)/amplitude;\n tuv.y+=sin(tuv.x*(frequency*1.5)+warpTime)/(amplitude*0.5);\n\n vec3 colLav=uColor1;\n vec3 colOrg=uColor2;\n vec3 colDark=uColor3;\n float b=uColorBalance;\n float s=max(uBlendSoftness,0.0);\n mat2 blendRot=Rot(radians(uBlendAngle));\n float blendX=(tuv*blendRot).x;\n float edge0=-0.3-b-s;\n float edge1=0.2-b+s;\n float v0=0.5-b+s;\n float v1=-0.3-b-s;\n vec3 layer1=mix(colDark,colOrg,S(edge0,edge1,blendX));\n vec3 layer2=mix(colOrg,colLav,S(edge0,edge1,blendX));\n vec3 col=mix(layer1,layer2,S(v0,v1,tuv.y));\n\n vec2 grainUv=uv*max(uGrainScale,0.001);\n if(uGrainAnimated>0.5){grainUv+=vec2(iTime*0.05);} \n float grain=fract(sin(dot(grainUv,vec2(12.9898,78.233)))*43758.5453);\n col+=(grain-0.5)*uGrainAmount;\n\n col=(col-0.5)*uContrast+0.5;\n float luma=dot(col,vec3(0.2126,0.7152,0.0722));\n col=mix(vec3(luma),col,uSaturation);\n col=pow(max(col,0.0),vec3(1.0/max(uGamma,0.001)));\n col=clamp(col,0.0,1.0);\n\n o=vec4(col,1.0);\n}\nvoid main(){\n vec4 o=vec4(0.0);\n mainImage(o,gl_FragCoord.xy);\n fragColor=o;\n}\n", m = /* @__PURE__ */ t({
|
|
5
|
+
__name: "Grainient",
|
|
6
|
+
props: {
|
|
7
|
+
timeSpeed: { default: .25 },
|
|
8
|
+
colorBalance: { default: 0 },
|
|
9
|
+
warpStrength: { default: 1 },
|
|
10
|
+
warpFrequency: { default: 5 },
|
|
11
|
+
warpSpeed: { default: 2 },
|
|
12
|
+
warpAmplitude: { default: 50 },
|
|
13
|
+
blendAngle: { default: 0 },
|
|
14
|
+
blendSoftness: { default: .05 },
|
|
15
|
+
rotationAmount: { default: 500 },
|
|
16
|
+
noiseScale: { default: 2 },
|
|
17
|
+
grainAmount: { default: .1 },
|
|
18
|
+
grainScale: { default: 2 },
|
|
19
|
+
grainAnimated: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: !1
|
|
22
|
+
},
|
|
23
|
+
contrast: { default: 1.5 },
|
|
24
|
+
gamma: { default: 1 },
|
|
25
|
+
saturation: { default: 1 },
|
|
26
|
+
centerX: { default: 0 },
|
|
27
|
+
centerY: { default: 0 },
|
|
28
|
+
zoom: { default: .9 },
|
|
29
|
+
color1: { default: "#48FF28" },
|
|
30
|
+
color2: { default: "#2c3d32" },
|
|
31
|
+
color3: { default: "#65a865" },
|
|
32
|
+
className: { default: "" }
|
|
33
|
+
},
|
|
34
|
+
setup(t) {
|
|
35
|
+
let m = (e) => {
|
|
36
|
+
let t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
|
37
|
+
return t ? [
|
|
38
|
+
parseInt(t[1], 16) / 255,
|
|
39
|
+
parseInt(t[2], 16) / 255,
|
|
40
|
+
parseInt(t[3], 16) / 255
|
|
41
|
+
] : [
|
|
42
|
+
1,
|
|
43
|
+
1,
|
|
44
|
+
1
|
|
45
|
+
];
|
|
46
|
+
}, h = t, g = o("containerRef"), _ = null, v = () => {
|
|
47
|
+
if (!g.value) return;
|
|
48
|
+
let e = new u({
|
|
49
|
+
webgl: 2,
|
|
50
|
+
alpha: !0,
|
|
51
|
+
antialias: !1,
|
|
52
|
+
dpr: Math.min(window.devicePixelRatio || 1, 2)
|
|
53
|
+
}), t = e.gl, n = t.canvas;
|
|
54
|
+
n.style.width = "100%", n.style.height = "100%", n.style.display = "block";
|
|
55
|
+
let r = g.value;
|
|
56
|
+
r.appendChild(n);
|
|
57
|
+
let i = new d(t), a = new l(t, {
|
|
58
|
+
vertex: f,
|
|
59
|
+
fragment: p,
|
|
60
|
+
uniforms: {
|
|
61
|
+
iTime: { value: 0 },
|
|
62
|
+
iResolution: { value: new Float32Array([1, 1]) },
|
|
63
|
+
uTimeSpeed: { value: h.timeSpeed },
|
|
64
|
+
uColorBalance: { value: h.colorBalance },
|
|
65
|
+
uWarpStrength: { value: h.warpStrength },
|
|
66
|
+
uWarpFrequency: { value: h.warpFrequency },
|
|
67
|
+
uWarpSpeed: { value: h.warpSpeed },
|
|
68
|
+
uWarpAmplitude: { value: h.warpAmplitude },
|
|
69
|
+
uBlendAngle: { value: h.blendAngle },
|
|
70
|
+
uBlendSoftness: { value: h.blendSoftness },
|
|
71
|
+
uRotationAmount: { value: h.rotationAmount },
|
|
72
|
+
uNoiseScale: { value: h.noiseScale },
|
|
73
|
+
uGrainAmount: { value: h.grainAmount },
|
|
74
|
+
uGrainScale: { value: h.grainScale },
|
|
75
|
+
uGrainAnimated: { value: +!!h.grainAnimated },
|
|
76
|
+
uContrast: { value: h.contrast },
|
|
77
|
+
uGamma: { value: h.gamma },
|
|
78
|
+
uSaturation: { value: h.saturation },
|
|
79
|
+
uCenterOffset: { value: new Float32Array([h.centerX, h.centerY]) },
|
|
80
|
+
uZoom: { value: h.zoom },
|
|
81
|
+
uColor1: { value: new Float32Array(m(h.color1)) },
|
|
82
|
+
uColor2: { value: new Float32Array(m(h.color2)) },
|
|
83
|
+
uColor3: { value: new Float32Array(m(h.color3)) }
|
|
84
|
+
}
|
|
85
|
+
}), o = new c(t, {
|
|
86
|
+
geometry: i,
|
|
87
|
+
program: a
|
|
88
|
+
}), s = () => {
|
|
89
|
+
let n = r.getBoundingClientRect(), i = Math.max(1, Math.floor(n.width)), o = Math.max(1, Math.floor(n.height));
|
|
90
|
+
e.setSize(i, o);
|
|
91
|
+
let s = a.uniforms.iResolution.value;
|
|
92
|
+
s[0] = t.drawingBufferWidth, s[1] = t.drawingBufferHeight;
|
|
93
|
+
}, v = new ResizeObserver(s);
|
|
94
|
+
v.observe(r), s();
|
|
95
|
+
let y = 0, b = performance.now(), x = (t) => {
|
|
96
|
+
a.uniforms.iTime.value = (t - b) * .001, e.render({ scene: o }), y = requestAnimationFrame(x);
|
|
97
|
+
};
|
|
98
|
+
y = requestAnimationFrame(x), _ = () => {
|
|
99
|
+
cancelAnimationFrame(y), v.disconnect();
|
|
100
|
+
try {
|
|
101
|
+
r.removeChild(n);
|
|
102
|
+
} catch {}
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
return i(v), r(() => {
|
|
106
|
+
_?.();
|
|
107
|
+
}), s(() => [
|
|
108
|
+
h.timeSpeed,
|
|
109
|
+
h.colorBalance,
|
|
110
|
+
h.warpStrength,
|
|
111
|
+
h.warpFrequency,
|
|
112
|
+
h.warpSpeed,
|
|
113
|
+
h.warpAmplitude,
|
|
114
|
+
h.blendAngle,
|
|
115
|
+
h.blendSoftness,
|
|
116
|
+
h.rotationAmount,
|
|
117
|
+
h.noiseScale,
|
|
118
|
+
h.grainAmount,
|
|
119
|
+
h.grainScale,
|
|
120
|
+
h.grainAnimated,
|
|
121
|
+
h.contrast,
|
|
122
|
+
h.gamma,
|
|
123
|
+
h.saturation,
|
|
124
|
+
h.centerX,
|
|
125
|
+
h.centerY,
|
|
126
|
+
h.zoom,
|
|
127
|
+
h.color1,
|
|
128
|
+
h.color2,
|
|
129
|
+
h.color3
|
|
130
|
+
], () => {
|
|
131
|
+
_?.(), v();
|
|
132
|
+
}, { deep: !0 }), (r, i) => (a(), e("div", {
|
|
133
|
+
ref_key: "containerRef",
|
|
134
|
+
ref: g,
|
|
135
|
+
class: n(["relative h-full w-full overflow-hidden", t.className])
|
|
136
|
+
}, null, 2));
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
//#endregion
|
|
140
|
+
export { m as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
interface GrainientProps {
|
|
2
|
+
timeSpeed?: number;
|
|
3
|
+
colorBalance?: number;
|
|
4
|
+
warpStrength?: number;
|
|
5
|
+
warpFrequency?: number;
|
|
6
|
+
warpSpeed?: number;
|
|
7
|
+
warpAmplitude?: number;
|
|
8
|
+
blendAngle?: number;
|
|
9
|
+
blendSoftness?: number;
|
|
10
|
+
rotationAmount?: number;
|
|
11
|
+
noiseScale?: number;
|
|
12
|
+
grainAmount?: number;
|
|
13
|
+
grainScale?: number;
|
|
14
|
+
grainAnimated?: boolean;
|
|
15
|
+
contrast?: number;
|
|
16
|
+
gamma?: number;
|
|
17
|
+
saturation?: number;
|
|
18
|
+
centerX?: number;
|
|
19
|
+
centerY?: number;
|
|
20
|
+
zoom?: number;
|
|
21
|
+
color1?: string;
|
|
22
|
+
color2?: string;
|
|
23
|
+
color3?: string;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
declare const __VLS_export: import('vue').DefineComponent<GrainientProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<GrainientProps> & Readonly<{}>, {
|
|
27
|
+
className: string;
|
|
28
|
+
zoom: number;
|
|
29
|
+
color1: string;
|
|
30
|
+
color2: string;
|
|
31
|
+
color3: string;
|
|
32
|
+
timeSpeed: number;
|
|
33
|
+
colorBalance: number;
|
|
34
|
+
warpStrength: number;
|
|
35
|
+
warpFrequency: number;
|
|
36
|
+
warpSpeed: number;
|
|
37
|
+
warpAmplitude: number;
|
|
38
|
+
blendAngle: number;
|
|
39
|
+
blendSoftness: number;
|
|
40
|
+
rotationAmount: number;
|
|
41
|
+
noiseScale: number;
|
|
42
|
+
grainAmount: number;
|
|
43
|
+
grainScale: number;
|
|
44
|
+
grainAnimated: boolean;
|
|
45
|
+
contrast: number;
|
|
46
|
+
gamma: number;
|
|
47
|
+
saturation: number;
|
|
48
|
+
centerX: number;
|
|
49
|
+
centerY: number;
|
|
50
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
51
|
+
declare const _default: typeof __VLS_export;
|
|
52
|
+
export default _default;
|
|
@@ -16,6 +16,7 @@ interface LightRaysProps {
|
|
|
16
16
|
}
|
|
17
17
|
declare const __VLS_export: import('vue').DefineComponent<LightRaysProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LightRaysProps> & Readonly<{}>, {
|
|
18
18
|
className: string;
|
|
19
|
+
saturation: number;
|
|
19
20
|
distortion: number;
|
|
20
21
|
fadeDistance: number;
|
|
21
22
|
followMouse: boolean;
|
|
@@ -27,7 +28,6 @@ declare const __VLS_export: import('vue').DefineComponent<LightRaysProps, {}, {}
|
|
|
27
28
|
raysColor: string;
|
|
28
29
|
raysOrigin: RaysOrigin;
|
|
29
30
|
raysSpeed: number;
|
|
30
|
-
saturation: number;
|
|
31
31
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
32
32
|
declare const _default: typeof __VLS_export;
|
|
33
33
|
export default _default;
|
|
@@ -25,18 +25,18 @@ declare const __VLS_export: import('vue').DefineComponent<PrismProps, {}, {}, {}
|
|
|
25
25
|
};
|
|
26
26
|
height: number;
|
|
27
27
|
transparent: boolean;
|
|
28
|
-
|
|
28
|
+
scale: number;
|
|
29
29
|
baseWidth: number;
|
|
30
|
-
|
|
30
|
+
animationType: "rotate" | "hover" | "3drotate";
|
|
31
31
|
glow: number;
|
|
32
|
-
hueShift: number;
|
|
33
32
|
noise: number;
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
hueShift: number;
|
|
34
|
+
colorFrequency: number;
|
|
36
35
|
hoverStrength: number;
|
|
37
36
|
inertia: number;
|
|
38
37
|
bloom: number;
|
|
39
38
|
suspendWhenOffscreen: boolean;
|
|
39
|
+
timeScale: number;
|
|
40
40
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
41
41
|
declare const _default: typeof __VLS_export;
|
|
42
42
|
export default _default;
|
package/main.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as e, D as t } from "./chunks/provider-
|
|
2
|
-
import { t as n } from "./chunks/app-
|
|
1
|
+
import { B as e, D as t } from "./chunks/provider-Bb25LOJZ.mjs";
|
|
2
|
+
import { t as n } from "./chunks/app-CouSbYl9.mjs";
|
|
3
3
|
import "./components/app/index.mjs";
|
|
4
4
|
import r from "./plugins/directive/index.mjs";
|
|
5
5
|
import i from "./store/index.mjs";
|
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as e, S as t, w as n } from "../../../chunks/provider-
|
|
1
|
+
import { C as e, S as t, w as n } from "../../../chunks/provider-Bb25LOJZ.mjs";
|
|
2
2
|
export { t as default, e as getFilterEmptyParamsObj, n as getParamsString };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { V as e } from "../../../chunks/provider-
|
|
1
|
+
import { V as e } from "../../../chunks/provider-Bb25LOJZ.mjs";
|
|
2
2
|
export { e as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { H as e } from "../../../chunks/provider-
|
|
1
|
+
import { H as e } from "../../../chunks/provider-Bb25LOJZ.mjs";
|
|
2
2
|
export { e as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { O as e } from "../../../chunks/provider-
|
|
1
|
+
import { O as e } from "../../../chunks/provider-Bb25LOJZ.mjs";
|
|
2
2
|
export { e as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as e, n as t } from "../../chunks/provider-
|
|
1
|
+
import { S as e, n as t } from "../../chunks/provider-Bb25LOJZ.mjs";
|
|
2
2
|
import { t as n } from "../../chunks/icon-DcFIQ_yG.mjs";
|
|
3
3
|
import "../../components/icon/index.mjs";
|
|
4
4
|
import "../../chunks/utils-ag05P503.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as e } from "../../chunks/provider-
|
|
1
|
+
import { H as e } from "../../chunks/provider-Bb25LOJZ.mjs";
|
|
2
2
|
import { defineAsyncComponent as t, h as n } from "vue";
|
|
3
3
|
//#region ../../packages/dlzn-ui/plugins/captcha/index.ts
|
|
4
4
|
var r = () => new Promise((r) => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../../chunks/Index-
|
|
1
|
+
import { t as e } from "../../../../chunks/Index-CxEYiUa-.mjs";
|
|
2
2
|
export { e as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../../chunks/Index-
|
|
1
|
+
import { t as e } from "../../../../chunks/Index-C1v5EsZk.mjs";
|
|
2
2
|
export { e as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../../chunks/Index-
|
|
1
|
+
import { t as e } from "../../../../chunks/Index-xoyD_qOp.mjs";
|
|
2
2
|
export { e as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as e } from "../../../chunks/useAppContext-D47amIp5.mjs";
|
|
2
2
|
import { t } from "../../../chunks/Index-DOMlymIc.mjs";
|
|
3
|
-
import { t as n } from "../../../chunks/Index-
|
|
3
|
+
import { t as n } from "../../../chunks/Index-CxEYiUa-.mjs";
|
|
4
4
|
import { t as r } from "../../../chunks/Index-BKtK-Ikl.mjs";
|
|
5
5
|
import { t as i } from "../../../chunks/Index-But4jrnW.mjs";
|
|
6
6
|
import { t as a } from "../../../chunks/Index-BuqrJDKe.mjs";
|
|
7
|
-
import { t as o } from "../../../chunks/Index-
|
|
7
|
+
import { t as o } from "../../../chunks/Index-C1v5EsZk.mjs";
|
|
8
8
|
import { t as s } from "../../../chunks/Index-DlS664Iz.mjs";
|
|
9
9
|
import { t as c } from "../../../chunks/Index-BVighfGs.mjs";
|
|
10
10
|
import { t as l } from "../../../chunks/Index-sYhv1xn9.mjs";
|
|
@@ -14,7 +14,7 @@ import { t as f } from "../../../chunks/Index-B-O5KGpr.mjs";
|
|
|
14
14
|
import { t as p } from "../../../chunks/Index-B5dltuvs.mjs";
|
|
15
15
|
import { t as m } from "../../../chunks/Index-DBQnzqsw.mjs";
|
|
16
16
|
import { t as h } from "../../../chunks/Index-BAwtI6wg.mjs";
|
|
17
|
-
import { t as g } from "../../../chunks/Index-
|
|
17
|
+
import { t as g } from "../../../chunks/Index-xoyD_qOp.mjs";
|
|
18
18
|
import { t as _ } from "../../../chunks/Index-BOv4n_q9.mjs";
|
|
19
19
|
import { t as v } from "../../../chunks/Index-DuOAXN6w.mjs";
|
|
20
20
|
import { t as y } from "../../../chunks/Index-DytUHz5x.mjs";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 修改代码后必须通过项目 TypeScript 校验(pnpm type-check)
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 修改后 TypeScript 校验
|
|
7
|
+
|
|
8
|
+
在本仓库**每次完成代码修改**(含新增/删除文件)后,结束任务前必须执行类型检查并处理与本次改动相关的结果:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pnpm type-check
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
- 等价于 `vue-tsc --build`,以项目 `tsconfig` 为准;不要仅用 `vue-tsc --noEmit` 代替。
|
|
15
|
+
- 若报错路径属于**本次修改的文件**,必须修到通过再结束。
|
|
16
|
+
- 若报错在未改动的历史文件,说明现状即可;不要为通过全量检查而扩大无关改动范围。
|
|
17
|
+
- 与页面迁移 skill 一致:除 TS 外,对改动的 `.vue`/`.ts` 仍应执行 `pnpm eslint <路径>`。
|
|
@@ -37,7 +37,7 @@ Task Progress:
|
|
|
37
37
|
- [ ] 3. 在 qc-ui 同路径创建 index.vue
|
|
38
38
|
- [ ] 4. 按映射表转换配置
|
|
39
39
|
- [ ] 5. 内联新增/编辑表单(不迁移 PageListItemForm)
|
|
40
|
-
- [ ] 6. 对**本次修改的文件**执行 `pnpm eslint <路径>` 与 `pnpm
|
|
40
|
+
- [ ] 6. 对**本次修改的文件**执行 `pnpm eslint <路径>` 与 `pnpm type-check`,确认无 ESLint/TS 报错后再结束(见 `.cursor/rules/type-check-after-edit.mdc`)
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
### Step 1:分析原页面
|
|
@@ -165,8 +165,22 @@ $confirm({
|
|
|
165
165
|
| `responseType: 'blob'` 导出 | `apis.export.method: '.../export'`(POST) |
|
|
166
166
|
| `refreshCache` 且原定义为 delete | `$alova.Delete('.../refreshCache', ...)` |
|
|
167
167
|
| `unlock/{userName}` 且无 method | `$alova.Get('monitor/logininfor/unlock/${userName}', ...)` |
|
|
168
|
+
| `useDataResult: false`(如 online/list) | list 请求保留 `meta: { useDataResult: false }`(响应 `{ rows, total }` 在顶层,不在 `data` 内) |
|
|
169
|
+
| `online/{tokenId}` + `method: 'delete'` | `$alova.Delete('monitor/online/${row.tokenId}', undefined, { meta: { useSuccessMsg: true } })` |
|
|
168
170
|
|
|
169
|
-
路径占位符 `{userName}`、`{id}` 在目标项目中通常拼进 URL 字符串,如 `` `monitor/logininfor/unlock/${row.userName}` ``。
|
|
171
|
+
路径占位符 `{userName}`、`{id}`、`{tokenId}` 在目标项目中通常拼进 URL 字符串,如 `` `monitor/logininfor/unlock/${row.userName}` ``。
|
|
172
|
+
|
|
173
|
+
**原 api 带 `useDataResult: false` 的 list**(如 `getOnlineList`):
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
list: {
|
|
177
|
+
method: (o: Record<string, any>) =>
|
|
178
|
+
$alova.Get('monitor/online/list', {
|
|
179
|
+
meta: { useDataResult: false },
|
|
180
|
+
params: o,
|
|
181
|
+
}),
|
|
182
|
+
},
|
|
183
|
+
```
|
|
170
184
|
|
|
171
185
|
**`$alova` 参数个数**(勿与 axios 混用;写完后对照项目内已有调用):
|
|
172
186
|
|
|
@@ -205,8 +219,37 @@ list: {
|
|
|
205
219
|
| `title: 'xxx'` | `title: 'xxx'`(不变) |
|
|
206
220
|
| `type: 'checkbox'` | 由 `apis.delete.showBatch: true` 自动处理 |
|
|
207
221
|
| `field: 'c-action'` | `colKey: '_operation'` |
|
|
222
|
+
| `field: 'c-action'` + `fixed: 'right'` | **不要**写 `fixed: 'right'`;TTable 对 `colKey: '_operation'` 默认右固定 |
|
|
208
223
|
| 删除按钮 | 由 TPageList 根据 `apis.delete` 自动追加 |
|
|
209
224
|
| `field: 'remark'` / `title: '备注'` | 加 `resize: { maxWidth: 300 }`(内容可能很长) |
|
|
225
|
+
| slot / 模板拼 `${row.xxx}%` | `align: 'right'` + `FormatNumber` | 见下方「百分比列」 |
|
|
226
|
+
|
|
227
|
+
### 百分比列
|
|
228
|
+
|
|
229
|
+
原项目用 slot 或 `cell: (_, { row }) => \`${row.usage}%\`` 拼百分号时,迁移改用 `FormatNumber`:
|
|
230
|
+
|
|
231
|
+
- **靠右对齐**:数字/百分比列加 `align: 'right'`
|
|
232
|
+
- **空值安全**:后端字段(如 `usage`)可能为空/无效,`FormatNumber` 返回空字符串,避免 `undefined%`
|
|
233
|
+
- **勿手写 `%`**:由 `config.unit: 'percent'` 格式化
|
|
234
|
+
|
|
235
|
+
```typescript
|
|
236
|
+
{
|
|
237
|
+
align: 'right',
|
|
238
|
+
cell: {
|
|
239
|
+
component: 'FormatNumber',
|
|
240
|
+
config: {
|
|
241
|
+
style: 'unit',
|
|
242
|
+
unit: 'percent',
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
colKey: 'usage',
|
|
246
|
+
title: '已用百分比',
|
|
247
|
+
}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
纯数字列(非百分比)同理:`align: 'right'` + `cell: { component: 'FormatNumber' }`(无 `unit`)。
|
|
251
|
+
|
|
252
|
+
参考:`qc-ui/src/views/monitor/server/index.vue` 磁盘「已用百分比」列。
|
|
210
253
|
|
|
211
254
|
### 权限
|
|
212
255
|
|
|
@@ -214,7 +257,7 @@ list: {
|
|
|
214
257
|
|
|
215
258
|
### 即时请求操作需 popconfirm
|
|
216
259
|
|
|
217
|
-
`operations`
|
|
260
|
+
`operations` 与操作列 `Buttons` 中点击即发请求的操作(强退、解锁、刷新缓存、同步、重置等),**必须**用 `popconfirm` 二次确认,不用 `onClick` 直接请求;原项目 `$confirm` + `$api` 一律改为 `popconfirm.onConfirm` + `$alova`:
|
|
218
261
|
|
|
219
262
|
```typescript
|
|
220
263
|
{
|
|
@@ -233,6 +276,12 @@ list: {
|
|
|
233
276
|
|
|
234
277
|
新增/编辑等打开弹窗的操作不需要 popconfirm。
|
|
235
278
|
|
|
279
|
+
### 仅列表 + 行内操作(无 CRUD)
|
|
280
|
+
|
|
281
|
+
部分 monitor 页只有 list 与行内自定义按钮(如在线用户强退),**不配置** `apis.delete` / `export`,也无需 `tableOtherProps.rowKey`(无批量删)。操作列手写 `Buttons` + `popconfirm`;成功后 `pageListRef.value!.query()` 刷新。原项目未写 `permission` 的按钮,目标也**不要**自行添加。
|
|
282
|
+
|
|
283
|
+
参考:`qc-ui/src/views/monitor/online/index.vue`(原 `yq-monitor-front/src/views/monitor/online/index.vue`)。
|
|
284
|
+
|
|
236
285
|
### 只读详情弹窗($dialog)
|
|
237
286
|
|
|
238
287
|
原项目用旧式 `$dialog({ title, showCancel: false, confirmText: '关闭' }, Component)` 展示只读详情时,目标项目**直接用 `h(TForm, ...)` 内联**,与 `formItemMap` 共用,**不单独建 `modules/Detail.vue`**:
|
|
@@ -296,6 +345,9 @@ onClick: () => {
|
|
|
296
345
|
| 系统页参考(dlzn-ui) | `dlzn-ui/packages/dlzn-ui/views/system/post/index.vue` |
|
|
297
346
|
| 含 dateRange + 刷新缓存 | `dlzn-ui/packages/dlzn-ui/views/system/dict/index.vue` |
|
|
298
347
|
| 只读详情弹窗 | `qc-ui/src/views/monitor/operlog/index.vue` |
|
|
348
|
+
| 仅列表 + 行内强退 | `qc-ui/src/views/monitor/online/index.vue` |
|
|
349
|
+
| 原:仅列表 + 行内强退 | `yq-monitor-front/src/views/monitor/online/index.vue` |
|
|
350
|
+
| 百分比列 FormatNumber | `qc-ui/src/views/monitor/server/index.vue`(usage 列) |
|
|
299
351
|
|
|
300
352
|
更多 before/after 片段见 [examples.md](examples.md)。
|
|
301
353
|
|
|
@@ -303,12 +355,15 @@ onClick: () => {
|
|
|
303
355
|
|
|
304
356
|
- [ ] 路径与原项目一致(`src/views/.../index.vue`)
|
|
305
357
|
- [ ] 筛选、分页列表正常
|
|
306
|
-
- [ ]
|
|
307
|
-
- [ ] 自定义 operations
|
|
358
|
+
- [ ] 新增、编辑、单删、批量删、导出(仅列表页可跳过 CRUD 项)
|
|
359
|
+
- [ ] 自定义 operations / 行内 Buttons(如强退、解锁、刷新缓存)
|
|
360
|
+
- [ ] `_operation` 列未重复写 `fixed: 'right'`
|
|
361
|
+
- [ ] 原 list 带 `useDataResult: false` 时已保留 `meta`
|
|
362
|
+
- [ ] 百分比列用 `FormatNumber` + `align: 'right'`,未手写 `` `${row.xxx}%` ``
|
|
308
363
|
- [ ] 权限码与后端一致
|
|
309
364
|
- [ ] 每个非 CRUD 操作(unlock、clean、refreshCache 等)的 HTTP 方法已与原 `@/api` 定义逐项核对
|
|
310
365
|
- [ ] 无路由组件缺失报错
|
|
311
366
|
- [ ] 修改文件 ESLint 通过(`pnpm eslint <文件路径>`)
|
|
312
|
-
- [ ] 修改文件 TS 通过(`pnpm
|
|
367
|
+
- [ ] 修改文件 TS 通过(`pnpm type-check`,至少无本次文件相关报错)
|
|
313
368
|
- [ ] `$alova.Get` 仅两参;带 meta 时写在第二参 config 对象内
|
|
314
369
|
- [ ] `formItemMap` 使用 `satisfies Record<string, FormItem>`;条件显示用 `__others`
|