@hr-components-dev/cli 1.2.0 → 1.2.1

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,11 +1,10 @@
1
1
  {
2
2
  "name": "@hr-components-dev/cli",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
- "packageManager": "pnpm@10.28.0",
9
8
  "keywords": [
10
9
  "hrisv",
11
10
  "hr",
@@ -15,15 +14,6 @@
15
14
  "cli"
16
15
  ],
17
16
  "author": "淮然科技<133490326@qq.com>",
18
- "scripts": {
19
- "dev": "vite",
20
- "prepublishOnly": "tsc -p tsconfig.scripts.json",
21
- "build:local": "vue-tsc -b && vite build",
22
- "preview:all": "vite preview",
23
- "update-pkg": "npx npm-check-updates --deep -u",
24
- "build": "node src/scripts/build-component.js",
25
- "preview": "node src/scripts/component-preview.js"
26
- },
27
17
  "bin": {
28
18
  "hr": "src/scripts/index.js"
29
19
  },
@@ -64,5 +54,13 @@
64
54
  "@types/react": "^19.2.14",
65
55
  "typescript": "~5.9.3",
66
56
  "vue-tsc": "^3.2.4"
57
+ },
58
+ "scripts": {
59
+ "dev": "vite",
60
+ "build:local": "vue-tsc -b && vite build",
61
+ "preview:all": "vite preview",
62
+ "update-pkg": "npx npm-check-updates --deep -u",
63
+ "build": "node src/scripts/build-component.js",
64
+ "preview": "node src/scripts/component-preview.js"
67
65
  }
68
66
  }
@@ -70,7 +70,7 @@ const onTestCodePreview = async (ctx: any, doAction: (p: any) => void, event: {
70
70
  }
71
71
  }
72
72
  });
73
- scopeContext.onInit?.(instance.value); // 触发初始化事件
73
+ scopeContext.onInit?.(instance.value, defaultAmisData.value); // 触发初始化事件
74
74
  instance.value?.updateProps({
75
75
  data: {
76
76
  ...defaultAmisData.value,
@@ -279,9 +279,10 @@ const defaultAmisData = ref<DefaultAmisDataType>({
279
279
  * amis context 数据
280
280
  */
281
281
  const defaultAmisContext = ref({
282
- onInit: (amisInstance?: IScopedContext & amis.TypeEmbed) => consola.success('onInit事件触发:', amisInstance),
282
+ onInit: (amisInstance?: IScopedContext & amis.TypeEmbed, defaultAmisData?: DefaultAmisDataType) => consola.success('onInit事件触发:', amisInstance, defaultAmisData),
283
283
  changeLocale: (lang: 'en-US' | 'zh-CN'): void => { consola.log('changeLocale', lang) },
284
- changeTheme: (): void => { consola.log('changeTheme') }
284
+ changeTheme: (): void => { consola.log('changeTheme') },
285
+
285
286
  });
286
287
  const amisReady = (amisInstance: IScopedContext & amis.TypeEmbed) => {
287
288
  instance.value = amisInstance;
File without changes