mvframe 1.0.74 → 1.0.77
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/README.cn.md +11 -3
- package/README.md +11 -3
- package/dist/css/cpt.css +1 -1
- package/dist/vendor.js +2009 -3841
- package/dist/vtable.js +1878 -0
- package/package.json +1 -1
- package/scripts/scaffold-app.js +35 -4
package/package.json
CHANGED
package/scripts/scaffold-app.js
CHANGED
|
@@ -99,6 +99,11 @@ const SCAFFOLD_SCRIPTS = {
|
|
|
99
99
|
preview: "vite preview",
|
|
100
100
|
};
|
|
101
101
|
|
|
102
|
+
const TEST_DINGTALK_WEBHOOK =
|
|
103
|
+
"https://oapi.dingtalk.com/robot/send?access_token=142b6ddc73e8656b7906a3cb3982836a59f430a6fe5ef619a5689eed91d5f9f7";
|
|
104
|
+
const TEST_DINGTALK_SECRET =
|
|
105
|
+
"SEC7140677a84a5190046e22d508548923dd2c4f485e38896aa0c3555ae003f4ef5";
|
|
106
|
+
|
|
102
107
|
/**
|
|
103
108
|
* 合并 package.json:保留原有字段与其它依赖;仅补足脚手架所需包与启动脚本。
|
|
104
109
|
* 同名依赖以目标项目已有版本为准({ ...建议, ...已有 })。
|
|
@@ -229,6 +234,9 @@ const launchRouteGuard = (to, from, next) => {
|
|
|
229
234
|
};
|
|
230
235
|
|
|
231
236
|
app.use(mvframe, {
|
|
237
|
+
components: {
|
|
238
|
+
async: ["VTable"],
|
|
239
|
+
},
|
|
232
240
|
vueRouter: {
|
|
233
241
|
routes,
|
|
234
242
|
guard: (router) => {
|
|
@@ -757,8 +765,9 @@ export default defineConfig({
|
|
|
757
765
|
|
|
758
766
|
write(
|
|
759
767
|
".env.mvframe-notify.example",
|
|
760
|
-
`# Copy to .env.mvframe-notify
|
|
768
|
+
`# Copy to .env.mvframe-notify for the local Node notify service.
|
|
761
769
|
# Do not put DingTalk webhook/secret in src/main.js or other browser-bundled files.
|
|
770
|
+
# The DingTalk values below are MVFrame's test robot config. Replace them for production.
|
|
762
771
|
|
|
763
772
|
MVFRAME_NOTIFY_PORT=3300
|
|
764
773
|
MVFRAME_NOTIFY_HOST=127.0.0.1
|
|
@@ -766,8 +775,28 @@ MVFRAME_NOTIFY_TOKEN=
|
|
|
766
775
|
MVFRAME_NOTIFY_TIMEOUT_MS=5000
|
|
767
776
|
MVFRAME_NOTIFY_CORS_ORIGIN=*
|
|
768
777
|
|
|
769
|
-
DINGTALK_WEBHOOK="
|
|
770
|
-
DINGTALK_SECRET="
|
|
778
|
+
DINGTALK_WEBHOOK="${TEST_DINGTALK_WEBHOOK}"
|
|
779
|
+
DINGTALK_SECRET="${TEST_DINGTALK_SECRET}"
|
|
780
|
+
DINGTALK_AT_MOBILES=""
|
|
781
|
+
DINGTALK_AT_USER_IDS=""
|
|
782
|
+
DINGTALK_AT_ALL=""
|
|
783
|
+
`,
|
|
784
|
+
);
|
|
785
|
+
|
|
786
|
+
write(
|
|
787
|
+
".env.mvframe-notify",
|
|
788
|
+
`# Local MVFrame DingTalk notify service config.
|
|
789
|
+
# This file is generated for test use and is ignored by git.
|
|
790
|
+
# Replace the DingTalk webhook/secret before production use.
|
|
791
|
+
|
|
792
|
+
MVFRAME_NOTIFY_PORT=3300
|
|
793
|
+
MVFRAME_NOTIFY_HOST=127.0.0.1
|
|
794
|
+
MVFRAME_NOTIFY_TOKEN=
|
|
795
|
+
MVFRAME_NOTIFY_TIMEOUT_MS=5000
|
|
796
|
+
MVFRAME_NOTIFY_CORS_ORIGIN=*
|
|
797
|
+
|
|
798
|
+
DINGTALK_WEBHOOK="${TEST_DINGTALK_WEBHOOK}"
|
|
799
|
+
DINGTALK_SECRET="${TEST_DINGTALK_SECRET}"
|
|
771
800
|
DINGTALK_AT_MOBILES=""
|
|
772
801
|
DINGTALK_AT_USER_IDS=""
|
|
773
802
|
DINGTALK_AT_ALL=""
|
|
@@ -806,6 +835,8 @@ yarn exec mvframe-d
|
|
|
806
835
|
|
|
807
836
|
自动生成的 \`vite.config.js\` 已包含 \`unplugin-auto-import\`;\`dts: true\` 时类型默认写在项目根 \`auto-imports.d.ts\`。
|
|
808
837
|
|
|
838
|
+
\`src/main.js\` 默认在 \`app.use(mvframe, { components: { async: ["VTable"] } })\` 中异步注册 \`VTable\`。这样只有页面实际渲染 \`<VTable>\` 时才加载 VisActor 相关 chunk,避免 \`@visactor/vtable\` 进入宿主首屏同步链。
|
|
839
|
+
|
|
809
840
|
## Launch(登录壳)
|
|
810
841
|
|
|
811
842
|
雏形与 **mvframe demo** 对齐:\`pinia/chip/launch.js\`(顶层 \`login\` + \`userinfo\`)、\`App.vue\`(\`<AdminEntry v-if />\` / \`<Entry v-else />\`)、\`main.js\` 内 \`import { store, pinia } from "mvframe/store"\` + \`launchRouteGuard\` + \`useAdmin\` / \`adminPermission\` / \`noaccess\`。未登录仅 \`meta.public\`;已登录进 \`Entry\` 会重定向到 \`Overview_Home\`(\`/overview\`)。若不需门禁,将 \`useAdmin\` 改为 \`false\` 并删除 \`adminPermission\` 与 \`noaccess\`。
|
|
@@ -843,7 +874,7 @@ yarn exec mvframe-d
|
|
|
843
874
|
脚手架已初始化:
|
|
844
875
|
|
|
845
876
|
- \`src/config/index.js\` 的 \`notify\` 节点:浏览器端只保存本地服务地址和访问 token。
|
|
846
|
-
- \`.env.mvframe-notify
|
|
877
|
+
- \`.env.mvframe-notify\` 与 \`.env.mvframe-notify.example\`:已写入 MVFrame 测试钉钉机器人配置,生产环境请替换 \`DINGTALK_WEBHOOK\` / \`DINGTALK_SECRET\`。
|
|
847
878
|
- \`.env.local.example\`:复制为 \`.env.local\`,填写 \`VITE_MVFRAME_NOTIFY_ENDPOINT\` / \`VITE_MVFRAME_NOTIFY_TOKEN\`。
|
|
848
879
|
|
|
849
880
|
启动通知服务:
|