@melt-js/comps-vue2 0.0.0-stage → 2026.11.6

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.
Files changed (47) hide show
  1. package/README.md +51 -2
  2. package/hel_dist/css/chunk-f032efe6.332a9b03.css +1 -0
  3. package/hel_dist/entry.js +37 -0
  4. package/hel_dist/favicon.ico +0 -0
  5. package/hel_dist/hel-meta.json +90 -0
  6. package/hel_dist/img/clouds_back.d1a6739b.jpg +0 -0
  7. package/hel_dist/img/clouds_front.b35c0bd4.jpg +0 -0
  8. package/hel_dist/img/clouds_left.4f5664b9.jpg +0 -0
  9. package/hel_dist/img/clouds_right.0e9ec637.jpg +0 -0
  10. package/hel_dist/img/clouds_top.31039c75.jpg +0 -0
  11. package/hel_dist/img/logo.82b9c7a5.png +0 -0
  12. package/hel_dist/index.html +1 -0
  13. package/hel_dist/js/app~493df0b3.39d7ea1f.js +16 -0
  14. package/hel_dist/js/app~493df0b3.39d7ea1f.js.map +1 -0
  15. package/hel_dist/js/chunk-f032efe6.d73e0465.js +2 -0
  16. package/hel_dist/js/chunk-f032efe6.d73e0465.js.map +1 -0
  17. package/hel_proxy/entry.js +37 -0
  18. package/hel_proxy_es/entry.js +28 -0
  19. package/package.json +88 -6
  20. package/scripts/check.js +13 -0
  21. package/scripts/meta.js +21 -0
  22. package/scripts/prepublishOnly.js +26 -0
  23. package/src/assets/logo.png +0 -0
  24. package/src/components/App.vue +32 -0
  25. package/src/components/Butterflies3d/assets/clouds_back.jpg +0 -0
  26. package/src/components/Butterflies3d/assets/clouds_front.jpg +0 -0
  27. package/src/components/Butterflies3d/assets/clouds_left.jpg +0 -0
  28. package/src/components/Butterflies3d/assets/clouds_right.jpg +0 -0
  29. package/src/components/Butterflies3d/assets/clouds_top.jpg +0 -0
  30. package/src/components/Butterflies3d/assets/wing-pattern.gif +0 -0
  31. package/src/components/Butterflies3d/index.vue +245 -0
  32. package/src/components/Butterflies3d/source/README.md +17 -0
  33. package/src/components/Butterflies3d/source/index.html +305 -0
  34. package/src/components/Butterflies3d/source/reset.css +1 -0
  35. package/src/components/Butterflies3d/source/style.css +831 -0
  36. package/src/components/Butterflies3d/style.css +295 -0
  37. package/src/components/HelloWorld.vue +37 -0
  38. package/src/components/TierRanking/index.vue +1012 -0
  39. package/src/components/TierRanking/ranking.css +650 -0
  40. package/src/components/TierRanking/source/ranking.css +657 -0
  41. package/src/components/TierRanking/source/ranking.html +1532 -0
  42. package/src/components/index.js +18 -0
  43. package/src/configs/subApp.js +9 -0
  44. package/src/entrance/libProperties.js +10 -0
  45. package/src/entrance/libTypes.ts +34 -0
  46. package/src/loadApp.js +20 -0
  47. package/src/main.js +25 -0
@@ -0,0 +1,18 @@
1
+ /*
2
+ |--------------------------------------------------------------------------
3
+ |
4
+ | 这些组件暴露给使用方
5
+ |
6
+ |--------------------------------------------------------------------------
7
+ */
8
+ import App from './App.vue';
9
+ import HelloWorld from './HelloWorld.vue';
10
+ import TierRanking from './TierRanking/index.vue';
11
+ import Butterflies3d from './Butterflies3d/index.vue';
12
+
13
+ export default {
14
+ App,
15
+ HelloWorld,
16
+ TierRanking,
17
+ Butterflies3d,
18
+ };
@@ -0,0 +1,9 @@
1
+ /*
2
+ |--------------------------------------------------------------------------
3
+ |
4
+ | 对应 package.json/appGroupName
5
+ |
6
+ |--------------------------------------------------------------------------
7
+ */
8
+
9
+ export const LIB_NAME = 'comps-vue2';
@@ -0,0 +1,10 @@
1
+ /*
2
+ |--------------------------------------------------------------------------
3
+ |
4
+ | 这些组件暴露给使用方
5
+ |
6
+ |--------------------------------------------------------------------------
7
+ */
8
+ import comps from '../components';
9
+
10
+ export default comps;
@@ -0,0 +1,34 @@
1
+ /*
2
+ |--------------------------------------------------------------------------
3
+ |
4
+ | 组件类型导出文件,同时也作为 rollup 的打包入口文件,因只提供类型,rollup 打包后是一个
5
+ | 仅包含 hel-lib-proxy 的空壳文件,对模块使用方的包体构建大小无影响
6
+ | 模块使用方 通过 npm i xxx-lib 后,只要在头文件处执行过 preFetchLib
7
+ | 则整个项目项使用本地模块一样载入提供方的组件,并可以点击到 node_modules 查看源码
8
+ |
9
+ |--------------------------------------------------------------------------
10
+ */
11
+ import { exposeLib } from 'hel-lib-proxy';
12
+ import { LIB_NAME } from '../configs/subApp';
13
+
14
+ export type CompTypes = {
15
+ App: {
16
+ name: string,
17
+ },
18
+ HelloWorld: {
19
+ name: string,
20
+ },
21
+ TierRanking: {
22
+ name: string,
23
+ },
24
+ Butterflies3d: {
25
+ name: string,
26
+ },
27
+ };
28
+
29
+ /**
30
+ * 将提供给用户的lib暴露出去(同时也暴露了类型)
31
+ */
32
+ export const dtlib = exposeLib<CompTypes>(LIB_NAME);
33
+
34
+ export default dtlib;
package/src/loadApp.js ADDED
@@ -0,0 +1,20 @@
1
+ /*
2
+ |--------------------------------------------------------------------------
3
+ |
4
+ | 用于本地调试组件,配合 npm script 的 VUE_APP_COMP 参数来决定载入哪个组件调试
5
+ |
6
+ |--------------------------------------------------------------------------
7
+ */
8
+ import Vue from 'vue';
9
+ import libProperties from './entrance/libProperties';
10
+
11
+ const compName = process.env.VUE_APP_COMP || 'App';
12
+
13
+ if (Vue.version.startsWith('3.')) {
14
+ // 如果是 vue3,渲染入口调整为 createApp
15
+ Vue.createApp(libProperties[compName]).mount('#app');
16
+ } else {
17
+ new Vue({
18
+ render: h => h(libProperties[compName]),
19
+ }).$mount('#app');
20
+ }
package/src/main.js ADDED
@@ -0,0 +1,25 @@
1
+ import { isMasterApp } from 'hel-iso';
2
+ import * as Vue from 'vue';
3
+ import { LIB_NAME } from './configs/subApp';
4
+ import { libReady } from 'hel-lib-proxy';
5
+ // import { preFetchLib } from 'hel-micro';
6
+
7
+ if (Vue.config) {
8
+ Vue.config.productionTip = false;
9
+ }
10
+
11
+ (async function () {
12
+ // const enableCustom = false;
13
+ // await preFetchLib('@melt-js/comps-vue2');
14
+
15
+ const libProperties = await import('./entrance/libProperties');
16
+ // 注意此处传递的是 default
17
+ libReady(LIB_NAME, libProperties.default);
18
+
19
+ // 非子应用时(即不是被别的模块触发载入的情况),自己挂载渲染节点,方便本地调试
20
+ // 可根据项目实际情况控制是否载入 loadApp 文件
21
+ // eslint-disable-next-line
22
+ if (isMasterApp()) {
23
+ await import('./loadApp');
24
+ }
25
+ })().catch(console.error);