customs-ui-kit 1.0.1 → 1.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.
@@ -1 +1 @@
1
- ._isHighlight_2pl28_11{box-shadow:0 0 8px #409effcc;transform:scale(1.02);transition:all .3s ease}._myTableWrapper_1olwi_3{width:100%;overflow:hidden}._myTable_1olwi_3{--el-table-header-bg-color: #f5f7fa}
1
+ .isHighlight[data-v-ae952d65]{box-shadow:0 0 8px #409effcc;transform:scale(1.02);transition:all .3s ease}.myTableWrapper[data-v-160d151c]{width:100%;overflow:hidden}.myTable[data-v-160d151c]{--el-table-header-bg-color: #f5f7fa}
@@ -1,76 +1,62 @@
1
- import { defineComponent as d, openBlock as o, createBlock as m, unref as r, mergeProps as n, withCtx as p, renderSlot as u, createElementBlock as i, normalizeClass as y, createVNode as b, Fragment as _, renderList as h, createSlots as f } from "vue";
2
- import { ElButton as g, ElTable as $, ElTableColumn as B } from "element-plus";
3
- const T = /* @__PURE__ */ d({
1
+ import { defineComponent as i, openBlock as o, createBlock as c, unref as s, mergeProps as n, withCtx as d, renderSlot as u, createElementBlock as p, createVNode as f, Fragment as b, renderList as _, createSlots as h } from "vue";
2
+ import { ElButton as y, ElTable as B, ElTableColumn as g } from "element-plus";
3
+ const v = /* @__PURE__ */ i({
4
4
  __name: "Button",
5
5
  props: {
6
6
  highlight: { type: Boolean }
7
7
  },
8
- setup(s) {
9
- return (e, l) => (o(), m(r(g), n(e.$attrs, {
10
- class: [e.$style.myButton, { [e.$style.isHighlight]: s.highlight }]
8
+ setup(r) {
9
+ return (e, a) => (o(), c(s(y), n(e.$attrs, {
10
+ class: ["myButton", { isHighlight: r.highlight }]
11
11
  }), {
12
- default: p(() => [
13
- u(e.$slots, "default")
12
+ default: d(() => [
13
+ u(e.$slots, "default", {}, void 0, !0)
14
14
  ]),
15
15
  _: 3
16
16
  }, 16, ["class"]));
17
17
  }
18
- }), k = "_myButton_2pl28_3", w = "_isHighlight_2pl28_11", M = {
19
- myButton: k,
20
- isHighlight: w
21
- }, c = (s, e) => {
22
- const l = s.__vccOpts || s;
23
- for (const [t, a] of e)
24
- l[t] = a;
25
- return l;
26
- }, v = {
27
- $style: M
28
- }, L = /* @__PURE__ */ c(T, [["__cssModules", v]]), C = /* @__PURE__ */ d({
18
+ }), m = (r, e) => {
19
+ const a = r.__vccOpts || r;
20
+ for (const [t, l] of e)
21
+ a[t] = l;
22
+ return a;
23
+ }, E = /* @__PURE__ */ m(v, [["__scopeId", "data-v-ae952d65"]]), T = { class: "myTableWrapper" }, $ = /* @__PURE__ */ i({
29
24
  __name: "Table",
30
25
  props: {
31
26
  data: { default: () => [] },
32
27
  columns: { default: () => [] },
33
28
  border: { type: Boolean, default: !0 }
34
29
  },
35
- setup(s) {
36
- return (e, l) => (o(), i("div", {
37
- class: y(e.$style.myTableWrapper)
38
- }, [
39
- b(r($), n({
40
- data: s.data,
41
- border: s.border
42
- }, e.$attrs, {
43
- class: e.$style.myTable
44
- }), {
45
- default: p(() => [
46
- (o(!0), i(_, null, h(s.columns, (t) => (o(), m(r(B), {
30
+ setup(r) {
31
+ return (e, a) => (o(), p("div", T, [
32
+ f(s(B), n({
33
+ data: r.data,
34
+ border: r.border
35
+ }, e.$attrs, { class: "myTable" }), {
36
+ default: d(() => [
37
+ (o(!0), p(b, null, _(r.columns, (t) => (o(), c(s(g), {
47
38
  key: t.prop,
48
39
  prop: t.prop,
49
40
  label: t.label,
50
41
  width: t.width,
51
42
  sortable: t.sortable
52
- }, f({ _: 2 }, [
43
+ }, h({ _: 2 }, [
53
44
  e.$slots[t.prop] ? {
54
45
  name: "default",
55
- fn: p((a) => [
56
- u(e.$slots, t.prop, n({ ref_for: !0 }, a))
46
+ fn: d((l) => [
47
+ u(e.$slots, t.prop, n({ ref_for: !0 }, l), void 0, !0)
57
48
  ]),
58
49
  key: "0"
59
50
  } : void 0
60
51
  ]), 1032, ["prop", "label", "width", "sortable"]))), 128)),
61
- u(e.$slots, "append")
52
+ u(e.$slots, "append", {}, void 0, !0)
62
53
  ]),
63
54
  _: 3
64
- }, 16, ["data", "border", "class"])
65
- ], 2));
55
+ }, 16, ["data", "border"])
56
+ ]));
66
57
  }
67
- }), E = "_myTableWrapper_1olwi_3", H = "_myTable_1olwi_3", W = {
68
- myTableWrapper: E,
69
- myTable: H
70
- }, S = {
71
- $style: W
72
- }, N = /* @__PURE__ */ c(C, [["__cssModules", S]]);
58
+ }), C = /* @__PURE__ */ m($, [["__scopeId", "data-v-160d151c"]]);
73
59
  export {
74
- L as MyButton,
75
- N as MyTable
60
+ E as MyButton,
61
+ C as MyTable
76
62
  };
@@ -1 +1 @@
1
- (function(s,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],e):(s=typeof globalThis<"u"?globalThis:s||self,e(s.CustomsUIKit={},s.Vue,s.ElementPlus))})(this,(function(s,e,r){"use strict";const p=e.defineComponent({__name:"Button",props:{highlight:{type:Boolean}},setup(l){return(t,n)=>(e.openBlock(),e.createBlock(e.unref(r.ElButton),e.mergeProps(t.$attrs,{class:[t.$style.myButton,{[t.$style.isHighlight]:l.highlight}]}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["class"]))}}),d={myButton:"_myButton_2pl28_3",isHighlight:"_isHighlight_2pl28_11"},i=(l,t)=>{const n=l.__vccOpts||l;for(const[o,a]of t)n[o]=a;return n},c=i(p,[["__cssModules",{$style:d}]]),m=i(e.defineComponent({__name:"Table",props:{data:{default:()=>[]},columns:{default:()=>[]},border:{type:Boolean,default:!0}},setup(l){return(t,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.$style.myTableWrapper)},[e.createVNode(e.unref(r.ElTable),e.mergeProps({data:l.data,border:l.border},t.$attrs,{class:t.$style.myTable}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.columns,o=>(e.openBlock(),e.createBlock(e.unref(r.ElTableColumn),{key:o.prop,prop:o.prop,label:o.label,width:o.width,sortable:o.sortable},e.createSlots({_:2},[t.$slots[o.prop]?{name:"default",fn:e.withCtx(a=>[e.renderSlot(t.$slots,o.prop,e.mergeProps({ref_for:!0},a))]),key:"0"}:void 0]),1032,["prop","label","width","sortable"]))),128)),e.renderSlot(t.$slots,"append")]),_:3},16,["data","border","class"])],2))}}),[["__cssModules",{$style:{myTableWrapper:"_myTableWrapper_1olwi_3",myTable:"_myTable_1olwi_3"}}]]);s.MyButton=c,s.MyTable=m,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.CustomsUIKit={},t.Vue,t.ElementPlus))})(this,(function(t,e,l){"use strict";const i=e.defineComponent({__name:"Button",props:{highlight:{type:Boolean}},setup(n){return(o,a)=>(e.openBlock(),e.createBlock(e.unref(l.ElButton),e.mergeProps(o.$attrs,{class:["myButton",{isHighlight:n.highlight}]}),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{},void 0,!0)]),_:3},16,["class"]))}}),d=(n,o)=>{const a=n.__vccOpts||n;for(const[r,s]of o)a[r]=s;return a},p=d(i,[["__scopeId","data-v-ae952d65"]]),c={class:"myTableWrapper"},f=d(e.defineComponent({__name:"Table",props:{data:{default:()=>[]},columns:{default:()=>[]},border:{type:Boolean,default:!0}},setup(n){return(o,a)=>(e.openBlock(),e.createElementBlock("div",c,[e.createVNode(e.unref(l.ElTable),e.mergeProps({data:n.data,border:n.border},o.$attrs,{class:"myTable"}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.columns,r=>(e.openBlock(),e.createBlock(e.unref(l.ElTableColumn),{key:r.prop,prop:r.prop,label:r.label,width:r.width,sortable:r.sortable},e.createSlots({_:2},[o.$slots[r.prop]?{name:"default",fn:e.withCtx(s=>[e.renderSlot(o.$slots,r.prop,e.mergeProps({ref_for:!0},s),void 0,!0)]),key:"0"}:void 0]),1032,["prop","label","width","sortable"]))),128)),e.renderSlot(o.$slots,"append",{},void 0,!0)]),_:3},16,["data","border"])]))}}),[["__scopeId","data-v-160d151c"]]);t.MyButton=p,t.MyTable=f,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "customs-ui-kit",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "main": "dist/customs-ui-kit.umd.js",
5
5
  "module": "dist/customs-ui-kit.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,7 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { ElButton } from 'element-plus';
3
3
  import type { ButtonProps as ElButtonProps } from 'element-plus';
4
- import { useCssModule } from 'vue';
5
4
 
6
5
  /**
7
6
  * 自定义按钮组件属性 (继承并扩展 Element Plus)
@@ -18,12 +17,12 @@ defineProps<MyButtonProps>();
18
17
  </script>
19
18
 
20
19
  <template>
21
- <el-button v-bind="$attrs" :class="[$style.myButton, { [$style.isHighlight]: highlight }]">
20
+ <el-button v-bind="$attrs" class="myButton" :class="{ 'isHighlight': highlight }">
22
21
  <slot />
23
22
  </el-button>
24
23
  </template>
25
24
 
26
- <style module>
25
+ <style scoped>
27
26
  .myButton {
28
27
  /* 在这里可以添加基础的自定义样式 */
29
28
  }
@@ -45,8 +45,8 @@ withDefaults(defineProps<MyTableProps>(), {
45
45
  </script>
46
46
 
47
47
  <template>
48
- <div :class="$style.myTableWrapper">
49
- <el-table :data="data" :border="border" v-bind="$attrs" :class="$style.myTable">
48
+ <div class="myTableWrapper">
49
+ <el-table :data="data" :border="border" v-bind="$attrs" class="myTable">
50
50
  <el-table-column
51
51
  v-for="col in columns"
52
52
  :key="col.prop"
@@ -67,7 +67,7 @@ withDefaults(defineProps<MyTableProps>(), {
67
67
  </div>
68
68
  </template>
69
69
 
70
- <style module>
70
+ <style scoped>
71
71
  .myTableWrapper {
72
72
  width: 100%;
73
73
  overflow: hidden;