oga-ui 0.1.51 → 0.1.57

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/README.md CHANGED
@@ -167,14 +167,14 @@ ColumnType.State
167
167
  ```html
168
168
  Simplified the usage of Element Plus Icons
169
169
 
170
- <el-icon name="apple"></el-icon>
170
+ <el-icon name="apple" size="40"></el-icon>
171
171
  ```
172
172
 
173
173
  ## IconFont
174
174
  #### How to use
175
175
  ```html
176
176
  name: icon name
177
- <oga-icon name="package"></oga-icon>
177
+ <oga-icon name="package" size="40"></oga-icon>
178
178
  ```
179
179
  #### ICON List
180
180
  ```js
package/icon/index.css ADDED
@@ -0,0 +1,2 @@
1
+ .el-icon[data-v-42918fdb]{font-size:calc(var(--icon-size,16) * 1px)}
2
+ /*$vite$:1*/
package/icon/index.es.ts CHANGED
@@ -1,10 +1,14 @@
1
- import { createElementBlock, defineComponent, openBlock, ref, watch } from "vue";
2
- var __rolldown_dynamic_import_helper_default = (e, r, i) => {
3
- let a = r.lastIndexOf("?"), o = e[a === -1 || a < r.lastIndexOf("/") ? r : r.slice(0, a)];
4
- return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((e, a) => {
5
- (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(a.bind(null, /* @__PURE__ */ Error("Unknown variable dynamic import: " + r + (r.split("/").length === i ? "" : ". Note that variables only represent file names one level deep."))));
1
+ import { createElementBlock, defineComponent, normalizeStyle, openBlock, ref, watch } from "vue";
2
+ var __rolldown_dynamic_import_helper_default = (e, i, a) => {
3
+ let o = i.lastIndexOf("?"), s = e[o === -1 || o < i.lastIndexOf("/") ? i : i.slice(0, o)];
4
+ return s ? typeof s == "function" ? s() : Promise.resolve(s) : new Promise((e, o) => {
5
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(o.bind(null, /* @__PURE__ */ Error("Unknown variable dynamic import: " + i + (i.split("/").length === a ? "" : ". Note that variables only represent file names one level deep."))));
6
6
  });
7
- }, _hoisted_1 = ["innerHTML"], src_default = /* @__PURE__ */ defineComponent({
7
+ }, _hoisted_1 = ["innerHTML"], src_default = /* @__PURE__ */ ((e, i) => {
8
+ let a = e.__vccOpts || e;
9
+ for (let [e, o] of i) a[e] = o;
10
+ return a;
11
+ })(/* @__PURE__ */ defineComponent({
8
12
  __name: "index",
9
13
  props: {
10
14
  name: {
@@ -20,11 +24,10 @@ var __rolldown_dynamic_import_helper_default = (e, r, i) => {
20
24
  default: 16
21
25
  }
22
26
  },
23
- setup(r) {
24
- let s = r, c = ref("");
25
- return watch(() => s.name, async () => {
26
- if (s.name) try {
27
- c.value = (await __rolldown_dynamic_import_helper_default({
27
+ setup(i) {
28
+ let c = i, l = ref(""), u = async () => {
29
+ if (c.name) try {
30
+ l.value = (await __rolldown_dynamic_import_helper_default({
28
31
  "../svg/add-location.svg": () => import("./add-location-C480UfBy.mjs"),
29
32
  "../svg/aim.svg": () => import("./aim-CaTl3hc4.mjs"),
30
33
  "../svg/alarm-clock.svg": () => import("./alarm-clock-CAZp6D0Y.mjs"),
@@ -318,16 +321,18 @@ var __rolldown_dynamic_import_helper_default = (e, r, i) => {
318
321
  "../svg/wind-power.svg": () => import("./wind-power-BAMKTkkd.mjs"),
319
322
  "../svg/zoom-in.svg": () => import("./zoom-in-DWcaHYok.mjs"),
320
323
  "../svg/zoom-out.svg": () => import("./zoom-out-EIXLIt1v.mjs")
321
- }, `../svg/${s.name}.svg?raw`, 3)).default;
324
+ }, `../svg/${c.name}.svg?raw`, 3)).default;
322
325
  } catch {
323
- console.warn(`SVG not found: ${s.name}`), c.value = "";
326
+ console.warn(`SVG not found: ${c.name}`), l.value = "";
324
327
  }
325
- }, { immediate: !0 }), (r, a) => (openBlock(), createElementBlock("i", {
328
+ }, d = ref({});
329
+ return c.size !== 16 && c.size > 0 && (d.value["--icon-size"] = c.size), watch(() => c.name, u, { immediate: !0 }), (i, s) => (openBlock(), createElementBlock("i", {
326
330
  class: "el-icon",
327
- innerHTML: c.value
328
- }, null, 8, _hoisted_1));
331
+ style: normalizeStyle(d.value),
332
+ innerHTML: l.value
333
+ }, null, 12, _hoisted_1));
329
334
  }
330
- }), icon_default = { install(e) {
335
+ }), [["__scopeId", "data-v-42918fdb"]]), icon_default = { install(e) {
331
336
  e.component("ElIcon", src_default);
332
337
  } };
333
338
  export { icon_default as default };