auto-vue-basic 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.
- package/dist/auto-vue-basic.es.js +4 -5
- package/dist/auto-vue-basic.umd.js +1 -1
- package/dist/index-DkkqS0YR.js +4 -0
- package/dist/index-FK0zfgbm.js +14 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-Bznte5qu.js +138 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/router/index.d.ts +2 -0
- package/dist/types/views/index.d.ts +0 -0
- package/dist/types/views/menus/index.vue.d.ts +5 -0
- package/dist/version.js +1 -1
- package/package.json +6 -8
@@ -1,11 +1,10 @@
|
|
1
1
|
const n = {
|
2
|
-
install: (e,
|
3
|
-
|
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.");
|
2
|
+
install: (e, o) => {
|
3
|
+
Reflect.ownKeys(e._context.provides).some((i) => String(i) === "Symbol(pinia)") || console.warn("Pinia is not provided. Please install and provide Pinia in your app."), console.log(Reflect.ownKeys(e._context.provides));
|
6
4
|
},
|
7
5
|
version: "__VERSION__"
|
8
|
-
};
|
6
|
+
}, s = /* @__PURE__ */ Object.assign({ "./views/basic/index.vue": () => import("./index-FK0zfgbm.js"), "./views/menus/index.vue": () => import("./index-DkkqS0YR.js") });
|
9
7
|
export {
|
8
|
+
s as basicModules,
|
10
9
|
n as default
|
11
10
|
};
|
@@ -1 +1 @@
|
|
1
|
-
(function(
|
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 _={install:(l,i)=>{Reflect.ownKeys(l._context.provides).some(n=>String(n)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.log(Reflect.ownKeys(l._context.provides))},version:"__VERSION__"},m=Object.assign({"./views/basic/index.vue":()=>Promise.resolve().then(()=>y),"./views/menus/index.vue":()=>Promise.resolve().then(()=>h)});function b(l){return typeof l=="function"||Object.prototype.toString.call(l)==="[object Object]"&&!e.isVNode(l)}const f=e.defineComponent({__name:"index",setup(l){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 s;return e.createVNode(e.resolveComponent("el-button"),{type:"primary",size:"small",link:!0,onClick:p=>{p.stopPropagation(),console.log("onclick",p,o)}},b(s=t.Translate("base.modify"))?s:{default:()=>[s]})}}],T=()=>{var o;(o=c.value)==null||o.getTableList()},d=()=>{var o;(o=c.value)==null||o.search()},x=()=>{var o;n.keyword="",n.status=0,(o=c.value)==null||o.reset()};return(o,s)=>{const p=e.resolveComponent("el-input"),u=e.resolveComponent("el-radio-button"),g=e.resolveComponent("el-radio-group"),k=e.resolveComponent("el-space"),S=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(S,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(k,{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":s[0]||(s[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(g,{modelValue:n.status,"onUpdate:modelValue":s[1]||(s[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(u,{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:x})]),_: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(l){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=m,r.default=_,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
@@ -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
|
+
};
|
package/dist/types/index.d.ts
CHANGED
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
|
+
export const __VERSION__ = "0.0.3'
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "auto-vue-basic",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.4",
|
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,14 @@
|
|
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
|
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
21
|
"axios": "^1.7.9",
|
22
22
|
"element-plus": "^2.9.3",
|
23
23
|
"mitt": "^3.0.1",
|
24
|
-
"vue": "^3.5.13"
|
25
|
-
"auto-vue-manual": "^0.1.5"
|
24
|
+
"vue": "^3.5.13"
|
26
25
|
},
|
27
26
|
"devDependencies": {
|
28
27
|
"@types/node": "^22.10.2",
|
@@ -34,6 +33,8 @@
|
|
34
33
|
"@vue/runtime-core": "^3.5.13",
|
35
34
|
"@vue/runtime-dom": "^3.5.13",
|
36
35
|
"@vue/tsconfig": "^0.7.0",
|
36
|
+
"pinia": "^2.3.0",
|
37
|
+
"pinia-plugin-persistedstate": "^3.2.3",
|
37
38
|
"playwright": "^1.53.0",
|
38
39
|
"sass": "^1.77.6",
|
39
40
|
"sass-loader": "^16.0.4",
|
@@ -41,13 +42,10 @@
|
|
41
42
|
"vite": "^6.0.5",
|
42
43
|
"vite-plugin-dts": "^4.5.3",
|
43
44
|
"vitest": "^3.2.3",
|
44
|
-
"vue-tsc": "^2.2.0",
|
45
45
|
"vue-router": "^4.5.0",
|
46
|
-
"
|
47
|
-
"pinia-plugin-persistedstate": "^3.2.3"
|
46
|
+
"vue-tsc": "^2.2.0"
|
48
47
|
},
|
49
48
|
"peerDependencies": {
|
50
|
-
"auto-vue-manual": "^0.1.5",
|
51
49
|
"@element-plus/icons-vue": "^2.3.1",
|
52
50
|
"element-plus": "^2.9.3",
|
53
51
|
"sass": "^1.77.6",
|