@10yun/cv-pc-ui 0.3.54 → 0.3.55

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@10yun/cv-pc-ui",
3
- "version": "0.3.54",
3
+ "version": "0.3.55",
4
4
  "description": "cvjs-pc-ui组件",
5
5
  "author": "10yun",
6
6
  "private": false,
@@ -55,7 +55,7 @@
55
55
  "@codemirror/lang-javascript": "^6.2.4",
56
56
  "@codemirror/lang-json": "^6.0.2",
57
57
  "@codemirror/lang-lezer": "^6.0.2",
58
- "@codemirror/lang-markdown": "^6.4.0",
58
+ "@codemirror/lang-markdown": "^6.5.0",
59
59
  "@codemirror/lang-php": "^6.0.2",
60
60
  "@codemirror/lang-python": "^6.2.1",
61
61
  "@codemirror/lang-rust": "^6.0.2",
@@ -69,23 +69,23 @@
69
69
  "@codemirror/view": "6.x",
70
70
  "@ddietr/codemirror-themes": "^1.5.2",
71
71
  "@element-plus/icons-vue": "^2.3.2",
72
- "@lezer/highlight": "^1.2.1",
72
+ "@lezer/highlight": "^1.2.3",
73
73
  "@vitejs/plugin-vue-jsx": "^5.1.1",
74
- "@vueuse/core": "^13.9.0",
74
+ "@vueuse/core": "^14.0.0",
75
75
  "codemirror": "^6.0.2",
76
- "element-plus": "^2.11.4",
76
+ "element-plus": "^2.11.5",
77
77
  "highlight.js": "^11.11.1",
78
78
  "html-to-md": "^0.8.8",
79
79
  "vue": "^3.5.22",
80
80
  "vue-cropper": "^1.1.4",
81
- "vue-router": "^4.6.0"
81
+ "vue-router": "^4.6.3"
82
82
  },
83
83
  "devDependencies": {
84
- "@10yun/cv-js-utils": "^0.3.33",
84
+ "@10yun/cv-js-utils": "^0.3.34",
85
85
  "@rollup/plugin-terser": "^0.4.4",
86
86
  "@vitejs/plugin-vue": "^6.0.1",
87
- "vite": "^7.1.9",
88
- "vue-tsc": "^3.1.1"
87
+ "vite": "^7.1.12",
88
+ "vue-tsc": "^3.1.2"
89
89
  },
90
90
  "engines": {
91
91
  "node": ">=20.0.0"
@@ -1,9 +1,9 @@
1
1
  export default {
2
2
  props: {
3
- modelVal: {}
3
+ modelValue: {}
4
4
  },
5
5
  watch: {
6
- modelVal: {
6
+ modelValue: {
7
7
  handler(newVal) {
8
8
  this.localVal = newVal;
9
9
  }
@@ -16,7 +16,7 @@ export default {
16
16
  },
17
17
  methods: {
18
18
  onUpdateValue() {
19
- this.$emit('update:modelVal', this.localVal);
19
+ this.$emit('update:modelValue', this.localVal);
20
20
  }
21
21
  }
22
22
  };
@@ -0,0 +1,63 @@
1
+ export function content_to_value(valDef) {
2
+ // return [];;
3
+ if (valDef) {
4
+ if (typeof valDef === 'string' || typeof valDef == 'number') {
5
+ return [valDef];
6
+ } else if (Object.prototype.toString.call(valDef) === '[object Object]') {
7
+ return [];
8
+ } else {
9
+ return [...valDef];
10
+ }
11
+ } else {
12
+ return [];
13
+ }
14
+ }
15
+ export function array_to_value(array1, array2) {
16
+ let newArr = [];
17
+ if (Array.isArray(array1) && array1.length > 0) {
18
+ newArr.push(...array1);
19
+ }
20
+ if (Array.isArray(array2) && array2.length > 0) {
21
+ newArr.push(...array2);
22
+ }
23
+ if (typeof array2 == 'string') {
24
+ newArr.push(array2);
25
+ }
26
+ let lastArr = [];
27
+ for (let i in newArr) {
28
+ let newItem = newArr[i];
29
+ let newType = Object.prototype.toString.call(newItem);
30
+ if (newType === '[object String]') {
31
+ lastArr.push(newItem);
32
+ } else if (newType === '[object Object]') {
33
+ if (newItem.url) {
34
+ lastArr.push(newItem.url);
35
+ }
36
+ }
37
+ }
38
+ return lastArr;
39
+ }
40
+ export function content_to_array(valDef) {
41
+ let existList = [];
42
+ let value_type1 = Object.prototype.toString.call(valDef);
43
+ if (value_type1 === '[object String]') {
44
+ existList.push(getFileInfo(valDef));
45
+ } else if (value_type1 === '[object Object]') {
46
+ if (valDef.name && valDef.url) {
47
+ existList.push(valDef);
48
+ }
49
+ } else if (value_type1 === '[object Array]') {
50
+ for (let i in valDef) {
51
+ let itemDef = valDef[i];
52
+ let value_type2 = Object.prototype.toString.call(itemDef);
53
+ if (value_type2 === '[object String]') {
54
+ existList.push(getFileInfo(itemDef));
55
+ } else if (value_type2 === '[object Object]') {
56
+ if (itemDef.name && itemDef.url) {
57
+ existList.push(itemDef);
58
+ }
59
+ }
60
+ }
61
+ }
62
+ return existList;
63
+ }