@pangu-backend-ui/user-core 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js ADDED
@@ -0,0 +1,261 @@
1
+ import { openBlock as a, createElementBlock as d, Fragment as h, createTextVNode as f, toDisplayString as b, createCommentVNode as _, defineComponent as T, ref as w, resolveComponent as u, createVNode as e, withCtx as s, createElementVNode as k, unref as g, createBlock as v, pushScopeId as N, popScopeId as P } from "vue";
2
+ import { component as D } from "v-viewer";
3
+ import { PgTable as S } from "@pangu-backend-ui/common";
4
+ const y = (l, n) => {
5
+ const o = l.__vccOpts || l;
6
+ for (const [r, i] of n)
7
+ o[r] = i;
8
+ return o;
9
+ }, V = {
10
+ name: "UserMobile",
11
+ props: {
12
+ userId: {
13
+ type: Number,
14
+ default: null
15
+ },
16
+ maskMobile: {
17
+ type: String,
18
+ default: null
19
+ }
20
+ },
21
+ data() {
22
+ return {
23
+ plainMobile: null,
24
+ loading: !1
25
+ };
26
+ },
27
+ methods: {
28
+ getPlainMobile() {
29
+ this.plainMobile == null && (this.loading = !0, this.$http.get(`/api/user/${this.userId}/plainmobile`).then((l) => {
30
+ this.plainMobile = l.data, this.loading = !1;
31
+ }).finally(() => {
32
+ this.loading = !1;
33
+ }));
34
+ }
35
+ }
36
+ }, L = {
37
+ key: 3,
38
+ class: "el-icon-loading"
39
+ };
40
+ function B(l, n, o, r, i, m) {
41
+ return a(), d("div", null, [
42
+ o.maskMobile != null ? (a(), d(h, { key: 0 }, [
43
+ i.plainMobile == null ? (a(), d(h, { key: 0 }, [
44
+ f(b(o.maskMobile), 1)
45
+ ], 64)) : (a(), d(h, { key: 1 }, [
46
+ f(b(i.plainMobile), 1)
47
+ ], 64)),
48
+ i.plainMobile == null && !i.loading && o.userId != null ? (a(), d("i", {
49
+ key: 2,
50
+ class: "el-icon-view",
51
+ onClick: n[0] || (n[0] = (...c) => m.getPlainMobile && m.getPlainMobile(...c))
52
+ })) : _("", !0),
53
+ i.loading ? (a(), d("i", L)) : _("", !0)
54
+ ], 64)) : _("", !0)
55
+ ]);
56
+ }
57
+ const M = /* @__PURE__ */ y(V, [["render", B]]), E = {
58
+ install: (l) => {
59
+ l.component("PgUserMobile", M);
60
+ }
61
+ }, R = [
62
+ E
63
+ ];
64
+ const q = (l) => (N("data-v-690b99ee"), l = l(), P(), l), z = { class: "page-layout" }, F = { style: { "margin-top": "10px" } }, O = /* @__PURE__ */ q(() => /* @__PURE__ */ k("template", { "slot-scope": "{row}" }, null, -1)), j = /* @__PURE__ */ T({
65
+ __name: "list",
66
+ setup(l) {
67
+ const n = w({
68
+ id: null,
69
+ phoneNumber: null
70
+ }), o = w(null);
71
+ function r() {
72
+ o.value.search();
73
+ }
74
+ return (i, m) => {
75
+ const c = u("el-input"), x = u("el-button"), I = u("el-space"), U = u("el-card"), t = u("el-table-column"), C = u("el-avatar");
76
+ return a(), d("div", z, [
77
+ e(U, null, {
78
+ default: s(() => [
79
+ e(I, null, {
80
+ default: s(() => [
81
+ e(c, {
82
+ placeholder: "ID",
83
+ style: { width: "100px" }
84
+ }),
85
+ e(c, {
86
+ placeholder: "父用户ID",
87
+ style: { width: "100px" }
88
+ }),
89
+ e(c, { placeholder: "手机号" }),
90
+ e(c, { placeholder: "昵称" }),
91
+ e(c, { placeholder: "邀请码" }),
92
+ e(x, {
93
+ type: "primary",
94
+ icon: "search",
95
+ onClick: r
96
+ }, {
97
+ default: s(() => [
98
+ f("搜索")
99
+ ]),
100
+ _: 1
101
+ })
102
+ ]),
103
+ _: 1
104
+ })
105
+ ]),
106
+ _: 1
107
+ }),
108
+ k("div", F, [
109
+ e(g(S), {
110
+ ref_key: "userTable",
111
+ ref: o,
112
+ "data-url": "/api/user/page",
113
+ condition: n.value
114
+ }, {
115
+ columns: s(() => [
116
+ e(t, {
117
+ prop: "id",
118
+ label: "UID",
119
+ width: "80",
120
+ align: "center"
121
+ }),
122
+ e(t, {
123
+ prop: "mobile",
124
+ label: "手机",
125
+ width: "110",
126
+ align: "left",
127
+ "show-overflow-tooltip": ""
128
+ }, {
129
+ default: s((p) => [
130
+ (a(), v(M, {
131
+ "mask-mobile": p.row.mobile,
132
+ "user-id": p.row.id,
133
+ key: p.row.id
134
+ }, null, 8, ["mask-mobile", "user-id"]))
135
+ ]),
136
+ _: 1
137
+ }),
138
+ e(t, {
139
+ prop: "username",
140
+ label: "用户名",
141
+ width: "110",
142
+ align: "left",
143
+ "show-overflow-tooltip": ""
144
+ }),
145
+ e(t, {
146
+ prop: "nickname",
147
+ label: "昵称",
148
+ width: "110",
149
+ align: "left",
150
+ "show-overflow-tooltip": ""
151
+ }),
152
+ e(t, {
153
+ prop: "inviteCode",
154
+ label: "邀请码",
155
+ width: "90",
156
+ align: "center",
157
+ "show-overflow-tooltip": ""
158
+ }),
159
+ e(t, {
160
+ prop: "avatar",
161
+ label: "头像",
162
+ width: "60",
163
+ align: "center",
164
+ "show-overflow-tooltip": ""
165
+ }, {
166
+ default: s((p) => [
167
+ p.row.avatar ? (a(), v(g(D), {
168
+ key: 0,
169
+ images: [p.row.avatar]
170
+ }, {
171
+ default: s(() => [
172
+ e(C, {
173
+ shape: "square",
174
+ fit: "cover",
175
+ size: 30,
176
+ src: p.row.avatar
177
+ }, null, 8, ["src"])
178
+ ]),
179
+ _: 2
180
+ }, 1032, ["images"])) : _("", !0)
181
+ ]),
182
+ _: 1
183
+ }),
184
+ e(t, {
185
+ prop: "parentId",
186
+ label: "上级ID",
187
+ width: "80",
188
+ align: "left",
189
+ "show-overflow-tooltip": ""
190
+ }),
191
+ e(t, {
192
+ prop: "relationPath",
193
+ label: "邀请关系",
194
+ "min-width": "150",
195
+ align: "left",
196
+ "show-overflow-tooltip": ""
197
+ }),
198
+ e(t, {
199
+ prop: "blackUnlockTime",
200
+ label: "黑名单解锁",
201
+ width: "145",
202
+ align: "left",
203
+ "show-overflow-tooltip": ""
204
+ }),
205
+ e(t, {
206
+ prop: "lastLoginTime",
207
+ label: "最后登录时间",
208
+ width: "145",
209
+ align: "center",
210
+ "show-overflow-tooltip": ""
211
+ }),
212
+ e(t, {
213
+ prop: "createdTime",
214
+ label: "创建时间",
215
+ width: "145",
216
+ align: "center",
217
+ "show-overflow-tooltip": ""
218
+ }),
219
+ e(t, {
220
+ label: "操作",
221
+ width: "220",
222
+ fixed: "right"
223
+ }, {
224
+ default: s(() => [
225
+ O
226
+ ]),
227
+ _: 1
228
+ })
229
+ ]),
230
+ _: 1
231
+ }, 8, ["condition"])
232
+ ])
233
+ ]);
234
+ };
235
+ }
236
+ });
237
+ const A = /* @__PURE__ */ y(j, [["__scopeId", "data-v-690b99ee"]]), G = {
238
+ install: (l, n = {}) => {
239
+ let o = n.router, r = o.getRoutes().find((i) => i.path == "/");
240
+ r && r.meta && o.addRoute({
241
+ path: "/user",
242
+ name: "User",
243
+ redirect: "/user/list",
244
+ component: r.meta.commonLayout,
245
+ children: [{
246
+ path: "list",
247
+ name: "UserList",
248
+ component: A
249
+ }]
250
+ });
251
+ }
252
+ }, H = (l, n = {}) => {
253
+ R.forEach((o) => l.use(o)), l.use(G, n);
254
+ }, W = {
255
+ install: H
256
+ };
257
+ export {
258
+ E as UserMobileComp,
259
+ W as default,
260
+ H as install
261
+ };
package/index.umd.cjs ADDED
@@ -0,0 +1 @@
1
+ (function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("v-viewer"),require("@pangu-backend-ui/common")):typeof define=="function"&&define.amd?define(["exports","vue","v-viewer","@pangu-backend-ui/common"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n["pg-user-core"]={},n.Vue,n.vViewer,n.common))})(this,function(n,e,f,w){"use strict";const p=(o,a)=>{const t=o.__vccOpts||o;for(const[r,i]of a)t[r]=i;return t},b={name:"UserMobile",props:{userId:{type:Number,default:null},maskMobile:{type:String,default:null}},data(){return{plainMobile:null,loading:!1}},methods:{getPlainMobile(){this.plainMobile==null&&(this.loading=!0,this.$http.get(`/api/user/${this.userId}/plainmobile`).then(o=>{this.plainMobile=o.data,this.loading=!1}).finally(()=>{this.loading=!1}))}}},g={key:3,class:"el-icon-loading"};function k(o,a,t,r,i,d){return e.openBlock(),e.createElementBlock("div",null,[t.maskMobile!=null?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[i.plainMobile==null?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.maskMobile),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(i.plainMobile),1)],64)),i.plainMobile==null&&!i.loading&&t.userId!=null?(e.openBlock(),e.createElementBlock("i",{key:2,class:"el-icon-view",onClick:a[0]||(a[0]=(...c)=>d.getPlainMobile&&d.getPlainMobile(...c))})):e.createCommentVNode("",!0),i.loading?(e.openBlock(),e.createElementBlock("i",g)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])}const m=p(b,[["render",k]]),h={install:o=>{o.component("PgUserMobile",m)}},V=[h],P="",N=o=>(e.pushScopeId("data-v-690b99ee"),o=o(),e.popScopeId(),o),u={class:"page-layout"},y={style:{"margin-top":"10px"}},C=N(()=>e.createElementVNode("template",{"slot-scope":"{row}"},null,-1)),x=e.defineComponent({__name:"list",setup(o){const a=e.ref({id:null,phoneNumber:null}),t=e.ref(null);function r(){t.value.search()}return(i,d)=>{const c=e.resolveComponent("el-input"),T=e.resolveComponent("el-button"),E=e.resolveComponent("el-space"),U=e.resolveComponent("el-card"),l=e.resolveComponent("el-table-column"),S=e.resolveComponent("el-avatar");return e.openBlock(),e.createElementBlock("div",u,[e.createVNode(U,null,{default:e.withCtx(()=>[e.createVNode(E,null,{default:e.withCtx(()=>[e.createVNode(c,{placeholder:"ID",style:{width:"100px"}}),e.createVNode(c,{placeholder:"父用户ID",style:{width:"100px"}}),e.createVNode(c,{placeholder:"手机号"}),e.createVNode(c,{placeholder:"昵称"}),e.createVNode(c,{placeholder:"邀请码"}),e.createVNode(T,{type:"primary",icon:"search",onClick:r},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1})]),_:1})]),_:1}),e.createElementVNode("div",y,[e.createVNode(e.unref(w.PgTable),{ref_key:"userTable",ref:t,"data-url":"/api/user/page",condition:a.value},{columns:e.withCtx(()=>[e.createVNode(l,{prop:"id",label:"UID",width:"80",align:"center"}),e.createVNode(l,{prop:"mobile",label:"手机",width:"110",align:"left","show-overflow-tooltip":""},{default:e.withCtx(s=>[(e.openBlock(),e.createBlock(m,{"mask-mobile":s.row.mobile,"user-id":s.row.id,key:s.row.id},null,8,["mask-mobile","user-id"]))]),_:1}),e.createVNode(l,{prop:"username",label:"用户名",width:"110",align:"left","show-overflow-tooltip":""}),e.createVNode(l,{prop:"nickname",label:"昵称",width:"110",align:"left","show-overflow-tooltip":""}),e.createVNode(l,{prop:"inviteCode",label:"邀请码",width:"90",align:"center","show-overflow-tooltip":""}),e.createVNode(l,{prop:"avatar",label:"头像",width:"60",align:"center","show-overflow-tooltip":""},{default:e.withCtx(s=>[s.row.avatar?(e.openBlock(),e.createBlock(e.unref(f.component),{key:0,images:[s.row.avatar]},{default:e.withCtx(()=>[e.createVNode(S,{shape:"square",fit:"cover",size:30,src:s.row.avatar},null,8,["src"])]),_:2},1032,["images"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(l,{prop:"parentId",label:"上级ID",width:"80",align:"left","show-overflow-tooltip":""}),e.createVNode(l,{prop:"relationPath",label:"邀请关系","min-width":"150",align:"left","show-overflow-tooltip":""}),e.createVNode(l,{prop:"blackUnlockTime",label:"黑名单解锁",width:"145",align:"left","show-overflow-tooltip":""}),e.createVNode(l,{prop:"lastLoginTime",label:"最后登录时间",width:"145",align:"center","show-overflow-tooltip":""}),e.createVNode(l,{prop:"createdTime",label:"创建时间",width:"145",align:"center","show-overflow-tooltip":""}),e.createVNode(l,{label:"操作",width:"220",fixed:"right"},{default:e.withCtx(()=>[C]),_:1})]),_:1},8,["condition"])])])}}}),D="",M=p(x,[["__scopeId","data-v-690b99ee"]]),B={install:(o,a={})=>{let t=a.router,r=t.getRoutes().find(i=>i.path=="/");r&&r.meta&&t.addRoute({path:"/user",name:"User",redirect:"/user/list",component:r.meta.commonLayout,children:[{path:"list",name:"UserList",component:M}]})}},_=(o,a={})=>{V.forEach(t=>o.use(t)),o.use(B,a)},I={install:_};n.UserMobileComp=h,n.default=I,n.install=_,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@pangu-backend-ui/user-core",
3
+ "private": false,
4
+ "version": "0.0.2",
5
+ "main": "index.js",
6
+ "module": "index.js",
7
+ "unpkg": "index.umd.cjs",
8
+ "types": "types/index.d.ts",
9
+ "license": "MIT",
10
+ "exports": {
11
+ ".": {
12
+ "import": "index.js",
13
+ "require": "index.umd.cjs",
14
+ "types": "types/index.d.ts"
15
+ }
16
+ },
17
+ "dependencies": {
18
+ "axios": "^1.3.2",
19
+ "element-plus": "^2.2.29",
20
+ "v-viewer": "^3.0.11",
21
+ "vue": "^3.2.45",
22
+ "vue-router": "^4.1.6",
23
+ "@pangu-backend-ui/common": "^0.0.2"
24
+ },
25
+ "publishConfig": {
26
+ "access": "public",
27
+ "registry": "https://registry.npmjs.org/"
28
+ },
29
+ "web-types": "web-types.json",
30
+ "browserslist": [
31
+ "> 1%",
32
+ "not ie 11",
33
+ "not op_mini all"
34
+ ]
35
+ }
package/style.css ADDED
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Viewer.js v1.11.2
3
+ * https://fengyuanchen.github.io/viewerjs
4
+ *
5
+ * Copyright 2015-present Chen Fengyuan
6
+ * Released under the MIT license
7
+ *
8
+ * Date: 2023-01-01T10:14:47.694Z
9
+ */.viewer-zoom-in:before,.viewer-zoom-out:before,.viewer-one-to-one:before,.viewer-reset:before,.viewer-prev:before,.viewer-play:before,.viewer-next:before,.viewer-rotate-left:before,.viewer-rotate-right:before,.viewer-flip-horizontal:before,.viewer-flip-vertical:before,.viewer-fullscreen:before,.viewer-fullscreen-exit:before,.viewer-close:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAAUCAYAAABWOyJDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAQPSURBVHic7Zs/iFxVFMa/0U2UaJGksUgnIVhYxVhpjDbZCBmLdAYECxsRFBTUamcXUiSNncgKQbSxsxH8gzAP3FU2jY0kKKJNiiiIghFlccnP4p3nPCdv3p9778vsLOcHB2bfveeb7955c3jvvNkBIMdxnD64a94GHMfZu3iBcRynN7zAOI7TG15gHCeeNUkr8zaxG2lbYDYsdgMbktBsP03jdQwljSXdtBhLOmtjowC9Mg9L+knSlcD8TNKpSA9lBpK2JF2VdDSR5n5J64m0qli399hNFMUlpshQii5jbXTbHGviB0nLNeNDSd9VO4A2UdB2fp+x0eCnaXxWXGA2X0au/3HgN9P4LFCjIANOJdrLr0zzZ+BEpNYDwKbpnQMeAw4m8HjQtM6Z9qa917zPQwFr3M5KgA6J5rTJCdFZJj9/lyvGhsDvwFNVuV2MhhjrK6b9bFiE+j1r87eBl4HDwCF7/U/k+ofAX5b/EXBv5JoLMuILzf3Ap6Z3EzgdqHMCuF7hcQf4HDgeoHnccncqdK/TvSDWffFXI/exICY/xZyqc6XLWF1UFZna4gJ7q8BsRvgd2/xXpo6P+D9dfT7PpECtA3cnWPM0GXGFZh/wgWltA+cDNC7X+AP4GzjZQe+k5dRxuYPeiuXU7e1qwLpDz7dFjXKRaSwuMLvAlG8zZlG+YmiK1HoFqT7wP2z+4Q45TfEGcMt01xLoNZEBTwRqD4BLpnMLeC1A41UmVxsXgXeBayV/Wx20rpTyrpnWRft7p6O/FdqzGrDukPNtkaMoMo3FBdBSQMOnYBCReyf05s126fU9ytfX98+mY54Kxnp7S9K3kj6U9KYdG0h6UdLbkh7poFXMfUnSOyVvL0h6VtIXHbS6nOP+s/Zm9mvyXW1uuC9ohZ72E9uDmXWLJOB1GxsH+DxPftsB8B6wlGDN02TAkxG6+4D3TWsbeC5CS8CDFce+AW500LhhOW2020TRjK3b21HEmgti9m0RonxbdMZeVzV+/4tF3cBpP7E9mKHNL5q8h5g0eYsCMQz0epq8gQrwMXAgcs0FGXGFRcB9wCemF9PkbYqM/Bas7fxLwNeJPdTdpo4itQti8lPMqTpXuozVRVXPpbHI3KkNTB1NfkL81j2mvhDp91HgV9MKuRIqrykj3WPq4rHyL+axj8/qGPmTqi6F9YDlHOvJU6oYcTsh/TYSzWmTE6JT19CtLTJt32D6CmHe0eQn1O8z5AXgT4sx4Vcu0/EQecMydB8z0hUWkTd2t4CrwNEePqMBcAR4mrBbwyXLPWJa8zrXmmLEhNBmfpkuY2102xxrih+pb+ieAb6vGhuA97UcJ5KR8gZ77K+99xxeYBzH6Q3/Z0fHcXrDC4zjOL3hBcZxnN74F+zlvXFWXF9PAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-size:280px;color:transparent;display:block;font-size:0;height:20px;line-height:0;width:20px}.viewer-zoom-in:before{background-position:0 0;content:"Zoom In"}.viewer-zoom-out:before{background-position:-20px 0;content:"Zoom Out"}.viewer-one-to-one:before{background-position:-40px 0;content:"One to One"}.viewer-reset:before{background-position:-60px 0;content:"Reset"}.viewer-prev:before{background-position:-80px 0;content:"Previous"}.viewer-play:before{background-position:-100px 0;content:"Play"}.viewer-next:before{background-position:-120px 0;content:"Next"}.viewer-rotate-left:before{background-position:-140px 0;content:"Rotate Left"}.viewer-rotate-right:before{background-position:-160px 0;content:"Rotate Right"}.viewer-flip-horizontal:before{background-position:-180px 0;content:"Flip Horizontal"}.viewer-flip-vertical:before{background-position:-200px 0;content:"Flip Vertical"}.viewer-fullscreen:before{background-position:-220px 0;content:"Enter Full Screen"}.viewer-fullscreen-exit:before{background-position:-240px 0;content:"Exit Full Screen"}.viewer-close:before{background-position:-260px 0;content:"Close"}.viewer-container{bottom:0;direction:ltr;font-size:0;left:0;line-height:0;overflow:hidden;position:absolute;right:0;-webkit-tap-highlight-color:transparent;top:0;-ms-touch-action:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.viewer-container::-moz-selection,.viewer-container *::-moz-selection{background-color:transparent}.viewer-container::selection,.viewer-container *::selection{background-color:transparent}.viewer-container:focus{outline:0}.viewer-container img{display:block;height:auto;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.viewer-canvas{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.viewer-canvas>img{height:auto;margin:15px auto;max-width:90%!important;width:auto}.viewer-footer{bottom:0;left:0;overflow:hidden;position:absolute;right:0;text-align:center}.viewer-navbar{background-color:#0000007f;overflow:hidden}.viewer-list{box-sizing:content-box;height:50px;margin:0;overflow:hidden;padding:1px 0}.viewer-list>li{color:transparent;cursor:pointer;float:left;font-size:0;height:50px;line-height:0;opacity:.5;overflow:hidden;transition:opacity .15s;width:30px}.viewer-list>li:focus,.viewer-list>li:hover{opacity:.75}.viewer-list>li:focus{outline:0}.viewer-list>li+li{margin-left:1px}.viewer-list>.viewer-loading{position:relative}.viewer-list>.viewer-loading:after{border-width:2px;height:20px;margin-left:-10px;margin-top:-10px;width:20px}.viewer-list>.viewer-active,.viewer-list>.viewer-active:focus,.viewer-list>.viewer-active:hover{opacity:1}.viewer-player{background-color:#000;bottom:0;cursor:none;display:none;left:0;position:absolute;right:0;top:0;z-index:1}.viewer-player>img{left:0;position:absolute;top:0}.viewer-toolbar>ul{display:inline-block;margin:0 auto 5px;overflow:hidden;padding:6px 3px}.viewer-toolbar>ul>li{background-color:#0000007f;border-radius:50%;cursor:pointer;float:left;height:24px;overflow:hidden;transition:background-color .15s;width:24px}.viewer-toolbar>ul>li:focus,.viewer-toolbar>ul>li:hover{background-color:#000c}.viewer-toolbar>ul>li:focus{box-shadow:0 0 3px #fff;outline:0;position:relative;z-index:1}.viewer-toolbar>ul>li:before{margin:2px}.viewer-toolbar>ul>li+li{margin-left:1px}.viewer-toolbar>ul>.viewer-small{height:18px;margin-bottom:3px;margin-top:3px;width:18px}.viewer-toolbar>ul>.viewer-small:before{margin:-1px}.viewer-toolbar>ul>.viewer-large{height:30px;margin-bottom:-3px;margin-top:-3px;width:30px}.viewer-toolbar>ul>.viewer-large:before{margin:5px}.viewer-tooltip{background-color:#000c;border-radius:10px;color:#fff;display:none;font-size:12px;height:20px;left:50%;line-height:20px;margin-left:-25px;margin-top:-10px;position:absolute;text-align:center;top:50%;width:50px}.viewer-title{color:#ccc;display:inline-block;font-size:12px;line-height:1.2;margin:5px 5%;max-width:90%;min-height:14px;opacity:.8;overflow:hidden;text-overflow:ellipsis;transition:opacity .15s;white-space:nowrap}.viewer-title:hover{opacity:1}.viewer-button{-webkit-app-region:no-drag;background-color:#0000007f;border-radius:50%;cursor:pointer;height:80px;overflow:hidden;position:absolute;right:-40px;top:-40px;transition:background-color .15s;width:80px}.viewer-button:focus,.viewer-button:hover{background-color:#000c}.viewer-button:focus{box-shadow:0 0 3px #fff;outline:0}.viewer-button:before{bottom:15px;left:15px;position:absolute}.viewer-fixed{position:fixed}.viewer-open{overflow:hidden}.viewer-show{display:block}.viewer-hide{display:none}.viewer-backdrop{background-color:#0000007f}.viewer-invisible{visibility:hidden}.viewer-move{cursor:move;cursor:grab}.viewer-fade{opacity:0}.viewer-in{opacity:1}.viewer-transition{transition:all .3s}@keyframes viewer-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.viewer-loading:after{animation:viewer-spinner 1s linear infinite;border:4px solid rgba(255,255,255,10%);border-left-color:#ffffff7f;border-radius:50%;content:"";display:inline-block;height:40px;left:50%;margin-left:-20px;margin-top:-20px;position:absolute;top:50%;width:40px;z-index:1}@media (max-width: 767px){.viewer-hide-xs-down{display:none}}@media (max-width: 991px){.viewer-hide-sm-down{display:none}}@media (max-width: 1199px){.viewer-hide-md-down{display:none}}.page-layout[data-v-690b99ee]{display:flex;flex-direction:column}
@@ -0,0 +1,24 @@
1
+ export default _sfc_main;
2
+ declare namespace _sfc_main {
3
+ const name: string;
4
+ namespace props {
5
+ namespace userId {
6
+ export const type: NumberConstructor;
7
+ const _default: null;
8
+ export { _default as default };
9
+ }
10
+ namespace maskMobile {
11
+ const type_1: StringConstructor;
12
+ export { type_1 as type };
13
+ const _default_1: null;
14
+ export { _default_1 as default };
15
+ }
16
+ }
17
+ function data(): {
18
+ plainMobile: null;
19
+ loading: boolean;
20
+ };
21
+ namespace methods {
22
+ function getPlainMobile(): void;
23
+ }
24
+ }
@@ -0,0 +1,6 @@
1
+ import { App } from "vue";
2
+ export * from './UserMobileComponent.vue';
3
+ declare const _default: {
4
+ install: (app: App) => void;
5
+ };
6
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import UserMobileComp from './UserMobile';
2
+ declare const _default: {
3
+ install: (app: import("vue").App<any>) => void;
4
+ }[];
5
+ export default _default;
6
+ export { UserMobileComp };
@@ -0,0 +1,8 @@
1
+ import type { App } from 'vue';
2
+ export * from './components';
3
+ export * from './model';
4
+ export declare const install: (app: App, option?: any) => void;
5
+ declare const _default: {
6
+ install: (app: App<any>, option?: any) => void;
7
+ };
8
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { App } from "vue";
2
+ declare const _default: {
3
+ install: (app: App, option?: any) => void;
4
+ };
5
+ export default _default;
@@ -0,0 +1,115 @@
1
+ declare const _sfc_main: import("vue").DefineComponent<{}, {
2
+ condition: import("vue").Ref<{
3
+ id: null;
4
+ phoneNumber: null;
5
+ }>;
6
+ userTable: any;
7
+ search: () => void;
8
+ UserMobile: {
9
+ name: string;
10
+ props: {
11
+ userId: {
12
+ type: NumberConstructor;
13
+ default: null;
14
+ };
15
+ maskMobile: {
16
+ type: StringConstructor;
17
+ default: null;
18
+ };
19
+ };
20
+ data(): {
21
+ plainMobile: null;
22
+ loading: boolean;
23
+ };
24
+ methods: {
25
+ getPlainMobile(): void;
26
+ };
27
+ };
28
+ readonly Viewer: import("vue").DefineComponent<{}, {}, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
29
+ readonly PgTable: import("vue").DefineComponent<{
30
+ condition: {
31
+ type: ObjectConstructor;
32
+ required: boolean;
33
+ default: () => {};
34
+ };
35
+ pageSize: {
36
+ type: NumberConstructor;
37
+ required: boolean;
38
+ default: number;
39
+ };
40
+ dataUrl: {
41
+ type: StringConstructor;
42
+ required: boolean;
43
+ };
44
+ fetchData: {
45
+ type: BooleanConstructor;
46
+ required: boolean;
47
+ default: boolean;
48
+ };
49
+ pagination: {
50
+ type: BooleanConstructor;
51
+ default: boolean;
52
+ required: boolean;
53
+ };
54
+ dataList: {
55
+ type: ArrayConstructor;
56
+ required: boolean;
57
+ default: never[];
58
+ };
59
+ }, {
60
+ props: any;
61
+ emits: (event: string, ...args: any[]) => void;
62
+ state: {
63
+ loading: boolean;
64
+ list: any[];
65
+ total: number;
66
+ pageSize: number;
67
+ pageNumber: number;
68
+ };
69
+ search: () => void;
70
+ switchLoading: () => void;
71
+ handlePageSizeChange: (pageSize: number) => void;
72
+ handlePageCurrentChange: (pageNumber: number) => void;
73
+ setData: (dataList: any[]) => void;
74
+ getData: () => any[];
75
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
76
+ condition: {
77
+ type: ObjectConstructor;
78
+ required: boolean;
79
+ default: () => {};
80
+ };
81
+ pageSize: {
82
+ type: NumberConstructor;
83
+ required: boolean;
84
+ default: number;
85
+ };
86
+ dataUrl: {
87
+ type: StringConstructor;
88
+ required: boolean;
89
+ };
90
+ fetchData: {
91
+ type: BooleanConstructor;
92
+ required: boolean;
93
+ default: boolean;
94
+ };
95
+ pagination: {
96
+ type: BooleanConstructor;
97
+ default: boolean;
98
+ required: boolean;
99
+ };
100
+ dataList: {
101
+ type: ArrayConstructor;
102
+ required: boolean;
103
+ default: never[];
104
+ };
105
+ }>> & {
106
+ [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
107
+ }, {
108
+ condition: Record<string, any>;
109
+ pageSize: number;
110
+ fetchData: boolean;
111
+ pagination: boolean;
112
+ dataList: unknown[];
113
+ }>;
114
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
115
+ export default _sfc_main;
package/web-types.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "$schema": "http://json.schemastore.org/web-types",
3
+ "framework": "vue",
4
+ "name": "@pangu-backend-ui/common",
5
+ "version": "0.0.6",
6
+ "js-types-syntax": "typescript",
7
+ "description-markup": "markdown",
8
+ "contributions": {
9
+ "html": {
10
+ "vue-components": [
11
+ {
12
+ "name": "pg-table",
13
+ "source": {
14
+ "symbol": "Table"
15
+ },
16
+ "props": [
17
+ {
18
+ "name": "tt1",
19
+ "type": ["'1 | 2 | 3'"]
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "name": "pg-pagination",
25
+ "source": {
26
+ "symbol": "Pagination"
27
+ },
28
+ "props": [
29
+ {
30
+ "name": "tt1",
31
+ "type": ["'1 | 2 | 3'"]
32
+ }
33
+ ]
34
+ }
35
+ ]
36
+ }
37
+ }
38
+ }