ocpview-pro 0.0.5 → 0.0.8

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.
@@ -452,8 +452,8 @@ common.initEview = function(ViewUI2) {
452
452
  common.initAffix(ViewUI2.Affix);
453
453
  common.initAnchor(ViewUI2.Anchor);
454
454
  };
455
- const name = "ocpview-plus";
456
- const version$2 = "0.0.4";
455
+ const name = "ocpview-pro";
456
+ const version$2 = "0.0.7";
457
457
  const title = "ocpviewPlus";
458
458
  const description = "A high quality Service UI components Library with Vue.js";
459
459
  const homepage = "";
@@ -38664,6 +38664,7 @@ function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
38664
38664
  ref: "tree",
38665
38665
  data: _ctx.treeData,
38666
38666
  class: normalizeClass(_ctx.myConfig.className),
38667
+ "onUpdate:data": _cache[1] || (_cache[1] = ($event) => _ctx.treeData = $event),
38667
38668
  "show-checkbox": _ctx.myConfig.showCheckBox,
38668
38669
  onOnSelectChange: _ctx.onSelectChange,
38669
38670
  onOnCheckChange: _ctx.onCheckChange,
@@ -47831,7 +47832,7 @@ const _sfc_main$u = {
47831
47832
  getCurlAnchorData() {
47832
47833
  let tmp = [];
47833
47834
  this.anchorData.forEach((el2) => {
47834
- if (el2.visible) {
47835
+ if (el2.visible && el2.name) {
47835
47836
  tmp.push(el2);
47836
47837
  }
47837
47838
  });
@@ -47892,7 +47893,7 @@ const _sfc_main$u = {
47892
47893
  }
47893
47894
  },
47894
47895
  setShowForm(value, name2) {
47895
- if (this.$refs[name2] && this.$refs[name2][0]) {
47896
+ if (this.$refs[name2] && this.$refs[name2][0] && this.$refs[name2][0].setShowForm) {
47896
47897
  this.$refs[name2][0].setShowForm(value);
47897
47898
  }
47898
47899
  },
@@ -56981,7 +56982,8 @@ const _sfc_main$c = {
56981
56982
  },
56982
56983
  showGrid: true,
56983
56984
  showTitle: true,
56984
- dataInfo: {}
56985
+ dataInfo: {},
56986
+ readOnly: false
56985
56987
  };
56986
56988
  },
56987
56989
  computed: {},
@@ -56995,9 +56997,19 @@ const _sfc_main$c = {
56995
56997
  setData(data = [], flag = "set") {
56996
56998
  this.dataInfo = { ...data };
56997
56999
  },
57000
+ getData() {
57001
+ return this.dataInfo;
57002
+ },
57003
+ getChangeData() {
57004
+ return this.dataInfo;
57005
+ },
57006
+ valueChanged(obj) {
57007
+ return true;
57008
+ },
56998
57009
  clearData() {
56999
57010
  },
57000
57011
  setReadOnly(value) {
57012
+ this.readOnly = value;
57001
57013
  },
57002
57014
  doAction(params) {
57003
57015
  this.$emit("doAction", params);
@@ -57079,7 +57091,8 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
57079
57091
  config: $props.config,
57080
57092
  dictData: $props.dictData,
57081
57093
  doAction: $options.doAction,
57082
- dataInfo: $data.dataInfo
57094
+ dataInfo: $data.dataInfo,
57095
+ readOnly: $data.readOnly
57083
57096
  }) : createCommentVNode("", true)
57084
57097
  ], 512), [
57085
57098
  [vShow, $data.showGrid]
@@ -135692,6 +135705,31 @@ const install$1 = (app2, i18n) => {
135692
135705
  app2.use(VXETableExport);
135693
135706
  };
135694
135707
  var VXETable = { install: install$1 };
135708
+ function setupCopyFormatRestore() {
135709
+ document.addEventListener("copy", (e10) => {
135710
+ let selectedText = window.getSelection().toString();
135711
+ selectedText = selectedText.trim();
135712
+ if (!selectedText.includes(","))
135713
+ return;
135714
+ const isFullFormatted = /^\d{1,3}(,\d{3})*(\.\d+)?$/.test(selectedText);
135715
+ const isPartialFormatted = /\d+,\d{1,3}/.test(selectedText) && !/[^\d,.]/.test(selectedText);
135716
+ if (!isFullFormatted && !isPartialFormatted)
135717
+ return;
135718
+ e10.preventDefault();
135719
+ let stripped = selectedText.replace(/,/g, "");
135720
+ if (stripped.endsWith(".")) {
135721
+ stripped = stripped.slice(0, -1);
135722
+ }
135723
+ if (stripped.startsWith(".")) {
135724
+ stripped = "0" + stripped;
135725
+ }
135726
+ if (!stripped || !/\d/.test(stripped)) {
135727
+ e10.clipboardData.setData("text/plain", selectedText);
135728
+ return;
135729
+ }
135730
+ e10.clipboardData.setData("text/plain", stripped);
135731
+ });
135732
+ }
135695
135733
  const components = {
135696
135734
  Ebutton,
135697
135735
  Toolbar: Toolbar$2,
@@ -135781,6 +135819,7 @@ const iview = {
135781
135819
  const install2 = function(app2, opts = {}) {
135782
135820
  if (install2.installed)
135783
135821
  return;
135822
+ setupCopyFormatRestore();
135784
135823
  VXETable.install(app2);
135785
135824
  app2.config.globalProperties.$utils = xeUtils;
135786
135825
  common.initEview(ViewUI);