cc1-admin-front 0.0.2 → 0.0.4

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.
@@ -1,22 +1,26 @@
1
- import { defineComponent as y, reactive as m, resolveComponent as s, openBlock as p, createBlock as n, withCtx as r, createTextVNode as i } from "vue";
2
- import { ApiAuthApi as u, scurd as d, ssys as b } from "./cc1-admin-front.js";
3
- import { TSys as f } from "cc1-form";
4
- const v = /* @__PURE__ */ y({
1
+ import { defineComponent as y, reactive as m, resolveComponent as s, openBlock as r, createBlock as p, withCtx as n, createTextVNode as u } from "vue";
2
+ import { TSys as i } from "cc1-form";
3
+ import { ApiAuthApi as d, scurd as f, ssys as b } from "./cc1-admin-front.js";
4
+ const x = /* @__PURE__ */ y({
5
5
  __name: "index",
6
6
  setup(_) {
7
- const e = m({
7
+ const t = m({
8
8
  data: [],
9
9
  option: {
10
- api: u,
10
+ api: d,
11
11
  search: {
12
12
  show: !1
13
13
  },
14
- data(t) {
15
- return e.data = b.getTableTree(t), e.data;
14
+ data(e) {
15
+ return t.data = b.getTableTree(e), t.data;
16
16
  },
17
17
  table: {
18
18
  border: !0,
19
- index: !1
19
+ index: !1,
20
+ add: (e) => e?.type === 0,
21
+ operate: {
22
+ width: 160
23
+ }
20
24
  },
21
25
  page: {
22
26
  show: !1
@@ -58,6 +62,7 @@ const v = /* @__PURE__ */ y({
58
62
  value: 0,
59
63
  options: {
60
64
  select: {
65
+ clearable: !1,
61
66
  data: [
62
67
  { label: "目录", value: 0 },
63
68
  { label: "接口", value: 1 }
@@ -83,8 +88,9 @@ const v = /* @__PURE__ */ y({
83
88
  label: "地址",
84
89
  type: "select",
85
90
  value: "",
91
+ rules: !0,
86
92
  show: {
87
- form: (t) => t.type === 1
93
+ form: (e) => e.type === 1
88
94
  },
89
95
  options: {
90
96
  select: {
@@ -102,11 +108,11 @@ const v = /* @__PURE__ */ y({
102
108
  }
103
109
  ],
104
110
  form: {
105
- openBefore: async (t, a) => {
106
- d.form.openBefore.parentId(t, a, e.data, e.option);
107
- const l = await e.api.getList();
108
- d.setOptionsData(
109
- e.option,
111
+ openBefore: async (e, a) => {
112
+ f.form.openBefore.parentId(e.title ? e : null, a, t.data, t.option), a.type === i.EDialog.Add && (e.title = "");
113
+ const l = await t.api.getList();
114
+ f.setOptionsData(
115
+ t.option,
110
116
  "url",
111
117
  l.map((o) => ({
112
118
  label: o.path,
@@ -116,7 +122,7 @@ const v = /* @__PURE__ */ y({
116
122
  }
117
123
  },
118
124
  tools: {
119
- add: (t) => t === void 0 ? !0 : t.type === 0,
125
+ add: (e) => e === void 0 ? !0 : e.type === 0,
120
126
  update: !0,
121
127
  delete: !0,
122
128
  export: {
@@ -128,38 +134,38 @@ const v = /* @__PURE__ */ y({
128
134
  api: {
129
135
  list: [],
130
136
  getList: async () => {
131
- if (e.api.list.length) return e.api.list;
132
- f.loading(!0);
133
- const t = await u.all({
137
+ if (t.api.list.length) return t.api.list;
138
+ i.loading(!0);
139
+ const e = await d.all({
134
140
  final(a, l, o) {
135
- f.loading(!1);
141
+ i.loading(!1);
136
142
  }
137
143
  });
138
- return e.api.list = t.data, e.api.list;
144
+ return t.api.list = e.data, t.api.list;
139
145
  }
140
146
  }
141
147
  });
142
- return (t, a) => {
148
+ return (e, a) => {
143
149
  const l = s("el-tag"), o = s("t-curd");
144
- return p(), n(o, {
145
- option: e.option
150
+ return r(), p(o, {
151
+ option: t.option
146
152
  }, {
147
- "table-type": r(({ row: c }) => [
148
- c.type === 0 ? (p(), n(l, {
153
+ "table-type": n(({ row: c }) => [
154
+ c.type === 0 ? (r(), p(l, {
149
155
  key: 0,
150
156
  type: "success"
151
157
  }, {
152
- default: r(() => a[0] || (a[0] = [
153
- i("目录", -1)
158
+ default: n(() => a[0] || (a[0] = [
159
+ u("目录", -1)
154
160
  ])),
155
161
  _: 1,
156
162
  __: [0]
157
- })) : (p(), n(l, {
163
+ })) : (r(), p(l, {
158
164
  key: 1,
159
165
  type: "warning"
160
166
  }, {
161
- default: r(() => a[1] || (a[1] = [
162
- i("接口", -1)
167
+ default: n(() => a[1] || (a[1] = [
168
+ u("接口", -1)
163
169
  ])),
164
170
  _: 1,
165
171
  __: [1]
@@ -171,5 +177,5 @@ const v = /* @__PURE__ */ y({
171
177
  }
172
178
  });
173
179
  export {
174
- v as default
180
+ x as default
175
181
  };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import 'tools-css/index.css';
2
2
  import 'tools-css/scroll.css';
3
+ import type { query, ApiData, ApiRes } from './apis/types/query';
3
4
  import ApiAuthApi from './apis/auth/ApiAuthApi';
4
5
  import ApiAuthMenu from './apis/auth/ApiAuthMenu';
5
6
  import ApiAuthPhone from './apis/auth/ApiAuthPhone';
@@ -15,7 +16,7 @@ import ApiSmsConfig from './apis/sms/ApiSmsConfig';
15
16
  import ApiApp from './apis/system/ApiApp';
16
17
  import ApiSystemConfig from './apis/system/ApiSystemConfig';
17
18
  import ApiSystemTenant from './apis/system/ApiSystemTenant';
18
- import { EDialog, ERouter } from './enum/Enum';
19
+ import { ERouter } from './enum/Enum';
19
20
  import { scurd } from './sstore/scurd';
20
21
  import { ssys } from './sstore/ssys';
21
22
  import { suser } from './sstore/suser';
@@ -24,7 +25,7 @@ import { svf } from './sstore/svf';
24
25
  import './styles/index.less';
25
26
  import System from './utils/System';
26
27
  declare const initApp: (config: Partial<typeof System.config>) => Promise<void>;
27
- export { ApiApp, ApiAuthApi, ApiAuthMenu, ApiAuthPhone, ApiAuthRole, ApiAuthUser, ApiCaptcha, ApiCron, ApiEmailConfig, ApiErrorLog, ApiJob, ApiLoginLog, ApiSmsConfig, ApiSystemConfig, ApiSystemTenant, EDialog, ERouter, initApp, scurd, ssys, suser, sutil, svf, System };
28
+ export { ApiApp, ApiAuthApi, ApiAuthMenu, ApiAuthPhone, ApiAuthRole, ApiAuthUser, ApiCaptcha, ApiCron, ApiEmailConfig, ApiErrorLog, ApiJob, ApiLoginLog, ApiSmsConfig, ApiSystemConfig, ApiSystemTenant, ERouter, initApp, scurd, ssys, suser, sutil, svf, System, type query, type ApiData, type ApiRes };
28
29
 
29
30
  export {}
30
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc1-admin-front",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "我来助你-后台管理系统-页面",
5
5
  "repository": {
6
6
  "type": "git",