auto-vue-basic 0.0.2 → 0.0.3

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.
@@ -2,10 +2,11 @@ const n = {
2
2
  install: (e, i) => {
3
3
  if (!i.requestBaseUrl)
4
4
  throw new Error("requestBaseUrl is required");
5
- Reflect.ownKeys(e._context.provides).some((r) => String(r) === "Symbol(pinia)") || console.warn("Pinia is not provided. Please install and provide Pinia in your app.");
5
+ Reflect.ownKeys(e._context.provides).some((s) => String(s) === "Symbol(pinia)") || console.warn("Pinia is not provided. Please install and provide Pinia in your app.");
6
6
  },
7
7
  version: "__VERSION__"
8
- };
8
+ }, r = /* @__PURE__ */ Object.assign({ "./views/basic/index.vue": () => import("./index-FK0zfgbm.js"), "./views/menus/index.vue": () => import("./index-DkkqS0YR.js") });
9
9
  export {
10
+ r as basicModules,
10
11
  n as default
11
12
  };
@@ -1 +1 @@
1
- (function(i,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(i=typeof globalThis<"u"?globalThis:i||self,i.AutoVueBasic=e())})(this,function(){"use strict";return{install:(e,n)=>{if(!n.requestBaseUrl)throw new Error("requestBaseUrl is required");Reflect.ownKeys(e._context.provides).some(o=>String(o)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app.")},version:"__VERSION__"}});
1
+ (function(r,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("auto-vue-manual")):typeof define=="function"&&define.amd?define(["exports","vue","auto-vue-manual"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r.AutoVueBasic={},r.Vue,r["auto-vue-manual"]))})(this,function(r,e,t){"use strict";const m={install:(s,i)=>{if(!i.requestBaseUrl)throw new Error("requestBaseUrl is required");Reflect.ownKeys(s._context.provides).some(n=>String(n)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app.")},version:"__VERSION__"},_=Object.assign({"./views/basic/index.vue":()=>Promise.resolve().then(()=>y),"./views/menus/index.vue":()=>Promise.resolve().then(()=>h)});function b(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!e.isVNode(s)}const f=e.defineComponent({__name:"index",setup(s){const i=t.createAutoApi("menu"),n=e.reactive({keyword:"",status:0}),c=e.ref(),w=[{label:t.Translate("base.index"),type:"index",width:60},{label:t.Translate("base.icon"),prop:"icon",width:60,render:({row:o})=>e.createVNode("span",{class:"iconfont "+o.icon,style:"font-size: 16px;"},null)},{label:t.Translate("base.module"),prop:"module",width:120},{label:t.Translate("base.parent"),prop:"parent",width:120},{label:t.Translate("base.name"),prop:"name",width:120},{label:t.Translate("base.url"),prop:"url",width:300},{label:t.Translate("base.component"),prop:"component",width:300},{label:t.Translate("base.rules"),prop:"status",width:100,type:"switch",props:{activeValue:1,inactiveValue:2,api:i.urls[t.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:t.Translate("base.action"),width:60,align:"center",render:o=>{let l;return e.createVNode(e.resolveComponent("el-button"),{type:"primary",size:"small",link:!0,onClick:p=>{p.stopPropagation(),console.log("onclick",p,o)}},b(l=t.Translate("base.modify"))?l:{default:()=>[l]})}}],T=()=>{var o;(o=c.value)==null||o.getTableList()},d=()=>{var o;(o=c.value)==null||o.search()},u=()=>{var o;n.keyword="",n.status=0,(o=c.value)==null||o.reset()};return(o,l)=>{const p=e.resolveComponent("el-input"),x=e.resolveComponent("el-radio-button"),k=e.resolveComponent("el-radio-group"),S=e.resolveComponent("el-space"),g=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(g,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(S,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(t.RefreshButton),{onRefresh:T}),e.createVNode(e.unref(t.OpenButton)),e.createVNode(p,{class:"basic-search-input",modelValue:n.keyword,"onUpdate:modelValue":l[0]||(l[0]=a=>n.keyword=a),placeholder:e.unref(t.Translate)("menu.keyword"),clearable:"",onKeyup:e.withKeys(d,["enter"]),onClear:d},null,8,["modelValue","placeholder"]),e.createVNode(k,{modelValue:n.status,"onUpdate:modelValue":l[1]||(l[1]=a=>n.status=a),onChange:d},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],a=>e.createVNode(x,{key:a,label:e.unref(t.Translate)(`base.DISABLE_ENABLE.${a}`),value:a},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(t.SearchButton),{onSearch:d}),e.createVNode(e.unref(t.ResetButton),{onReset:u})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(t.ProTable),{ref_key:"proTableRef",ref:c,size:"small",columns:w,url:e.unref(i).urls[e.unref(t.DEFAULT_PAGE_KEY)],"search-param":n,autoSearch:""},null,8,["url","search-param"])]),_:1})}}}),h=Object.freeze(Object.defineProperty({__proto__:null,default:f},Symbol.toStringTag,{value:"Module"})),y=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(s){return(i,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n[0]||(n[0]=e.createTextVNode(" 2 ")),e.createVNode(f)],64))}})},Symbol.toStringTag,{value:"Module"}));r.basicModules=_,r.default=m,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "./index.vue_vue_type_script_setup_true_lang-Bznte5qu.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,14 @@
1
+ import { defineComponent as t, createElementBlock as n, openBlock as o, Fragment as r, createTextVNode as m, createVNode as a } from "vue";
2
+ import { _ } from "./index.vue_vue_type_script_setup_true_lang-Bznte5qu.js";
3
+ const i = /* @__PURE__ */ t({
4
+ __name: "index",
5
+ setup(p) {
6
+ return (c, e) => (o(), n(r, null, [
7
+ e[0] || (e[0] = m(" 2 ")),
8
+ a(_)
9
+ ], 64));
10
+ }
11
+ });
12
+ export {
13
+ i as default
14
+ };
@@ -0,0 +1,138 @@
1
+ import { defineComponent as g, reactive as v, ref as x, createVNode as o, resolveComponent as s, createBlock as B, openBlock as m, withCtx as d, unref as l, withKeys as E, createElementBlock as T, Fragment as A, renderList as S, isVNode as C } from "vue";
2
+ import { createAutoApi as L, Translate as t, DEFAULT_STATUS_KEY as R, ProTable as U, DEFAULT_PAGE_KEY as K, RefreshButton as j, OpenButton as z, SearchButton as D, ResetButton as F } from "auto-vue-manual";
3
+ function N(c) {
4
+ return typeof c == "function" || Object.prototype.toString.call(c) === "[object Object]" && !C(c);
5
+ }
6
+ const Y = /* @__PURE__ */ g({
7
+ __name: "index",
8
+ setup(c) {
9
+ const b = L("menu"), n = v({
10
+ keyword: "",
11
+ status: 0
12
+ }), u = x(), _ = [{
13
+ label: t("base.index"),
14
+ type: "index",
15
+ width: 60
16
+ }, {
17
+ label: t("base.icon"),
18
+ prop: "icon",
19
+ width: 60,
20
+ render: ({
21
+ row: e
22
+ }) => o("span", {
23
+ class: "iconfont " + e.icon,
24
+ style: "font-size: 16px;"
25
+ }, null)
26
+ }, {
27
+ label: t("base.module"),
28
+ prop: "module",
29
+ width: 120
30
+ }, {
31
+ label: t("base.parent"),
32
+ prop: "parent",
33
+ width: 120
34
+ }, {
35
+ label: t("base.name"),
36
+ prop: "name",
37
+ width: 120
38
+ }, {
39
+ label: t("base.url"),
40
+ prop: "url",
41
+ width: 300
42
+ }, {
43
+ label: t("base.component"),
44
+ prop: "component",
45
+ width: 300
46
+ }, {
47
+ label: t("base.rules"),
48
+ prop: "status",
49
+ width: 100,
50
+ type: "switch",
51
+ props: {
52
+ activeValue: 1,
53
+ inactiveValue: 2,
54
+ api: b.urls[R],
55
+ refresh: !0
56
+ }
57
+ }, {
58
+ prop: "action",
59
+ label: t("base.action"),
60
+ width: 60,
61
+ align: "center",
62
+ render: (e) => {
63
+ let a;
64
+ return o(s("el-button"), {
65
+ type: "primary",
66
+ size: "small",
67
+ link: !0,
68
+ onClick: (i) => {
69
+ i.stopPropagation(), console.log("onclick", i, e);
70
+ }
71
+ }, N(a = t("base.modify")) ? a : {
72
+ default: () => [a]
73
+ });
74
+ }
75
+ }], f = () => {
76
+ var e;
77
+ (e = u.value) == null || e.getTableList();
78
+ }, p = () => {
79
+ var e;
80
+ (e = u.value) == null || e.search();
81
+ }, h = () => {
82
+ var e;
83
+ n.keyword = "", n.status = 0, (e = u.value) == null || e.reset();
84
+ };
85
+ return (e, a) => {
86
+ const i = s("el-input"), y = s("el-radio-button"), w = s("el-radio-group"), k = s("el-space"), V = s("el-card");
87
+ return m(), B(V, {
88
+ class: "basic-card flex-full",
89
+ "body-class": "flex-1"
90
+ }, {
91
+ header: d(() => [o(k, {
92
+ class: "search-bar"
93
+ }, {
94
+ default: d(() => [o(l(j), {
95
+ onRefresh: f
96
+ }), o(l(z)), o(i, {
97
+ class: "basic-search-input",
98
+ modelValue: n.keyword,
99
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => n.keyword = r),
100
+ placeholder: l(t)("menu.keyword"),
101
+ clearable: "",
102
+ onKeyup: E(p, ["enter"]),
103
+ onClear: p
104
+ }, null, 8, ["modelValue", "placeholder"]), o(w, {
105
+ modelValue: n.status,
106
+ "onUpdate:modelValue": a[1] || (a[1] = (r) => n.status = r),
107
+ onChange: p
108
+ }, {
109
+ default: d(() => [(m(), T(A, null, S([0, 1, 2], (r) => o(y, {
110
+ key: r,
111
+ label: l(t)(`base.DISABLE_ENABLE.${r}`),
112
+ value: r
113
+ }, null, 8, ["label", "value"])), 64))]),
114
+ _: 1
115
+ }, 8, ["modelValue"]), o(l(D), {
116
+ onSearch: p
117
+ }), o(l(F), {
118
+ onReset: h
119
+ })]),
120
+ _: 1
121
+ })]),
122
+ default: d(() => [o(l(U), {
123
+ ref_key: "proTableRef",
124
+ ref: u,
125
+ size: "small",
126
+ columns: _,
127
+ url: l(b).urls[l(K)],
128
+ "search-param": n,
129
+ autoSearch: ""
130
+ }, null, 8, ["url", "search-param"])]),
131
+ _: 1
132
+ });
133
+ };
134
+ }
135
+ });
136
+ export {
137
+ Y as _
138
+ };
@@ -4,3 +4,4 @@ declare const installer: {
4
4
  version: string;
5
5
  };
6
6
  export default installer;
7
+ export declare const basicModules: Record<string, () => Promise<unknown>>;
@@ -0,0 +1,2 @@
1
+ import { RouteRecordRaw } from 'vue-router';
2
+ export declare const routes: RouteRecordRaw[];
File without changes
@@ -0,0 +1,5 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {
3
+ proTableRef: any;
4
+ }, any>;
5
+ export default _default;
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const __VERSION__ = "0.0.1'
1
+ export const __VERSION__ = "0.0.2'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auto-vue-basic",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "main": "./dist/auto-vue-basic.umd.js",
6
6
  "module": "./dist/auto-vue-basic.es.js",
@@ -14,15 +14,15 @@
14
14
  "build:pub": "npm run build && npm run publish:latest && npm run update:auto",
15
15
  "build": "rm -rf dist && vite build --config vite.config.ts && echo 'export const __VERSION__ = \"'$(npm pkg get version | tr -d '\"')\"'\" > dist/version.js",
16
16
  "publish:latest": "npm version patch --no-git-tag-version && npm publish",
17
- "update:auto": "npm uni auto-vue-manual && npm i auto-vue-manual -D --save-dev && npm list auto-vue-manual"
17
+ "update:auto": "npm uni auto-vue-manual && npm i auto-vue-manual && npm list auto-vue-manual"
18
18
  },
19
19
  "dependencies": {
20
20
  "@element-plus/icons-vue": "^2.3.1",
21
+ "auto-vue-manual": "^0.1.10",
21
22
  "axios": "^1.7.9",
22
23
  "element-plus": "^2.9.3",
23
24
  "mitt": "^3.0.1",
24
- "vue": "^3.5.13",
25
- "auto-vue-manual": "^0.1.5"
25
+ "vue": "^3.5.13"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^22.10.2",
@@ -34,6 +34,8 @@
34
34
  "@vue/runtime-core": "^3.5.13",
35
35
  "@vue/runtime-dom": "^3.5.13",
36
36
  "@vue/tsconfig": "^0.7.0",
37
+ "pinia": "^2.3.0",
38
+ "pinia-plugin-persistedstate": "^3.2.3",
37
39
  "playwright": "^1.53.0",
38
40
  "sass": "^1.77.6",
39
41
  "sass-loader": "^16.0.4",
@@ -41,13 +43,10 @@
41
43
  "vite": "^6.0.5",
42
44
  "vite-plugin-dts": "^4.5.3",
43
45
  "vitest": "^3.2.3",
44
- "vue-tsc": "^2.2.0",
45
46
  "vue-router": "^4.5.0",
46
- "pinia": "^2.3.0",
47
- "pinia-plugin-persistedstate": "^3.2.3"
47
+ "vue-tsc": "^2.2.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "auto-vue-manual": "^0.1.5",
51
50
  "@element-plus/icons-vue": "^2.3.1",
52
51
  "element-plus": "^2.9.3",
53
52
  "sass": "^1.77.6",