diry 2 тижнів тому
батько
коміт
c2a31827e4
4 змінених файлів з 474 додано та 281 видалено
  1. 1 1
      lib/config.json
  2. 0 0
      lib/css/style.css
  3. 194 72
      lib/js/SSkeletonLayout.js
  4. 279 208
      lib/js/index2.js

+ 1 - 1
lib/config.json

@@ -1 +1 @@
-{"_hash":1793674605490,"VITE_APP_PROJECT_NAME":"前端项目架构","VITE_APP_VERSION":"v1.0","VITE_APP_JSS_LICENSE":"","VITE_APP_TITLE":"平台","VITE_APP_BASE_URL":"/","VITE_APP_FOOTER_VISIBLE":false,"VITE_APP_LOGIN_PHONE":false,"VITE_APP_LOGIN_QRCODE":false,"VITE_APP_MESSAGE_VISIBLE":true,"VITE_APP_IS_BASE":true,"VITE_APP_LANG_ENABLE":false,"VITE_APP_LANG":"zh","VITE_APP_API_PATH":"/apig","VITE_APP_SYS_SERVER_NAME":"portal","VITE_APP_MESSAGE_SERVER_NAME":"message","VITE_APP_PORTAL_SERVER_NAME":"portal","VITE_APP_FLOW_SERVER_NAME":"flow","VITE_APP_CLIENT_ID":"mm0001","VITE_APP_PREVIEW_ONLINE":"/filePreview/onlinePreview?url=","VITE_APP_WEB_SITE":"https://sapit.com.cn/#/home","VITE_APP_LOGIN_CASE_NAME":"辽ICP备14008719号-2","VITE_APP_BASE_CASE_NAME":"辽ICP备14008719号-2","VITE_APP_SOCKET_URL":"/","VITE_APP_SOCKET_PATH":"/apig/ws/websocket","VITE_CONFIG_MODE":false,"VITE_APP_API_BASE_URL":"http://192.168.200.7:6801","VITE_APP_API_FILE_URL":"/","VITE_APP_LOGIN_PATH":"/login","VITE_APP_DEFAULT_PATH":"/workplace/index","VITE_APP_LOGIN_PATH_THEME":"3","VITE_APP_MENU_THEME":"light","VITE_APP_MENU_BG":"#ebf7fe","VITE_APP_MENU_SUB_BG":"#ebf7fe","VITE_APP_MENU_HOVER_BG":"#d5e8f5","VITE_APP_MENU_ACTIVE_BG":"#d5e8f5","VITE_APP_MENU_TEXT":"","VITE_APP_MENU_TEXT_HOVER":"","VITE_APP_MENU_TEXT_ACTIVE":"","VITE_APP_MENU_GROUP_TITLE":"","VITE_APP_MENU_BG_LIGHTNESS":93,"VITE_APP_MENU_BG_SATURATION":66,"VITE_APP_MENU_BG_ACTIVE_MIX":16,"VITE_APP_MENU_BAR":"left","VITE_APP_THEME_VALUE":"blue","VITE_APP_THEME":{"blue":{"name":"blue","color":"#1677FF","lightColor":"\t#6495ED","darkColor":"#00008B","borderColor":"#B0C4DE","bgColor":"#f0f2f5"},"green":{"name":"green","color":"#00b96b","lightColor":"#90EE90","darkColor":"#3CB371","borderColor":"#98FB98","bgColor":"#F0FFF0"},"orange":{"name":"orange","color":"#FFA500","lightColor":"\t#FFE4B5","darkColor":"#FF8C00","borderColor":"#FFDEAD","bgColor":"#FFEFD5"}},"VITE_USER_NODE_ENV":"production"}
+{"_hash":1793683059731,"VITE_APP_PROJECT_NAME":"前端项目架构","VITE_APP_VERSION":"v1.0","VITE_APP_JSS_LICENSE":"","VITE_APP_TITLE":"平台","VITE_APP_BASE_URL":"/","VITE_APP_FOOTER_VISIBLE":false,"VITE_APP_LOGIN_PHONE":false,"VITE_APP_LOGIN_QRCODE":false,"VITE_APP_MESSAGE_VISIBLE":true,"VITE_APP_IS_BASE":true,"VITE_APP_LANG_ENABLE":false,"VITE_APP_LANG":"zh","VITE_APP_API_PATH":"/apig","VITE_APP_SYS_SERVER_NAME":"portal","VITE_APP_MESSAGE_SERVER_NAME":"message","VITE_APP_PORTAL_SERVER_NAME":"portal","VITE_APP_FLOW_SERVER_NAME":"flow","VITE_APP_CLIENT_ID":"mm0001","VITE_APP_PREVIEW_ONLINE":"/filePreview/onlinePreview?url=","VITE_APP_WEB_SITE":"https://sapit.com.cn/#/home","VITE_APP_LOGIN_CASE_NAME":"辽ICP备14008719号-2","VITE_APP_BASE_CASE_NAME":"辽ICP备14008719号-2","VITE_APP_SOCKET_URL":"/","VITE_APP_SOCKET_PATH":"/apig/ws/websocket","VITE_CONFIG_MODE":false,"VITE_APP_API_BASE_URL":"http://192.168.200.7:6801","VITE_APP_API_FILE_URL":"/","VITE_APP_LOGIN_PATH":"/login","VITE_APP_DEFAULT_PATH":"/workplace/index","VITE_APP_LOGIN_PATH_THEME":"3","VITE_APP_MENU_THEME":"light","VITE_APP_MENU_BG":"#ebf7fe","VITE_APP_MENU_SUB_BG":"#ebf7fe","VITE_APP_MENU_HOVER_BG":"#d5e8f5","VITE_APP_MENU_ACTIVE_BG":"#d5e8f5","VITE_APP_MENU_TEXT":"","VITE_APP_MENU_TEXT_HOVER":"","VITE_APP_MENU_TEXT_ACTIVE":"","VITE_APP_MENU_GROUP_TITLE":"","VITE_APP_MENU_BG_LIGHTNESS":93,"VITE_APP_MENU_BG_SATURATION":66,"VITE_APP_MENU_BG_ACTIVE_MIX":16,"VITE_APP_MENU_BAR":"left","VITE_APP_THEME_VALUE":"blue","VITE_APP_THEME":{"blue":{"name":"blue","color":"#1677FF","lightColor":"\t#6495ED","darkColor":"#00008B","borderColor":"#B0C4DE","bgColor":"#f0f2f5"},"green":{"name":"green","color":"#00b96b","lightColor":"#90EE90","darkColor":"#3CB371","borderColor":"#98FB98","bgColor":"#F0FFF0"},"orange":{"name":"orange","color":"#FFA500","lightColor":"\t#FFE4B5","darkColor":"#FF8C00","borderColor":"#FFDEAD","bgColor":"#FFEFD5"}},"VITE_USER_NODE_ENV":"production"}

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
lib/css/style.css


+ 194 - 72
lib/js/SSkeletonLayout.js

@@ -1,9 +1,14 @@
-import { ref as d, onMounted as T, onActivated as L, resolveDirective as P, openBlock as l, createElementBlock as i, normalizeStyle as c, createElementVNode as r, toDisplayString as S, Fragment as V, renderList as A, withDirectives as _, createBlock as b, withCtx as w, createTextVNode as N, resolveDynamicComponent as z, createCommentVNode as f, vShow as E, renderSlot as m, nextTick as M } from "vue";
-import { n as W, B as X } from "./index2.js";
-const F = { class: "title" }, I = { class: "btns" }, j = {
+import { ref as u, computed as Y, watch as Z, onMounted as ee, onActivated as te, resolveComponent as V, resolveDirective as ne, openBlock as n, createElementBlock as a, normalizeStyle as v, createElementVNode as d, toDisplayString as C, Fragment as K, renderList as L, withDirectives as j, createBlock as m, withCtx as f, createTextVNode as A, resolveDynamicComponent as le, createCommentVNode as r, vShow as se, renderSlot as D, createVNode as h, nextTick as oe } from "vue";
+import { n as ae, B as ie } from "./index2.js";
+import { _ as ue, S as re } from "./index10.js";
+import { T as ce, _ as de } from "./index11.js";
+const fe = { class: "title" }, ye = { class: "btns" }, pe = {
   key: 0,
   style: { "margin-left": "8px" }
-}, q = /* @__PURE__ */ Object.assign({ name: "SSkeletonLayout" }, {
+}, ve = {
+  key: 1,
+  class: "steps-btns"
+}, me = /* @__PURE__ */ Object.assign({ name: "SSkeletonLayout" }, {
   __name: "SSkeletonLayout",
   props: {
     // 页面标题
@@ -16,23 +21,57 @@ const F = { class: "title" }, I = { class: "btns" }, j = {
       type: Array,
       default: () => []
     },
-    bgColor: {
-      type: String,
-      default: ""
+    tabs: {
+      type: Array,
+      default: () => []
+    },
+    tabKey: {
+      type: Object,
+      default: () => ({
+        label: "label",
+        value: "value"
+      })
+    },
+    steps: {
+      type: Array,
+      default: () => []
     }
   },
-  emits: ["btnCallback"],
-  setup(p, { emit: $ }) {
-    const h = d(null), v = d(null), k = d(null), y = d(232), a = d(0);
-    function g() {
-      M(() => {
-        var o, t, n, C;
-        const e = ((t = (o = h.value) == null ? void 0 : o.parentNode) == null ? void 0 : t.offsetHeight) || 0, s = ((n = v.value) == null ? void 0 : n.offsetHeight) || 0, u = ((C = k.value) == null ? void 0 : C.offsetHeight) || 0;
-        a.value = Math.max(e - s - u, 0);
+  emits: ["tabsChange", "btnCallback", "stepChange", "stepConfirm"],
+  setup(s, { emit: F }) {
+    const _ = F, g = s, x = u(null), N = u(null), P = u(null), O = u(232), y = u(0), b = u(""), z = u(null), R = u(null), p = u(0), E = u(0), B = Y(() => g.tabKey && g.tabKey.value || "value");
+    Z(() => g.tabs, I, { immediate: !0, deep: !0 });
+    const I = () => {
+      const e = g.tabs || [];
+      if (!e.length) {
+        b.value = "";
+        return;
+      }
+      const l = B.value;
+      e.some((o) => o && o[l] === b.value) || (b.value = e[0][l]);
+    };
+    function q(e) {
+      b.value = e;
+      const l = g.tabs.find((o) => o[B.value] === e);
+      _("tabsChange", l);
+    }
+    function M(e) {
+      p.value += e === "prev" ? -1 : 1, _("stepChange", e, p.value);
+    }
+    function U() {
+      _("stepConfirm", p.value);
+    }
+    function W() {
+      oe(() => {
+        var i, S, w, $, H, T;
+        const e = ((S = (i = x.value) == null ? void 0 : i.parentNode) == null ? void 0 : S.offsetHeight) || 0, l = ((w = N.value) == null ? void 0 : w.offsetHeight) || 0, o = (($ = P.value) == null ? void 0 : $.offsetHeight) || 0;
+        y.value = Math.max(e - l - o, 0);
+        const c = ((H = z.value) == null ? void 0 : H.offsetHeight) || 0, k = ((T = R.value) == null ? void 0 : T.offsetHeight) || 0;
+        E.value = y.value - c - k;
       });
     }
-    T(() => g()), L(() => g());
-    const D = $, H = {
+    ee(() => W()), te(() => W());
+    const G = {
       add: "PlusCircleOutlined",
       edit: "FormOutlined",
       delete: "DeleteOutlined",
@@ -49,26 +88,26 @@ const F = { class: "title" }, I = { class: "btns" }, j = {
       TOP: "VerticalAlignTopOutlined",
       synchronize: "SyncOutlined"
     };
-    function x(e) {
-      D("btnCallback", e.key);
+    function J(e) {
+      _("btnCallback", e.key);
     }
-    function O(e) {
-      return typeof e.icon == "string" ? e.icon : typeof e.icon == "boolean" && e.icon && H[e.key] || "";
+    function X(e) {
+      return typeof e.icon == "string" ? e.icon : typeof e.icon == "boolean" && e.icon && G[e.key] || "";
     }
-    const B = {
+    const Q = {
       mounted(e) {
-        e.style.cursor = "e-resize", document.addEventListener("selectstart", (s) => {
-          s.preventDefault();
-        }), e.onmousedown = (s) => {
-          const u = s.clientX, o = y.value;
-          document.onmousemove = (t) => {
-            const n = t.clientX - u;
-            if (n < 0) {
-              if (o + n <= 232) return;
-              y.value = o + n;
+        e.style.cursor = "e-resize", document.addEventListener("selectstart", (l) => {
+          l.preventDefault();
+        }), e.onmousedown = (l) => {
+          const o = l.clientX, c = O.value;
+          document.onmousemove = (k) => {
+            const i = k.clientX - o;
+            if (i < 0) {
+              if (c + i <= 232) return;
+              O.value = c + i;
             } else {
-              if (o + n >= 500) return;
-              y.value = o + n;
+              if (c + i >= 500) return;
+              O.value = c + i;
             }
           }, document.onmouseup = () => {
             document.onmousemove = document.onmousedown = null;
@@ -76,85 +115,168 @@ const F = { class: "title" }, I = { class: "btns" }, j = {
         };
       }
     };
-    return (e, s) => {
-      const u = X, o = P("action");
-      return l(), i("div", {
+    return (e, l) => {
+      const o = ie, c = V("arrow-left-outlined"), k = V("arrow-right-outlined"), i = V("save-outlined"), S = re, w = ue, $ = de, H = ce, T = ne("action");
+      return n(), a("div", {
         class: "s-skeleton-layout",
         ref_key: "layout",
-        ref: h,
-        style: c({ backgroundColor: p.bgColor })
+        ref: x,
+        style: v({ backgroundColor: e.bgColor })
       }, [
-        r("div", {
+        d("div", {
           class: "tools",
           ref_key: "tools",
-          ref: v
+          ref: N
         }, [
-          r("div", F, S(p.title), 1),
-          r("div", I, [
-            (l(!0), i(V, null, A(p.buttons, (t) => (l(), i("span", {
+          d("div", fe, C(s.title), 1),
+          d("div", ye, [
+            (n(!0), a(K, null, L(s.buttons, (t) => (n(), a("span", {
               class: "item-btn",
               key: t.key
             }, [
-              _((l(), b(u, {
+              j((n(), m(o, {
                 class: "btn",
                 disabled: !!t.disabled,
                 type: t.type || t.key === "add" ? "primary" : "default",
-                onClick: (n) => x(t)
+                onClick: (he) => J(t)
               }, {
-                icon: w(() => [
-                  O(t) ? (l(), b(z(O(t)), { key: 0 })) : f("", !0)
+                icon: f(() => [
+                  X(t) ? (n(), m(le(X(t)), { key: 0 })) : r("", !0)
                 ]),
-                default: w(() => [
-                  N(" " + S(e.$l(t.name)), 1)
+                default: f(() => [
+                  A(" " + C(e.$l(t.name)), 1)
                 ]),
                 _: 2
               }, 1032, ["disabled", "type", "onClick"])), [
-                [o, t.action || t.key],
-                [E, t.show !== !1]
+                [T, t.action || t.key],
+                [se, t.show !== !1]
               ])
             ]))), 128)),
-            e.$slots.otherBtns ? (l(), i("span", j, [
-              m(e.$slots, "otherBtns", {}, void 0, !0)
-            ])) : f("", !0)
+            e.$slots.otherBtns ? (n(), a("span", pe, [
+              D(e.$slots, "otherBtns", {}, void 0, !0)
+            ])) : r("", !0),
+            s.steps.length > 0 ? (n(), a("span", ve, [
+              s.steps.length ? (n(), m(o, {
+                key: 0,
+                class: "btn",
+                disabled: p.value === e.stepDefaultActive,
+                onClick: l[0] || (l[0] = (t) => M("prev"))
+              }, {
+                default: f(() => [
+                  h(c),
+                  A(C(e.$l("上一步")), 1)
+                ]),
+                _: 1
+              }, 8, ["disabled"])) : r("", !0),
+              s.steps.length ? (n(), m(o, {
+                key: 1,
+                class: "btn",
+                type: "primary",
+                disabled: p.value === s.steps.length - 1,
+                onClick: l[1] || (l[1] = (t) => M("next"))
+              }, {
+                default: f(() => [
+                  h(k),
+                  A(C(e.$l("下一步")), 1)
+                ]),
+                _: 1
+              }, 8, ["disabled"])) : r("", !0),
+              h(o, {
+                style: { "margin-right": "8px" },
+                type: "primary",
+                onClick: U
+              }, {
+                default: f(() => [
+                  h(i),
+                  A(" " + C(e.$l("确认")), 1)
+                ]),
+                _: 1
+              })
+            ])) : r("", !0)
           ])
         ], 512),
-        r("div", {
+        d("div", {
           class: "skeleton-layout-main",
-          style: c({ height: a.value + "px" })
+          style: v({ height: y.value + "px" })
         }, [
-          e.$slots.tree ? (l(), i("div", {
+          e.$slots.tree ? (n(), a("div", {
             key: 0,
             class: "side s-side-tree",
             ref: "side",
-            style: c([{ height: a.value + "px", width: y.value + "px" }, { "overflow-y": "auto" }])
+            style: v([{ height: y.value + "px", width: O.value + "px" }, { "overflow-y": "auto" }])
           }, [
-            m(e.$slots, "tree", {}, void 0, !0)
-          ], 4)) : f("", !0),
-          e.$slots.tree ? _((l(), i("div", {
+            D(e.$slots, "tree", {}, void 0, !0)
+          ], 4)) : r("", !0),
+          e.$slots.tree ? j((n(), a("div", {
             key: 1,
             class: "side-bar s-theme-bg",
-            style: c({ height: a.value + "px" })
+            style: v({ height: y.value + "px" })
           }, null, 4)), [
-            [B]
-          ]) : f("", !0),
-          r("div", {
+            [Q]
+          ]) : r("", !0),
+          d("div", {
             class: "skeleton-content",
-            style: c({ height: a.value + "px" })
+            style: v({ height: y.value + "px" })
           }, [
-            m(e.$slots, "default", {}, void 0, !0)
+            s.steps && s.steps.length ? (n(), a("div", {
+              key: 0,
+              class: "step-wrap",
+              ref_key: "stepRef",
+              ref: R
+            }, [
+              h(w, {
+                current: p.value,
+                type: "navigation",
+                size: "small"
+              }, {
+                default: f(() => [
+                  (n(!0), a(K, null, L(s.steps, (t) => (n(), m(S, {
+                    title: t,
+                    key: t,
+                    disabled: !0
+                  }, null, 8, ["title"]))), 128))
+                ]),
+                _: 1
+              }, 8, ["current"])
+            ], 512)) : r("", !0),
+            s.tabs && s.tabs.length ? (n(), a("div", {
+              key: 1,
+              class: "tabs-wrap",
+              ref_key: "tabsRef",
+              ref: z
+            }, [
+              h(H, {
+                "active-key": b.value,
+                onChange: q
+              }, {
+                default: f(() => [
+                  (n(!0), a(K, null, L(s.tabs, (t) => (n(), m($, {
+                    tab: t[s.tabKey.label],
+                    key: t[B.value]
+                  }, null, 8, ["tab"]))), 128))
+                ]),
+                _: 1
+              }, 8, ["active-key"])
+            ], 512)) : r("", !0),
+            d("div", {
+              class: "skeleton-container",
+              style: v({ height: E.value + "px" })
+            }, [
+              D(e.$slots, "default", {}, void 0, !0)
+            ], 4)
           ], 4)
         ], 4),
-        r("div", {
+        d("div", {
           class: "other",
           ref_key: "other",
-          ref: k
+          ref: P
         }, [
-          m(e.$slots, "other", {}, void 0, !0)
+          D(e.$slots, "other", {}, void 0, !0)
         ], 512)
       ], 4);
     };
   }
-}), J = /* @__PURE__ */ W(q, [["__scopeId", "data-v-9e0f7d9d"]]);
+}), _e = /* @__PURE__ */ ae(me, [["__scopeId", "data-v-b3f920e1"]]);
 export {
-  J as default
+  _e as default
 };

Різницю між файлами не показано, бо вона завелика
+ 279 - 208
lib/js/index2.js


Деякі файли не було показано, через те що забагато файлів було змінено