@10yun/cv-pc-ui 0.4.2 → 0.4.3

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/lib/cv-ui.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! cvPcUI v0.4.2 */
1
+ /*! cvPcUI v0.4.3 */
2
2
  import { ClickOutside as e, ElAutocomplete as t, ElAvatar as n, ElBadge as r, ElButton as i, ElButton as a, ElCascader as o, ElCheckbox as s, ElCheckboxButton as c, ElCheckboxGroup as l, ElDatePicker as u, ElDialog as d, ElDrawer as f, ElForm as p, ElFormItem as m, ElIcon as h, ElImage as g, ElInput as _, ElInput as v, ElInputNumber as y, ElMessage as ee, ElMessage as b, ElMessageBox as te, ElMessageBox as ne, ElOption as re, ElPagination as ie, ElPopover as ae, ElScrollbar as oe, ElSelect as se, ElSwitch as ce, ElTable as le, ElTableColumn as ue, ElTag as de, ElTimePicker as fe } from "element-plus";
3
3
  import { Fragment as x, Transition as pe, TransitionGroup as me, computed as he, createBlock as S, createCommentVNode as C, createElementBlock as w, createElementVNode as T, createSlots as ge, createTextVNode as E, createVNode as D, defineComponent as _e, getCurrentInstance as ve, getCurrentScope as ye, guardReactiveProps as be, h as xe, inject as Se, mergeProps as O, nextTick as Ce, normalizeClass as k, normalizeProps as A, normalizeStyle as j, onBeforeUnmount as we, onMounted as Te, onScopeDispose as Ee, onUnmounted as De, openBlock as M, provide as Oe, reactive as ke, ref as N, render as Ae, renderList as P, renderSlot as F, resolveComponent as I, resolveDirective as je, resolveDynamicComponent as Me, shallowReadonly as Ne, shallowRef as Pe, toDisplayString as L, toHandlers as Fe, toRaw as Ie, toRef as Le, toRefs as Re, toValue as ze, unref as R, useCssVars as Be, useSlots as Ve, vShow as He, watch as Ue, withCtx as z, withDirectives as B, withKeys as We, withModifiers as Ge } from "vue";
4
4
  import { basicSetup as Ke } from "codemirror";
@@ -3764,7 +3764,7 @@ var da = {
3764
3764
  type: [Boolean],
3765
3765
  default: !1
3766
3766
  },
3767
- limit: {
3767
+ allowFileNum: {
3768
3768
  type: [Number, String],
3769
3769
  default: 1
3770
3770
  },
@@ -3805,18 +3805,18 @@ var da = {
3805
3805
  },
3806
3806
  computed: {
3807
3807
  fileTypeStr() {
3808
- return this.fileType.join(",");
3808
+ return this.allowFileType.join(",");
3809
3809
  },
3810
3810
  fileUnit() {
3811
3811
  return "个";
3812
3812
  },
3813
3813
  tipAttr() {
3814
3814
  return {
3815
- fileType: this.fileType || [],
3816
- fileSize: this.fileSize || "",
3815
+ fileType: this.allowFileType || [],
3816
+ fileSize: this.allowFileSize || "",
3817
3817
  fileUnit: this.fileUnit,
3818
3818
  multiple: this?.multiple || !1,
3819
- limit: this.limit ? parseInt(this.limit) : 5
3819
+ limit: this.allowFileNum ? parseInt(this.allowFileNum) : 5
3820
3820
  };
3821
3821
  },
3822
3822
  mergeAttrs() {
@@ -3827,8 +3827,8 @@ var da = {
3827
3827
  methods: {
3828
3828
  _commonBeforeUpload(e) {
3829
3829
  e.type;
3830
- let t = e.name || "", n = e.size / 1024 / 1024, r = t.split(".").pop().toLowerCase(), i = this.fileType.join("、");
3831
- return this.fileType.includes(r) ? n > this.fileSize ? (ExtendMessage.error(`文件大小不能超过 ${this.fileSize} MB`), !1) : !0 : (ExtendMessage.error(`文件格式错误,请上传类型 如:${i}格式文件`), !1);
3830
+ let t = e.name || "", n = e.size / 1024 / 1024, r = t.split(".").pop().toLowerCase(), i = this.allowFileType.join("、");
3831
+ return this.allowFileType.includes(r) ? n > this.allowFileSize ? (ExtendMessage.error(`文件大小不能超过 ${this.allowFileSize} MB`), !1) : !0 : (ExtendMessage.error(`文件格式错误,请上传类型 如:${i}格式文件`), !1);
3832
3832
  },
3833
3833
  _commonRemove() {
3834
3834
  return new Promise((e, t) => {
@@ -3851,7 +3851,7 @@ var da = {
3851
3851
  },
3852
3852
  initOnSuccess(e, t) {},
3853
3853
  initOnExceed() {
3854
- this.$message.error(`最多上传 ${this.limit} ${this.fileUnit}`);
3854
+ this.$message.error(`最多上传 ${this.allowFileNum} ${this.fileUnit}`);
3855
3855
  },
3856
3856
  _clearUploadFiles() {
3857
3857
  let e = this.$refs.uploadHandleRef;
@@ -5910,11 +5910,11 @@ var ds = { class: "cv-upload-crop-box" }, fs = { class: "cv-upload-crop-left-box
5910
5910
  type: [String],
5911
5911
  default: ""
5912
5912
  },
5913
- fileSize: {
5913
+ allowFileSize: {
5914
5914
  type: [Number],
5915
5915
  default: 2
5916
5916
  },
5917
- fileType: {
5917
+ allowFileType: {
5918
5918
  type: [Array],
5919
5919
  default: () => [
5920
5920
  "png",
@@ -6123,11 +6123,11 @@ var ws = {
6123
6123
  ],
6124
6124
  default: () => ""
6125
6125
  },
6126
- fileSize: {
6126
+ allowFileSize: {
6127
6127
  type: [Number],
6128
6128
  default: 2
6129
6129
  },
6130
- fileType: {
6130
+ allowFileType: {
6131
6131
  type: [Array],
6132
6132
  default: () => [
6133
6133
  "png",
@@ -6183,7 +6183,7 @@ var ws = {
6183
6183
  return {
6184
6184
  action: "#",
6185
6185
  accept: this.upAccept,
6186
- limit: parseInt(this.limit),
6186
+ limit: parseInt(this.allowFileNum),
6187
6187
  multiple: this.multiple,
6188
6188
  drag: !!this.drag,
6189
6189
  disabled: this.upIngLoading,
@@ -6191,7 +6191,7 @@ var ws = {
6191
6191
  };
6192
6192
  },
6193
6193
  showUpload() {
6194
- return !(this.localList.length >= this.limit);
6194
+ return !(this.localList.length >= this.allowFileNum);
6195
6195
  },
6196
6196
  showStyle() {
6197
6197
  let e = this.showSize + "px";
@@ -6275,8 +6275,8 @@ var ws = {
6275
6275
  inputErrorMessage: "格式不正确"
6276
6276
  }).then(({ value: e }) => {
6277
6277
  let n = e.split("/").pop(), r = n.split(".").pop().toLowerCase();
6278
- if (!this.fileType.includes(r)) {
6279
- let e = this.fileType.join("、");
6278
+ if (!this.allowFileType.includes(r)) {
6279
+ let e = this.allowFileType.join("、");
6280
6280
  return b.error(`文件格式错误,请填写类型,如:${e} 格式文件`), !1;
6281
6281
  }
6282
6282
  let i = Qr(r);
@@ -6599,11 +6599,11 @@ var Ws = {
6599
6599
  ],
6600
6600
  default: ""
6601
6601
  },
6602
- fileSize: {
6602
+ allowFileSize: {
6603
6603
  type: [Number],
6604
6604
  default: 5
6605
6605
  },
6606
- fileType: {
6606
+ allowFileType: {
6607
6607
  type: [Array],
6608
6608
  default: [
6609
6609
  "txt",
@@ -6617,7 +6617,7 @@ var Ws = {
6617
6617
  type: [Boolean],
6618
6618
  default: !1
6619
6619
  },
6620
- limit: {
6620
+ allowFileNum: {
6621
6621
  type: [Number],
6622
6622
  default: 5
6623
6623
  },
@@ -6650,7 +6650,7 @@ var Ws = {
6650
6650
  return {
6651
6651
  action: "#",
6652
6652
  accept: this.upAccept,
6653
- limit: parseInt(this.limit),
6653
+ limit: parseInt(this.allowFileNum),
6654
6654
  multiple: this.multiple,
6655
6655
  drag: !1,
6656
6656
  disabled: this.upIngLoading,
@@ -6776,11 +6776,11 @@ var qs = /*#__PURE__*/ H(Ws, [["render", Ks]]), Js = {
6776
6776
  type: [String],
6777
6777
  default: ""
6778
6778
  },
6779
- fileSize: {
6779
+ allowFileSize: {
6780
6780
  type: [Number],
6781
6781
  default: 10
6782
6782
  },
6783
- fileType: {
6783
+ allowFileType: {
6784
6784
  type: Array,
6785
6785
  default: ["mp4", "mp3"]
6786
6786
  },
@@ -6877,8 +6877,8 @@ var qs = /*#__PURE__*/ H(Ws, [["render", Ks]]), Js = {
6877
6877
  inputErrorMessage: "格式不正确"
6878
6878
  }).then(({ value: e }) => {
6879
6879
  let t = e.split("/").pop(), n = t.split(".").pop().toLowerCase();
6880
- if (!this.fileType.includes(n)) {
6881
- let e = this.fileType.join("、");
6880
+ if (!this.allowFileType.includes(n)) {
6881
+ let e = this.allowFileType.join("、");
6882
6882
  return b.error(`文件格式错误,请填写类型,如:${e} 格式文件`), !1;
6883
6883
  }
6884
6884
  let r = Qr(n);
@@ -7427,11 +7427,11 @@ function Tc(e, t, n, r, i, a) {
7427
7427
  var Ec = /*#__PURE__*/ H(cc, [["render", Tc], ["__scopeId", "data-v-ae9dfc45"]]), Dc = {
7428
7428
  mixins: [da],
7429
7429
  props: {
7430
- fileSize: {
7430
+ allowFileSize: {
7431
7431
  type: [Number],
7432
7432
  default: 50
7433
7433
  },
7434
- fileType: {
7434
+ allowFileType: {
7435
7435
  type: [Array],
7436
7436
  default: () => []
7437
7437
  },
@@ -7469,7 +7469,7 @@ var Ec = /*#__PURE__*/ H(cc, [["render", Tc], ["__scopeId", "data-v-ae9dfc45"]])
7469
7469
  return {
7470
7470
  action: "#",
7471
7471
  accept: this.upAccept,
7472
- limit: parseInt(this.limit),
7472
+ limit: parseInt(this.allowFileNum),
7473
7473
  multiple: this.multiple,
7474
7474
  drag: !!this.drag,
7475
7475
  disabled: this.disabled || this.upIngLoading,
@@ -7501,11 +7501,11 @@ var Ec = /*#__PURE__*/ H(cc, [["render", Tc], ["__scopeId", "data-v-ae9dfc45"]])
7501
7501
  name: "cvUploadImageMini",
7502
7502
  mixins: [Dc],
7503
7503
  props: {
7504
- fileSize: {
7504
+ allowFileSize: {
7505
7505
  type: [Number],
7506
7506
  default: 2
7507
7507
  },
7508
- fileType: {
7508
+ allowFileType: {
7509
7509
  type: [Array],
7510
7510
  default: () => [
7511
7511
  "png",
@@ -7569,11 +7569,11 @@ var jc = /*#__PURE__*/ H(Oc, [["render", Ac]]), Mc = {
7569
7569
  name: "cvUploadFileMini",
7570
7570
  mixins: [Dc],
7571
7571
  props: {
7572
- fileSize: {
7572
+ allowFileSize: {
7573
7573
  type: [Number],
7574
7574
  default: 50
7575
7575
  },
7576
- fileType: {
7576
+ allowFileType: {
7577
7577
  type: [Array],
7578
7578
  default: () => [
7579
7579
  "txt",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@10yun/cv-pc-ui",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "private": false,
5
5
  "description": "cvjs-pc-ui组件",
6
6
  "homepage": "http://cvjs.cn/cv-pc-ui",