@ipa-community/element-plus 0.0.3 → 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.
Files changed (32) hide show
  1. package/README.md +1 -2
  2. package/components.d.ts +2 -2
  3. package/eslint.config.js +7 -1
  4. package/lib/{index-DaeDazhE.js → ElAuthCode-BtEs4aSF.js} +21 -21
  5. package/lib/ElAuthCode-CjW7VQCs.cjs +1 -0
  6. package/lib/{index-C9rxMCZ2.js → ElTablePlus-BFmsdH61.js} +370 -370
  7. package/lib/{index-Bmh-3jKH.cjs → ElTablePlus-DGAKgtzB.cjs} +2 -2
  8. package/lib/{HelloWorld-Aj-MDO0D.js → HelloWorld-DUGHI-ql.js} +2 -2
  9. package/lib/{HelloWorld-CQxaM9pS.cjs → HelloWorld-DkE5myvU.cjs} +1 -1
  10. package/lib/assets/ElAuthCode.css +1 -0
  11. package/lib/{index.css → assets/ElTablePlus.css} +1 -1
  12. package/lib/components/index.d.ts +3 -3
  13. package/lib/{index-Bl8VR7w8.cjs → index-B9aGVsah.cjs} +1 -1
  14. package/lib/{index-C_s6bFgm.cjs → index-C3NSW_8F.cjs} +1 -1
  15. package/lib/{index-FUqkHp7t.js → index-Dkgs1rld.js} +5 -5
  16. package/lib/{index-8crKazUF.js → index-DlT5uboQ.js} +1 -1
  17. package/lib/index.cjs +1 -1
  18. package/lib/index.es.js +1 -1
  19. package/lib/index.umd.js +2 -2
  20. package/lib/{table-forQfWBb.cjs → table-DnNkGrLR.cjs} +1 -1
  21. package/lib/{table-LdapiE0J.js → table-T2Jkjf7q.js} +1 -1
  22. package/package.json +1 -1
  23. package/lib/index-u8W1XFVy.cjs +0 -1
  24. package/lib/index2.css +0 -1
  25. /package/lib/{HelloWorld.css → assets/HelloWorld.css} +0 -0
  26. /package/lib/{base.css → assets/base.css} +0 -0
  27. /package/lib/{index3.css → assets/index.css} +0 -0
  28. /package/lib/{base-DRB0p7jn.cjs → base-BKS5Bata.cjs} +0 -0
  29. /package/lib/{base-8KXu3iRZ.js → base-D3FwvTBU.js} +0 -0
  30. /package/lib/components/{ElAuthCode/index.vue.d.ts → input/ElAuthCode.vue.d.ts} +0 -0
  31. /package/lib/components/{ElTablePlus/index.vue.d.ts → table/ElTablePlus.vue.d.ts} +0 -0
  32. /package/lib/components/{ElTablePlus → table}/types.d.ts +0 -0
package/README.md CHANGED
@@ -84,7 +84,6 @@ or test release
84
84
  bun run release --dry-run
85
85
  ```
86
86
 
87
-
88
87
  ## TODO
89
88
 
90
- - [ ] decrease package size
89
+ - [ ] decrease package size
package/components.d.ts CHANGED
@@ -11,7 +11,7 @@ export {}
11
11
  /* prettier-ignore */
12
12
  declare module 'vue' {
13
13
  export interface GlobalComponents {
14
- ElAuthCode: typeof import('./src/components/ElAuthCode/index.vue')['default']
14
+ ElAuthCode: typeof import('./src/components/input/ElAuthCode.vue')['default']
15
15
  ElAutoResizer: typeof import('element-plus/es')['ElAutoResizer']
16
16
  ElButton: typeof import('element-plus/es')['ElButton']
17
17
  ElEmpty: typeof import('element-plus/es')['ElEmpty']
@@ -19,7 +19,7 @@ declare module 'vue' {
19
19
  ElPagination: typeof import('element-plus/es')['ElPagination']
20
20
  ElTable: typeof import('element-plus/es')['ElTable']
21
21
  ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
22
- ElTablePlus: typeof import('./src/components/ElTablePlus/index.vue')['default']
22
+ ElTablePlus: typeof import('./src/components/table/ElTablePlus.vue')['default']
23
23
  ElTableV2: typeof import('element-plus/es')['ElTableV2']
24
24
  ElTooltip: typeof import('element-plus/es')['ElTooltip']
25
25
  HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
package/eslint.config.js CHANGED
@@ -28,8 +28,14 @@ export default [
28
28
  { ignores: ["dist", ".eslintrc-auto-import.cjs", "lib"] },
29
29
  {
30
30
  rules: {
31
- "vue/multi-word-component-names": "warn",
31
+ "vue/multi-word-component-names": "error",
32
32
  "@typescript-eslint/no-explicit-any": "warn",
33
33
  },
34
34
  },
35
+ {
36
+ files: ["src/pages/**/*.vue"],
37
+ rules: {
38
+ "vue/multi-word-component-names": "off",
39
+ },
40
+ },
35
41
  ];
@@ -1,8 +1,8 @@
1
- import { defineComponent as b, mergeModels as m, useModel as I, ref as i, watch as k, computed as w, createElementBlock as f, openBlock as c, Fragment as B, renderList as F, createBlock as S, unref as $, normalizeStyle as A, withKeys as K } from "vue";
2
- import { ElInput as M } from "element-plus";
3
- import { _ as j } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- const z = { class: "code-input-group" }, D = /* @__PURE__ */ b({
5
- __name: "index",
1
+ import { defineComponent as b, mergeModels as m, useModel as I, ref as i, watch as k, computed as w, createElementBlock as f, openBlock as r, Fragment as A, renderList as B, createBlock as E, unref as F, normalizeStyle as S, withKeys as $ } from "vue";
2
+ import { ElInput as C } from "element-plus";
3
+ import { _ as K } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const M = { class: "code-input-group" }, j = /* @__PURE__ */ b({
5
+ __name: "ElAuthCode",
6
6
  props: /* @__PURE__ */ m({
7
7
  // 验证码长度(默认6位)
8
8
  length: {
@@ -28,10 +28,10 @@ const z = { class: "code-input-group" }, D = /* @__PURE__ */ b({
28
28
  modelModifiers: {}
29
29
  }),
30
30
  emits: /* @__PURE__ */ m(["complete", "update:modelValue"], ["update:modelValue"]),
31
- setup(u, { expose: p, emit: v }) {
32
- const l = u, h = I(u, "modelValue"), r = v, t = i(Array(l.length).fill(""));
31
+ setup(a, { expose: p, emit: h }) {
32
+ const l = a, v = I(a, "modelValue"), c = h, t = i(Array(l.length).fill(""));
33
33
  k(
34
- h,
34
+ v,
35
35
  (e) => {
36
36
  t.value = [
37
37
  ...(e ?? "").split(""),
@@ -42,43 +42,43 @@ const z = { class: "code-input-group" }, D = /* @__PURE__ */ b({
42
42
  immediate: !0
43
43
  }
44
44
  );
45
- const a = i([]), y = w(() => l.disabled), g = (e) => {
45
+ const u = i([]), y = w(() => l.disabled), g = (e) => {
46
46
  const d = t.value[e];
47
47
  if (!/^\d?$/.test(d)) {
48
48
  t.value[e] = "";
49
49
  return;
50
50
  }
51
- d && e < l.length - 1 && a.value[e + 1]?.focus();
51
+ d && e < l.length - 1 && u.value[e + 1]?.focus();
52
52
  const n = t.value.join("");
53
- n.length === l.length && r("complete", n), r("update:modelValue", n);
53
+ n.length === l.length && c("complete", n), c("update:modelValue", n);
54
54
  }, V = (e) => {
55
- t.value[e] === "" && e > 0 && a.value[e - 1]?.focus();
55
+ t.value[e] === "" && e > 0 && u.value[e - 1]?.focus();
56
56
  }, _ = (e) => {
57
- a.value[e]?.select();
57
+ u.value[e]?.select();
58
58
  };
59
59
  return p({ reset: () => {
60
- t.value = Array(l.length).fill(""), a.value[0]?.focus();
61
- } }), (e, d) => (c(), f("div", z, [
62
- (c(!0), f(B, null, F(u.length, (n, o) => (c(), S($(M), {
60
+ t.value = Array(l.length).fill(""), u.value[0]?.focus();
61
+ } }), (e, d) => (r(), f("div", M, [
62
+ (r(!0), f(A, null, B(a.length, (n, o) => (r(), E(F(C), {
63
63
  key: o,
64
64
  ref_for: !0,
65
65
  ref_key: "codeInputRefs",
66
- ref: a,
66
+ ref: u,
67
67
  modelValue: t.value[o],
68
68
  "onUpdate:modelValue": (s) => t.value[o] = s,
69
69
  class: "code-input-item",
70
70
  size: "small",
71
71
  maxlength: "1",
72
72
  onInput: (s) => g(o),
73
- onKeydown: K((s) => V(o), ["delete"]),
73
+ onKeydown: $((s) => V(o), ["delete"]),
74
74
  onFocus: (s) => _(o),
75
75
  disabled: y.value,
76
76
  type: "tel",
77
- style: A(u.itemStyle)
77
+ style: S(a.itemStyle)
78
78
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onInput", "onKeydown", "onFocus", "disabled", "style"]))), 128))
79
79
  ]));
80
80
  }
81
- }), q = /* @__PURE__ */ j(D, [["__scopeId", "data-v-4cd9f76d"]]);
81
+ }), U = /* @__PURE__ */ K(j, [["__scopeId", "data-v-a341dfde"]]);
82
82
  export {
83
- q as default
83
+ U as default
84
84
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),y=require("element-plus"),V=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_={class:"code-input-group"},b=e.defineComponent({__name:"ElAuthCode",props:e.mergeModels({length:{type:Number,default:6},disabled:{type:Boolean,default:!1},itemStyle:{type:Object,default:()=>({width:"40px"})}},{modelValue:{type:String,required:!0},modelModifiers:{}}),emits:e.mergeModels(["complete","update:modelValue"],["update:modelValue"]),setup(a,{expose:i,emit:m}){const o=a,p=e.useModel(a,"modelValue"),d=m,l=e.ref(Array(o.length).fill(""));e.watch(p,t=>{l.value=[...(t??"").split(""),...Array(o.length).fill("")],l.value.length!=o.length&&(l.value=l.value.slice(0,o.length))},{immediate:!0});const n=e.ref([]),f=e.computed(()=>o.disabled),v=t=>{const r=l.value[t];if(!/^\d?$/.test(r)){l.value[t]="";return}r&&t<o.length-1&&n.value[t+1]?.focus();const s=l.value.join("");s.length===o.length&&d("complete",s),d("update:modelValue",s)},h=t=>{l.value[t]===""&&t>0&&n.value[t-1]?.focus()},g=t=>{n.value[t]?.select()};return i({reset:()=>{l.value=Array(o.length).fill(""),n.value[0]?.focus()}}),(t,r)=>(e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.length,(s,u)=>(e.openBlock(),e.createBlock(e.unref(y.ElInput),{key:u,ref_for:!0,ref_key:"codeInputRefs",ref:n,modelValue:l.value[u],"onUpdate:modelValue":c=>l.value[u]=c,class:"code-input-item",size:"small",maxlength:"1",onInput:c=>v(u),onKeydown:e.withKeys(c=>h(u),["delete"]),onFocus:c=>g(u),disabled:f.value,type:"tel",style:e.normalizeStyle(a.itemStyle)},null,8,["modelValue","onUpdate:modelValue","onInput","onKeydown","onFocus","disabled","style"]))),128))]))}}),k=V._export_sfc(b,[["__scopeId","data-v-a341dfde"]]);exports.default=k;