feat(admin): perfect dashboard page
This commit is contained in:
parent
d7e74f862c
commit
5393d40ff7
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@omiu/chart-card",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.7",
|
||||
"main": "dist/index.es.js",
|
||||
"exports": {
|
||||
".": "./dist/index.es.js"
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
margin-bottom: 1.5rem;
|
||||
word-wrap: break-word;
|
||||
background-clip: border-box;
|
||||
border: 1px solid;
|
||||
|
@ -14,11 +13,14 @@
|
|||
border-color: #d8dbe0;
|
||||
}
|
||||
|
||||
.card[class^=bg-], .card[class*=" bg-"] {
|
||||
.card[class^=bg-],
|
||||
.card[class*=" bg-"] {
|
||||
border-color: rgba(0, 0, 0, 0.125);
|
||||
}
|
||||
|
||||
*, *::before, *::after {
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
@ -45,19 +47,24 @@
|
|||
padding: 1.25rem;
|
||||
}
|
||||
|
||||
.pb-0, .py-0 {
|
||||
.pb-0,
|
||||
.py-0 {
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.ml-3, .mx-3, html:not([dir=rtl]) .mfs-3 {
|
||||
.ml-3,
|
||||
.mx-3,
|
||||
html:not([dir=rtl]) .mfs-3 {
|
||||
margin-left: 1rem !important;
|
||||
}
|
||||
|
||||
.mr-3, .mx-3 {
|
||||
.mr-3,
|
||||
.mx-3 {
|
||||
margin-right: 1rem !important;
|
||||
}
|
||||
|
||||
.mt-3, .my-3 {
|
||||
.mt-3,
|
||||
.my-3 {
|
||||
margin-top: 1rem !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["index.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAIF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE","file":"index.css"}
|
||||
{"version":3,"sourceRoot":"","sources":["index.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;AAAA;EAEE;;;AAGF;AAAA;AAAA;EAGE;;;AAIF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;AAAA;EAEE;;;AAGF;AAAA;AAAA;EAGE;;;AAGF;AAAA;EAEE;;;AAGF;AAAA;EAEE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE","file":"index.css"}
|
|
@ -5,7 +5,6 @@
|
|||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
margin-bottom: 1.5rem;
|
||||
word-wrap: break-word;
|
||||
background-clip: border-box;
|
||||
border: 1px solid;
|
||||
|
@ -14,11 +13,14 @@
|
|||
border-color: #d8dbe0;
|
||||
}
|
||||
|
||||
.card[class^=bg-], .card[class*=" bg-"] {
|
||||
border-color: rgba(0,0,0,.125);
|
||||
.card[class^=bg-],
|
||||
.card[class*=" bg-"] {
|
||||
border-color: rgba(0, 0, 0, .125);
|
||||
}
|
||||
|
||||
*, *::before, *::after {
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
@ -46,22 +48,28 @@
|
|||
padding: 1.25rem;
|
||||
}
|
||||
|
||||
.pb-0, .py-0 {
|
||||
padding-bottom: 0!important;
|
||||
.pb-0,
|
||||
.py-0 {
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.ml-3, .mx-3, html:not([dir=rtl]) .mfs-3 {
|
||||
margin-left: 1rem!important;
|
||||
.ml-3,
|
||||
.mx-3,
|
||||
html:not([dir=rtl]) .mfs-3 {
|
||||
margin-left: 1rem !important;
|
||||
}
|
||||
|
||||
.mr-3, .mx-3 {
|
||||
margin-right: 1rem!important;
|
||||
}
|
||||
.mt-3, .my-3 {
|
||||
margin-top: 1rem!important;
|
||||
.mr-3,
|
||||
.mx-3 {
|
||||
margin-right: 1rem !important;
|
||||
}
|
||||
|
||||
.nowrap{
|
||||
.mt-3,
|
||||
.my-3 {
|
||||
margin-top: 1rem !important;
|
||||
}
|
||||
|
||||
.nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
@ -71,4 +79,4 @@
|
|||
|
||||
[class^=text-value] {
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
|
1
packages/admin/dist/assets/___vite-browser-external_commonjs-proxy.45057099.js
vendored
Normal file
1
packages/admin/dist/assets/___vite-browser-external_commonjs-proxy.45057099.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
import{i as o}from"./vendor.59122d2d.js";var r=o(Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:{}}));export{r};
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
|||
var e=Object.defineProperty,n=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,i=(n,t,o)=>t in n?e(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o;import{h as r,e as a,b as l,W as c,j as s,d as p,t as d,s as u}from"./vendor.7166e243.js";import"./index.esm.9e9d6b6e.js";
|
||||
var e=Object.defineProperty,n=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,i=(n,t,o)=>t in n?e(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o;import{h as r,e as a,b as l,W as c,j as s,d as p,t as d,s as u}from"./vendor.59122d2d.js";import"./index.esm.7e39debc.js";
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
|
@ -1 +1 @@
|
|||
import{W as e,h as t,t as r,s as n,b as i}from"./vendor.7166e243.js";var o=Object.defineProperty,s=Object.getOwnPropertyDescriptor;let a=class extends e{render(){return t("div",{class:r``},t("iframe",{height:window.innerHeight-90,style:"width: 100%;",scrolling:"yes",title:"OMIU Link",src:"https://tencent.github.io/omi/components/icon/demos/icon.html",frameborder:"no",loading:"lazy"}))}};a.css=n.target,a=((e,t,r,n)=>{for(var i,a=n>1?void 0:n?s(t,r):t,c=e.length-1;c>=0;c--)(i=e[c])&&(a=(n?i(t,r,a):i(a))||a);return n&&a&&o(t,r,a),a})([i("admin-icon")],a);export{a as default};
|
||||
import{W as e,h as t,t as r,s as n,b as i}from"./vendor.59122d2d.js";var o=Object.defineProperty,s=Object.getOwnPropertyDescriptor;let a=class extends e{render(){return t("div",{class:r``},t("iframe",{height:window.innerHeight-90,style:"width: 100%;",scrolling:"yes",title:"OMIU Link",src:"https://tencent.github.io/omi/components/icon/demos/icon.html",frameborder:"no",loading:"lazy"}))}};a.css=n.target,a=((e,t,r,n)=>{for(var i,a=n>1?void 0:n?s(t,r):t,d=e.length-1;d>=0;d--)(i=e[d])&&(a=(n?i(t,r,a):i(a))||a);return n&&a&&o(t,r,a),a})([i("admin-icon")],a);export{a as default};
|
|
@ -1 +1 @@
|
|||
import{k as getDefaultExportFromCjs,f as require$$0,g as commonjsGlobal}from"./vendor.7166e243.js";var ballot$2={exports:{}};(function(module,exports){var factory;factory=function(__WEBPACK_EXTERNAL_MODULE_omi__){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s="./esm/ballot.js")}({"./esm/ballot.js":function(module,exports,__webpack_require__){eval('\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar createSvgIcon_1 = __webpack_require__(/*! ./utils/createSvgIcon */ "./esm/utils/createSvgIcon.js");\nexports.default = createSvgIcon_1.default(omi_1.h("path", {\n fillRule: "evenodd",\n d: "M13 9.5h5v-2h-5v2zm0 7h5v-2h-5v2zm6 4.5H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v14c0 1.1-.9 2-2 2zM6 11h5V6H6v5zm1-4h3v3H7V7zM6 18h5v-5H6v5zm1-4h3v3H7v-3z"\n}), \'Ballot\');\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/ballot.js?')},"./esm/utils/createSvgIcon.js":function(module,exports,__webpack_require__){eval('\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) {\n return str.replace(hyphenateRE, \'-$1\').toLowerCase();\n};\nfunction createSvgIcon(path, displayName) {\n omi_1.define(hyphenate(\'OIcon\' + displayName), function (_) {\n return omi_1.h(\'svg\', __assign({ viewBox: "0 0 24 24", title: displayName }, _.props), path);\n }, {\n css: ":host {\\n fill: currentColor;\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n vertical-align: -0.125em;\\n transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\\n flex-shrink: 0;\\n user-select: none;\\n}"\n });\n}\nexports.default = createSvgIcon;\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/utils/createSvgIcon.js?')},omi:function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;\n\n//# sourceURL=webpack://%5Bname%5D/external_%7B%22commonjs%22:%22omi%22,%22commonjs2%22:%22omi%22,%22amd%22:%22omi%22,%22root%22:%22Omi%22%7D?")}}).default},module.exports=factory(require$$0)})(ballot$2);var ballot=getDefaultExportFromCjs(ballot$2.exports),ballot$1=Object.freeze(Object.assign(Object.create(null),ballot$2.exports,{[Symbol.toStringTag]:"Module",default:ballot}));export{ballot$1 as b};
|
||||
import{k as getDefaultExportFromCjs,f as require$$0,g as commonjsGlobal}from"./vendor.59122d2d.js";var ballot$2={exports:{}};(function(module,exports){var factory;factory=function(__WEBPACK_EXTERNAL_MODULE_omi__){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s="./esm/ballot.js")}({"./esm/ballot.js":function(module,exports,__webpack_require__){eval('\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar createSvgIcon_1 = __webpack_require__(/*! ./utils/createSvgIcon */ "./esm/utils/createSvgIcon.js");\nexports.default = createSvgIcon_1.default(omi_1.h("path", {\n fillRule: "evenodd",\n d: "M13 9.5h5v-2h-5v2zm0 7h5v-2h-5v2zm6 4.5H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v14c0 1.1-.9 2-2 2zM6 11h5V6H6v5zm1-4h3v3H7V7zM6 18h5v-5H6v5zm1-4h3v3H7v-3z"\n}), \'Ballot\');\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/ballot.js?')},"./esm/utils/createSvgIcon.js":function(module,exports,__webpack_require__){eval('\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) {\n return str.replace(hyphenateRE, \'-$1\').toLowerCase();\n};\nfunction createSvgIcon(path, displayName) {\n omi_1.define(hyphenate(\'OIcon\' + displayName), function (_) {\n return omi_1.h(\'svg\', __assign({ viewBox: "0 0 24 24", title: displayName }, _.props), path);\n }, {\n css: ":host {\\n fill: currentColor;\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n vertical-align: -0.125em;\\n transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\\n flex-shrink: 0;\\n user-select: none;\\n}"\n });\n}\nexports.default = createSvgIcon;\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/utils/createSvgIcon.js?')},omi:function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;\n\n//# sourceURL=webpack://%5Bname%5D/external_%7B%22commonjs%22:%22omi%22,%22commonjs2%22:%22omi%22,%22amd%22:%22omi%22,%22root%22:%22Omi%22%7D?")}}).default},module.exports=factory(require$$0)})(ballot$2);var ballot=getDefaultExportFromCjs(ballot$2.exports),ballot$1=Object.freeze(Object.assign(Object.create(null),ballot$2.exports,{[Symbol.toStringTag]:"Module",default:ballot}));export{ballot$1 as b};
|
|
@ -1 +1 @@
|
|||
import{W as e,h as t,t as s,s as a,b as c}from"./vendor.7166e243.js";import"./index.esm.7b4f3ca4.js";var i=Object.defineProperty,r=Object.getOwnPropertyDescriptor;let o=class extends e{constructor(){super(...arguments),this.dataSource=[],this.columns=[{title:"ID",render:e=>t("strong",null,e.id)},{title:"Name",key:"name"},{title:"Age",key:"age"},{title:"Address",key:"address"},{title:"操作",align:"right",render:e=>t("o-tooltip",{content:"删除"+e.name},t("o-icon-delete",{"data-item-id":e.id,onClick:this.onClick,style:"cursor:pointer;font-size:20px;"}))}],this.onClick=e=>{this.deleteItemById(Number(e.currentTarget.dataset.itemId))}}async install(){this.dataSource=await async function(){return[{id:1,name:"xwang",age:18,address:"Tencent"},{id:2,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:3,name:"lucy",age:12,address:"Tencent"},{id:4,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:5,name:"tim",age:12,address:"Tencent"},{id:6,name:"tim",age:12,address:"Tencent"},{id:7,name:"tim",age:12,address:"Tencent"},{id:8,name:"tim",age:12,address:"Tencent"}]}(),this.update()}deleteItemById(e){const t=this.dataSource.indexOf(this.dataSource.find((t=>t.id===e)));-1!==t&&(this.dataSource.splice(t,1),this.update())}render(){return t("div",{class:s`pl-0.5`},t("div",{class:s`px-2`},t("h4",{class:s`py-2 text-sm`},"基础表格"),t("o-table",{checkbox:!1,stripe:!1,border:!1,compact:!1,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex flex-row`},t("div",{class:s` px-2`},t("h4",{class:s`py-2 text-sm`},"冻结行列"),t("o-table",{checkbox:!0,stripe:!0,width:"200px",height:"250px",stickyTop:!0,stickyLeftCount:2,border:!0,compact:!0,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"带边框"),t("o-table",{checkbox:!0,stripe:!0,border:!0,compact:!0,columns:this.columns,dataSource:this.dataSource}))),t("div",{class:s`flex flex-row`},t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"压缩高度"),t("o-table",{checkbox:!1,stripe:!0,border:!1,compact:!0,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"无隔行变色"),t("o-table",{checkbox:!0,stripe:!1,border:!0,compact:!0,columns:this.columns,dataSource:this.dataSource}))))}};o.css=a.target,o=((e,t,s,a)=>{for(var c,o=a>1?void 0:a?r(t,s):t,d=e.length-1;d>=0;d--)(c=e[d])&&(o=(a?c(t,s,o):c(o))||o);return a&&o&&i(t,s,o),o})([c("basic-table")],o);export{o as default};
|
||||
import{W as e,h as t,t as s,s as a,b as c}from"./vendor.59122d2d.js";import"./index.esm.3fed61a2.js";var d=Object.defineProperty,i=Object.getOwnPropertyDescriptor;let r=class extends e{constructor(){super(...arguments),this.dataSource=[],this.columns=[{title:"ID",render:e=>t("strong",null,e.id)},{title:"Name",key:"name"},{title:"Age",key:"age"},{title:"Address",key:"address"},{title:"操作",align:"right",render:e=>t("o-tooltip",{content:"删除"+e.name},t("o-icon-delete",{"data-item-id":e.id,onClick:this.onClick,style:"cursor:pointer;font-size:20px;"}))}],this.onClick=e=>{this.deleteItemById(Number(e.currentTarget.dataset.itemId))}}async install(){this.dataSource=await async function(){return[{id:1,name:"xwang",age:18,address:"Tencent"},{id:2,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:3,name:"lucy",age:12,address:"Tencent"},{id:4,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:5,name:"tim",age:12,address:"Tencent"},{id:6,name:"tim",age:12,address:"Tencent"},{id:7,name:"tim",age:12,address:"Tencent"},{id:8,name:"tim",age:12,address:"Tencent"}]}(),this.update()}deleteItemById(e){const t=this.dataSource.indexOf(this.dataSource.find((t=>t.id===e)));-1!==t&&(this.dataSource.splice(t,1),this.update())}render(){return t("div",{class:s`pl-0.5`},t("div",{class:s`px-2`},t("h4",{class:s`py-2 text-sm`},"基础表格"),t("o-table",{checkbox:!1,stripe:!1,border:!1,compact:!1,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex flex-row`},t("div",{class:s` px-2`},t("h4",{class:s`py-2 text-sm`},"冻结行列"),t("o-table",{checkbox:!0,stripe:!0,width:"200px",height:"250px",stickyTop:!0,stickyLeftCount:2,border:!0,compact:!0,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"带边框"),t("o-table",{checkbox:!0,stripe:!0,border:!0,compact:!0,columns:this.columns,dataSource:this.dataSource}))),t("div",{class:s`flex flex-row`},t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"压缩高度"),t("o-table",{checkbox:!1,stripe:!0,border:!1,compact:!0,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"无隔行变色"),t("o-table",{checkbox:!0,stripe:!1,border:!0,compact:!0,columns:this.columns,dataSource:this.dataSource}))))}};r.css=a.target,r=((e,t,s,a)=>{for(var c,r=a>1?void 0:a?i(t,s):t,o=e.length-1;o>=0;o--)(c=e[o])&&(r=(a?c(t,s,r):c(r))||r);return a&&r&&d(t,s,r),r})([c("basic-table")],r);export{r as default};
|
|
@ -1 +1 @@
|
|||
import{k as getDefaultExportFromCjs,f as require$$0,g as commonjsGlobal}from"./vendor.7166e243.js";var emojiPeople$2={exports:{}};(function(module,exports){var factory;factory=function(__WEBPACK_EXTERNAL_MODULE_omi__){return function(e){var n={};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=n,o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,n){if(1&n&&(e=o(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)o.d(t,r,function(n){return e[n]}.bind(null,r));return t},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="",o(o.s="./esm/emoji-people.js")}({"./esm/emoji-people.js":function(module,exports,__webpack_require__){eval('\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar createSvgIcon_1 = __webpack_require__(/*! ./utils/createSvgIcon */ "./esm/utils/createSvgIcon.js");\nexports.default = createSvgIcon_1.default(omi_1.h(omi_1.h.f, null, omi_1.h("circle", {\n cx: "12",\n cy: "4",\n r: "2"\n}), omi_1.h("path", {\n d: "M15.89 8.11C15.5 7.72 14.83 7 13.53 7h-2.54C8.24 6.99 6 4.75 6 2H4c0 3.16 2.11 5.84 5 6.71V22h2v-6h2v6h2V10.05L18.95 14l1.41-1.41-4.47-4.48z"\n})), \'EmojiPeople\');\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/emoji-people.js?')},"./esm/utils/createSvgIcon.js":function(module,exports,__webpack_require__){eval('\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) {\n return str.replace(hyphenateRE, \'-$1\').toLowerCase();\n};\nfunction createSvgIcon(path, displayName) {\n omi_1.define(hyphenate(\'OIcon\' + displayName), function (_) {\n return omi_1.h(\'svg\', __assign({ viewBox: "0 0 24 24", title: displayName }, _.props), path);\n }, {\n css: ":host {\\n fill: currentColor;\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n vertical-align: -0.125em;\\n transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\\n flex-shrink: 0;\\n user-select: none;\\n}"\n });\n}\nexports.default = createSvgIcon;\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/utils/createSvgIcon.js?')},omi:function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;\n\n//# sourceURL=webpack://%5Bname%5D/external_%7B%22commonjs%22:%22omi%22,%22commonjs2%22:%22omi%22,%22amd%22:%22omi%22,%22root%22:%22Omi%22%7D?")}}).default},module.exports=factory(require$$0)})(emojiPeople$2);var emojiPeople=getDefaultExportFromCjs(emojiPeople$2.exports),emojiPeople$1=Object.freeze(Object.assign(Object.create(null),emojiPeople$2.exports,{[Symbol.toStringTag]:"Module",default:emojiPeople}));export{emojiPeople$1 as e};
|
||||
import{k as getDefaultExportFromCjs,f as require$$0,g as commonjsGlobal}from"./vendor.59122d2d.js";var emojiPeople$2={exports:{}};(function(module,exports){var factory;factory=function(__WEBPACK_EXTERNAL_MODULE_omi__){return function(e){var n={};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=n,o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,n){if(1&n&&(e=o(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)o.d(t,r,function(n){return e[n]}.bind(null,r));return t},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="",o(o.s="./esm/emoji-people.js")}({"./esm/emoji-people.js":function(module,exports,__webpack_require__){eval('\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar createSvgIcon_1 = __webpack_require__(/*! ./utils/createSvgIcon */ "./esm/utils/createSvgIcon.js");\nexports.default = createSvgIcon_1.default(omi_1.h(omi_1.h.f, null, omi_1.h("circle", {\n cx: "12",\n cy: "4",\n r: "2"\n}), omi_1.h("path", {\n d: "M15.89 8.11C15.5 7.72 14.83 7 13.53 7h-2.54C8.24 6.99 6 4.75 6 2H4c0 3.16 2.11 5.84 5 6.71V22h2v-6h2v6h2V10.05L18.95 14l1.41-1.41-4.47-4.48z"\n})), \'EmojiPeople\');\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/emoji-people.js?')},"./esm/utils/createSvgIcon.js":function(module,exports,__webpack_require__){eval('\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) {\n return str.replace(hyphenateRE, \'-$1\').toLowerCase();\n};\nfunction createSvgIcon(path, displayName) {\n omi_1.define(hyphenate(\'OIcon\' + displayName), function (_) {\n return omi_1.h(\'svg\', __assign({ viewBox: "0 0 24 24", title: displayName }, _.props), path);\n }, {\n css: ":host {\\n fill: currentColor;\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n vertical-align: -0.125em;\\n transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\\n flex-shrink: 0;\\n user-select: none;\\n}"\n });\n}\nexports.default = createSvgIcon;\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/utils/createSvgIcon.js?')},omi:function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;\n\n//# sourceURL=webpack://%5Bname%5D/external_%7B%22commonjs%22:%22omi%22,%22commonjs2%22:%22omi%22,%22amd%22:%22omi%22,%22root%22:%22Omi%22%7D?")}}).default},module.exports=factory(require$$0)})(emojiPeople$2);var emojiPeople=getDefaultExportFromCjs(emojiPeople$2.exports),emojiPeople$1=Object.freeze(Object.assign(Object.create(null),emojiPeople$2.exports,{[Symbol.toStringTag]:"Module",default:emojiPeople}));export{emojiPeople$1 as e};
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
|||
import{h as n,e,d as t,b as o,W as r}from"./vendor.7166e243.js";
|
||||
import{h as n,e,d as t,b as o,W as r}from"./vendor.59122d2d.js";
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
var t=Object.defineProperty,e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,i=(t,i)=>{for(var c in i||(i={}))n.call(i,c)&&o(t,c,i[c]);if(e)for(var c of e(i))r.call(i,c)&&o(t,c,i[c]);return t},c=(t,e,n)=>(o(t,"symbol"!=typeof e?e+"":e,n),n);import{h as p,e as a,b as s,W as l}from"./vendor.7166e243.js";
|
||||
var t=Object.defineProperty,e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,i=(t,i)=>{for(var c in i||(i={}))n.call(i,c)&&o(t,c,i[c]);if(e)for(var c of e(i))r.call(i,c)&&o(t,c,i[c]);return t},c=(t,e,n)=>(o(t,"symbol"!=typeof e?e+"":e,n),n);import{h as p,e as a,b as s,W as l}from"./vendor.59122d2d.js";
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@ -1,4 +1,4 @@
|
|||
import{h as n,e as o,b as e,W as t}from"./vendor.7166e243.js";
|
||||
import{h as n,e as o,b as e,W as t}from"./vendor.59122d2d.js";
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import{h as t,e as n,b as e,W as r}from"./vendor.7166e243.js";
|
||||
import{h as t,e as n,b as e,W as r}from"./vendor.59122d2d.js";
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
|
@ -1 +1 @@
|
|||
import{_ as e}from"./index.4e0c9eeb.js";import{W as t,h as a,t as i,s as n,b as s}from"./vendor.7166e243.js";import"./index.esm.7b4f3ca4.js";import"./index.esm.55ff4e88.js";var d=Object.defineProperty,r=Object.getOwnPropertyDescriptor;let o=class extends t{constructor(){super(...arguments),this.dataSource=[{id:1,name:"xwang",age:18,address:"Tencent"},{id:2,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:3,name:"lucy",age:12,address:"Tencent"},{id:4,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:5,name:"tim",age:12,address:"Tencent"},{id:6,name:"tim",age:12,address:"Tencent"},{id:7,name:"tim",age:12,address:"Tencent"},{id:8,name:"tim",age:12,address:"Tencent"},{id:9,name:"xwang",age:18,address:"Tencent"},{id:10,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:11,name:"lucy",age:12,address:"Tencent"},{id:12,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:13,name:"tim",age:12,address:"Tencent"},{id:14,name:"tim",age:12,address:"Tencent"},{id:15,name:"tim",age:12,address:"Tencent"},{id:16,name:"tim",age:12,address:"Tencent"}],this.columns=[{title:"ID",render:e=>a("strong",null,e.id)},{title:"Name",width:120,key:"name",editable:!0},{title:"Age",width:90,key:"age",editable:!0},{title:"Address",width:290,key:"address",editable:!0},{title:"操作",align:"right",render:e=>a("o-tooltip",{content:"删除"+e.name},a("o-icon-delete",{"data-item-id":e.id,_onclick:this.onClick,style:"cursor:pointer;font-size:20px;"}))}],this.paging=!0,this.pageSize=5,this.pageIndex=0,this.filterData=[],this.change=e=>{this.pageIndex=e.detail,this.renderTable()},this.onClick=e=>{this.table.deleteRowById(e.currentTarget.dataset.itemId)},this.exportExcel=()=>{e((()=>import("./export-excel.81418b81.js")),["assets/export-excel.81418b81.js","assets/vendor.7166e243.js"]).then((e=>{e.exportTableToExcel(this.table.rootNode.querySelector("table"))}))}}renderTable(){this.filterData=this.dataSource.slice(this.pageIndex*this.pageSize,this.pageIndex*this.pageSize+this.pageSize),this.update()}installed(){this.renderTable()}deleteItemById(e){const t=this.dataSource.indexOf(this.dataSource.find((t=>t.id===e)));-1!==t&&this.dataSource.splice(t,1),this.update()}render(){return a("div",{class:i`pl-0.5`},a("div",{class:i`relative h-10 text-right`},a("o-button",{class:i`relative top-2 right-2`,size:"mini",onClick:this.exportExcel},"导出Excel")),a("div",{class:i`px-2`},a("o-table",{ref:e=>this.table=e,checkbox:!1,stripe:!1,border:!1,compact:!1,columns:this.columns,dataSource:this.filterData}),a("div",{class:i`mt-3 text-right`},a("o-pagination",{total:this.dataSource.length,"current-page":this.pageIndex,"page-size":this.pageSize,onchange:this.change}))))}};o.css=n.target,o=((e,t,a,i)=>{for(var n,s=i>1?void 0:i?r(t,a):t,o=e.length-1;o>=0;o--)(n=e[o])&&(s=(i?n(t,a,s):n(s))||s);return i&&s&&d(t,a,s),s})([s("inline-editing")],o);export{o as default};
|
||||
import{_ as e}from"./index.d6aad707.js";import{W as t,h as a,t as i,s as n,b as s}from"./vendor.59122d2d.js";import"./index.esm.3fed61a2.js";import"./index.esm.e69e5702.js";var d=Object.defineProperty,r=Object.getOwnPropertyDescriptor;let o=class extends t{constructor(){super(...arguments),this.dataSource=[{id:1,name:"xwang",age:18,address:"Tencent"},{id:2,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:3,name:"lucy",age:12,address:"Tencent"},{id:4,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:5,name:"tim",age:12,address:"Tencent"},{id:6,name:"tim",age:12,address:"Tencent"},{id:7,name:"tim",age:12,address:"Tencent"},{id:8,name:"tim",age:12,address:"Tencent"},{id:9,name:"xwang",age:18,address:"Tencent"},{id:10,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:11,name:"lucy",age:12,address:"Tencent"},{id:12,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:13,name:"tim",age:12,address:"Tencent"},{id:14,name:"tim",age:12,address:"Tencent"},{id:15,name:"tim",age:12,address:"Tencent"},{id:16,name:"tim",age:12,address:"Tencent"}],this.columns=[{title:"ID",render:e=>a("strong",null,e.id)},{title:"Name",width:120,key:"name",editable:!0},{title:"Age",width:90,key:"age",editable:!0},{title:"Address",width:290,key:"address",editable:!0},{title:"操作",align:"right",render:e=>a("o-tooltip",{content:"删除"+e.name},a("o-icon-delete",{"data-item-id":e.id,_onclick:this.onClick,style:"cursor:pointer;font-size:20px;"}))}],this.paging=!0,this.pageSize=5,this.pageIndex=0,this.filterData=[],this.change=e=>{this.pageIndex=e.detail,this.renderTable()},this.onClick=e=>{this.table.deleteRowById(e.currentTarget.dataset.itemId)},this.exportExcel=()=>{e((()=>import("./export-excel.05343990.js")),["assets/export-excel.05343990.js","assets/vendor.59122d2d.js","assets/___vite-browser-external_commonjs-proxy.45057099.js"]).then((e=>{e.exportTableToExcel(this.table.rootNode.querySelector("table"))}))}}renderTable(){this.filterData=this.dataSource.slice(this.pageIndex*this.pageSize,this.pageIndex*this.pageSize+this.pageSize),this.update()}installed(){this.renderTable()}deleteItemById(e){const t=this.dataSource.indexOf(this.dataSource.find((t=>t.id===e)));-1!==t&&this.dataSource.splice(t,1),this.update()}render(){return a("div",{class:i`pl-0.5`},a("div",{class:i`relative h-10 text-right`},a("o-button",{class:i`relative top-2 right-2`,size:"mini",onClick:this.exportExcel},"导出Excel")),a("div",{class:i`px-2`},a("o-table",{ref:e=>this.table=e,checkbox:!1,stripe:!1,border:!1,compact:!1,columns:this.columns,dataSource:this.filterData}),a("div",{class:i`mt-3 text-right`},a("o-pagination",{total:this.dataSource.length,"current-page":this.pageIndex,"page-size":this.pageSize,onchange:this.change}))))}};o.css=n.target,o=((e,t,a,i)=>{for(var n,s=i>1?void 0:i?r(t,a):t,o=e.length-1;o>=0;o--)(n=e[o])&&(s=(i?n(t,a,s):n(s))||s);return i&&s&&d(t,a,s),s})([s("inline-editing")],o);export{o as default};
|
|
@ -1,4 +1,4 @@
|
|||
import{h as o,b as n,W as e,t as r,s as i}from"./vendor.7166e243.js";import"./admin-docs.fd3ba450.js";
|
||||
import{h as o,b as n,W as e,t as r,s as i}from"./vendor.59122d2d.js";import"./admin-docs.7d892bd3.js";import"./___vite-browser-external_commonjs-proxy.45057099.js";
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
import{W as e,h as t,t as a,s as i,b as n}from"./vendor.7166e243.js";import"./index.esm.7b4f3ca4.js";import"./index.esm.55ff4e88.js";var s=Object.defineProperty,d=Object.getOwnPropertyDescriptor;let r=class extends e{constructor(){super(...arguments),this.dataSource=[{id:1,name:"xwang",age:18,address:"Tencent"},{id:2,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:3,name:"lucy",age:12,address:"Tencent"},{id:4,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:5,name:"tim",age:12,address:"Tencent"},{id:6,name:"tim",age:12,address:"Tencent"},{id:7,name:"tim",age:12,address:"Tencent"},{id:8,name:"tim",age:12,address:"Tencent"},{id:9,name:"xwang",age:18,address:"Tencent"},{id:10,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:11,name:"lucy",age:12,address:"Tencent"},{id:12,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:13,name:"tim",age:12,address:"Tencent"},{id:14,name:"tim",age:12,address:"Tencent"},{id:15,name:"tim",age:12,address:"Tencent"},{id:16,name:"tim",age:12,address:"Tencent"}],this.columns=[{title:"ID",render:e=>t("strong",null,e.id)},{title:"Name",key:"name"},{title:"Age",key:"age"},{title:"Address",key:"address"},{title:"操作",align:"right",render:e=>t("o-tooltip",{content:"删除"+e.name},t("o-icon-delete",{"data-item-id":e.id,_onclick:this.onClick,style:"cursor:pointer;font-size:20px;"}))}],this.paging=!0,this.pageSize=5,this.pageIndex=0,this.filterData=[],this.change=e=>{this.pageIndex=e.detail,this.renderTable()},this.onClick=e=>{this.table.deleteRowById(e.currentTarget.dataset.itemId)}}renderTable(){this.filterData=this.dataSource.slice(this.pageIndex*this.pageSize,this.pageIndex*this.pageSize+this.pageSize),this.update()}installed(){this.renderTable()}deleteItemById(e){const t=this.dataSource.indexOf(this.dataSource.find((t=>t.id===e)));-1!==t&&this.dataSource.splice(t,1),this.update()}render(){return t("div",{class:a`pl-0.5`},t("div",{class:a`px-2`},t("o-table",{ref:e=>this.table=e,checkbox:!1,stripe:!1,border:!1,compact:!1,columns:this.columns,dataSource:this.filterData}),t("div",{class:a`mt-3 text-right`},t("o-pagination",{total:this.dataSource.length,"current-page":this.pageIndex,"page-size":this.pageSize,onchange:this.change}))))}};r.css=i.target,r=((e,t,a,i)=>{for(var n,r=i>1?void 0:i?d(t,a):t,c=e.length-1;c>=0;c--)(n=e[c])&&(r=(i?n(t,a,r):n(r))||r);return i&&r&&s(t,a,r),r})([n("pagination-table")],r);export{r as default};
|
||||
import{W as e,h as t,t as a,s as i,b as n}from"./vendor.59122d2d.js";import"./index.esm.3fed61a2.js";import"./index.esm.e69e5702.js";var s=Object.defineProperty,d=Object.getOwnPropertyDescriptor;let r=class extends e{constructor(){super(...arguments),this.dataSource=[{id:1,name:"xwang",age:18,address:"Tencent"},{id:2,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:3,name:"lucy",age:12,address:"Tencent"},{id:4,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:5,name:"tim",age:12,address:"Tencent"},{id:6,name:"tim",age:12,address:"Tencent"},{id:7,name:"tim",age:12,address:"Tencent"},{id:8,name:"tim",age:12,address:"Tencent"},{id:9,name:"xwang",age:18,address:"Tencent"},{id:10,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:11,name:"lucy",age:12,address:"Tencent"},{id:12,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:13,name:"tim",age:12,address:"Tencent"},{id:14,name:"tim",age:12,address:"Tencent"},{id:15,name:"tim",age:12,address:"Tencent"},{id:16,name:"tim",age:12,address:"Tencent"}],this.columns=[{title:"ID",render:e=>t("strong",null,e.id)},{title:"Name",key:"name"},{title:"Age",key:"age"},{title:"Address",key:"address"},{title:"操作",align:"right",render:e=>t("o-tooltip",{content:"删除"+e.name},t("o-icon-delete",{"data-item-id":e.id,_onclick:this.onClick,style:"cursor:pointer;font-size:20px;"}))}],this.paging=!0,this.pageSize=5,this.pageIndex=0,this.filterData=[],this.change=e=>{this.pageIndex=e.detail,this.renderTable()},this.onClick=e=>{this.table.deleteRowById(e.currentTarget.dataset.itemId)}}renderTable(){this.filterData=this.dataSource.slice(this.pageIndex*this.pageSize,this.pageIndex*this.pageSize+this.pageSize),this.update()}installed(){this.renderTable()}deleteItemById(e){const t=this.dataSource.indexOf(this.dataSource.find((t=>t.id===e)));-1!==t&&this.dataSource.splice(t,1),this.update()}render(){return t("div",{class:a`pl-0.5`},t("div",{class:a`px-2`},t("o-table",{ref:e=>this.table=e,checkbox:!1,stripe:!1,border:!1,compact:!1,columns:this.columns,dataSource:this.filterData}),t("div",{class:a`mt-3 text-right`},t("o-pagination",{total:this.dataSource.length,"current-page":this.pageIndex,"page-size":this.pageSize,onchange:this.change}))))}};r.css=i.target,r=((e,t,a,i)=>{for(var n,r=i>1?void 0:i?d(t,a):t,g=e.length-1;g>=0;g--)(n=e[g])&&(r=(i?n(t,a,r):n(r))||r);return i&&r&&s(t,a,r),r})([n("pagination-table")],r);export{r as default};
|
|
@ -0,0 +1 @@
|
|||
import{W as r,h as e,t,s,b as a}from"./vendor.59122d2d.js";var o=Object.defineProperty,d=Object.getOwnPropertyDescriptor;let n=class extends r{render(){return e("div",{class:t``},"Admin Error Page")}};n.css=s.target,n=((r,e,t,s)=>{for(var a,n=s>1?void 0:s?d(e,t):e,c=r.length-1;c>=0;c--)(a=r[c])&&(n=(s?a(e,t,n):a(n))||n);return s&&n&&o(e,t,n),n})([a("status-error")],n);export{n as default};
|
|
@ -1 +0,0 @@
|
|||
import{W as r,h as e,t,s,b as a}from"./vendor.7166e243.js";var o=Object.defineProperty,n=Object.getOwnPropertyDescriptor;let d=class extends r{render(){return e("div",{class:t``},"Admin Error Page")}};d.css=s.target,d=((r,e,t,s)=>{for(var a,d=s>1?void 0:s?n(e,t):e,c=r.length-1;c>=0;c--)(a=r[c])&&(d=(s?a(e,t,d):a(d))||d);return s&&d&&o(e,t,d),d})([a("status-error")],d);export{d as default};
|
|
@ -0,0 +1 @@
|
|||
import{W as r,h as e,t,s,b as a}from"./vendor.59122d2d.js";var n=Object.defineProperty,d=Object.getOwnPropertyDescriptor;let o=class extends r{render(){return e("div",{class:t``},"Admin Warning Page")}};o.css=s.target,o=((r,e,t,s)=>{for(var a,o=s>1?void 0:s?d(e,t):e,i=r.length-1;i>=0;i--)(a=r[i])&&(o=(s?a(e,t,o):a(o))||o);return s&&o&&n(e,t,o),o})([a("status-warning")],o);export{o as default};
|
|
@ -1 +0,0 @@
|
|||
import{W as e,h as r,t,s,b as a}from"./vendor.7166e243.js";var n=Object.defineProperty,o=Object.getOwnPropertyDescriptor;let d=class extends e{render(){return r("div",{class:t``},"Admin Warning Page")}};d.css=s.target,d=((e,r,t,s)=>{for(var a,d=s>1?void 0:s?o(r,t):r,i=e.length-1;i>=0;i--)(a=e[i])&&(d=(s?a(r,t,d):a(d))||d);return s&&d&&n(r,t,d),d})([a("status-warning")],d);export{d as default};
|
|
@ -1,4 +1,4 @@
|
|||
import{h as e,e as t,b as n,W as o,t as r,s as i}from"./vendor.7166e243.js";import"./admin-docs.fd3ba450.js";
|
||||
import{h as e,e as t,b as n,W as o,t as r,s as i}from"./vendor.59122d2d.js";import"./admin-docs.7d892bd3.js";import"./___vite-browser-external_commonjs-proxy.45057099.js";
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@ -7,8 +7,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>OMI ADMIN</title>
|
||||
|
||||
<script type="module" crossorigin src="./assets/index.4e0c9eeb.js"></script>
|
||||
<link rel="modulepreload" href="./assets/vendor.7166e243.js">
|
||||
<script type="module" crossorigin src="./assets/index.d6aad707.js"></script>
|
||||
<link rel="modulepreload" href="./assets/vendor.59122d2d.js">
|
||||
<link rel="stylesheet" href="./assets/index.e4c38a11.css">
|
||||
</head>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"@omiu/avatar": "^0.0.1",
|
||||
"@omiu/button": "^0.0.9",
|
||||
"@omiu/cascader": "^0.0.5",
|
||||
"@omiu/chart-card": "^0.0.6",
|
||||
"@omiu/chart-card": "^0.0.7",
|
||||
"@omiu/checkbox": "^0.0.11",
|
||||
"@omiu/color-picker": "^0.0.4",
|
||||
"@omiu/common": "^0.0.9",
|
||||
|
|
|
@ -2,6 +2,7 @@ import { WeElement, h, tag } from 'omi'
|
|||
import { tw, sheet } from 'omi-twind'
|
||||
import '@omiu/chart-card'
|
||||
import '@omiu/icon/people'
|
||||
import '@omiu/pagination'
|
||||
|
||||
interface Props { }
|
||||
|
||||
|
@ -14,15 +15,293 @@ declare global {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
const chartColors = [
|
||||
'rgb(55, 199, 132)',
|
||||
'rgb(155, 59, 64)',
|
||||
]
|
||||
|
||||
const chartBgColors = [
|
||||
'rgba(55, 199, 132,.1)',
|
||||
'rgba(155, 59, 64,.1)',
|
||||
]
|
||||
|
||||
|
||||
@tag(tagName)
|
||||
export default class extends WeElement<Props> {
|
||||
static css = [sheet.target]
|
||||
|
||||
|
||||
// onClick = () => {
|
||||
// this.chartData.datasets.forEach((dataset, index) => {
|
||||
// dataset.data.forEach((item, subIndex) => {
|
||||
// dataset.data[subIndex] = Math.random() * 100 - index * Math.random() * 200
|
||||
// })
|
||||
// })
|
||||
// this.update()
|
||||
// }
|
||||
|
||||
|
||||
dataSource = [
|
||||
{
|
||||
id: 1,
|
||||
name: 'xwang',
|
||||
age: 18,
|
||||
address: 'Tencent'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: 'dntzhang',
|
||||
age: 12,
|
||||
address: 'Tencent',
|
||||
$config: {
|
||||
bgColor: 'rgb(247 176 176 / 32%)'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: 'lucy',
|
||||
age: 12,
|
||||
address: 'Tencent'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: 'john',
|
||||
age: 12,
|
||||
address: 'Tencent',
|
||||
$config: {
|
||||
bgColor: 'rgb(230 162 60 / 34%)'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: 'tim',
|
||||
age: 12,
|
||||
address: 'Tencent'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: 'tim',
|
||||
age: 12,
|
||||
address: 'Tencent'
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
name: 'tim',
|
||||
age: 12,
|
||||
address: 'Tencent'
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
name: 'tim',
|
||||
age: 12,
|
||||
address: 'Tencent'
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
name: 'xwang',
|
||||
age: 18,
|
||||
address: 'Tencent'
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
name: 'dntzhang',
|
||||
age: 12,
|
||||
address: 'Tencent',
|
||||
$config: {
|
||||
bgColor: 'rgb(247 176 176 / 32%)'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 11,
|
||||
name: 'lucy',
|
||||
age: 12,
|
||||
address: 'Tencent'
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
name: 'john',
|
||||
age: 12,
|
||||
address: 'Tencent',
|
||||
$config: {
|
||||
bgColor: 'rgb(230 162 60 / 34%)'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 13,
|
||||
name: 'tim',
|
||||
age: 12,
|
||||
address: 'Tencent'
|
||||
},
|
||||
{
|
||||
id: 14,
|
||||
name: 'tim',
|
||||
age: 12,
|
||||
address: 'Tencent'
|
||||
},
|
||||
{
|
||||
id: 15,
|
||||
name: 'tim',
|
||||
age: 12,
|
||||
address: 'Tencent'
|
||||
},
|
||||
{
|
||||
id: 16,
|
||||
name: 'tim',
|
||||
age: 12,
|
||||
address: 'Tencent'
|
||||
}
|
||||
]
|
||||
|
||||
columns = [
|
||||
{
|
||||
title: 'ID',
|
||||
render: (item: { id: number }) => <strong>{item.id}</strong>
|
||||
},
|
||||
{
|
||||
title: 'Name',
|
||||
key: 'name'
|
||||
},
|
||||
{
|
||||
title: 'Age',
|
||||
key: 'age'
|
||||
},
|
||||
{
|
||||
title: 'Address',
|
||||
key: 'address'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'right',
|
||||
render: (item: { name: string; id: number }) => (
|
||||
//onclick 会绑定多次,需要使用_onclick
|
||||
<o-tooltip content={'删除' + item.name}>
|
||||
<o-icon-delete
|
||||
data-item-id={item.id}
|
||||
_onclick={this.onClick}
|
||||
style="cursor:pointer;font-size:20px;"
|
||||
></o-icon-delete>
|
||||
</o-tooltip>
|
||||
)
|
||||
}
|
||||
]
|
||||
|
||||
paging = true
|
||||
pageSize = 5
|
||||
pageIndex = 0
|
||||
|
||||
filterData = []
|
||||
|
||||
|
||||
|
||||
|
||||
renderTable() {
|
||||
this.filterData = this.dataSource.slice(this.pageIndex * this.pageSize, this.pageIndex * this.pageSize + this.pageSize)
|
||||
|
||||
this.update()
|
||||
}
|
||||
|
||||
installed() {
|
||||
this.renderTable()
|
||||
}
|
||||
|
||||
change = (evt) => {
|
||||
this.pageIndex = evt.detail
|
||||
this.renderTable()
|
||||
}
|
||||
|
||||
table
|
||||
|
||||
onClick = (evt: { currentTarget: { dataset: { itemId: number } } }) => {
|
||||
this.table.deleteRowById(evt.currentTarget.dataset.itemId)
|
||||
}
|
||||
|
||||
deleteItemById(id: number) {
|
||||
const index = this.dataSource.indexOf(
|
||||
this.dataSource.find((item) => item.id === id)
|
||||
)
|
||||
if (index !== -1) {
|
||||
this.dataSource.splice(index, 1)
|
||||
}
|
||||
this.update()
|
||||
}
|
||||
|
||||
|
||||
|
||||
chartData = {
|
||||
labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
|
||||
datasets: [{
|
||||
label: '# of Votes',
|
||||
data: [12, 19, 3, 5, 5, 3],
|
||||
//yAxisID: 'y-axis-1',
|
||||
backgroundColor: chartBgColors[0],
|
||||
borderColor: chartColors[0],
|
||||
borderWidth: 1,
|
||||
fill: true
|
||||
}, {
|
||||
label: '# of Votes',
|
||||
data: [7, 17, 13, 5, 12, 13],
|
||||
//yAxisID: 'y-axis-2',
|
||||
backgroundColor: chartBgColors[1],
|
||||
borderColor: chartColors[1],
|
||||
borderWidth: 1,
|
||||
fill: true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
chartOptions = {
|
||||
|
||||
maintainAspectRatio: false,
|
||||
elements: {
|
||||
line: {
|
||||
tension: 0.4
|
||||
}
|
||||
},
|
||||
interaction: {
|
||||
intersect: false,
|
||||
mode: 'index',
|
||||
},
|
||||
plugins: {
|
||||
title: {
|
||||
display: true,
|
||||
text: (ctx) => {
|
||||
//const { intersect, mode } = ctx.chart.options.interaction;
|
||||
return 'Annual income statistics'.toUpperCase()
|
||||
}
|
||||
},
|
||||
}
|
||||
// title: {
|
||||
// display: true,
|
||||
// text: 'Omi-chart Bar Chart - Multi Axis'
|
||||
// },
|
||||
// tooltips: {
|
||||
// mode: 'index',
|
||||
// intersect: true
|
||||
// },
|
||||
// scales: {
|
||||
// yAxes: [{
|
||||
// type: 'linear', // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
|
||||
// display: true,
|
||||
// position: 'left',
|
||||
// id: 'y-axis-1',
|
||||
// }, {
|
||||
// type: 'linear', // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance
|
||||
// display: true,
|
||||
// position: 'right',
|
||||
// id: 'y-axis-2',
|
||||
// gridLines: {
|
||||
// drawOnChartArea: false
|
||||
// }
|
||||
// }],
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div class={tw``}>
|
||||
<div class={tw`flex flex-col sm:flex-row md:flex-row flex-wrap gap-x-4 px-2 py-2`} >
|
||||
<div class={tw`flex flex-col sm:flex-row md:flex-row flex-wrap gap-x-4 mx-4 my-2`} >
|
||||
<o-chart-card content="9987" class={tw`flex-1 md:w-5/12`} describe="PV" color="#07c160" data={[12, 19, 3, 5, 2, 3]} labels={['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange']}>
|
||||
<o-icon-people width="2em" height="2em" fill="white"></o-icon-people>
|
||||
</o-chart-card>
|
||||
|
@ -38,11 +317,39 @@ export default class extends WeElement<Props> {
|
|||
<o-chart-card content="9987" class={tw`flex-1 md:w-5/12`} describe="Members online" color="#39f" chartType="bar" data={[12, 19, 3, 5, 2, 3]} labels={['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange']}>
|
||||
<o-icon-people width="2em" height="2em" fill="white"></o-icon-people>
|
||||
</o-chart-card>
|
||||
</div>
|
||||
|
||||
|
||||
<div class={tw`border-1 mx-4 my-4 bg-white shadow-sm px-2 rounded`}>
|
||||
<o-line height="350" data={this.chartData} options={this.chartOptions} />
|
||||
</div>
|
||||
|
||||
<div class={tw`px-4 my-4`}>
|
||||
{/* <h4 class={tw`py-2 text-sm`}>基础表格</h4> */}
|
||||
<o-table
|
||||
ref={e => this.table = e}
|
||||
checkbox={false}
|
||||
stripe={false}
|
||||
border={false}
|
||||
compact={false}
|
||||
columns={this.columns}
|
||||
dataSource={this.filterData}
|
||||
></o-table>
|
||||
|
||||
<div class={tw`mt-1 text-right`}>
|
||||
|
||||
<o-pagination
|
||||
total={this.dataSource.length}
|
||||
current-page={this.pageIndex}
|
||||
page-size={this.pageSize}
|
||||
onchange={this.change}
|
||||
></o-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ export default class extends WeElement {
|
|||
></o-tabs>
|
||||
</div>
|
||||
|
||||
<div style={{ height: 'calc(100vh - 90px)', width: this.getMainContentWidth() }} class={tw`overflow-auto`}>
|
||||
<div style={{ height: 'calc(100vh - 90px)', width: this.getMainContentWidth(), background: '#ebedef' }} class={tw`overflow-auto`}>
|
||||
<slot></slot>
|
||||
</div>
|
||||
</layout-container>
|
||||
|
|
Loading…
Reference in New Issue