fantasia-ui 0.0.10 → 0.0.12

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
@@ -5,29 +5,29 @@
5
5
  *详细Api使用方法参考 [基于 el-upload 二次封装,实现多功能上传-CSDN博客](https://blog.csdn.net/weixin_60818087/article/details/148193542?spm=1001.2014.3001.5502)*
6
6
 
7
7
  > main.ts 引入样式 import 'fantasia-ui/dist/index.css'
8
+ >
9
+ > 发现没有图标?需要安装 **Element-plus** 的 icon 才会显示图标
8
10
 
9
- **filename.vue**
10
-
11
- `
12
-
13
- <script setup lang="ts">
11
+ ```vue
12
+ <script lang="ts">
14
13
  import { FUpload } from 'fantasia-ui';
15
14
 
16
- const handleUplaod = ({ file, done, error }) => {
17
- console.log(file);
18
- done();
15
+ export default {
16
+ methods: {
17
+ handleUpload: (file, done, error) => {
18
+ try {
19
+ console.log(file);
20
+ done();
21
+ } catch (err) {
22
+ error(err);
23
+ }
24
+ }
25
+ }
19
26
  }
20
27
  </script>
21
28
 
22
29
  <template>
23
30
  <FUpload crop mosaic @upload="handleUplaod" />
24
31
  </template>
25
-
26
- `
27
-
28
- > 发现没有图标?需要安装 **Element-plus** 的 icon 才会显示下方图标
29
-
30
- <img src="C:\Users\Shuster\AppData\Roaming\Typora\typora-user-images\image-20250531002955293.png" alt="image-20250531002955293" style="zoom: 50%;" />
31
-
32
- <img src="C:\Users\Shuster\AppData\Roaming\Typora\typora-user-images\image-20250531003159734.png" alt="image-20250531003159734" style="zoom: 50%;" />
32
+ ```
33
33
 
@@ -29258,16 +29258,12 @@ const dT = { class: "upload-box" }, xT = { class: "upload-action" }, mT = ["src"
29258
29258
  if (n.crop) {
29259
29259
  if (ae = await Oe(!0), !ae) return Br.error("裁剪文件生成失败");
29260
29260
  } else (l.value.name.endsWith(".xlsx") || l.value.name.endsWith(".xls")) && n.outputType === "json" ? ae = await fe(l.value) : ae = l.value;
29261
- s("upload", {
29262
- file: ae,
29263
- done: () => {
29264
- setTimeout(() => {
29265
- var ue;
29266
- l.value = null, i.value = "", x.value = "", p.value = null, o.value = { x: 0, y: 0 }, _.value = n.size, (ue = c.value) == null || ue.clearFiles();
29267
- }, 100);
29268
- },
29269
- error: (ue) => Br.error(ue)
29270
- });
29261
+ s("upload", ae, () => {
29262
+ setTimeout(() => {
29263
+ var ue;
29264
+ l.value = null, i.value = "", x.value = "", p.value = null, o.value = { x: 0, y: 0 }, _.value = n.size, (ue = c.value) == null || ue.clearFiles();
29265
+ }, 100);
29266
+ }, (ue) => Br.error(ue));
29271
29267
  } catch (ae) {
29272
29268
  console.error(`文件处理失败:${ae}`);
29273
29269
  }
@@ -29673,7 +29669,7 @@ const dT = { class: "upload-box" }, xT = { class: "upload-action" }, mT = ["src"
29673
29669
  for (const [a, n] of t)
29674
29670
  r[a] = n;
29675
29671
  return r;
29676
- }, K1 = /* @__PURE__ */ DT(LT, [["__scopeId", "data-v-fb3627fc"]]), RT = (e) => {
29672
+ }, K1 = /* @__PURE__ */ DT(LT, [["__scopeId", "data-v-cfefc41b"]]), RT = (e) => {
29677
29673
  for (const [t, r] of Object.entries(s5))
29678
29674
  e.component(t, r);
29679
29675
  e.component(K1.name || "FUpload", K1);