Commit ae9717bb by haojie

1

parent 5e262c8c
......@@ -22,6 +22,7 @@
"redux": "^4.2.1",
"redux-devtools-extension": "^2.13.9",
"redux-thunk": "^2.4.2",
"tdesign-react": "^1.1.8",
"typescript": "^5.1.3",
"vite": "^4.0.0",
"vite-plugin-compression": "^0.5.1",
......
<svg width="13" height="13" viewBox="0 0 13 13" fill="" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_533_3515)">
<path d="M0.8125 6.90625C0.56875 6.90625 0.40625 6.74375 0.40625 6.5C0.40625 6.25625 0.56875 6.09375 0.8125 6.09375H12.1875C12.4312 6.09375 12.5938 6.25625 12.5938 6.5C12.5938 6.74375 12.4312 6.90625 12.1875 6.90625H0.8125Z" fill=""/>
<path d="M12.1875 5.6875H0.8125C0.325 5.6875 0 6.0125 0 6.5C0 6.9875 0.325 7.3125 0.8125 7.3125H12.1875C12.675 7.3125 13 6.9875 13 6.5C13 6.0125 12.675 5.6875 12.1875 5.6875Z" fill=""/>
<path d="M6.5 12.5938C6.25625 12.5938 6.09375 12.4312 6.09375 12.1875V0.8125C6.09375 0.56875 6.25625 0.40625 6.5 0.40625C6.74375 0.40625 6.90625 0.56875 6.90625 0.8125V12.1875C6.90625 12.4312 6.74375 12.5938 6.5 12.5938Z" fill=""/>
<path d="M6.5 0C6.0125 0 5.6875 0.325 5.6875 0.8125V12.1875C5.6875 12.675 6.0125 13 6.5 13C6.9875 13 7.3125 12.675 7.3125 12.1875V0.8125C7.3125 0.325 6.9875 0 6.5 0Z" fill=""/>
</g>
<defs>
<clipPath id="clip0_533_3515">
<rect width="13" height="13" fill="white"/>
</clipPath>
</defs>
</svg>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<svg width="71" height="43" viewBox="0 0 71 43" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M1.23541 32.0474H9.44886C9.90052 32.0474 10.2725 32.3091 10.5647 32.8324C10.6179 32.9945 10.6444 33.1194 10.6444 33.2071V33.502C10.6444 33.9217 10.3801 34.2738 9.85137 34.558C9.68133 34.6271 9.5206 34.6616 9.36916 34.6616H6.6433V41.3488C6.6433 41.8934 6.32315 42.2946 5.68287 42.5523L5.47165 42.5762H5.17675C4.75166 42.5762 4.39433 42.3145 4.10474 41.7911C4.03566 41.6184 4.00112 41.459 4.00112 41.3129V34.6616H1.34301C0.721318 34.6616 0.288261 34.3508 0.043837 33.7291C0.0146123 33.6016 0 33.5113 0 33.4581V33.2748C0 32.7408 0.313501 32.3463 0.940503 32.0912C1.04677 32.062 1.14508 32.0474 1.23541 32.0474ZM12.6131 32.0474H18.8858C19.7811 32.0474 20.6047 32.4685 21.3566 33.3107C21.8029 33.951 22.0261 34.5527 22.0261 35.116V35.5503C22.0261 36.4058 21.601 37.2082 20.7508 37.9574C20.2301 38.2895 19.8156 38.4834 19.5075 38.5392V38.5512C20.5941 39.5156 21.3088 40.1864 21.6515 40.5637C21.8029 40.8187 21.8786 41.0618 21.8786 41.293C21.8786 41.8456 21.5705 42.2587 20.9541 42.5324C20.8319 42.5616 20.7415 42.5762 20.6831 42.5762H20.3882C20.0455 42.5762 19.5925 42.2733 19.0292 41.6676C18.8353 41.5055 17.7248 40.4893 15.6976 38.6189H14.0239V41.3129C14.0239 41.8868 13.6931 42.2999 13.0315 42.5523C12.9598 42.5682 12.8987 42.5762 12.8482 42.5762H12.5533C12.1096 42.5762 11.7457 42.3065 11.4614 41.7672C11.4082 41.6264 11.3817 41.5015 11.3817 41.3926V33.2748C11.3817 32.7408 11.6952 32.3463 12.3222 32.0912C12.4285 32.062 12.5254 32.0474 12.6131 32.0474ZM19.3839 34.6616H14.0239V36.0286H19.3839V34.6616ZM27.9879 32.0474H28.2151C28.7597 32.0474 29.1981 32.4804 29.5302 33.3465C32.0409 38.2961 33.3334 40.8679 33.4078 41.0618V41.4604C33.4078 41.9067 33.1142 42.264 32.527 42.5324C32.3995 42.5616 32.2959 42.5762 32.2162 42.5762H32.0249C31.4776 42.5762 31.0353 42.1285 30.6978 41.2332C28.9709 37.8166 28.0942 36.0976 28.0676 36.0764C26.1361 39.9633 25.1159 41.9851 25.007 42.1418C24.7174 42.4314 24.4185 42.5762 24.1103 42.5762H23.927C23.4833 42.5762 23.1167 42.3065 22.8271 41.7672C22.7819 41.6105 22.7594 41.4856 22.7594 41.3926V41.2332C22.7594 41.0366 23.0091 40.4707 23.5086 39.5355L27.0474 32.5455C27.3264 32.2134 27.6399 32.0474 27.9879 32.0474ZM35.3764 32.0474H39.6127C40.8508 32.0474 42.0304 32.5375 43.1515 33.5179C43.821 34.2113 44.2541 34.8476 44.4507 35.4268C44.6739 36.0485 44.7855 36.5785 44.7855 37.0169V37.5828C44.7855 38.773 44.27 39.9261 43.2392 41.0419C42.4661 41.7274 41.7169 42.1697 40.9916 42.369C40.4576 42.5071 40.0311 42.5762 39.7123 42.5762H35.3167C34.8703 42.5762 34.505 42.3065 34.2207 41.7672C34.1676 41.6264 34.141 41.5015 34.141 41.3926V33.2748C34.141 32.7408 34.4545 32.3463 35.0815 32.0912C35.1878 32.062 35.2861 32.0474 35.3764 32.0474ZM38.9791 34.6616H36.7832V39.9619H39.1265C40.0378 39.9619 40.8361 39.6166 41.5216 38.9258C41.9361 38.4263 42.1433 37.9149 42.1433 37.3915V37.2082C42.1433 36.4244 41.7102 35.739 40.8441 35.1518C40.3021 34.825 39.6804 34.6616 38.9791 34.6616ZM46.79 32.0474H46.9893C47.4409 32.0474 47.8155 32.2971 48.1131 32.7966C48.1954 32.9586 48.2366 33.1526 48.2366 33.3784V41.3129C48.2366 41.8868 47.8992 42.2999 47.2244 42.5523C47.1473 42.5682 47.0836 42.5762 47.0331 42.5762H46.7342C46.2746 42.5762 45.9 42.3065 45.6104 41.7672C45.5519 41.6264 45.5227 41.5015 45.5227 41.3926V33.2748C45.5227 32.7408 45.8455 32.3463 46.4911 32.0912C46.5974 32.062 46.697 32.0474 46.79 32.0474ZM50.2053 32.0474H50.3966C50.7739 32.0474 51.1578 32.2679 51.5483 32.7089C54.0165 35.1372 55.8257 36.9066 56.9761 38.0172V33.4581C56.9761 32.8019 57.2763 32.3516 57.8768 32.1071C58.0096 32.0673 58.1305 32.0474 58.2394 32.0474H58.4228C58.8717 32.0474 59.2437 32.3091 59.5386 32.8324C59.5917 32.9945 59.6183 33.1194 59.6183 33.2071V41.4365C59.6183 41.8429 59.3659 42.1883 58.8611 42.4726C58.7203 42.5417 58.5888 42.5762 58.4666 42.5762H58.1717C57.7944 42.5762 57.3268 42.2508 56.7689 41.5998L51.6161 36.5626V41.3129C51.6161 41.8868 51.2853 42.2999 50.6238 42.5523C50.552 42.5682 50.4909 42.5762 50.4404 42.5762H50.1455C49.7018 42.5762 49.3379 42.3065 49.0536 41.7672C49.0005 41.6264 48.9739 41.5015 48.9739 41.3926V33.2748C48.9739 32.7408 49.2861 32.3463 49.9104 32.0912C50.0193 32.062 50.1176 32.0474 50.2053 32.0474ZM65.5961 32.0474H69.8004C70.2335 32.0474 70.6054 32.3024 70.9163 32.8125C70.9721 33.0012 71 33.1327 71 33.2071V33.502C71 33.9217 70.7356 34.2738 70.2069 34.558C70.0342 34.6271 69.8722 34.6616 69.7207 34.6616H66.1819C64.8615 34.6616 63.8824 35.193 63.2448 36.2557C63.0801 36.6064 62.9977 36.9664 62.9977 37.3357C62.9977 38.3718 63.6035 39.1715 64.815 39.7348C65.248 39.8862 65.6479 39.9619 66.0145 39.9619H68.3578V38.6389C68.3578 37.9454 68.6315 37.4832 69.1788 37.252C69.3196 37.1803 69.471 37.1444 69.6331 37.1444H69.7446C70.3159 37.1444 70.7263 37.4699 70.9761 38.1208C70.992 38.1925 71 38.2536 71 38.3041V41.4365C71 41.8429 70.7476 42.1883 70.2428 42.4726C70.102 42.5417 69.9705 42.5762 69.8483 42.5762H65.4646C64.3142 42.5762 63.1824 42.1139 62.0692 41.1894C61.4395 40.5464 61.0556 40.0416 60.9175 39.675C60.5402 38.9258 60.3516 38.2071 60.3516 37.519V37.1285C60.3516 35.8745 60.8763 34.6922 61.9257 33.5817C63.0495 32.5588 64.273 32.0474 65.5961 32.0474Z"
fill="#0A0A0A"/>
<path
d="M27.5235 18.7227L28.5343 16.7206C28.612 16.5647 28.6039 16.3805 28.5118 16.2327C28.4665 16.1603 28.4032 16.1005 28.328 16.0591C28.2528 16.0176 28.1682 15.9959 28.0821 15.9959H25.8968L31.6281 5.53001L36.7455 14.7367C36.8356 14.8967 37.0054 14.9958 37.1896 14.9958H39.4935C39.6736 14.9958 39.8393 14.9027 39.9294 14.7489C40.0215 14.595 40.0235 14.4068 39.9355 14.2529L32.066 0.238367C31.8879 -0.0794556 31.36 -0.0794556 31.182 0.238367L21.0637 18.255C20.9758 18.4109 20.9798 18.5992 21.0699 18.753C21.1599 18.9049 21.3257 19 21.5057 19H27.0713C27.2636 18.998 27.4375 18.8927 27.5235 18.7227Z"
fill="#0A0A0A"/>
<path
d="M49.9378 18.2577L39.9362 0.256866C39.8452 0.0950604 39.6571 0.00404513 39.4872 0C39.3011 0.00404513 39.1333 0.111241 39.0503 0.277092L36.5504 5.27688C36.4797 5.41644 36.4797 5.58229 36.5504 5.72387L37.5496 7.72418C37.7195 8.06398 38.2757 8.06398 38.4456 7.72418L39.5155 5.58229L45.1585 16.0005H34.4996C34.2245 16.0005 34 16.225 34 16.5001V18.5004C34 18.7755 34.2245 19 34.4996 19H49.5009C49.6789 19 49.8427 18.907 49.9317 18.7532C50.0207 18.6016 50.0227 18.4135 49.9378 18.2577Z"
fill="#0A0A0A"/>
<path
d="M43.438 20.5755C43.3946 20.4951 43.3312 20.4281 43.2544 20.3814C43.1777 20.3347 43.0902 20.31 43.0012 20.3098H40.4994C40.3194 20.3098 40.1536 20.4102 40.0646 20.5713C39.9756 20.7345 39.9776 20.9332 40.0706 21.0922L41.1163 22.8955H29.8674L34.9336 13.8456C35.0186 13.695 35.0246 13.5109 34.9478 13.356L33.9487 11.2871C33.9083 11.2033 33.8467 11.1325 33.7705 11.082C33.6943 11.0315 33.6063 11.0034 33.5159 11.0005C33.3298 10.9921 33.1579 11.0946 33.0669 11.262L29.0746 18.4877L25.0742 25.2113C25.0275 25.2896 25.0019 25.3794 25.0001 25.4714C24.9983 25.5634 25.0204 25.6542 25.0641 25.7343C25.1075 25.8147 25.1709 25.8817 25.2477 25.9284C25.3245 25.9751 25.4119 25.9998 25.5009 26H45.5009C45.6789 26 45.8427 25.9038 45.9317 25.7448C46.0207 25.5879 46.0227 25.3912 45.9378 25.2302L43.438 20.5755Z"
fill="#0A0A0A"/>
</svg>
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var n={exports:{}},o={},u=Symbol.for("react.element"),a=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),h=Symbol.iterator;var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,m={};function S(e,t,r){this.props=e,this.context=t,this.refs=m,this.updater=r||b}function w(){}function E(e,t,r){this.props=e,this.context=t,this.refs=m,this.updater=r||b}S.prototype.isReactComponent={},S.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},S.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=S.prototype;var g=E.prototype=new w;g.constructor=E,v(g,S.prototype),g.isPureReactComponent=!0;var R=Array.isArray,$=Object.prototype.hasOwnProperty,k={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,r){var n,o={},a=null,c=null;if(null!=t)for(n in void 0!==t.ref&&(c=t.ref),void 0!==t.key&&(a=""+t.key),t)$.call(t,n)&&!j.hasOwnProperty(n)&&(o[n]=t[n]);var i=arguments.length-2;if(1===i)o.children=r;else if(1<i){for(var f=Array(i),l=0;l<i;l++)f[l]=arguments[l+2];o.children=f}if(e&&e.defaultProps)for(n in i=e.defaultProps)void 0===o[n]&&(o[n]=i[n]);return{$$typeof:u,type:e,key:a,ref:c,props:o,_owner:k.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===u}var P=/\/+/g;function x(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function I(e,t,r,n,o){var c=typeof e;"undefined"!==c&&"boolean"!==c||(e=null);var i=!1;if(null===e)i=!0;else switch(c){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case u:case a:i=!0}}if(i)return o=o(i=e),e=""===n?"."+x(i,0):n,R(o)?(r="",null!=e&&(r=e.replace(P,"$&/")+"/"),I(o,t,r,"",(function(e){return e}))):null!=o&&(C(o)&&(o=function(e,t){return{$$typeof:u,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,r+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(P,"$&/")+"/")+e)),t.push(o)),1;if(i=0,n=""===n?".":n+":",R(e))for(var f=0;f<e.length;f++){var l=n+x(c=e[f],f);i+=I(c,t,r,l,o)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),f=0;!(c=e.next()).done;)i+=I(c=c.value,t,r,l=n+x(c,f++),o);else if("object"===c)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function T(e,t,r){if(null==e)return e;var n=[],o=0;return I(e,n,"","",(function(e){return t.call(r,e,o++)})),n}function D(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var M={current:null},V={transition:null},A={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:V,ReactCurrentOwner:k};o.Children={map:T,forEach:function(e,t,r){T(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return T(e,(function(){t++})),t},toArray:function(e){return T(e,(function(e){return e}))||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},o.Component=S,o.Fragment=c,o.Profiler=f,o.PureComponent=E,o.StrictMode=i,o.Suspense=y,o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A,o.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=v({},e.props),o=e.key,a=e.ref,c=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,c=k.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(f in t)$.call(t,f)&&!j.hasOwnProperty(f)&&(n[f]=void 0===t[f]&&void 0!==i?i[f]:t[f])}var f=arguments.length-2;if(1===f)n.children=r;else if(1<f){i=Array(f);for(var l=0;l<f;l++)i[l]=arguments[l+2];n.children=i}return{$$typeof:u,type:e.type,key:o,ref:a,props:n,_owner:c}},o.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},o.createElement=O,o.createFactory=function(e){var t=O.bind(null,e);return t.type=e,t},o.createRef=function(){return{current:null}},o.forwardRef=function(e){return{$$typeof:p,render:e}},o.isValidElement=C,o.lazy=function(e){return{$$typeof:_,_payload:{_status:-1,_result:e},_init:D}},o.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},o.startTransition=function(e){var t=V.transition;V.transition={};try{e()}finally{V.transition=t}},o.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},o.useCallback=function(e,t){return M.current.useCallback(e,t)},o.useContext=function(e){return M.current.useContext(e)},o.useDebugValue=function(){},o.useDeferredValue=function(e){return M.current.useDeferredValue(e)},o.useEffect=function(e,t){return M.current.useEffect(e,t)},o.useId=function(){return M.current.useId()},o.useImperativeHandle=function(e,t,r){return M.current.useImperativeHandle(e,t,r)},o.useInsertionEffect=function(e,t){return M.current.useInsertionEffect(e,t)},o.useLayoutEffect=function(e,t){return M.current.useLayoutEffect(e,t)},o.useMemo=function(e,t){return M.current.useMemo(e,t)},o.useReducer=function(e,t,r){return M.current.useReducer(e,t,r)},o.useRef=function(e){return M.current.useRef(e)},o.useState=function(e){return M.current.useState(e)},o.useSyncExternalStore=function(e,t,r){return M.current.useSyncExternalStore(e,t,r)},o.useTransition=function(){return M.current.useTransition()},o.version="18.2.0",n.exports=o;var F=n.exports;const U=t(F);export{U as R,r as a,e as c,t as g,F as r};
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"_react-347a3393.js": {
"file": "assets/react-347a3393.js"
},
"_tdesign-react-334e4b27.js": {
"css": [
"assets/tdesign-react-db31776b.css"
],
"file": "assets/tdesign-react-334e4b27.js",
"imports": [
"_react-347a3393.js"
]
},
"resources/assets/svg/add.svg": {
"file": "assets/add-e0fb6364.svg",
"src": "resources/assets/svg/add.svg"
},
"resources/assets/svg/header/logo.svg": {
"file": "assets/logo-8ed34510.svg",
"src": "resources/assets/svg/header/logo.svg"
},
"resources/js/app.css": {
"file": "assets/app-a0e9313b.css",
"src": "resources/js/app.css"
},
"resources/js/app.jsx": {
"file": "assets/app-f8d7441a.js",
"css": [
"assets/app-a0e9313b.css"
],
"file": "assets/app-227194fd.js",
"imports": [
"_react-347a3393.js",
"_tdesign-react-334e4b27.js"
],
"isEntry": true,
"src": "resources/js/app.jsx"
},
"tdesign-react.css": {
"file": "assets/tdesign-react-db31776b.css",
"src": "tdesign-react.css"
}
}
\ No newline at end of file
body {
padding: 0;
margin: 0;
overflow: hidden;
}
a {
text-decoration: none;
}
......@@ -3,22 +3,24 @@
*:active,
::before,
::after {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
// * {
// -ms-touch-action: none;
// touch-action: none;
// }
.narrow-scrollbar {
&::-webkit-scrollbar {
}
&::-webkit-scrollbar-thumb {
background: #565656;
}
&:hover {
&::-webkit-scrollbar-thumb {
background: #565656 !important;
}
}
}
//.narrow-scrollbar {
// &::-webkit-scrollbar {
// }
//
// &::-webkit-scrollbar-thumb {
// background: #565656;
// }
//
// &:hover {
// &::-webkit-scrollbar-thumb {
// background: #565656 !important;
// }
// }
//}
.custom-layout-content {
width: 100%;
height: calc(100vh - 64px);
background: #FAFAFA;
overflow-y: auto;
.real-content {
width: 1500px;
background: white;
margin: 0 auto;
border: 1px solid #EAECEF;
border-top: none;
}
}
import './index.less';
export default function ({children}) {
return (
<div className="custom-layout-content narrow-scrollbar">
<div className="real-content">
{children}
</div>
</div>
)
}
......@@ -42,7 +42,7 @@ export default function ({children}) {
<div className="layout-head-right">
</div>
</div>
<article>{children}</article>
{children}
</main>
)
}
......
......@@ -3,6 +3,7 @@ import {Component} from 'react';
import Layout from '@/js/Layout';
import {ReactComponent as Logo} from '@/assets/svg/add.svg';
import {isMobile} from '@/js/utils/tool'
import Content from "@/js/Layout/Content";
interface MyProps {
info: any
......@@ -35,9 +36,11 @@ class Index extends Component<MyProps, MyState> {
return (
<Layout>
<Head title={this.props.info.title}></Head>
<h1>我是详情页面</h1>
<div>{this.name}</div>
<Logo></Logo>
<Content>
<h1>我是详情页面</h1>
<div>{this.name}</div>
<Logo></Logo>
</Content>
</Layout>
)
}
......
.contract-account-table {
.contract-account-label {
padding: 24px 12px 6px 12px;
font-weight: 600;
font-size: 14px;
color: #000000;
border-bottom: 1px solid #EAECEF;
}
.contract-account-table-box {
padding: 0 30px;
}
}
import './index.less'
import {Component} from "react";
import CustomTable from '@/js/components/Table/index';
class ContractAccount extends Component<any, any> {
constructor(props) {
super(props);
this.state = {
list: [],
name: 'aa'
}
this.columns = [
{
colKey: 'ddd',
title: '用户名',
align: 'center'
},
{
colKey: 'd2',
title: '交易所',
align: 'center'
},
{
colKey: 'd3',
title: '资产',
align: 'center'
},
{
colKey: 'd4',
title: '现货余额',
align: 'center'
},
{
colKey: 'd5',
title: '今日盈亏',
align: 'center'
},
];
}
changeList = () => {
this.setState({
list: [{
ddd: '111',
d2: '222',
d3: '333',
d4: '444',
d5: '555',
}]
})
setTimeout(() => {
this.setState({
list: [{
ddd: '111',
d2: '222',
d3: '333',
d4: '444',
d5: '555',
}, {
ddd: '111',
d2: '222',
d3: '333',
d4: '444',
d5: '555',
},]
})
}, 3000)
}
componentDidMount() {
// this.changeList();
}
render() {
return (
<div className={'contract-account-table'}>
<div className='contract-account-label'>合约账户</div>
<div className='contract-account-table-box'>
<CustomTable columns={this.columns} data={this.state.list}></CustomTable>
</div>
</div>
)
}
}
export default ContractAccount;
.contract-trade-table {
display: flex;
flex-direction: column;
.contract-trade-label {
padding: 24px 12px 6px 12px;
font-weight: 600;
font-size: 14px;
color: #000000;
border-bottom: 1px solid #EAECEF;
}
.contract-trade-table-box {
padding: 0 30px;
flex: 1;
}
.contract-trade-group {
display: flex;
align-items: center;
height: 37px;
font-weight: 600;
font-size: 14px;
& > * {
cursor: pointer;
transition: all 0.3s;
}
& > :nth-child(1) {
margin-left: 12px;
}
& > :not(:nth-child(1)) {
margin-left: 20px;
}
.group-active {
color: #C99400;
transition: all 0.3s;
}
}
}
import './index.less'
import {Component} from 'react';
import CustomTable from '@/js/components/Table/index';
import Pagination from '@/js/components/Pagination/index';
class ContractTrade extends Component<any, any> {
constructor(props) {
super(props);
this.state = {
list: [],
pageNum: 1,
pageSize: 10,
total: 0,
// 当前委托数量
currentEntrustNum: 0,
// 当前选择的按钮
currentGroupButton: '1',
}
this.columns = [
{
colKey: 'ddd',
title: '用户名',
},
{
colKey: 'd2',
title: '交易所',
},
{
colKey: 'd3',
title: '交易对',
},
{
colKey: 'd4',
title: '持仓方向',
align: 'center'
},
{
colKey: 'd5',
title: '策略',
align: 'center'
},
{
colKey: 'd6',
title: '开仓价格',
align: 'center'
},
{
colKey: 'd7',
title: '标记价格',
align: 'center'
},
{
colKey: 'd8',
title: '未实现盈亏',
align: 'center'
},
{
colKey: 'd9',
title: '操作',
align: 'center'
},
];
}
// 计算属性
get ComputedGroupButtons() {
return [
{
label: '持有仓位',
value: '1'
},
{
label: `当前委托(${this.state.currentEntrustNum})`,
value: '2'
},
{
label: '历史成交',
value: '3'
}
];
}
// 切换按钮
changeGroupButton = (value: string) => {
this.setState({
currentGroupButton: value
})
}
// 请求表格数据
getTableData = async () => {
try {
// const res:any = await ddd();
} catch (e) {
console.log(e)
}
}
pageChange = (value: number) => {
this.getTableData();
}
render() {
return (
<div className={'contract-trade-table'} id={this.props.id} style={this.props.style}>
<div className='contract-trade-label'>合约账户</div>
<div className='contract-trade-group'>
{
this.ComputedGroupButtons.map((item, index) => (
<div key={item.value}
className={item.value === this.state.currentGroupButton ? 'group-active' : ''}
onClick={this.changeGroupButton.bind(this, item.value)}
>
{item.label}
</div>
))
}
</div>
<div className='contract-trade-table-box'>
<CustomTable columns={this.columns} data={this.state.list}></CustomTable>
</div>
<Pagination onChange={this.pageChange} pageNum={this.state.pageNum}
pageSize={this.state.pageSize} total={this.state.total}></Pagination>
</div>
)
}
}
export default ContractTrade;
import {Head} from '@inertiajs/react';
import {Component} from 'react';
import Layout from '@/js/Layout';
import {ReactComponent as Logo} from '@/assets/svg/add.svg';
import {isMobile} from '@/js/utils/tool'
import {isMobile} from '@/js/utils/tool';
import Content from "../../Layout/Content";
import ContractAccount from "./components/ContractAccount";
import ContractTrade from './components/ContractTrade';
import {getDomRect} from '@/js/utils/dom'
interface MyProps {
info: any
......@@ -11,20 +14,32 @@ interface MyProps {
interface MyState {
}
// 定义常量
const dom_id = 'contract-trade';
class Index extends Component<MyProps, MyState> {
constructor(props) {
super(props);
this.name = '你好'
this.state = {
minHeight: 0,
}
}
// 获取表格最低高度
getTableHeight = () => {
const dom: HTMLElement = document.getElementById(dom_id);
const rect = getDomRect(dom);
const height = document.documentElement.clientHeight - rect.top;
this.setState({
minHeight: height
})
}
// componentWillUnmount() {
// console.log('我先执行')
// }
componentDidMount() {
console.log(isMobile())
this.getTableHeight();
// 请求接口
console.log('我先执行2')
}
shouldComponentUpdate(next: any, old: any): boolean {
......@@ -35,9 +50,14 @@ class Index extends Component<MyProps, MyState> {
return (
<Layout>
<Head title={this.props.info.title}></Head>
<h1>Home</h1>
<div>{this.name}</div>
<Logo></Logo>
<Content>
<ContractAccount></ContractAccount>
<ContractTrade id={dom_id} style={
{
minHeight: this.state.minHeight
}
}></ContractTrade>
</Content>
</Layout>
)
}
......
import './bootstrap';
import '../css/app.css';
import '../css/ui.less';
// tdesign
import 'tdesign-react/es/style/index.css'; // 少量公共样式
import {createInertiaApp} from '@inertiajs/react'
import {createRoot} from 'react-dom/client'
......
.reset-t-pagination-box {
padding: 30px 50px;
.reset-t-pagination {
.t-pagination__number {
border-color: transparent;
&:hover {
color: #C99400;
}
&:active {
background: transparent;
color: #C99400;
}
}
.t-is-current {
background: #C99400;
border-radius: 8px;
}
}
}
import './index.less';
import {Pagination as TPagination} from 'tdesign-react';
import {Component} from "react";
class Pagination extends Component<any, any> {
constructor(props) {
super(props);
}
pageChange = ({current, pageSize}: any) => {
// 通知父组件
this.props.onChange(current);
}
render() {
const props = this.props;
return (
<div className='reset-t-pagination-box'>
<TPagination
className={'reset-t-pagination'}
defaultCurrent={props.pageNum}
defaultPageSize={props.pageSize}
pageSizeOptions={[]}
pageEllipsisMode="mid"
showFirstAndLastPageBtn={false}
showJumper={false}
showPageNumber
showPreviousAndNextBtn
size="medium"
theme="default"
total={props.total}
totalContent
onChange={this.pageChange}
/>
</div>
)
}
}
export default Pagination;
.reset-t-table {
th {
border-bottom: 1px solid #EAECEF;
font-weight: 500;
font-size: 12px;
color: #707A8A;
}
}
import {Component} from 'react';
import {Table as TTable} from 'tdesign-react';
import './index.less'
class Index extends Component<any, any> {
constructor(props) {
super(props);
}
render() {
const {columns, data} = this.props;
return (
<TTable columns={columns} data={data} className={'reset-t-table'}>
</TTable>
)
}
}
export default Index;
// 获取dom-getBoundingClientRect
export const getDomRect = (dom: HTMLElement) => {
return dom.getBoundingClientRect();
}
......@@ -19,5 +19,28 @@ export default defineConfig({
alias: {
'@': '/resources'
}
}
},
build: {
minify: 'terser', // 混淆器,terser构建后文件体积更小
terserOptions: {
compress: {
//生产环境时移除console
drop_console: true,
// drop_debugger: true,
},
output: {
// 去掉注释内容
comments: false,
},
},
rollupOptions: {
output: {
manualChunks: {
// 拆分代码,这个就是分包,配置完后自动按需加载
react: ['react'],
'tdesign-react': ['tdesign-react'],
},
},
},
},
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment