@10yun/cv-pc-ui 0.3.51 → 0.3.53

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.51",
3
+ "version": "0.3.53",
4
4
  "description": "cvjs-pc-ui组件",
5
5
  "author": "10yun",
6
6
  "private": false,
@@ -70,13 +70,13 @@
70
70
  "@ddietr/codemirror-themes": "^1.5.1",
71
71
  "@element-plus/icons-vue": "^2.3.2",
72
72
  "@lezer/highlight": "^1.2.1",
73
- "@vitejs/plugin-vue-jsx": "^5.0.1",
74
- "@vueuse/core": "^13.6.0",
73
+ "@vitejs/plugin-vue-jsx": "^5.1.0",
74
+ "@vueuse/core": "^13.7.0",
75
75
  "codemirror": "^6.0.2",
76
- "element-plus": "^2.10.7",
76
+ "element-plus": "^2.11.1",
77
77
  "highlight.js": "^11.11.1",
78
78
  "html-to-md": "^0.8.8",
79
- "vue": "^3.5.18",
79
+ "vue": "^3.5.20",
80
80
  "vue-cropper": "^1.1.4",
81
81
  "vue-router": "^4.5.1"
82
82
  },
@@ -84,8 +84,8 @@
84
84
  "@10yun/cv-js-utils": "^0.3.30",
85
85
  "@rollup/plugin-terser": "^0.4.4",
86
86
  "@vitejs/plugin-vue": "^6.0.1",
87
- "vite": "^7.1.2",
88
- "vue-tsc": "^3.0.5"
87
+ "vite": "^7.1.3",
88
+ "vue-tsc": "^3.0.6"
89
89
  },
90
90
  "engines": {
91
91
  "node": ">=20.0.0"
@@ -0,0 +1,36 @@
1
+ export default {
2
+ computed: {
3
+ // 获取组件名: 并将组件转为 kebab-case
4
+ componentName() {
5
+ let name = this.$options.name;
6
+ // name = name
7
+ // .replace('cv', '')
8
+ // .replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g, '-$&')
9
+ // .toLowerCase()
10
+ // if (name.startsWith('-')) name = name.slice(1)
11
+ return name;
12
+ }
13
+ },
14
+ methods: {
15
+ _mergeAttrs(key) {
16
+ // 全局属性
17
+ const globalAttrs = this.$cvUiParams || {};
18
+ // 全局上传组件属性
19
+ const globalUploadAttrs = key ? globalAttrs[key] || {} : {};
20
+ // 最终组件属性
21
+ const globalCompoAttr = globalAttrs[this.componentName] || {};
22
+ const lastCompAttrs = Object.assign({}, globalUploadAttrs, globalCompoAttr);
23
+ // console.log('---lastCompAttrs---', this.componentName, lastCompAttrs, this.$props, this.$attrs);
24
+ console.log(globalAttrs);
25
+ console.log(globalCompoAttr);
26
+ return Object.assign(
27
+ {},
28
+ lastCompAttrs,
29
+ // this.$props,
30
+ this.$attrs
31
+ // { disabled: this.disabled || this.$attrs.disabled },
32
+ // { readonly: this.readonly || this.$attrs.readonly }
33
+ );
34
+ }
35
+ }
36
+ };