From 9d49544307150243dfd429035e155517577adfbf Mon Sep 17 00:00:00 2001 From: dntzhang Date: Wed, 11 Aug 2021 17:22:59 +0800 Subject: [PATCH] feat(admin): add doughnut chart to dashboard --- components/icon-card/package.json | 2 +- components/icon-card/src/index.css | 1 + components/icon-card/src/index.css.map | 2 +- components/icon-card/src/index.scss | 26 +-- components/icon-card/src/index.tsx | 9 +- ...2e1c0ca.js => admin-dashboard.05e4920b.js} | 4 +- .../{index.17c4f622.js => index.a8620b53.js} | 2 +- ...8c035e0c.js => inline-editing.bf022738.js} | 2 +- packages/admin/dist/index.html | 2 +- packages/admin/package.json | 2 +- .../admin/src/components/admin-dashboard.tsx | 157 ++++++++++++++---- 11 files changed, 151 insertions(+), 58 deletions(-) rename packages/admin/dist/assets/{admin-dashboard.b2e1c0ca.js => admin-dashboard.05e4920b.js} (94%) rename packages/admin/dist/assets/{index.17c4f622.js => index.a8620b53.js} (99%) rename packages/admin/dist/assets/{inline-editing.8c035e0c.js => inline-editing.bf022738.js} (97%) diff --git a/components/icon-card/package.json b/components/icon-card/package.json index c83dfb4c8..8b271c4fb 100644 --- a/components/icon-card/package.json +++ b/components/icon-card/package.json @@ -1,6 +1,6 @@ { "name": "@omiu/icon-card", - "version": "0.0.1", + "version": "0.0.3", "main": "dist/index.es.js", "exports": { ".": "./dist/index.es.js" diff --git a/components/icon-card/src/index.css b/components/icon-card/src/index.css index a28330013..77321cb74 100644 --- a/components/icon-card/src/index.css +++ b/components/icon-card/src/index.css @@ -20,6 +20,7 @@ height: 85px; vertical-align: top; padding-top: 20px; + background-color: white; } * { diff --git a/components/icon-card/src/index.css.map b/components/icon-card/src/index.css.map index 4ad76f6a0..fbd187d0f 100644 --- a/components/icon-card/src/index.css.map +++ b/components/icon-card/src/index.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["index.scss"],"names":[],"mappings":"AACA;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE","file":"index.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["index.scss"],"names":[],"mappings":"AAAA;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE","file":"index.css"} \ No newline at end of file diff --git a/components/icon-card/src/index.scss b/components/icon-card/src/index.scss index abc23343b..8d1252c05 100755 --- a/components/icon-card/src/index.scss +++ b/components/icon-card/src/index.scss @@ -1,48 +1,48 @@ - :host { display: block; } -.card{ +.card { display: inline-block; - box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12); + box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); text-decoration: none; height: 85px; white-space: nowrap; width: 100%; text-align: center; border-radius: 4px; - overflow: hidden; + overflow: hidden; } -.icon{ +.icon { display: inline-block; width: 50%; height: 85px; vertical-align: top; - padding-top: 20px; + padding-top: 20px; + background-color: white; } * { box-sizing: border-box; } -.text{ +.text { display: inline-block; width: 50%; height: 85px; vertical-align: top; color: white; line-height: 20px; - padding-top: 20px; + padding-top: 20px; } -.info{ +.info { font-weight: bold; - margin-bottom: 5px; + margin-bottom: 5px; } -.caption{ - font-size: 14px; -} +.caption { + font-size: 14px; +} \ No newline at end of file diff --git a/components/icon-card/src/index.tsx b/components/icon-card/src/index.tsx index 75b4d0ecc..d5953769e 100755 --- a/components/icon-card/src/index.tsx +++ b/components/icon-card/src/index.tsx @@ -5,17 +5,22 @@ import { tag, WeElement, h } from 'omi' export default class SimpleCard extends WeElement { static css = css.default + static defaultProps = { + viewBox: '64 64 896 896' + } + static propTypes = { color: String, path: String, info: String, - caption: String + caption: String, + viewBox: String } render(props) { return
- +
diff --git a/packages/admin/dist/assets/admin-dashboard.b2e1c0ca.js b/packages/admin/dist/assets/admin-dashboard.05e4920b.js similarity index 94% rename from packages/admin/dist/assets/admin-dashboard.b2e1c0ca.js rename to packages/admin/dist/assets/admin-dashboard.05e4920b.js index 16b790d45..64bd4c6e3 100644 --- a/packages/admin/dist/assets/admin-dashboard.b2e1c0ca.js +++ b/packages/admin/dist/assets/admin-dashboard.05e4920b.js @@ -1,4 +1,4 @@ -import{h,b as tag,W as WeElement,j as require$$0,k as commonjsGlobal,t as tw,s as sheet}from"./vendor.c4d80dea.js";import"./index.5ccbdcb7.js";import"./index.1cbd7be6.js";import"./index.esm.c1ea4fdc.js";import"./index.esm.3f4a5145.js";var t=Object.defineProperty,e$1=Object.defineProperties,i=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,o$1=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,a=(e,i,n)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n,r$1=(t,e)=>{for(var i in e||(e={}))o$1.call(e,i)&&a(t,i,e[i]);if(n)for(var i of n(e))s.call(e,i)&&a(t,i,e[i]);return t},l=(t,e)=>e$1(t,i(e)) +import{h,b as tag,W as WeElement,j as require$$0,k as commonjsGlobal,t as tw,s as sheet}from"./vendor.c4d80dea.js";import"./index.5ccbdcb7.js";import"./index.1cbd7be6.js";import"./index.esm.c1ea4fdc.js";import"./index.esm.3f4a5145.js";var t$1=Object.defineProperty,e$1=Object.defineProperties,i=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,a=(t,e,i)=>e in t?t$1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,r$1=(t,e)=>{for(var i in e||(e={}))o.call(e,i)&&a(t,i,e[i]);if(n)for(var i of n(e))s.call(e,i)&&a(t,i,e[i]);return t},l=(t,e)=>e$1(t,i(e)) /*! * Chart.js v3.5.0 * https://www.chartjs.org @@ -25,4 +25,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ -var ea=function(t,e){return(ea=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function ia(t,e){function i(){this.constructor=t}ea(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function na(t,e,i,n){var o,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(a=(s<3?o(a):s>3?o(e,i,a):o(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a}bo.register(ko,Ro,No,zo,Ni,Hi,$i,Yi,Xi,Ui,qi,Ki,Cs,Rs,zs,$s,Qs,ta,Yo,cs,us,gs,Ds);var oa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._refCanvas=function(t){e.canvas=t},e}return ia(e,t),e.prototype.receiveProps=function(t){this.chart.data=t.data,this.chart.options=t.options,this.chart.update()},e.prototype.update=function(){this.chart.update()},e.prototype.render=function(t){return h("div",{style:{width:t.width+"px",height:t.height+"px"}},h("canvas",{ref:this._refCanvas}))},e.propTypes={data:Object,options:Object,width:Number,height:Number},e}(WeElement);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ia(e,t),e.prototype.installed=function(){this.chart=new bo(this.canvas.getContext("2d"),{type:this.props.horizontal?"horizontalBar":"bar",data:this.props.data,options:this.props.options})},e=na([tag("o-bar")],e)}(oa),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ia(e,t),e.prototype.installed=function(){this.chart=new bo(this.canvas.getContext("2d"),{type:"line",data:this.props.data,options:this.props.options})},e=na([tag("o-line")],e)}(oa),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ia(e,t),e.prototype.installed=function(){this.chart=new bo(this.canvas.getContext("2d"),{type:"radar",data:this.props.data,options:this.props.options})},e=na([tag("o-radar")],e)}(oa),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ia(e,t),e.prototype.installed=function(){this.chart=new bo.Scatter(this.canvas.getContext("2d"),{data:this.props.data,options:this.props.options})},e=na([tag("o-scatter")],e)}(oa),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ia(e,t),e.prototype.installed=function(){this.chart=new bo(this.canvas.getContext("2d"),{type:"doughnut",data:this.props.data,options:this.props.options})},e=na([tag("o-doughnut")],e)}(oa),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ia(e,t),e.prototype.installed=function(){this.chart=new bo(this.canvas.getContext("2d"),{type:"pie",data:this.props.data,options:this.props.options})},e=na([tag("o-pie")],e)}(oa),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ia(e,t),e.prototype.installed=function(){this.chart=new bo.PolarArea(this.canvas.getContext("2d"),{data:this.props.data,options:this.props.options})},e=na([tag("o-polar-area")],e)}(oa),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ia(e,t),e.prototype.installed=function(){var t=this.props.options.elements.point.radius;this.props.options.elements.point.radius=function(e){var i=e.dataset.data[e.dataIndex].v,n=e.chart.width;return new Function("$v","$w","return "+t)(i,n)},this.chart=new bo(this.canvas.getContext("2d"),{type:"bubble",data:this.props.data,options:this.props.options})},e=na([tag("o-bubble")],e)}(oa);var sa=Object.defineProperty,aa=Object.getOwnPropertyDescriptor;let ra=class extends WeElement{constructor(){super(...arguments),this.chartData={labels:null,datasets:[{data:null,segment:{borderColor:"white"},barPercentage:.5,barThickness:6,maxBarThickness:8,minBarLength:2,backgroundColor:[],borderColor:["white","white","white","white","white","white"],borderWidth:1}]},this.chartOptions={plugins:{legend:{display:!1}},maintainAspectRatio:!1,scales:{yAxes:{display:!1},xAxes:{display:!1}}}}render(t){return t.labels.forEach((e=>{this.chartData.datasets[0].backgroundColor.push(t.color)})),this.chartTagName="o-"+t.chartType,this.chartData.labels=t.labels,this.chartData.datasets[0].data=t.data,h("div",{class:"card text-white",style:{backgroundColor:t.color}},h("div",{class:"card-body card-body pb-0 d-flex justify-content-between align-items-start"},h("div",null,h("div",{class:"text-value-lg"},t.content),h("div",{class:"nowrap"},t.describe)),h("div",{class:"icon"},h("slot",null,"ICON"))),h("div",{class:"mt-3 mx-3"},h(this.chartTagName,{css:"canvas{width: 100% !important;}",ignoreAttrs:!0,height:"70",data:this.chartData,options:this.chartOptions})))}};ra.css='.card {\n position: relative;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n min-width: 0;\n word-wrap: break-word;\n background-clip: border-box;\n border: 1px solid;\n border-radius: 0.25rem;\n background-color: #fff;\n border-color: #d8dbe0;\n}\n\n.card[class^=bg-],\n.card[class*=" bg-"] {\n border-color: rgba(0, 0, 0, 0.125);\n}\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n.text-white {\n color: #fff;\n}\n\n.align-items-start {\n align-items: flex-start;\n}\n\n.justify-content-between {\n justify-content: space-between;\n}\n\n.d-flex {\n display: flex;\n}\n\n.card-body {\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n min-height: 1px;\n padding: 1.25rem;\n}\n\n.pb-0,\n.py-0 {\n padding-bottom: 0 !important;\n}\n\n.ml-3,\n.mx-3,\nhtml:not([dir=rtl]) .mfs-3 {\n margin-left: 1rem !important;\n}\n\n.mr-3,\n.mx-3 {\n margin-right: 1rem !important;\n}\n\n.mt-3,\n.my-3 {\n margin-top: 1rem !important;\n}\n\n.nowrap {\n white-space: nowrap;\n}\n\n.text-value-lg {\n font-size: 1.3125rem;\n}\n\n[class^=text-value] {\n font-weight: 600;\n}',ra.defaultProps={color:"black",chartType:"line"},ra.propTypes={color:String,labels:Array,data:Array,content:String,describe:String,chartType:String},ra=((t,e,i,n)=>{for(var o,s=e,a=t.length-1;a>=0;a--)(o=t[a])&&(s=o(s)||s);return s})([tag("o-chart-card")],ra);var people={exports:{}};(function(module,exports){var factory;factory=function(__WEBPACK_EXTERNAL_MODULE_omi__){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s="./esm/people.js")}({"./esm/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("path", {\n d: "M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"\n}), \'People\');\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/people.js?')},"./esm/utils/createSvgIcon.js":function(module,exports,__webpack_require__){eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\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 var _a;\n omi_1.define(hyphenate('OIcon' + displayName), (_a = /** @class */ (function (_super) {\n __extends(class_1, _super);\n function class_1() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n class_1.prototype.render = function () {\n return omi_1.h('svg', {\n viewBox: '0 0 24 24',\n }, path);\n };\n return class_1;\n }(omi_1.WeElement)),\n _a.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 _a));\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)})(people);var o=Object.defineProperty,e=Object.getOwnPropertyDescriptor;let r=class extends WeElement{render(t){return h("div",{class:"card"},h("div",{class:"icon"},h("svg",{viewBox:"64 64 896 896",class:"",width:"3em",height:"3em",fill:t.color,"aria-hidden":"true",focusable:"false"},h("path",{d:t.path}))),h("div",{class:"text",style:{background:t.color}},h("div",{class:"info"},t.info),h("span",{class:"caption"},t.caption)))}};r.css=":host {\n display: block;\n}\n\n.card {\n display: inline-block;\n box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);\n text-decoration: none;\n height: 85px;\n white-space: nowrap;\n width: 100%;\n text-align: center;\n border-radius: 4px;\n overflow: hidden;\n}\n\n.icon {\n display: inline-block;\n width: 50%;\n height: 85px;\n vertical-align: top;\n padding-top: 20px;\n}\n\n* {\n box-sizing: border-box;\n}\n\n.text {\n display: inline-block;\n width: 50%;\n height: 85px;\n vertical-align: top;\n color: white;\n line-height: 20px;\n padding-top: 20px;\n}\n\n.info {\n font-weight: bold;\n margin-bottom: 5px;\n}\n\n.caption {\n font-size: 14px;\n}",r.propTypes={color:String,path:String,info:String,caption:String},r=((t,e,i,n)=>{for(var o,s=e,a=t.length-1;a>=0;a--)(o=t[a])&&(s=o(s)||s);return s})([tag("o-icon-card")],r);var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__decorateClass=(t,e,i,n)=>{for(var o,s=n>1?void 0:n?__getOwnPropDesc(e,i):e,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n?o(e,i,s):o(s))||s);return n&&s&&__defProp(e,i,s),s};const tagName="admin-dashboard",chartColors=["rgb(55, 199, 132)","rgb(155, 59, 64)"],chartBgColors=["rgba(55, 199, 132,.1)","rgba(155, 59, 64,.1)"];let admin_dashboard_default=class extends WeElement{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:t=>h("strong",null,t.id)},{title:"Name",key:"name"},{title:"Age",key:"age"},{title:"Address",key:"address"},{title:"操作",align:"right",render:t=>h("o-tooltip",{content:"删除"+t.name},h("o-icon-delete",{"data-item-id":t.id,onClick:this.onClick,style:"cursor:pointer;font-size:20px;"}))}],this.paging=!0,this.pageSize=5,this.pageIndex=0,this.filterData=[],this.change=t=>{this.pageIndex=t.detail,this.renderTable()},this.onClick=t=>{this.table.deleteRowById(t.currentTarget.dataset.itemId)},this.chartData={labels:["Red","Blue","Yellow","Green","Purple","Orange"],datasets:[{label:"# of Votes",data:[12,19,3,5,5,3],backgroundColor:chartBgColors[0],borderColor:chartColors[0],borderWidth:1,fill:!0},{label:"# of Votes",data:[7,17,13,5,12,13],backgroundColor:chartBgColors[1],borderColor:chartColors[1],borderWidth:1,fill:!0}]},this.chartOptions={maintainAspectRatio:!1,elements:{line:{tension:.4}},layout:{padding:20},interaction:{intersect:!1,mode:"index"},plugins:{title:{display:!0,text:t=>"Annual income statistics".toUpperCase()}}}}renderTable(){this.filterData=this.dataSource.slice(this.pageIndex*this.pageSize,this.pageIndex*this.pageSize+this.pageSize),this.update()}installed(){this.renderTable()}deleteItemById(t){const e=this.dataSource.indexOf(this.dataSource.find((e=>e.id===t)));-1!==e&&this.dataSource.splice(e,1),this.update()}render(){return h("div",{style:{background:"#ebedef"},class:tw`pb-44`},h("div",{class:tw`flex flex-col sm:flex-row md:flex-row flex-wrap gap-y-4 gap-x-4 mx-4 py-2`},h("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"]},h("o-icon-people",{width:"2em",height:"2em",fill:"white"})),h("o-chart-card",{content:"9987",class:tw`flex-1 md:w-5/12`,describe:"Error",color:"#f56c6c",data:[12,9,4,5,2,113],labels:["Red","Blue","Yellow","Green","Purple","Orange"]},h("o-icon-error",{width:"2em",height:"2em",fill:"white"})),h("o-chart-card",{content:"9987",class:tw`flex-1 md:w-5/12`,describe:"Warning",color:"#e6a23c",data:[12,19,131,5,2,9],labels:["Red","Blue","Yellow","Green","Purple","Orange"]},h("o-icon-warning",{width:"2em",height:"2em",fill:"white"})),h("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"]},h("o-icon-people",{width:"2em",height:"2em",fill:"white"}))),h("div",{class:tw`border-1 mx-4 my-4 shadow-sm rounded flex flex-col gap-x-4 gap-y-4 md:flex-row`},h("o-line",{class:tw`flex-grow bg-white `,height:"350",data:this.chartData,options:this.chartOptions}),h("div",{class:tw`p-5 bg-white inset-x-full md:w-4/12 `},h("o-icon-card",{color:"#f56c6c",info:"100+",caption:"关注",path:"M457.3 543c-68.1-17.7-145 16.2-174.6 76.2-30.1 61.2-1 129.1 67.8 151.3 71.2 23 155.2-12.2 184.4-78.3 28.7-64.6-7.2-131-77.6-149.2zm-52 156.2c-13.8 22.1-43.5 31.7-65.8 21.6-22-10-28.5-35.7-14.6-57.2 13.7-21.4 42.3-31 64.4-21.7 22.4 9.5 29.6 35 16 57.3zm45.5-58.5c-5 8.6-16.1 12.7-24.7 9.1-8.5-3.5-11.2-13.1-6.4-21.5 5-8.4 15.6-12.4 24.1-9.1 8.7 3.2 11.8 12.9 7 21.5zm334.5-197.2c15 4.8 31-3.4 35.9-18.3 11.8-36.6 4.4-78.4-23.2-109a111.39 111.39 0 0 0-106-34.3 28.45 28.45 0 0 0-21.9 33.8 28.39 28.39 0 0 0 33.8 21.8c18.4-3.9 38.3 1.8 51.9 16.7a54.2 54.2 0 0 1 11.3 53.3 28.45 28.45 0 0 0 18.2 36zm99.8-206c-56.7-62.9-140.4-86.9-217.7-70.5a32.98 32.98 0 0 0-25.4 39.3 33.12 33.12 0 0 0 39.3 25.5c55-11.7 114.4 5.4 154.8 50.1 40.3 44.7 51.2 105.7 34 159.1-5.6 17.4 3.9 36 21.3 41.7 17.4 5.6 36-3.9 41.6-21.2v-.1c24.1-75.4 8.9-161.1-47.9-223.9zM729 499c-12.2-3.6-20.5-6.1-14.1-22.1 13.8-34.7 15.2-64.7.3-86-28-40.1-104.8-37.9-192.8-1.1 0 0-27.6 12.1-20.6-9.8 13.5-43.5 11.5-79.9-9.6-101-47.7-47.8-174.6 1.8-283.5 110.6C127.3 471.1 80 557.5 80 632.2 80 775.1 263.2 862 442.5 862c235 0 391.3-136.5 391.3-245 0-65.5-55.2-102.6-104.8-118zM443 810.8c-143 14.1-266.5-50.5-275.8-144.5-9.3-93.9 99.2-181.5 242.2-195.6 143-14.2 266.5 50.5 275.8 144.4C694.4 709 586 796.6 443 810.8z"}),h("br",null),h("o-icon-card",{color:"#07c160",info:"2098",caption:"好看",path:"M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 0 1 9.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 0 0 6.4-2.6 9 9 0 0 0 2.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 0 1-36 35.9z"}),h("br",null),h("o-icon-card",{color:"#39f",info:"98",caption:"转发",path:"M928 254.3c-30.6 13.2-63.9 22.7-98.2 26.4a170.1 170.1 0 0 0 75-94 336.64 336.64 0 0 1-108.2 41.2A170.1 170.1 0 0 0 672 174c-94.5 0-170.5 76.6-170.5 170.6 0 13.2 1.6 26.4 4.2 39.1-141.5-7.4-267.7-75-351.6-178.5a169.32 169.32 0 0 0-23.2 86.1c0 59.2 30.1 111.4 76 142.1a172 172 0 0 1-77.1-21.7v2.1c0 82.9 58.6 151.6 136.7 167.4a180.6 180.6 0 0 1-44.9 5.8c-11.1 0-21.6-1.1-32.2-2.6C211 652 273.9 701.1 348.8 702.7c-58.6 45.9-132 72.9-211.7 72.9-14.3 0-27.5-.5-41.2-2.1C171.5 822 261.2 850 357.8 850 671.4 850 843 590.2 843 364.7c0-7.4 0-14.8-.5-22.2 33.2-24.3 62.3-54.4 85.5-88.2z"}))),h("div",{class:tw`px-4 pt-4`},h("o-table",{ref:t=>this.table=t,checkbox:!1,stripe:!1,border:!1,compact:!1,columns:this.columns,dataSource:this.filterData}),h("div",{class:tw`mt-1 text-right`},h("o-pagination",{total:this.dataSource.length,"current-page":this.pageIndex,"page-size":this.pageSize,onchange:this.change}))))}};admin_dashboard_default.css=[sheet.target],admin_dashboard_default=__decorateClass([tag(tagName)],admin_dashboard_default);export{admin_dashboard_default as default}; +var ea=function(t,e){return(ea=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function ia(t,e){function i(){this.constructor=t}ea(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function na(t,e,i,n){var o,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(a=(s<3?o(a):s>3?o(e,i,a):o(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a}bo.register(ko,Ro,No,zo,Ni,Hi,$i,Yi,Xi,Ui,qi,Ki,Cs,Rs,zs,$s,Qs,ta,Yo,cs,us,gs,Ds);var oa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._refCanvas=function(t){e.canvas=t},e}return ia(e,t),e.prototype.receiveProps=function(t){this.chart.data=t.data,this.chart.options=t.options,this.chart.update()},e.prototype.update=function(){this.chart.update()},e.prototype.render=function(t){return h("div",{style:{width:t.width+"px",height:t.height+"px"}},h("canvas",{ref:this._refCanvas}))},e.propTypes={data:Object,options:Object,width:Number,height:Number},e}(WeElement);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ia(e,t),e.prototype.installed=function(){this.chart=new bo(this.canvas.getContext("2d"),{type:this.props.horizontal?"horizontalBar":"bar",data:this.props.data,options:this.props.options})},e=na([tag("o-bar")],e)}(oa),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ia(e,t),e.prototype.installed=function(){this.chart=new bo(this.canvas.getContext("2d"),{type:"line",data:this.props.data,options:this.props.options})},e=na([tag("o-line")],e)}(oa),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ia(e,t),e.prototype.installed=function(){this.chart=new bo(this.canvas.getContext("2d"),{type:"radar",data:this.props.data,options:this.props.options})},e=na([tag("o-radar")],e)}(oa),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ia(e,t),e.prototype.installed=function(){this.chart=new bo.Scatter(this.canvas.getContext("2d"),{data:this.props.data,options:this.props.options})},e=na([tag("o-scatter")],e)}(oa),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ia(e,t),e.prototype.installed=function(){this.chart=new bo(this.canvas.getContext("2d"),{type:"doughnut",data:this.props.data,options:this.props.options})},e=na([tag("o-doughnut")],e)}(oa),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ia(e,t),e.prototype.installed=function(){this.chart=new bo(this.canvas.getContext("2d"),{type:"pie",data:this.props.data,options:this.props.options})},e=na([tag("o-pie")],e)}(oa),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ia(e,t),e.prototype.installed=function(){this.chart=new bo.PolarArea(this.canvas.getContext("2d"),{data:this.props.data,options:this.props.options})},e=na([tag("o-polar-area")],e)}(oa),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}ia(e,t),e.prototype.installed=function(){var t=this.props.options.elements.point.radius;this.props.options.elements.point.radius=function(e){var i=e.dataset.data[e.dataIndex].v,n=e.chart.width;return new Function("$v","$w","return "+t)(i,n)},this.chart=new bo(this.canvas.getContext("2d"),{type:"bubble",data:this.props.data,options:this.props.options})},e=na([tag("o-bubble")],e)}(oa);var sa=Object.defineProperty,aa=Object.getOwnPropertyDescriptor;let ra=class extends WeElement{constructor(){super(...arguments),this.chartData={labels:null,datasets:[{data:null,segment:{borderColor:"white"},barPercentage:.5,barThickness:6,maxBarThickness:8,minBarLength:2,backgroundColor:[],borderColor:["white","white","white","white","white","white"],borderWidth:1}]},this.chartOptions={plugins:{legend:{display:!1}},maintainAspectRatio:!1,scales:{yAxes:{display:!1},xAxes:{display:!1}}}}render(t){return t.labels.forEach((e=>{this.chartData.datasets[0].backgroundColor.push(t.color)})),this.chartTagName="o-"+t.chartType,this.chartData.labels=t.labels,this.chartData.datasets[0].data=t.data,h("div",{class:"card text-white",style:{backgroundColor:t.color}},h("div",{class:"card-body card-body pb-0 d-flex justify-content-between align-items-start"},h("div",null,h("div",{class:"text-value-lg"},t.content),h("div",{class:"nowrap"},t.describe)),h("div",{class:"icon"},h("slot",null,"ICON"))),h("div",{class:"mt-3 mx-3"},h(this.chartTagName,{css:"canvas{width: 100% !important;}",ignoreAttrs:!0,height:"70",data:this.chartData,options:this.chartOptions})))}};ra.css='.card {\n position: relative;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n min-width: 0;\n word-wrap: break-word;\n background-clip: border-box;\n border: 1px solid;\n border-radius: 0.25rem;\n background-color: #fff;\n border-color: #d8dbe0;\n}\n\n.card[class^=bg-],\n.card[class*=" bg-"] {\n border-color: rgba(0, 0, 0, 0.125);\n}\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n.text-white {\n color: #fff;\n}\n\n.align-items-start {\n align-items: flex-start;\n}\n\n.justify-content-between {\n justify-content: space-between;\n}\n\n.d-flex {\n display: flex;\n}\n\n.card-body {\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n min-height: 1px;\n padding: 1.25rem;\n}\n\n.pb-0,\n.py-0 {\n padding-bottom: 0 !important;\n}\n\n.ml-3,\n.mx-3,\nhtml:not([dir=rtl]) .mfs-3 {\n margin-left: 1rem !important;\n}\n\n.mr-3,\n.mx-3 {\n margin-right: 1rem !important;\n}\n\n.mt-3,\n.my-3 {\n margin-top: 1rem !important;\n}\n\n.nowrap {\n white-space: nowrap;\n}\n\n.text-value-lg {\n font-size: 1.3125rem;\n}\n\n[class^=text-value] {\n font-weight: 600;\n}',ra.defaultProps={color:"black",chartType:"line"},ra.propTypes={color:String,labels:Array,data:Array,content:String,describe:String,chartType:String},ra=((t,e,i,n)=>{for(var o,s=e,a=t.length-1;a>=0;a--)(o=t[a])&&(s=o(s)||s);return s})([tag("o-chart-card")],ra);var people={exports:{}};(function(module,exports){var factory;factory=function(__WEBPACK_EXTERNAL_MODULE_omi__){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s="./esm/people.js")}({"./esm/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("path", {\n d: "M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"\n}), \'People\');\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/people.js?')},"./esm/utils/createSvgIcon.js":function(module,exports,__webpack_require__){eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\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 var _a;\n omi_1.define(hyphenate('OIcon' + displayName), (_a = /** @class */ (function (_super) {\n __extends(class_1, _super);\n function class_1() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n class_1.prototype.render = function () {\n return omi_1.h('svg', {\n viewBox: '0 0 24 24',\n }, path);\n };\n return class_1;\n }(omi_1.WeElement)),\n _a.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 _a));\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)})(people);var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor;let r=class extends WeElement{render(t){return h("div",{class:"card"},h("div",{class:"icon"},h("svg",{viewBox:t.viewBox,class:"",width:"3em",height:"3em",fill:t.color,"aria-hidden":"true",focusable:"false"},h("path",{d:t.path}))),h("div",{class:"text",style:{background:t.color}},h("div",{class:"info"},t.info),h("span",{class:"caption"},t.caption)))}};r.css=":host {\n display: block;\n}\n\n.card {\n display: inline-block;\n box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);\n text-decoration: none;\n height: 85px;\n white-space: nowrap;\n width: 100%;\n text-align: center;\n border-radius: 4px;\n overflow: hidden;\n}\n\n.icon {\n display: inline-block;\n width: 50%;\n height: 85px;\n vertical-align: top;\n padding-top: 20px;\n background-color: white;\n}\n\n* {\n box-sizing: border-box;\n}\n\n.text {\n display: inline-block;\n width: 50%;\n height: 85px;\n vertical-align: top;\n color: white;\n line-height: 20px;\n padding-top: 20px;\n}\n\n.info {\n font-weight: bold;\n margin-bottom: 5px;\n}\n\n.caption {\n font-size: 14px;\n}",r.defaultProps={viewBox:"64 64 896 896"},r.propTypes={color:String,path:String,info:String,caption:String,viewBox:String},r=((t,e,i,n)=>{for(var o,s=e,a=t.length-1;a>=0;a--)(o=t[a])&&(s=o(s)||s);return s})([tag("o-icon-card")],r);var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__decorateClass=(t,e,i,n)=>{for(var o,s=n>1?void 0:n?__getOwnPropDesc(e,i):e,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n?o(e,i,s):o(s))||s);return n&&s&&__defProp(e,i,s),s};const tagName="admin-dashboard",chartColors=["rgb(55, 199, 132)","rgb(155, 59, 64)"],chartBgColors=["rgba(55, 199, 132,.1)","rgba(155, 59, 64,.1)"];let admin_dashboard_default=class extends WeElement{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:t=>h("strong",null,t.id)},{title:"Name",key:"name"},{title:"Age",key:"age"},{title:"Address",key:"address"},{title:"操作",align:"right",render:t=>h("o-tooltip",{content:"删除"+t.name},h("o-icon-delete",{"data-item-id":t.id,onClick:this.onClick,style:"cursor:pointer;font-size:20px;"}))}],this.paging=!0,this.pageSize=5,this.pageIndex=0,this.filterData=[],this.change=t=>{this.pageIndex=t.detail,this.renderTable()},this.onClick=t=>{this.table.deleteRowById(t.currentTarget.dataset.itemId)},this.chartData={labels:["1月","2月","3月","4月","5月","6月"],datasets:[{label:"# 2021半年收入流水",data:[12,19,3,5,5,3],backgroundColor:chartBgColors[0],borderColor:chartColors[0],borderWidth:1,fill:!0},{label:"# 2022半年收入流水",data:[7,17,13,5,12,13],backgroundColor:chartBgColors[1],borderColor:chartColors[1],borderWidth:1,fill:!0}]},this.chartOptions={maintainAspectRatio:!1,elements:{line:{tension:.4}},layout:{padding:15},interaction:{intersect:!1,mode:"index"},plugins:{title:{display:!0,text:t=>"收入统计(单位: 万)"},tooltip:{callbacks:{label:function(t){return t.dataset.label+": "+t.parsed.y+"万"}}}}},this.doughnutChartData={labels:["WeChart","Facebook","Weibo","Twitter"],datasets:[{label:"# 用户来源统计",data:[12222,3119,3223,5223],backgroundColor:["#07c160","#3b5998","#f56c6c","#39f"],borderColor:"white",borderWidth:1,fill:!0}]},this.doughnutChartOptions={maintainAspectRatio:!1,elements:{line:{tension:.4}},layout:{padding:15},interaction:{intersect:!1,mode:"index"},plugins:{title:{display:!0,text:t=>"收入统计(单位: 万)"},tooltip:{callbacks:{label:function(t){return console.error(t),t.dataset.label+": "+t.parsed+"万"}}}}}}renderTable(){this.filterData=this.dataSource.slice(this.pageIndex*this.pageSize,this.pageIndex*this.pageSize+this.pageSize),this.update()}installed(){this.renderTable()}deleteItemById(t){const e=this.dataSource.indexOf(this.dataSource.find((e=>e.id===t)));-1!==e&&this.dataSource.splice(e,1),this.update()}render(){return h("div",{style:{background:"#ebedef"},class:tw`pb-44`},h("div",{class:tw`flex flex-col sm:flex-row md:flex-row flex-wrap gap-y-4 gap-x-4 mx-4 py-4`},h("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"]},h("o-icon-people",{width:"2em",height:"2em",fill:"white"})),h("o-chart-card",{content:"9987",class:tw`flex-1 md:w-5/12`,describe:"Error",color:"#f56c6c",data:[12,9,4,5,2,113],labels:["Red","Blue","Yellow","Green","Purple","Orange"]},h("o-icon-error",{width:"2em",height:"2em",fill:"white"})),h("o-chart-card",{content:"9987",class:tw`flex-1 md:w-5/12`,describe:"Warning",color:"#e6a23c",data:[12,19,131,5,2,9],labels:["Red","Blue","Yellow","Green","Purple","Orange"]},h("o-icon-warning",{width:"2em",height:"2em",fill:"white"})),h("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"]},h("o-icon-people",{width:"2em",height:"2em",fill:"white"}))),h("div",{class:tw`border-1 mx-4 flex flex-col gap-x-4 gap-y-4 md:flex-row`},h("o-line",{class:tw`bg-white flex-1 shadow-sm rounded`,height:"350",data:this.chartData,options:this.chartOptions}),h("o-doughnut",{class:tw`bg-white flex-1 shadow-sm rounded`,height:"350",data:this.doughnutChartData,options:this.doughnutChartOptions})),h("div",{class:tw`px-5 py-4 flex flex-col gap-x-4 gap-y-2 md:flex-row`},h("o-icon-card",{class:tw`flex-1`,color:"#07c160",info:"2098",caption:"好看",path:"M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 0 1 9.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 0 0 6.4-2.6 9 9 0 0 0 2.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 0 1-36 35.9z"}),h("o-icon-card",{class:tw`flex-1`,color:"#f56c6c",info:"100+",caption:"关注",path:"M457.3 543c-68.1-17.7-145 16.2-174.6 76.2-30.1 61.2-1 129.1 67.8 151.3 71.2 23 155.2-12.2 184.4-78.3 28.7-64.6-7.2-131-77.6-149.2zm-52 156.2c-13.8 22.1-43.5 31.7-65.8 21.6-22-10-28.5-35.7-14.6-57.2 13.7-21.4 42.3-31 64.4-21.7 22.4 9.5 29.6 35 16 57.3zm45.5-58.5c-5 8.6-16.1 12.7-24.7 9.1-8.5-3.5-11.2-13.1-6.4-21.5 5-8.4 15.6-12.4 24.1-9.1 8.7 3.2 11.8 12.9 7 21.5zm334.5-197.2c15 4.8 31-3.4 35.9-18.3 11.8-36.6 4.4-78.4-23.2-109a111.39 111.39 0 0 0-106-34.3 28.45 28.45 0 0 0-21.9 33.8 28.39 28.39 0 0 0 33.8 21.8c18.4-3.9 38.3 1.8 51.9 16.7a54.2 54.2 0 0 1 11.3 53.3 28.45 28.45 0 0 0 18.2 36zm99.8-206c-56.7-62.9-140.4-86.9-217.7-70.5a32.98 32.98 0 0 0-25.4 39.3 33.12 33.12 0 0 0 39.3 25.5c55-11.7 114.4 5.4 154.8 50.1 40.3 44.7 51.2 105.7 34 159.1-5.6 17.4 3.9 36 21.3 41.7 17.4 5.6 36-3.9 41.6-21.2v-.1c24.1-75.4 8.9-161.1-47.9-223.9zM729 499c-12.2-3.6-20.5-6.1-14.1-22.1 13.8-34.7 15.2-64.7.3-86-28-40.1-104.8-37.9-192.8-1.1 0 0-27.6 12.1-20.6-9.8 13.5-43.5 11.5-79.9-9.6-101-47.7-47.8-174.6 1.8-283.5 110.6C127.3 471.1 80 557.5 80 632.2 80 775.1 263.2 862 442.5 862c235 0 391.3-136.5 391.3-245 0-65.5-55.2-102.6-104.8-118zM443 810.8c-143 14.1-266.5-50.5-275.8-144.5-9.3-93.9 99.2-181.5 242.2-195.6 143-14.2 266.5 50.5 275.8 144.4C694.4 709 586 796.6 443 810.8z"}),h("o-icon-card",{class:tw`flex-1`,color:"#39f",info:"98",caption:"转发",path:"M928 254.3c-30.6 13.2-63.9 22.7-98.2 26.4a170.1 170.1 0 0 0 75-94 336.64 336.64 0 0 1-108.2 41.2A170.1 170.1 0 0 0 672 174c-94.5 0-170.5 76.6-170.5 170.6 0 13.2 1.6 26.4 4.2 39.1-141.5-7.4-267.7-75-351.6-178.5a169.32 169.32 0 0 0-23.2 86.1c0 59.2 30.1 111.4 76 142.1a172 172 0 0 1-77.1-21.7v2.1c0 82.9 58.6 151.6 136.7 167.4a180.6 180.6 0 0 1-44.9 5.8c-11.1 0-21.6-1.1-32.2-2.6C211 652 273.9 701.1 348.8 702.7c-58.6 45.9-132 72.9-211.7 72.9-14.3 0-27.5-.5-41.2-2.1C171.5 822 261.2 850 357.8 850 671.4 850 843 590.2 843 364.7c0-7.4 0-14.8-.5-22.2 33.2-24.3 62.3-54.4 85.5-88.2z"}),h("o-icon-card",{class:tw`flex-1`,color:"#3b5998",info:"98",caption:"转发",viewBox:"0 0 32 32",path:"M23.446 18l0.889-5.791h-5.557v-3.758c0-1.584 0.776-3.129 3.265-3.129h2.526v-4.93c0 0-2.292-0.391-4.484-0.391-4.576 0-7.567 2.774-7.567 7.795v4.414h-5.087v5.791h5.087v14h6.26v-14z"}),h("o-icon-card",{class:tw`flex-1`,color:"#4875b4",info:"1198",caption:"FEEDS",viewBox:"0 0 32 32",path:"M27.26 27.271h-4.733v-7.427c0-1.771-0.037-4.047-2.475-4.047-2.468 0-2.844 1.921-2.844 3.916v7.557h-4.739v-15.271h4.552v2.083h0.061c0.636-1.203 2.183-2.468 4.491-2.468 4.801 0 5.692 3.161 5.692 7.271v8.385zM7.115 9.912c-1.527 0-2.751-1.235-2.751-2.756 0-1.516 1.229-2.749 2.751-2.749s2.755 1.233 2.755 2.749c0 1.521-1.233 2.756-2.755 2.756zM9.489 27.271h-4.749v-15.271h4.749zM29.636 0h-27.276c-1.303 0-2.36 1.031-2.36 2.307v27.387c0 1.276 1.057 2.307 2.36 2.307h27.271c1.301 0 2.369-1.031 2.369-2.307v-27.387c0-1.276-1.068-2.307-2.369-2.307z"})),h("div",{class:tw`pb-1 border-2 bg-white mx-4 shadow-sm rounded`},h("o-table",{ref:t=>this.table=t,checkbox:!1,stripe:!1,border:!1,compact:!1,columns:this.columns,dataSource:this.filterData}),h("div",{class:tw`mt-1 text-right`},h("o-pagination",{total:this.dataSource.length,"current-page":this.pageIndex,"page-size":this.pageSize,onchange:this.change}))))}};admin_dashboard_default.css=[sheet.target],admin_dashboard_default=__decorateClass([tag(tagName)],admin_dashboard_default);export{admin_dashboard_default as default}; diff --git a/packages/admin/dist/assets/index.17c4f622.js b/packages/admin/dist/assets/index.a8620b53.js similarity index 99% rename from packages/admin/dist/assets/index.17c4f622.js rename to packages/admin/dist/assets/index.a8620b53.js index defc71f65..d0feeeb5b 100644 --- a/packages/admin/dist/assets/index.17c4f622.js +++ b/packages/admin/dist/assets/index.a8620b53.js @@ -1 +1 @@ -var e=Object.defineProperty,t=Object.defineProperties,s=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,a=(t,s,n)=>s in t?e(t,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[s]=n;import{r,s as l,W as c,a as d,h,t as m,b as f,c as b,d as u,e as p,f as _}from"./vendor.c4d80dea.js";let g;const y={},x=function(e,t){if(!t||0===t.length)return e();if(void 0===g){const e=document.createElement("link").relList;g=e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"}return Promise.all(t.map((e=>{if((e=`./${e}`)in y)return;y[e]=!0;const t=e.endsWith(".css"),s=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${s}`))return;const n=document.createElement("link");return n.rel=t?"stylesheet":g,t||(n.as="script",n.crossOrigin=""),n.href=e,document.head.appendChild(n),t?new Promise(((e,t)=>{n.addEventListener("load",e),n.addEventListener("error",t)})):void 0}))).then((()=>e()))};var w=Object.defineProperty,k=Object.getOwnPropertyDescriptor;let v=class extends c{constructor(){super(...arguments),this.items=[{label:"中文",value:"zh"},{label:"English",value:"en"}],this.isShowColorPicker=!1,this.toggle=e=>{this.isShowColorPicker=!this.isShowColorPicker,this.update(),e.stopPropagation()},this.onColorChange=e=>{this.store.themeColor=e.detail.color,d("primary",e.detail.color)},this.onItemSelect=e=>{this.store.setLocals(e.detail.value)},this.goNotification=()=>{const e=this.store.tabs.find((e=>e.label===this.store.localeMap.base.NotificationList));if(e)this.store.tabsActiveIndex=this.store.tabs.indexOf(e),this.store.selectTreeNodeById(e.id),location.hash=e.href;else{const e=this.store.treeData.find((e=>e.label===this.store.localeMap.base.ManagerWorkbench)).children.find((e=>e.label===this.store.localeMap.base.NotificationList));this.store.tabs.push(e),this.store.tabsActiveIndex=this.store.tabs.length-1,this.store.selectTreeNodeById(e.id),location.hash=e.href}},this.goPersonalCenter=()=>{}}install(){x((()=>import("./index.esm.f5f8448d.js")),["assets/index.esm.f5f8448d.js","assets/vendor.c4d80dea.js"]),window.addEventListener("click",(()=>{this.isShowColorPicker=!1,this.update()}))}render(){return h("div",{class:m`bg-gray-100 h-12 text-left border-b-1`},h("div",{class:m`flex justify-between`},h("div",{class:m`flex flex-row p-1 order-1`},h("img",{class:m`w-8 m-1 ml-3 flex-row`,src:"./assets/logo.a690a1ac.svg",alt:"logo"}),h("h1",{class:m`ml-3 leading-10 text-gray-500 flex-row whitespace-nowrap`},"OMI ADMIN"),h("div",{class:m`flex-row mt-1.5 ml-3`},h("o-select",{css:"\n .o-select .o-input__inner {\n width: 117px;\n ",size:"mini",onItemSelect:this.onItemSelect,value:this.store.locale,items:this.items}))),h("div",{class:m`flex flex-row text-gray-500 gap-x-4 items-center order-3 p-1 mr-3`},h("div",{class:m`flex-row hidden md:block`},h("div",{class:m`cursor-pointer`,onClick:this.toggle,style:{color:this.store.themeColor}},h("o-icon-palette",null),this.store.localeMap.base.Theme),this.isShowColorPicker&&h("o-color-picker",{onchange:this.onColorChange,onClick:e=>e.stopPropagation(),class:m`absolute right-0 z-50`,save:!1,preview:!1,button:!1,clear:!1,width:"300px"})),h("o-badge",{onClick:e=>this.goNotification(),content:"99",class:m`flex-row cursor-pointer hidden md:block`},h("o-icon-notifications",null)),h("o-icon-settings",{class:m`flex-row cursor-pointer hidden md:block`}),h("a",{href:"https://github.com/Tencent/omi",target:"_blank",class:m`flex-row`},h("o-icon-git-hub",null)),h("o-avatar",{onClick:e=>this.goPersonalCenter(),class:m`flex-row cursor-pointer`,src:"https://wx.gtimg.com/resource/feuploader/202106/e685db3a4545b05f6fa05b4cbd0b25f0_420x420.png"}))))}};v.css=l.target,v=((e,t,s,n)=>{for(var i,o=n>1?void 0:n?k(t,s):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(n?i(t,s,o):i(o))||o);return n&&o&&w(t,s,o),o})([f("layout-header")],v);var E=Object.defineProperty,P=Object.getOwnPropertyDescriptor;let T=class extends c{constructor(){super(...arguments),this.onNodeClick=e=>{if(!e.detail.children){const t=this.store.tabs.find((t=>t.id===e.detail.id));t?this.store.tabsActiveIndex=this.store.tabs.indexOf(t):(this.store.tabs.push({label:e.detail.label,closeable:!1,id:e.detail.id,href:e.detail.href}),this.store.tabsActiveIndex=this.store.tabs.length-1)}e.detail.md&&e.detail.md.then((e=>{this.store.markdown=e.default}))},this.onMenuChange=e=>{this.store.isLeftPanelClosed=e.detail,this.store.isLeftPanelClosed?this.store.openLeftPanel():this.store.closeLeftPanel()}}install(){x((()=>import("./emoji-people.e6f1dc40.js").then((function(e){return e.e}))),["assets/emoji-people.e6f1dc40.js","assets/vendor.c4d80dea.js"]),x((()=>import("./ballot.1c79a816.js").then((function(e){return e.b}))),["assets/ballot.1c79a816.js","assets/vendor.c4d80dea.js"])}installed(){this.store.ui.leftPanel=this}render(){return h("div",{style:"height:calc(100vh - 3rem)",class:m`text-left border-r-1 relative`},h("o-hamburger-menu",{title:"隐藏导航树",style:"right:-2.5px",class:m`absolute scale-50 z-10 top-0`,color:"rgb(107, 114, 128)",active:!this.store.isLeftPanelClosed,onchange:this.onMenuChange}),h("o-tree",{class:m`pb-40`,"onnode-click":this.onNodeClick,data:this.store.treeData}))}};T.css=[l.target,".menu {\n position: absolute;\n cursor: pointer;\n background-color: #acb7c1;\n height: 50px;\n line-height: 50px;\n text-align: center;\n border-top-right-radius: 20px;\n border-bottom-right-radius: 20px;\n width: 8px;\n bottom: 0;\n margin-top: -25px;\n right: -8px;\n z-index: 999;\n}\n\n.menu svg {\n font-size: 10px;\n display: inline-block;\n position: relative;\n top: -2px;\n right: 1px;\n}\n\n.menu.closed svg {\n transform: rotate(180deg);\n}"],T=((e,t,s,n)=>{for(var i,o=n>1?void 0:n?P(t,s):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(n?i(t,s,o):i(o))||o);return n&&o&&E(t,s,o),o})([f("layout-left-panel")],T);var L=Object.defineProperty,I=Object.getOwnPropertyDescriptor;let O=class extends c{constructor(){super(...arguments),this.onChange=e=>{const t=this.store.tabs.find((t=>t.id===e.detail.tab.id));this.store.tabsActiveIndex=this.store.tabs.indexOf(t),this.store.selectTreeNodeById(e.detail.tab.id),location.hash=e.detail.tab.href},this.onRemove=e=>{let t=e.detail.index;this.store.tabsActiveIndex===e.detail.index?(t-=1,t<0&&(t=0),this.store.tabsActiveIndex=t):this.store.tabsActiveIndex>t&&(this.store.tabsActiveIndex-=1);const s=this.store.tabs[this.store.tabsActiveIndex];this.store.selectTreeNodeById(s.id),location.hash=s.href},this.onMenuChange=e=>{this.store.isLeftPanelClosed=e.detail,this.store.isLeftPanelClosed?this.store.openLeftPanel():this.store.closeLeftPanel()}}installed(){this.store.ui.baseLayout=this,window.addEventListener("resize",(()=>{this.update()}))}getMainContentWidth(){return window.innerWidth>640?window.innerWidth-(this.store.isLeftPanelClosed?0:256)+"px":window.innerWidth}render(){return h(h.f,null,h("layout-header",{class:m`h-12 block`}),h("div",{class:m`flex flex-row`},h("layout-left-panel",{class:m`${this.store.isLeftPanelClosed?"sm:w-0 -translate-x-full":"sm:w-64 w-3/4 translate-x-0"} flex-none overflow-x-hidden overflow-y-auto bg-white z-50 transition-all duration-500 ease-in-out sm:relative fixed `}),h("layout-container",{class:m`flex-1 flex-grow`},h("div",{class:m`overflow-auto flex pt-0.5`,style:{width:this.getMainContentWidth()}},this.store.isLeftPanelClosed&&h("o-hamburger-menu",{class:m`mt-1.5 ml-1 scale-75 flex-row`,color:"rgb(107, 114, 128)",active:!this.store.isLeftPanelClosed,onchange:this.onMenuChange}),h("o-tabs",{class:m`w-full `,closable:!0,type:"card",list:this.store.tabs,onChange:this.onChange,onRemove:this.onRemove,"active-index":this.store.tabsActiveIndex})),h("div",{style:{height:"calc(100vh - 90px)",width:this.getMainContentWidth()},class:m`overflow-auto`},h("slot",null)))))}};O.css=[l.target,"\n.is-closed{\n width: 0;\n transform: translateX(-100%);\n}\n"],O=((e,t,s,n)=>{for(var i,o=n>1?void 0:n?I(t,s):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(n?i(t,s,o):i(o))||o);return n&&o&&L(t,s,o),o})([f("basic-layout")],O);var A=Object.defineProperty,C=Object.getOwnPropertyDescriptor;let j=class extends c{render(){return h("div",null,h("slot",null))}};j.css=l.target,j=((e,t,s,n)=>{for(var i,o=n>1?void 0:n?C(t,s):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(n?i(t,s,o):i(o))||o);return n&&o&&A(t,s,o),o})([f("layout-container")],j);var D=Object.defineProperty,R=Object.getOwnPropertyDescriptor;let V=class extends c{render(){return h("div",{class:m``},h("div",{class:m`w-4/5 sm:w-96 m-auto pt-52`},h("svg",{version:"1.1",viewBox:"0 0 800 600",xmlns:"http://www.w3.org/2000/svg"},h("symbol",{id:"text"},h("text",{x:"2%",y:"35%",class:"text"},"Welcome to"),h("text",{x:"69%",y:"35%",class:"text"},"Admin")),h("symbol",{id:"omi"},h("text",{x:"46%",y:"35%",class:"text"},"OMI")),h("g",null,h("use",{"xlink:href":"#omi",class:"use-omi"}),h("use",{"xlink:href":"#omi",class:"use-omi"}),h("use",{"xlink:href":"#omi",class:"use-omi"}),h("use",{"xlink:href":"#omi",class:"use-omi"}),h("use",{"xlink:href":"#omi",class:"use-omi"})),h("g",null,h("use",{"xlink:href":"#text",class:"use-text"}),h("use",{"xlink:href":"#text",class:"use-text"}),h("use",{"xlink:href":"#text",class:"use-text"}),h("use",{"xlink:href":"#text",class:"use-text"}),h("use",{"xlink:href":"#text",class:"use-text"})))))}};V.css=[l.target,'.text {\n font-size: 60px;\n font-family: cursive;\n}\n\n\n/* line 19, ../../src/css/source/_chat.scss */\nsvg {\n width: 100%;\n height: 100%;\n}\n\n/* line 27, ../../src/css/source/_chat.scss */\n.use-text {\n fill: none;\n stroke: white;\n stroke-dashoffset: 35%;\n stroke-dasharray: 0 87.5%;\n stroke-width: 2px;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss "#33B5E5","#0099CC","#AA66CC","#9933CC","#99CC00","#669900","#FFBB33","#FF8800","#FF4444","#CC0000"*/\n.use-text:nth-child(1) {\n stroke: #777e7a;\n animation: animation1 8s infinite ease-in-out forwards;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss */\n.use-text:nth-child(2) {\n stroke: #777e7a;\n animation: animation2 8s infinite ease-in-out forwards;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss */\n.use-text:nth-child(3) {\n stroke: #777e7a;\n animation: animation3 8s infinite ease-in-out forwards;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss */\n.use-text:nth-child(4) {\n stroke: #777e7a;\n animation: animation4 8s infinite ease-in-out forwards;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss */\n.use-text:nth-child(5) {\n stroke: #777e7a;\n animation: animation5 8s infinite ease-in-out forwards;\n\n}\n\n.use-omi {\n fill: none;\n stroke: white;\n stroke-dashoffset: 35%;\n stroke-dasharray: 0 87.5%;\n stroke-width: 2px;\n\n}\n\n.use-omi:nth-child(1) {\n stroke: #07c160;\n animation: animation1 8s infinite ease-in-out forwards;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss */\n.use-omi:nth-child(2) {\n stroke: #07c160;\n animation: animation2 8s infinite ease-in-out forwards;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss */\n.use-omi:nth-child(3) {\n stroke: #07c160;\n animation: animation3 8s infinite ease-in-out forwards;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss */\n.use-omi:nth-child(4) {\n stroke: #07c160;\n animation: animation4 8s infinite ease-in-out forwards;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss */\n.use-omi:nth-child(5) {\n stroke: #07c160;\n animation: animation5 8s infinite ease-in-out forwards;\n\n}\n\n@keyframes animation1 {\n 50% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 7%;\n }\n\n 70% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 7%;\n }\n}\n\n@keyframes animation2 {\n 50% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 14%;\n }\n\n 70% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 14%;\n }\n}\n\n@keyframes animation3 {\n 50% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 21%;\n }\n\n 70% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 21%;\n }\n}\n\n@keyframes animation4 {\n 50% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 28%;\n }\n\n 70% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 28%;\n }\n}\n\n@keyframes animation5 {\n 50% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 35%;\n }\n\n 70% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 35%;\n }\n}\n'],V=((e,t,s,n)=>{for(var i,o=n>1?void 0:n?R(t,s):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(n?i(t,s,o):i(o))||o);return n&&o&&D(t,s,o),o})([f("admin-main-welcome")],V);let M=0;function N(){return M+=1,M}const B=e=>[{label:e.base.Demo1,icon:"description",href:"#/docs/demo1",md:x((()=>import("./demo.d6adbe13.js")),[]),id:N()},{label:e.base.Demo2,icon:"description",href:"#/docs/demo2",md:x((()=>import("./demo2.00871e17.js")),[]),id:N()}],W=(e,t)=>({label:t.base.Introduction,href:"#/docs/introduction",md:x("zh"===e?()=>import("./introduction.0483377b.js"):()=>import("./introduction.a615ed64.js"),[]),id:N()}),S=(e,t)=>({label:t.base.CustomTheme,href:"#/docs/theme",md:x("zh"===e?()=>import("./theme.1a268001.js"):()=>import("./theme.b40226bb.js"),[]),id:N()});var z=Object.defineProperty,F=Object.getOwnPropertyDescriptor;let $=class extends c{constructor(){super(...arguments),this.data={tagName:"admin-main-welcome"}}getMdByName(e,t){const s=`#/docs/${e}`,n=t.find((e=>e.href===s));if(n)return n.md;for(let i=0,o=t.length;i{e.update()})),r("/welcome",(()=>{e.transitionTo("admin-main-welcome")})),r("/table/basic",(()=>{x((()=>import("./basic-table.dd01c7bc.js")),["assets/basic-table.dd01c7bc.js","assets/vendor.c4d80dea.js","assets/index.5ccbdcb7.js","assets/index.1cbd7be6.js","assets/index.esm.c1ea4fdc.js"]).then((()=>e.transitionTo("basic-table")))})),r("/basic-list",(()=>{x((()=>import("./basic-list.bf71a18b.js")),["assets/basic-list.bf71a18b.js","assets/vendor.c4d80dea.js","assets/index.5ccbdcb7.js","assets/index.1cbd7be6.js","assets/index.esm.c1ea4fdc.js","assets/index.esm.3f4a5145.js"]).then((()=>e.transitionTo("basic-list")))})),r("/dashboard",(()=>{x((()=>import("./admin-dashboard.b2e1c0ca.js")),["assets/admin-dashboard.b2e1c0ca.js","assets/vendor.c4d80dea.js","assets/index.5ccbdcb7.js","assets/index.1cbd7be6.js","assets/index.esm.c1ea4fdc.js","assets/index.esm.3f4a5145.js"]).then((()=>e.transitionTo("admin-dashboard")))})),r("/md-editor",(()=>{x((()=>import("./md-editor.5335b082.js")),["assets/md-editor.5335b082.js","assets/md-editor.b217a3ba.css","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("md-editor")))})),r("/table/edit",(()=>{x((()=>import("./inline-editing.8c035e0c.js")),["assets/inline-editing.8c035e0c.js","assets/vendor.c4d80dea.js","assets/index.5ccbdcb7.js","assets/index.1cbd7be6.js","assets/index.esm.c1ea4fdc.js","assets/index.esm.3f4a5145.js"]).then((()=>e.transitionTo("inline-editing")))})),r("/docs/:name",(t=>{e.getMdByName(t.params.name,e.store.treeData).then((t=>{e.payload={mdContent:t.default,padding:20},x((()=>import("./admin-docs.5429a823.js")),["assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/vendor.c4d80dea.js","assets/___vite-browser-external_commonjs-proxy.5915cd82.js"]).then((()=>e.transitionTo("admin-docs")))}))})),r("/table/pagination",(()=>{x((()=>import("./pagination-table.9b5c4d65.js")),["assets/pagination-table.9b5c4d65.js","assets/vendor.c4d80dea.js","assets/index.5ccbdcb7.js","assets/index.1cbd7be6.js","assets/index.esm.c1ea4fdc.js","assets/index.esm.3f4a5145.js"]).then((()=>e.transitionTo("pagination-table")))})),r("/form",(()=>{x((()=>import("./admin-form.b14ba2d7.js")),["assets/admin-form.b14ba2d7.js","assets/vendor.c4d80dea.js","assets/index.esm.c1ea4fdc.js","assets/index.es.f06c8437.js","assets/index.1cbd7be6.js"]).then((()=>e.transitionTo("admin-form")))})),r("/steps-form",(()=>{x((()=>import("./steps-form.29b10d66.js")),["assets/steps-form.29b10d66.js","assets/vendor.c4d80dea.js","assets/index.esm.c1ea4fdc.js","assets/index.es.f06c8437.js","assets/index.1cbd7be6.js"]).then((()=>e.transitionTo("steps-form")))})),r("/comment",(()=>{x((()=>import("./admin-comment.0c37f908.js")),["assets/admin-comment.0c37f908.js","assets/admin-comment.cc2186d8.css","assets/vendor.c4d80dea.js","assets/index.esm.c1ea4fdc.js","assets/delete-outline.10207179.js"]).then((()=>e.transitionTo("admin-comment")))})),r("/icon",(()=>{x((()=>import("./admin-icon.0a73c0b2.js")),["assets/admin-icon.0a73c0b2.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("admin-icon")))})),r("/error",(()=>{x((()=>import("./status-error.cf799313.js")),["assets/status-error.cf799313.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("status-error")))})),r("/loading-component",(()=>{x((()=>import("./loading-component.2fd685f2.js")),["assets/loading-component.2fd685f2.js","assets/vendor.c4d80dea.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/container.e914e81c.js"]).then((()=>e.transitionTo("loading-component")))})),r("/toast-component",(()=>{x((()=>import("./toast-component.10a54d9b.js")),["assets/toast-component.10a54d9b.js","assets/vendor.c4d80dea.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/container.e914e81c.js"]).then((()=>e.transitionTo("toast-component")))})),r("/card-component",(()=>{x((()=>import("./card-component.13ea5504.js")),["assets/card-component.13ea5504.js","assets/vendor.c4d80dea.js","assets/add-comment-rounded.17d660fc.js","assets/add-ic-call-rounded.2b045778.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/container.e914e81c.js"]).then((()=>e.transitionTo("card-component")))})),r("/time-picker-component",(()=>{x((()=>import("./time-picker-component.799bdab3.js")),["assets/time-picker-component.799bdab3.js","assets/vendor.c4d80dea.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/container.e914e81c.js"]).then((()=>e.transitionTo("time-picker-component")))})),r("/slider-component",(()=>{x((()=>import("./slider-component.547fa8c9.js")),["assets/slider-component.547fa8c9.js","assets/vendor.c4d80dea.js","assets/index.esm.c1ea4fdc.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/container.e914e81c.js"]).then((()=>e.transitionTo("slider-component")))})),r("/button",(()=>{x((()=>import("./button-component.ba7e34c6.js")),["assets/button-component.ba7e34c6.js","assets/vendor.c4d80dea.js","assets/accessible-rounded.d97b6f38.js","assets/add-ic-call-rounded.2b045778.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/container.e914e81c.js"]).then((()=>e.transitionTo("button-component")))})),r("/tabs",(()=>{x((()=>import("./tabs-component.b568d25f.js")),["assets/tabs-component.b568d25f.js","assets/vendor.c4d80dea.js","assets/accessible-rounded.d97b6f38.js","assets/add-ic-call-rounded.2b045778.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/container.e914e81c.js"]).then((()=>e.transitionTo("tabs-component")))})),r("/progress-component",(()=>{x((()=>import("./progress-component.9dcbe2b1.js")),["assets/progress-component.9dcbe2b1.js","assets/vendor.c4d80dea.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/masonry.1138cd3e.js"]).then((()=>e.transitionTo("progress-component")))})),r("/slider-component",(()=>{x((()=>import("./slider-component.547fa8c9.js")),["assets/slider-component.547fa8c9.js","assets/vendor.c4d80dea.js","assets/index.esm.c1ea4fdc.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/container.e914e81c.js"]).then((()=>e.transitionTo("slider-component")))})),r("/mind-map",(()=>{x((()=>import("./mind-map.4f0e9e37.js")),["assets/mind-map.4f0e9e37.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("mind-map")))})),r("/warning",(()=>{x((()=>import("./status-warning.2b917150.js")),["assets/status-warning.2b917150.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("status-warning")))})),r("/results/browser-incompatible",(()=>{x((()=>import("./browser-incompatible.ddd03163.js")),["assets/browser-incompatible.ddd03163.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("browser-incompatible")))})),r("/results/network-error",(()=>{x((()=>import("./network-error.8528c211.js")),["assets/network-error.8528c211.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("network-error")))})),r("/results/not-found",(()=>{x((()=>import("./not-found.f70e743b.js")),["assets/not-found.f70e743b.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("not-found")))})),r("/results/permission-denied",(()=>{x((()=>import("./permission-denied.2e9e09da.js")),["assets/permission-denied.2e9e09da.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("permission-denied")))})),r("/results/server-error",(()=>{x((()=>import("./server-error.8260d283.js")),["assets/server-error.8260d283.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("server-error")))})),r("/masonry-list",(()=>{x((()=>import("./masonry-list.8cacaa83.js")),["assets/masonry-list.8cacaa83.js","assets/vendor.c4d80dea.js","assets/add-comment-rounded.17d660fc.js","assets/add-ic-call-rounded.2b045778.js","assets/masonry.1138cd3e.js"]).then((()=>e.transitionTo("masonry-list")))})),r("/notification-list",(()=>{x((()=>import("./notification-list.ff16cdbf.js")),["assets/notification-list.ff16cdbf.js","assets/vendor.c4d80dea.js","assets/index.5ccbdcb7.js","assets/index.1cbd7be6.js","assets/index.esm.c1ea4fdc.js","assets/index.esm.3f4a5145.js","assets/delete-outline.10207179.js"]).then((()=>e.transitionTo("notification-list")))})),r("*",(function(){console.log("not found")})),location.hash&&this.routeTo(location.hash)}findNodeByHash(e,t){const s=t.find((t=>t.href===e));if(s)return s;for(let n=0,i=t.length;ne.id===t.id));e?this.store.tabsActiveIndex=this.store.tabs.indexOf(e):(this.store.tabs.push({label:t.label,closeable:!1,id:t.id,href:t.href}),this.store.tabsActiveIndex=this.store.tabs.length-1)}t.md&&t.md.then((e=>{this.store.markdown=e.default})),_()}render(){return h("basic-layout",null,h("o-transition",{ref:e=>this.transition=e,appear:!0,name:"fade"},h(this.data.tagName,(e=((e,t)=>{for(var s in t||(t={}))i.call(t,s)&&a(e,s,t[s]);if(n)for(var s of n(t))o.call(t,s)&&a(e,s,t[s]);return e})({},this.payload),r={class:m`block`},t(e,s(r))))));var e,r}};$.css=[l.target,".fade-leave-to,\n.fade-enter {\n opacity: 0;\n transform: translateX(15px);\n}\n\n.fade-leave-active,\n.fade-enter-active {\n transition: all 300ms ease-in;\n}\n"],$=((e,t,s,n)=>{for(var i,o=n>1?void 0:n?F(t,s):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(n?i(t,s,o):i(o))||o);return n&&o&&z(t,s,o),o})([f("my-app")],$),new class{constructor(e){this.themeColor="#07c160",this.installed=e.installed,this.locale=e.locale,this.isLeftPanelClosed=window.innerWidth<640,this.ignoreAttrs=!0,this.ui={},this.markdown="",this.html="",this.localeMap={},this.setLocals(this.locale,(()=>{this.tabs=[{label:this.localeMap.base.Welcome,href:"#/welcome",closable:!1,id:2}],this.tabsActiveIndex=0,this.notifications=[{id:1,content:"【换换口味】8月6日中午员工餐厅上新宫保鸡丁,欢迎品尝!",category:"餐厅动态",time:"2021-8-6 10:00",status:1},{id:2,content:"【国家电网线下签约仪式】今天于南山中心举行,请提前15分钟前往会议中心签到!",category:"会议通知",time:"2021-8-6 15:00",status:1},{id:3,content:"【OMIG-后端开发-胡来】申请8月7日下午请假半天-理由:陪孩子参加幼儿园亲子运动会。",category:"部门消息",time:"2021-8-7 12:00",status:0},{id:4,content:"【时间调整】8月6日起,餐厅打烊时间调整为晚9点!",category:"餐厅动态",time:"2021-8-7 10:00",status:1},{id:5,content:"【技术开放签约仪式】今天于线上腾讯会议举行,会议信息详见邮件通知!",category:"会议通知",time:"2021-8-7 15:00",status:0},{id:6,content:"【OMIG-前端开发-郭靖】申请8月8日下午请假半天-理由:送老丈人去机场。",category:"部门消息",time:"2021-8-7 12:00",status:0},{id:7,content:"【腾讯大楼一期改造施工项目】 已通过审核!",category:"合同动态",time:"2021-8-8 9:00",status:1},{id:8,content:"【三季度生产原材料采购项目】 开票成功!",category:"票务动态",time:"2021-8-8 10:00",status:0},{id:9,content:"【OMI conf】于8月10日下午2:00线下举行,活动信息详见邮件通知!",category:"活动备忘",time:"2021-8-8 15:00",status:0},{id:10,content:"【OMIG Q3 All hands meeting】在8月9日下午企鹅中心一楼举行,请提前15分钟现场签到!",category:"部门消息",time:"2021-8-8 7:00",status:1},{id:11,content:"【产品化总结】于8月10日下午一点在A1会议室开始。",category:"部门消息",time:"2021-8-8 9:00",status:0},{id:12,content:"【腾讯大楼二期改造施工项目】 已通过审核!",category:"合同动态",time:"2021-8-10 9:00",status:1},{id:13,content:"【二季度生产原材料采购项目】 开票成功!",category:"票务动态",time:"2021-8-10 10:00",status:0},{id:14,content:"【项目交付】于8月11日9:00在B1会议室进行,活动信息详见邮件通知!",category:"部门消息",time:"2021-8-10 15:00",status:0},{id:15,content:"【疫情防护】新一轮疫情形势严峻,请各位做好防护!",category:"全体消息",time:"2021-8-10 17:00",status:1},{id:16,content:"【人力资源】新季度员工服可以领取啦!请到人力资源部2楼A105领取!",category:"部门消息",time:"2021-8-12 7:00",status:1},{id:17,content:"【季度总结】于8月12日下午一点在A1会议室开始。",category:"部门消息",time:"2021-8-12 9:00",status:0},{id:18,content:"【腾讯电影节】 将于8月12日于园区举行,欢迎同事们前来参与!",category:"公司动态",time:"2021-8-15 9:00",status:1},{id:19,content:"【新闻】 阿里、腾讯、字节跳动都感兴趣的新茶饮,还有多大的想象空间?",category:"新闻推送",time:"2021-8-16 10:00",status:0},{id:20,content:"【新闻】教育业务大力裁员,字节跳动外卖真能“心动”吗?",category:"新闻推送",time:"2021-8-16 15:00",status:0},{id:21,content:"【新闻】玩转私域,不可不知的6大企业微信SCRM",category:"新闻推送",time:"2021-8-16 17:00",status:1},{id:22,content:"【新闻】泡泡玛特困守王座:上市半年跌去百亿港元,盲盒“泡沫”破了吗",category:"新闻推送",time:"2021-8-17 7:00",status:1},{id:23,content:"【新闻】稻盛和夫:所谓扭转人生,不过是对工作极度认真。",category:"新闻推送",time:"2021-8-17 9:00",status:0},{id:24,content:"【新闻】 “人类高质量男性求偶”火爆全网,男性消费如何崛金千亿市场?",category:"新闻推送",time:"2021-8-18 9:00",status:1},{id:25,content:"【新闻】 市场为什么 | 互联网到底能不能好了?",category:"新闻推送",time:"2021-8-18 10:00",status:0},{id:26,content:"【Q3项目交付】于8月15日9:00在B1会议室进行,活动信息详见邮件通知!",category:"部门消息",time:"2021-8-18 15:00",status:0},{id:27,content:"【疫情防护】新一轮疫情形势严峻,请各位做好防护!",category:"全体消息",time:"2021-8-18 17:00",status:1},{id:28,content:"【OMIG Q2 All Hands Meeting】在8月2日下午企鹅中心一楼举行,请提前15分钟现场签到!",category:"部门消息",time:"2021-8-19 7:00",status:1},{id:29,content:"【产品化庆功宴】于8月20日下午一点在A1会议室开始。",category:"部门消息",time:"2021-8-19 9:00",status:0},{id:30,content:"【腾讯大楼竣工仪式】 由于在上班时间,欢迎同事们到线上直播间观看!",category:"公司动态",time:"2021-8-20 9:00",status:1}]})),this.isInstalled=!1,r.before=e=>{window.innerWidth<=640&&this.closeLeftPanel()}}setLocals(e,t){M=0,this.locale=e,function(e){switch(e){case"./l10n/en/base.ts":return x((()=>import("./base.487e1a78.js")),[]);case"./l10n/zh/base.ts":return x((()=>import("./base.3b4d6aec.js")),[]);default:return new Promise((function(t,s){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}(`./l10n/${e}/base.ts`).then((s=>{this.localeMap=s,t&&t(),this.treeData=function(e,t){return[{label:e.base.ManagerWorkbench,expanded:!0,id:N(),children:[{sign:"💗",label:e.base.WelcomePage,icon:"emoji-people",color:"#07c160",selected:!0,href:"#/welcome",id:N()},{label:e.base.Dashboard,icon:"pie-chart",href:"#/dashboard",id:N()},{label:e.base.BasicList,icon:"grid-on",href:"#/basic-list",id:N()},{label:e.base.Form,expanded:!0,id:N(),href:"#/form",icon:"list-alt"},{label:e.base.StepsForm,expanded:!0,id:N(),href:"#/steps-form",icon:"list-alt"},{label:e.base.MarkdownEditor,icon:"edit",href:"#/md-editor",id:N()},{label:e.base.MasonryList,expanded:!0,id:N(),href:"#/masonry-list",icon:"dashboard"},{label:e.base.NotificationList,expanded:!0,id:N(),href:"#/notification-list",icon:"notifications"}]},{label:e.base.Results,expanded:!0,id:N(),children:[{label:e.base.BrowserIncompatible,id:N(),href:"#/results/browser-incompatible"},{label:e.base.NetworkError,id:N(),href:"#/results/network-error"},{label:e.base.NotFound,id:N(),href:"#/results/not-found"},{label:e.base.PermissionDenied,id:N(),href:"#/results/permission-denied"},{label:e.base.ServerError,id:N(),href:"#/results/server-error"}]},{label:e.base.Components,expanded:!0,id:N(),children:[W(t,e),S(t,e),{label:e.base.Button,id:N(),href:"#/button"},{label:e.base.MaterialIcons,id:N(),href:"#/icon"},{label:e.base.Loading,id:N(),href:"#/loading-component"},{label:e.base.Toast,id:N(),href:"#/toast-component"},{label:e.base.Card,id:N(),href:"#/card-component"},{label:e.base.Slider,id:N(),href:"#/slider-component"},{label:e.base.Progress,id:N(),href:"#/progress-component"},{label:e.base.Timepicker,id:N(),href:"#/time-picker-component"},{label:e.base.BasicTable,icon:"grid-on",href:"#/table/basic",id:N()},{label:e.base.TableDeleteAnimation,icon:"grid-on",href:"#/table/pagination",id:N()},{label:e.base.InlineEditing,icon:"grid-on",href:"#/table/edit",id:N()}]},{label:e.base.Others,sign:"●",expanded:!0,id:N(),children:[{sign:"90020",label:e.base.Error,icon:"error",color:"#F56C6C",href:"#/error",id:N()},{sign:"993",label:e.base.Warning,icon:"warning",color:"#E6A23C",href:"#/warning",id:N()},{sign:"993",label:e.base.Comment,icon:"comment",href:"#/comment",id:N()},{label:e.base.ExternalLink,icon:"insert-link",href:"https://github.com/Tencent/omi",id:N(),target:"_blank"},{label:e.base.MindMap,icon:"ac-unit",href:"#/mind-map",id:N()}]},{label:e.base.MarkdownDocs,expanded:!0,id:N(),children:B(e)},{label:e.base.ManyThanksTo,id:N(),href:"#/thanks",icon:"people-alt"}]}(s,e),this.tabs.forEach((e=>{e.label=this.getTabLabelById(e.id)})),this.isInstalled?this.ui.myApp.update():(this.installed(this),this.isInstalled=!0)}))}getTabLabelById(e){const t=this.treeData.find((t=>t.id===e));if(t)return t.label;for(let s=0,n=this.treeData.length;st.id===e));if(t)return t.label}}toggleLeftPanel(){this.isLeftPanelClosed=!this.isLeftPanelClosed,this.ui.baseLayout.update()}openLeftPanel(){this.isLeftPanelClosed=!1,this.ui.baseLayout.update()}closeLeftPanel(){this.isLeftPanelClosed=!0,this.ui.baseLayout.update()}selectTreeNodeById(e){this.treeData.forEach((t=>{this.deselect(t,e)}))}deselect(e,t){e.selected=!1,e.children&&e.children.forEach((e=>{e.selected=!1,this.deselect(e,t)})),e.id===t&&(e.selected=!0)}}({locale:"zh",installed(e){b(h("my-app",{name:"Omi"}),"#root",e)}});export{x as _}; +var e=Object.defineProperty,t=Object.defineProperties,s=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,a=(t,s,n)=>s in t?e(t,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[s]=n;import{r,s as l,W as c,a as d,h,t as m,b as f,c as b,d as u,e as p,f as _}from"./vendor.c4d80dea.js";let g;const y={},x=function(e,t){if(!t||0===t.length)return e();if(void 0===g){const e=document.createElement("link").relList;g=e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"}return Promise.all(t.map((e=>{if((e=`./${e}`)in y)return;y[e]=!0;const t=e.endsWith(".css"),s=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${s}`))return;const n=document.createElement("link");return n.rel=t?"stylesheet":g,t||(n.as="script",n.crossOrigin=""),n.href=e,document.head.appendChild(n),t?new Promise(((e,t)=>{n.addEventListener("load",e),n.addEventListener("error",t)})):void 0}))).then((()=>e()))};var w=Object.defineProperty,k=Object.getOwnPropertyDescriptor;let v=class extends c{constructor(){super(...arguments),this.items=[{label:"中文",value:"zh"},{label:"English",value:"en"}],this.isShowColorPicker=!1,this.toggle=e=>{this.isShowColorPicker=!this.isShowColorPicker,this.update(),e.stopPropagation()},this.onColorChange=e=>{this.store.themeColor=e.detail.color,d("primary",e.detail.color)},this.onItemSelect=e=>{this.store.setLocals(e.detail.value)},this.goNotification=()=>{const e=this.store.tabs.find((e=>e.label===this.store.localeMap.base.NotificationList));if(e)this.store.tabsActiveIndex=this.store.tabs.indexOf(e),this.store.selectTreeNodeById(e.id),location.hash=e.href;else{const e=this.store.treeData.find((e=>e.label===this.store.localeMap.base.ManagerWorkbench)).children.find((e=>e.label===this.store.localeMap.base.NotificationList));this.store.tabs.push(e),this.store.tabsActiveIndex=this.store.tabs.length-1,this.store.selectTreeNodeById(e.id),location.hash=e.href}},this.goPersonalCenter=()=>{}}install(){x((()=>import("./index.esm.f5f8448d.js")),["assets/index.esm.f5f8448d.js","assets/vendor.c4d80dea.js"]),window.addEventListener("click",(()=>{this.isShowColorPicker=!1,this.update()}))}render(){return h("div",{class:m`bg-gray-100 h-12 text-left border-b-1`},h("div",{class:m`flex justify-between`},h("div",{class:m`flex flex-row p-1 order-1`},h("img",{class:m`w-8 m-1 ml-3 flex-row`,src:"./assets/logo.a690a1ac.svg",alt:"logo"}),h("h1",{class:m`ml-3 leading-10 text-gray-500 flex-row whitespace-nowrap`},"OMI ADMIN"),h("div",{class:m`flex-row mt-1.5 ml-3`},h("o-select",{css:"\n .o-select .o-input__inner {\n width: 117px;\n ",size:"mini",onItemSelect:this.onItemSelect,value:this.store.locale,items:this.items}))),h("div",{class:m`flex flex-row text-gray-500 gap-x-4 items-center order-3 p-1 mr-3`},h("div",{class:m`flex-row hidden md:block`},h("div",{class:m`cursor-pointer`,onClick:this.toggle,style:{color:this.store.themeColor}},h("o-icon-palette",null),this.store.localeMap.base.Theme),this.isShowColorPicker&&h("o-color-picker",{onchange:this.onColorChange,onClick:e=>e.stopPropagation(),class:m`absolute right-0 z-50`,save:!1,preview:!1,button:!1,clear:!1,width:"300px"})),h("o-badge",{onClick:e=>this.goNotification(),content:"99",class:m`flex-row cursor-pointer hidden md:block`},h("o-icon-notifications",null)),h("o-icon-settings",{class:m`flex-row cursor-pointer hidden md:block`}),h("a",{href:"https://github.com/Tencent/omi",target:"_blank",class:m`flex-row`},h("o-icon-git-hub",null)),h("o-avatar",{onClick:e=>this.goPersonalCenter(),class:m`flex-row cursor-pointer`,src:"https://wx.gtimg.com/resource/feuploader/202106/e685db3a4545b05f6fa05b4cbd0b25f0_420x420.png"}))))}};v.css=l.target,v=((e,t,s,n)=>{for(var i,o=n>1?void 0:n?k(t,s):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(n?i(t,s,o):i(o))||o);return n&&o&&w(t,s,o),o})([f("layout-header")],v);var E=Object.defineProperty,P=Object.getOwnPropertyDescriptor;let T=class extends c{constructor(){super(...arguments),this.onNodeClick=e=>{if(!e.detail.children){const t=this.store.tabs.find((t=>t.id===e.detail.id));t?this.store.tabsActiveIndex=this.store.tabs.indexOf(t):(this.store.tabs.push({label:e.detail.label,closeable:!1,id:e.detail.id,href:e.detail.href}),this.store.tabsActiveIndex=this.store.tabs.length-1)}e.detail.md&&e.detail.md.then((e=>{this.store.markdown=e.default}))},this.onMenuChange=e=>{this.store.isLeftPanelClosed=e.detail,this.store.isLeftPanelClosed?this.store.openLeftPanel():this.store.closeLeftPanel()}}install(){x((()=>import("./emoji-people.e6f1dc40.js").then((function(e){return e.e}))),["assets/emoji-people.e6f1dc40.js","assets/vendor.c4d80dea.js"]),x((()=>import("./ballot.1c79a816.js").then((function(e){return e.b}))),["assets/ballot.1c79a816.js","assets/vendor.c4d80dea.js"])}installed(){this.store.ui.leftPanel=this}render(){return h("div",{style:"height:calc(100vh - 3rem)",class:m`text-left border-r-1 relative`},h("o-hamburger-menu",{title:"隐藏导航树",style:"right:-2.5px",class:m`absolute scale-50 z-10 top-0`,color:"rgb(107, 114, 128)",active:!this.store.isLeftPanelClosed,onchange:this.onMenuChange}),h("o-tree",{class:m`pb-40`,"onnode-click":this.onNodeClick,data:this.store.treeData}))}};T.css=[l.target,".menu {\n position: absolute;\n cursor: pointer;\n background-color: #acb7c1;\n height: 50px;\n line-height: 50px;\n text-align: center;\n border-top-right-radius: 20px;\n border-bottom-right-radius: 20px;\n width: 8px;\n bottom: 0;\n margin-top: -25px;\n right: -8px;\n z-index: 999;\n}\n\n.menu svg {\n font-size: 10px;\n display: inline-block;\n position: relative;\n top: -2px;\n right: 1px;\n}\n\n.menu.closed svg {\n transform: rotate(180deg);\n}"],T=((e,t,s,n)=>{for(var i,o=n>1?void 0:n?P(t,s):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(n?i(t,s,o):i(o))||o);return n&&o&&E(t,s,o),o})([f("layout-left-panel")],T);var L=Object.defineProperty,I=Object.getOwnPropertyDescriptor;let O=class extends c{constructor(){super(...arguments),this.onChange=e=>{const t=this.store.tabs.find((t=>t.id===e.detail.tab.id));this.store.tabsActiveIndex=this.store.tabs.indexOf(t),this.store.selectTreeNodeById(e.detail.tab.id),location.hash=e.detail.tab.href},this.onRemove=e=>{let t=e.detail.index;this.store.tabsActiveIndex===e.detail.index?(t-=1,t<0&&(t=0),this.store.tabsActiveIndex=t):this.store.tabsActiveIndex>t&&(this.store.tabsActiveIndex-=1);const s=this.store.tabs[this.store.tabsActiveIndex];this.store.selectTreeNodeById(s.id),location.hash=s.href},this.onMenuChange=e=>{this.store.isLeftPanelClosed=e.detail,this.store.isLeftPanelClosed?this.store.openLeftPanel():this.store.closeLeftPanel()}}installed(){this.store.ui.baseLayout=this,window.addEventListener("resize",(()=>{this.update()}))}getMainContentWidth(){return window.innerWidth>640?window.innerWidth-(this.store.isLeftPanelClosed?0:256)+"px":window.innerWidth}render(){return h(h.f,null,h("layout-header",{class:m`h-12 block`}),h("div",{class:m`flex flex-row`},h("layout-left-panel",{class:m`${this.store.isLeftPanelClosed?"sm:w-0 -translate-x-full":"sm:w-64 w-3/4 translate-x-0"} flex-none overflow-x-hidden overflow-y-auto bg-white z-50 transition-all duration-500 ease-in-out sm:relative fixed `}),h("layout-container",{class:m`flex-1 flex-grow`},h("div",{class:m`overflow-auto flex pt-0.5`,style:{width:this.getMainContentWidth()}},this.store.isLeftPanelClosed&&h("o-hamburger-menu",{class:m`mt-1.5 ml-1 scale-75 flex-row`,color:"rgb(107, 114, 128)",active:!this.store.isLeftPanelClosed,onchange:this.onMenuChange}),h("o-tabs",{class:m`w-full `,closable:!0,type:"card",list:this.store.tabs,onChange:this.onChange,onRemove:this.onRemove,"active-index":this.store.tabsActiveIndex})),h("div",{style:{height:"calc(100vh - 90px)",width:this.getMainContentWidth()},class:m`overflow-auto`},h("slot",null)))))}};O.css=[l.target,"\n.is-closed{\n width: 0;\n transform: translateX(-100%);\n}\n"],O=((e,t,s,n)=>{for(var i,o=n>1?void 0:n?I(t,s):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(n?i(t,s,o):i(o))||o);return n&&o&&L(t,s,o),o})([f("basic-layout")],O);var A=Object.defineProperty,C=Object.getOwnPropertyDescriptor;let j=class extends c{render(){return h("div",null,h("slot",null))}};j.css=l.target,j=((e,t,s,n)=>{for(var i,o=n>1?void 0:n?C(t,s):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(n?i(t,s,o):i(o))||o);return n&&o&&A(t,s,o),o})([f("layout-container")],j);var D=Object.defineProperty,R=Object.getOwnPropertyDescriptor;let V=class extends c{render(){return h("div",{class:m``},h("div",{class:m`w-4/5 sm:w-96 m-auto pt-52`},h("svg",{version:"1.1",viewBox:"0 0 800 600",xmlns:"http://www.w3.org/2000/svg"},h("symbol",{id:"text"},h("text",{x:"2%",y:"35%",class:"text"},"Welcome to"),h("text",{x:"69%",y:"35%",class:"text"},"Admin")),h("symbol",{id:"omi"},h("text",{x:"46%",y:"35%",class:"text"},"OMI")),h("g",null,h("use",{"xlink:href":"#omi",class:"use-omi"}),h("use",{"xlink:href":"#omi",class:"use-omi"}),h("use",{"xlink:href":"#omi",class:"use-omi"}),h("use",{"xlink:href":"#omi",class:"use-omi"}),h("use",{"xlink:href":"#omi",class:"use-omi"})),h("g",null,h("use",{"xlink:href":"#text",class:"use-text"}),h("use",{"xlink:href":"#text",class:"use-text"}),h("use",{"xlink:href":"#text",class:"use-text"}),h("use",{"xlink:href":"#text",class:"use-text"}),h("use",{"xlink:href":"#text",class:"use-text"})))))}};V.css=[l.target,'.text {\n font-size: 60px;\n font-family: cursive;\n}\n\n\n/* line 19, ../../src/css/source/_chat.scss */\nsvg {\n width: 100%;\n height: 100%;\n}\n\n/* line 27, ../../src/css/source/_chat.scss */\n.use-text {\n fill: none;\n stroke: white;\n stroke-dashoffset: 35%;\n stroke-dasharray: 0 87.5%;\n stroke-width: 2px;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss "#33B5E5","#0099CC","#AA66CC","#9933CC","#99CC00","#669900","#FFBB33","#FF8800","#FF4444","#CC0000"*/\n.use-text:nth-child(1) {\n stroke: #777e7a;\n animation: animation1 8s infinite ease-in-out forwards;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss */\n.use-text:nth-child(2) {\n stroke: #777e7a;\n animation: animation2 8s infinite ease-in-out forwards;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss */\n.use-text:nth-child(3) {\n stroke: #777e7a;\n animation: animation3 8s infinite ease-in-out forwards;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss */\n.use-text:nth-child(4) {\n stroke: #777e7a;\n animation: animation4 8s infinite ease-in-out forwards;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss */\n.use-text:nth-child(5) {\n stroke: #777e7a;\n animation: animation5 8s infinite ease-in-out forwards;\n\n}\n\n.use-omi {\n fill: none;\n stroke: white;\n stroke-dashoffset: 35%;\n stroke-dasharray: 0 87.5%;\n stroke-width: 2px;\n\n}\n\n.use-omi:nth-child(1) {\n stroke: #07c160;\n animation: animation1 8s infinite ease-in-out forwards;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss */\n.use-omi:nth-child(2) {\n stroke: #07c160;\n animation: animation2 8s infinite ease-in-out forwards;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss */\n.use-omi:nth-child(3) {\n stroke: #07c160;\n animation: animation3 8s infinite ease-in-out forwards;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss */\n.use-omi:nth-child(4) {\n stroke: #07c160;\n animation: animation4 8s infinite ease-in-out forwards;\n\n}\n\n/* line 38, ../../src/css/source/_chat.scss */\n.use-omi:nth-child(5) {\n stroke: #07c160;\n animation: animation5 8s infinite ease-in-out forwards;\n\n}\n\n@keyframes animation1 {\n 50% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 7%;\n }\n\n 70% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 7%;\n }\n}\n\n@keyframes animation2 {\n 50% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 14%;\n }\n\n 70% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 14%;\n }\n}\n\n@keyframes animation3 {\n 50% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 21%;\n }\n\n 70% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 21%;\n }\n}\n\n@keyframes animation4 {\n 50% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 28%;\n }\n\n 70% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 28%;\n }\n}\n\n@keyframes animation5 {\n 50% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 35%;\n }\n\n 70% {\n stroke-dasharray: 7% 28%;\n stroke-dashoffset: 35%;\n }\n}\n'],V=((e,t,s,n)=>{for(var i,o=n>1?void 0:n?R(t,s):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(n?i(t,s,o):i(o))||o);return n&&o&&D(t,s,o),o})([f("admin-main-welcome")],V);let M=0;function N(){return M+=1,M}const B=e=>[{label:e.base.Demo1,icon:"description",href:"#/docs/demo1",md:x((()=>import("./demo.d6adbe13.js")),[]),id:N()},{label:e.base.Demo2,icon:"description",href:"#/docs/demo2",md:x((()=>import("./demo2.00871e17.js")),[]),id:N()}],W=(e,t)=>({label:t.base.Introduction,href:"#/docs/introduction",md:x("zh"===e?()=>import("./introduction.0483377b.js"):()=>import("./introduction.a615ed64.js"),[]),id:N()}),S=(e,t)=>({label:t.base.CustomTheme,href:"#/docs/theme",md:x("zh"===e?()=>import("./theme.1a268001.js"):()=>import("./theme.b40226bb.js"),[]),id:N()});var z=Object.defineProperty,F=Object.getOwnPropertyDescriptor;let $=class extends c{constructor(){super(...arguments),this.data={tagName:"admin-main-welcome"}}getMdByName(e,t){const s=`#/docs/${e}`,n=t.find((e=>e.href===s));if(n)return n.md;for(let i=0,o=t.length;i{e.update()})),r("/welcome",(()=>{e.transitionTo("admin-main-welcome")})),r("/table/basic",(()=>{x((()=>import("./basic-table.dd01c7bc.js")),["assets/basic-table.dd01c7bc.js","assets/vendor.c4d80dea.js","assets/index.5ccbdcb7.js","assets/index.1cbd7be6.js","assets/index.esm.c1ea4fdc.js"]).then((()=>e.transitionTo("basic-table")))})),r("/basic-list",(()=>{x((()=>import("./basic-list.bf71a18b.js")),["assets/basic-list.bf71a18b.js","assets/vendor.c4d80dea.js","assets/index.5ccbdcb7.js","assets/index.1cbd7be6.js","assets/index.esm.c1ea4fdc.js","assets/index.esm.3f4a5145.js"]).then((()=>e.transitionTo("basic-list")))})),r("/dashboard",(()=>{x((()=>import("./admin-dashboard.05e4920b.js")),["assets/admin-dashboard.05e4920b.js","assets/vendor.c4d80dea.js","assets/index.5ccbdcb7.js","assets/index.1cbd7be6.js","assets/index.esm.c1ea4fdc.js","assets/index.esm.3f4a5145.js"]).then((()=>e.transitionTo("admin-dashboard")))})),r("/md-editor",(()=>{x((()=>import("./md-editor.5335b082.js")),["assets/md-editor.5335b082.js","assets/md-editor.b217a3ba.css","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("md-editor")))})),r("/table/edit",(()=>{x((()=>import("./inline-editing.bf022738.js")),["assets/inline-editing.bf022738.js","assets/vendor.c4d80dea.js","assets/index.5ccbdcb7.js","assets/index.1cbd7be6.js","assets/index.esm.c1ea4fdc.js","assets/index.esm.3f4a5145.js"]).then((()=>e.transitionTo("inline-editing")))})),r("/docs/:name",(t=>{e.getMdByName(t.params.name,e.store.treeData).then((t=>{e.payload={mdContent:t.default,padding:20},x((()=>import("./admin-docs.5429a823.js")),["assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/vendor.c4d80dea.js","assets/___vite-browser-external_commonjs-proxy.5915cd82.js"]).then((()=>e.transitionTo("admin-docs")))}))})),r("/table/pagination",(()=>{x((()=>import("./pagination-table.9b5c4d65.js")),["assets/pagination-table.9b5c4d65.js","assets/vendor.c4d80dea.js","assets/index.5ccbdcb7.js","assets/index.1cbd7be6.js","assets/index.esm.c1ea4fdc.js","assets/index.esm.3f4a5145.js"]).then((()=>e.transitionTo("pagination-table")))})),r("/form",(()=>{x((()=>import("./admin-form.b14ba2d7.js")),["assets/admin-form.b14ba2d7.js","assets/vendor.c4d80dea.js","assets/index.esm.c1ea4fdc.js","assets/index.es.f06c8437.js","assets/index.1cbd7be6.js"]).then((()=>e.transitionTo("admin-form")))})),r("/steps-form",(()=>{x((()=>import("./steps-form.29b10d66.js")),["assets/steps-form.29b10d66.js","assets/vendor.c4d80dea.js","assets/index.esm.c1ea4fdc.js","assets/index.es.f06c8437.js","assets/index.1cbd7be6.js"]).then((()=>e.transitionTo("steps-form")))})),r("/comment",(()=>{x((()=>import("./admin-comment.0c37f908.js")),["assets/admin-comment.0c37f908.js","assets/admin-comment.cc2186d8.css","assets/vendor.c4d80dea.js","assets/index.esm.c1ea4fdc.js","assets/delete-outline.10207179.js"]).then((()=>e.transitionTo("admin-comment")))})),r("/icon",(()=>{x((()=>import("./admin-icon.0a73c0b2.js")),["assets/admin-icon.0a73c0b2.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("admin-icon")))})),r("/error",(()=>{x((()=>import("./status-error.cf799313.js")),["assets/status-error.cf799313.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("status-error")))})),r("/loading-component",(()=>{x((()=>import("./loading-component.2fd685f2.js")),["assets/loading-component.2fd685f2.js","assets/vendor.c4d80dea.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/container.e914e81c.js"]).then((()=>e.transitionTo("loading-component")))})),r("/toast-component",(()=>{x((()=>import("./toast-component.10a54d9b.js")),["assets/toast-component.10a54d9b.js","assets/vendor.c4d80dea.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/container.e914e81c.js"]).then((()=>e.transitionTo("toast-component")))})),r("/card-component",(()=>{x((()=>import("./card-component.13ea5504.js")),["assets/card-component.13ea5504.js","assets/vendor.c4d80dea.js","assets/add-comment-rounded.17d660fc.js","assets/add-ic-call-rounded.2b045778.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/container.e914e81c.js"]).then((()=>e.transitionTo("card-component")))})),r("/time-picker-component",(()=>{x((()=>import("./time-picker-component.799bdab3.js")),["assets/time-picker-component.799bdab3.js","assets/vendor.c4d80dea.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/container.e914e81c.js"]).then((()=>e.transitionTo("time-picker-component")))})),r("/slider-component",(()=>{x((()=>import("./slider-component.547fa8c9.js")),["assets/slider-component.547fa8c9.js","assets/vendor.c4d80dea.js","assets/index.esm.c1ea4fdc.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/container.e914e81c.js"]).then((()=>e.transitionTo("slider-component")))})),r("/button",(()=>{x((()=>import("./button-component.ba7e34c6.js")),["assets/button-component.ba7e34c6.js","assets/vendor.c4d80dea.js","assets/accessible-rounded.d97b6f38.js","assets/add-ic-call-rounded.2b045778.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/container.e914e81c.js"]).then((()=>e.transitionTo("button-component")))})),r("/tabs",(()=>{x((()=>import("./tabs-component.b568d25f.js")),["assets/tabs-component.b568d25f.js","assets/vendor.c4d80dea.js","assets/accessible-rounded.d97b6f38.js","assets/add-ic-call-rounded.2b045778.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/container.e914e81c.js"]).then((()=>e.transitionTo("tabs-component")))})),r("/progress-component",(()=>{x((()=>import("./progress-component.9dcbe2b1.js")),["assets/progress-component.9dcbe2b1.js","assets/vendor.c4d80dea.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/masonry.1138cd3e.js"]).then((()=>e.transitionTo("progress-component")))})),r("/slider-component",(()=>{x((()=>import("./slider-component.547fa8c9.js")),["assets/slider-component.547fa8c9.js","assets/vendor.c4d80dea.js","assets/index.esm.c1ea4fdc.js","assets/admin-docs.5429a823.js","assets/admin-docs.b657f02c.css","assets/___vite-browser-external_commonjs-proxy.5915cd82.js","assets/index.a3de305c.js","assets/container.e914e81c.js"]).then((()=>e.transitionTo("slider-component")))})),r("/mind-map",(()=>{x((()=>import("./mind-map.4f0e9e37.js")),["assets/mind-map.4f0e9e37.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("mind-map")))})),r("/warning",(()=>{x((()=>import("./status-warning.2b917150.js")),["assets/status-warning.2b917150.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("status-warning")))})),r("/results/browser-incompatible",(()=>{x((()=>import("./browser-incompatible.ddd03163.js")),["assets/browser-incompatible.ddd03163.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("browser-incompatible")))})),r("/results/network-error",(()=>{x((()=>import("./network-error.8528c211.js")),["assets/network-error.8528c211.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("network-error")))})),r("/results/not-found",(()=>{x((()=>import("./not-found.f70e743b.js")),["assets/not-found.f70e743b.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("not-found")))})),r("/results/permission-denied",(()=>{x((()=>import("./permission-denied.2e9e09da.js")),["assets/permission-denied.2e9e09da.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("permission-denied")))})),r("/results/server-error",(()=>{x((()=>import("./server-error.8260d283.js")),["assets/server-error.8260d283.js","assets/vendor.c4d80dea.js"]).then((()=>e.transitionTo("server-error")))})),r("/masonry-list",(()=>{x((()=>import("./masonry-list.8cacaa83.js")),["assets/masonry-list.8cacaa83.js","assets/vendor.c4d80dea.js","assets/add-comment-rounded.17d660fc.js","assets/add-ic-call-rounded.2b045778.js","assets/masonry.1138cd3e.js"]).then((()=>e.transitionTo("masonry-list")))})),r("/notification-list",(()=>{x((()=>import("./notification-list.ff16cdbf.js")),["assets/notification-list.ff16cdbf.js","assets/vendor.c4d80dea.js","assets/index.5ccbdcb7.js","assets/index.1cbd7be6.js","assets/index.esm.c1ea4fdc.js","assets/index.esm.3f4a5145.js","assets/delete-outline.10207179.js"]).then((()=>e.transitionTo("notification-list")))})),r("*",(function(){console.log("not found")})),location.hash&&this.routeTo(location.hash)}findNodeByHash(e,t){const s=t.find((t=>t.href===e));if(s)return s;for(let n=0,i=t.length;ne.id===t.id));e?this.store.tabsActiveIndex=this.store.tabs.indexOf(e):(this.store.tabs.push({label:t.label,closeable:!1,id:t.id,href:t.href}),this.store.tabsActiveIndex=this.store.tabs.length-1)}t.md&&t.md.then((e=>{this.store.markdown=e.default})),_()}render(){return h("basic-layout",null,h("o-transition",{ref:e=>this.transition=e,appear:!0,name:"fade"},h(this.data.tagName,(e=((e,t)=>{for(var s in t||(t={}))i.call(t,s)&&a(e,s,t[s]);if(n)for(var s of n(t))o.call(t,s)&&a(e,s,t[s]);return e})({},this.payload),r={class:m`block`},t(e,s(r))))));var e,r}};$.css=[l.target,".fade-leave-to,\n.fade-enter {\n opacity: 0;\n transform: translateX(15px);\n}\n\n.fade-leave-active,\n.fade-enter-active {\n transition: all 300ms ease-in;\n}\n"],$=((e,t,s,n)=>{for(var i,o=n>1?void 0:n?F(t,s):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(n?i(t,s,o):i(o))||o);return n&&o&&z(t,s,o),o})([f("my-app")],$),new class{constructor(e){this.themeColor="#07c160",this.installed=e.installed,this.locale=e.locale,this.isLeftPanelClosed=window.innerWidth<640,this.ignoreAttrs=!0,this.ui={},this.markdown="",this.html="",this.localeMap={},this.setLocals(this.locale,(()=>{this.tabs=[{label:this.localeMap.base.Welcome,href:"#/welcome",closable:!1,id:2}],this.tabsActiveIndex=0,this.notifications=[{id:1,content:"【换换口味】8月6日中午员工餐厅上新宫保鸡丁,欢迎品尝!",category:"餐厅动态",time:"2021-8-6 10:00",status:1},{id:2,content:"【国家电网线下签约仪式】今天于南山中心举行,请提前15分钟前往会议中心签到!",category:"会议通知",time:"2021-8-6 15:00",status:1},{id:3,content:"【OMIG-后端开发-胡来】申请8月7日下午请假半天-理由:陪孩子参加幼儿园亲子运动会。",category:"部门消息",time:"2021-8-7 12:00",status:0},{id:4,content:"【时间调整】8月6日起,餐厅打烊时间调整为晚9点!",category:"餐厅动态",time:"2021-8-7 10:00",status:1},{id:5,content:"【技术开放签约仪式】今天于线上腾讯会议举行,会议信息详见邮件通知!",category:"会议通知",time:"2021-8-7 15:00",status:0},{id:6,content:"【OMIG-前端开发-郭靖】申请8月8日下午请假半天-理由:送老丈人去机场。",category:"部门消息",time:"2021-8-7 12:00",status:0},{id:7,content:"【腾讯大楼一期改造施工项目】 已通过审核!",category:"合同动态",time:"2021-8-8 9:00",status:1},{id:8,content:"【三季度生产原材料采购项目】 开票成功!",category:"票务动态",time:"2021-8-8 10:00",status:0},{id:9,content:"【OMI conf】于8月10日下午2:00线下举行,活动信息详见邮件通知!",category:"活动备忘",time:"2021-8-8 15:00",status:0},{id:10,content:"【OMIG Q3 All hands meeting】在8月9日下午企鹅中心一楼举行,请提前15分钟现场签到!",category:"部门消息",time:"2021-8-8 7:00",status:1},{id:11,content:"【产品化总结】于8月10日下午一点在A1会议室开始。",category:"部门消息",time:"2021-8-8 9:00",status:0},{id:12,content:"【腾讯大楼二期改造施工项目】 已通过审核!",category:"合同动态",time:"2021-8-10 9:00",status:1},{id:13,content:"【二季度生产原材料采购项目】 开票成功!",category:"票务动态",time:"2021-8-10 10:00",status:0},{id:14,content:"【项目交付】于8月11日9:00在B1会议室进行,活动信息详见邮件通知!",category:"部门消息",time:"2021-8-10 15:00",status:0},{id:15,content:"【疫情防护】新一轮疫情形势严峻,请各位做好防护!",category:"全体消息",time:"2021-8-10 17:00",status:1},{id:16,content:"【人力资源】新季度员工服可以领取啦!请到人力资源部2楼A105领取!",category:"部门消息",time:"2021-8-12 7:00",status:1},{id:17,content:"【季度总结】于8月12日下午一点在A1会议室开始。",category:"部门消息",time:"2021-8-12 9:00",status:0},{id:18,content:"【腾讯电影节】 将于8月12日于园区举行,欢迎同事们前来参与!",category:"公司动态",time:"2021-8-15 9:00",status:1},{id:19,content:"【新闻】 阿里、腾讯、字节跳动都感兴趣的新茶饮,还有多大的想象空间?",category:"新闻推送",time:"2021-8-16 10:00",status:0},{id:20,content:"【新闻】教育业务大力裁员,字节跳动外卖真能“心动”吗?",category:"新闻推送",time:"2021-8-16 15:00",status:0},{id:21,content:"【新闻】玩转私域,不可不知的6大企业微信SCRM",category:"新闻推送",time:"2021-8-16 17:00",status:1},{id:22,content:"【新闻】泡泡玛特困守王座:上市半年跌去百亿港元,盲盒“泡沫”破了吗",category:"新闻推送",time:"2021-8-17 7:00",status:1},{id:23,content:"【新闻】稻盛和夫:所谓扭转人生,不过是对工作极度认真。",category:"新闻推送",time:"2021-8-17 9:00",status:0},{id:24,content:"【新闻】 “人类高质量男性求偶”火爆全网,男性消费如何崛金千亿市场?",category:"新闻推送",time:"2021-8-18 9:00",status:1},{id:25,content:"【新闻】 市场为什么 | 互联网到底能不能好了?",category:"新闻推送",time:"2021-8-18 10:00",status:0},{id:26,content:"【Q3项目交付】于8月15日9:00在B1会议室进行,活动信息详见邮件通知!",category:"部门消息",time:"2021-8-18 15:00",status:0},{id:27,content:"【疫情防护】新一轮疫情形势严峻,请各位做好防护!",category:"全体消息",time:"2021-8-18 17:00",status:1},{id:28,content:"【OMIG Q2 All Hands Meeting】在8月2日下午企鹅中心一楼举行,请提前15分钟现场签到!",category:"部门消息",time:"2021-8-19 7:00",status:1},{id:29,content:"【产品化庆功宴】于8月20日下午一点在A1会议室开始。",category:"部门消息",time:"2021-8-19 9:00",status:0},{id:30,content:"【腾讯大楼竣工仪式】 由于在上班时间,欢迎同事们到线上直播间观看!",category:"公司动态",time:"2021-8-20 9:00",status:1}]})),this.isInstalled=!1,r.before=e=>{window.innerWidth<=640&&this.closeLeftPanel()}}setLocals(e,t){M=0,this.locale=e,function(e){switch(e){case"./l10n/en/base.ts":return x((()=>import("./base.487e1a78.js")),[]);case"./l10n/zh/base.ts":return x((()=>import("./base.3b4d6aec.js")),[]);default:return new Promise((function(t,s){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}(`./l10n/${e}/base.ts`).then((s=>{this.localeMap=s,t&&t(),this.treeData=function(e,t){return[{label:e.base.ManagerWorkbench,expanded:!0,id:N(),children:[{sign:"💗",label:e.base.WelcomePage,icon:"emoji-people",color:"#07c160",selected:!0,href:"#/welcome",id:N()},{label:e.base.Dashboard,icon:"pie-chart",href:"#/dashboard",id:N()},{label:e.base.BasicList,icon:"grid-on",href:"#/basic-list",id:N()},{label:e.base.Form,expanded:!0,id:N(),href:"#/form",icon:"list-alt"},{label:e.base.StepsForm,expanded:!0,id:N(),href:"#/steps-form",icon:"list-alt"},{label:e.base.MarkdownEditor,icon:"edit",href:"#/md-editor",id:N()},{label:e.base.MasonryList,expanded:!0,id:N(),href:"#/masonry-list",icon:"dashboard"},{label:e.base.NotificationList,expanded:!0,id:N(),href:"#/notification-list",icon:"notifications"}]},{label:e.base.Results,expanded:!0,id:N(),children:[{label:e.base.BrowserIncompatible,id:N(),href:"#/results/browser-incompatible"},{label:e.base.NetworkError,id:N(),href:"#/results/network-error"},{label:e.base.NotFound,id:N(),href:"#/results/not-found"},{label:e.base.PermissionDenied,id:N(),href:"#/results/permission-denied"},{label:e.base.ServerError,id:N(),href:"#/results/server-error"}]},{label:e.base.Components,expanded:!0,id:N(),children:[W(t,e),S(t,e),{label:e.base.Button,id:N(),href:"#/button"},{label:e.base.MaterialIcons,id:N(),href:"#/icon"},{label:e.base.Loading,id:N(),href:"#/loading-component"},{label:e.base.Toast,id:N(),href:"#/toast-component"},{label:e.base.Card,id:N(),href:"#/card-component"},{label:e.base.Slider,id:N(),href:"#/slider-component"},{label:e.base.Progress,id:N(),href:"#/progress-component"},{label:e.base.Timepicker,id:N(),href:"#/time-picker-component"},{label:e.base.BasicTable,icon:"grid-on",href:"#/table/basic",id:N()},{label:e.base.TableDeleteAnimation,icon:"grid-on",href:"#/table/pagination",id:N()},{label:e.base.InlineEditing,icon:"grid-on",href:"#/table/edit",id:N()}]},{label:e.base.Others,sign:"●",expanded:!0,id:N(),children:[{sign:"90020",label:e.base.Error,icon:"error",color:"#F56C6C",href:"#/error",id:N()},{sign:"993",label:e.base.Warning,icon:"warning",color:"#E6A23C",href:"#/warning",id:N()},{sign:"993",label:e.base.Comment,icon:"comment",href:"#/comment",id:N()},{label:e.base.ExternalLink,icon:"insert-link",href:"https://github.com/Tencent/omi",id:N(),target:"_blank"},{label:e.base.MindMap,icon:"ac-unit",href:"#/mind-map",id:N()}]},{label:e.base.MarkdownDocs,expanded:!0,id:N(),children:B(e)},{label:e.base.ManyThanksTo,id:N(),href:"#/thanks",icon:"people-alt"}]}(s,e),this.tabs.forEach((e=>{e.label=this.getTabLabelById(e.id)})),this.isInstalled?this.ui.myApp.update():(this.installed(this),this.isInstalled=!0)}))}getTabLabelById(e){const t=this.treeData.find((t=>t.id===e));if(t)return t.label;for(let s=0,n=this.treeData.length;st.id===e));if(t)return t.label}}toggleLeftPanel(){this.isLeftPanelClosed=!this.isLeftPanelClosed,this.ui.baseLayout.update()}openLeftPanel(){this.isLeftPanelClosed=!1,this.ui.baseLayout.update()}closeLeftPanel(){this.isLeftPanelClosed=!0,this.ui.baseLayout.update()}selectTreeNodeById(e){this.treeData.forEach((t=>{this.deselect(t,e)}))}deselect(e,t){e.selected=!1,e.children&&e.children.forEach((e=>{e.selected=!1,this.deselect(e,t)})),e.id===t&&(e.selected=!0)}}({locale:"zh",installed(e){b(h("my-app",{name:"Omi"}),"#root",e)}});export{x as _}; diff --git a/packages/admin/dist/assets/inline-editing.8c035e0c.js b/packages/admin/dist/assets/inline-editing.bf022738.js similarity index 97% rename from packages/admin/dist/assets/inline-editing.8c035e0c.js rename to packages/admin/dist/assets/inline-editing.bf022738.js index ba68acdf1..5de575701 100644 --- a/packages/admin/dist/assets/inline-editing.8c035e0c.js +++ b/packages/admin/dist/assets/inline-editing.bf022738.js @@ -1 +1 @@ -import{_ as e}from"./index.17c4f622.js";import{W as t,h as a,t as i,s as n,b as s}from"./vendor.c4d80dea.js";import"./index.5ccbdcb7.js";import"./index.1cbd7be6.js";import"./index.esm.c1ea4fdc.js";import"./index.esm.3f4a5145.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.5a27793d.js")),["assets/export-excel.5a27793d.js","assets/vendor.c4d80dea.js","assets/___vite-browser-external_commonjs-proxy.5915cd82.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.a8620b53.js";import{W as t,h as a,t as i,s as n,b as s}from"./vendor.c4d80dea.js";import"./index.5ccbdcb7.js";import"./index.1cbd7be6.js";import"./index.esm.c1ea4fdc.js";import"./index.esm.3f4a5145.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.5a27793d.js")),["assets/export-excel.5a27793d.js","assets/vendor.c4d80dea.js","assets/___vite-browser-external_commonjs-proxy.5915cd82.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}; diff --git a/packages/admin/dist/index.html b/packages/admin/dist/index.html index 1e9325f95..bb3f064fb 100644 --- a/packages/admin/dist/index.html +++ b/packages/admin/dist/index.html @@ -7,7 +7,7 @@ OMI ADMIN - + diff --git a/packages/admin/package.json b/packages/admin/package.json index dbdb4df4a..b1ee9814a 100644 --- a/packages/admin/package.json +++ b/packages/admin/package.json @@ -28,7 +28,7 @@ "@omiu/form": "^0.0.6", "@omiu/hamburger-menu": "^0.0.5", "@omiu/icon": "^0.0.4", - "@omiu/icon-card": "^0.0.1", + "@omiu/icon-card": "^0.0.3", "@omiu/image": "^0.0.2", "@omiu/input": "^0.0.12", "@omiu/link": "^0.0.4", diff --git a/packages/admin/src/components/admin-dashboard.tsx b/packages/admin/src/components/admin-dashboard.tsx index b4944790c..f5d4fe633 100644 --- a/packages/admin/src/components/admin-dashboard.tsx +++ b/packages/admin/src/components/admin-dashboard.tsx @@ -230,9 +230,9 @@ export default class extends WeElement { chartData = { - labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"], + labels: ["1月", "2月", "3月", "4月", "5月", "6月"], datasets: [{ - label: '# of Votes', + label: '# 2021半年收入流水', data: [12, 19, 3, 5, 5, 3], //yAxisID: 'y-axis-1', backgroundColor: chartBgColors[0], @@ -240,7 +240,7 @@ export default class extends WeElement { borderWidth: 1, fill: true }, { - label: '# of Votes', + label: '# 2022半年收入流水', data: [7, 17, 13, 5, 12, 13], //yAxisID: 'y-axis-2', backgroundColor: chartBgColors[1], @@ -260,8 +260,9 @@ export default class extends WeElement { } }, layout: { - padding: 20 + padding: 15 }, + interaction: { intersect: false, mode: 'index', @@ -271,9 +272,16 @@ export default class extends WeElement { display: true, text: (ctx) => { //const { intersect, mode } = ctx.chart.options.interaction; - return 'Annual income statistics'.toUpperCase() + return '收入统计(单位: 万)' } }, + tooltip: { + callbacks: { + label: function (context) { + return context.dataset.label + ': ' + context.parsed.y + '万' + } + } + } } // title: { // display: true, @@ -302,10 +310,65 @@ export default class extends WeElement { } + + doughnutChartData = { + labels: ["WeChart", "Facebook", "Weibo", "Twitter"], + datasets: [{ + label: '# 用户来源统计', + data: [12222, 3119, 3223, 5223], + //yAxisID: 'y-axis-1', + backgroundColor: [ + '#07c160', + '#3b5998', + '#f56c6c', + '#39f' + ], + borderColor: 'white', + borderWidth: 1, + fill: true + }] + } + + doughnutChartOptions = { + + maintainAspectRatio: false, + elements: { + line: { + tension: 0.4 + } + }, + layout: { + padding: 15 + }, + + interaction: { + intersect: false, + mode: 'index', + }, + plugins: { + title: { + display: true, + text: (ctx) => { + //const { intersect, mode } = ctx.chart.options.interaction; + return '收入统计(单位: 万)' + } + }, + tooltip: { + callbacks: { + label: function (context) { + console.error(context) + return context.dataset.label + ': ' + context.parsed + '万' + } + } + } + } + } + + render() { return (
-
+
@@ -323,37 +386,61 @@ export default class extends WeElement {
- -
- -
- - -
- - -
- - -
+
+ +
-
+
+ + + + + + + + + + + + + + +
+ +
{/*

基础表格

*/} this.table = e}