mvframe 1.0.10 → 1.0.11

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,7 +1,7 @@
1
1
  {
2
2
  "name": "mvframe",
3
3
  "packageManager": "yarn@4.4.1",
4
- "version": "1.0.10",
4
+ "version": "1.0.11",
5
5
  "author": "matt avis",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -46,6 +46,9 @@
46
46
  "scripts/scaffold-app.js",
47
47
  ".cursor/skills/mvframe-app-init"
48
48
  ],
49
+ "peerDependencies": {
50
+ "element-plus": "^2.2.0"
51
+ },
49
52
  "dependencies": {
50
53
  "pinia": "^3.0.0",
51
54
  "vue": "^3.3.4",
@@ -41,6 +41,8 @@ const SCAFFOLD_DEPENDENCIES = {
41
41
  "@vue/shared": "^3.5.0",
42
42
  "vue-router": "^4.6.0",
43
43
  pinia: "^3.0.0",
44
+ /** mvframe 产物对 Table 列配置等直接 import,strict 包管理器下需直连依赖 */
45
+ vuedraggable: "^4.1.0",
44
46
  mvframe: "^1.0.0",
45
47
  "element-plus": "^2.13.0",
46
48
  };
@@ -129,6 +131,8 @@ import mvframe from "mvframe";
129
131
  import routes from "./router/index.js";
130
132
  import appConfig from "./config/index.js";
131
133
  import "./assets/style/index.scss";
134
+ import "mvframe/style";
135
+ import "mvframe/style/cpt";
132
136
 
133
137
  const app = createApp(App);
134
138
  app.use(ElementPlus);
@@ -296,14 +300,9 @@ export {};
296
300
 
297
301
  write(
298
302
  "src/assets/style/index.scss",
299
- `/* 项目全局样式入口(已在 main.js 引入) */
300
-
301
- /* MVFrame 工具类与变量:按安装方式选一种
302
- * - monorepo / 源码依赖:*/
303
- /* @import "mvframe/src/style/index.scss"; */
304
-
305
- /* - 发布包全量样式:*/
306
- /* @import "mvframe/style"; */
303
+ `/* 项目全局样式入口(main.js import 本文件) */
304
+ /* MVFrame:main.js 已 import "mvframe/style" 与 "mvframe/style/cpt"(发布包 CSS),勿在此处再 @import 同一路径,避免重复。 */
305
+ /* 若需在 SCSS 内 @use 变量/mixin,可指向 node_modules 内 mvframe 源码路径或 monorepo workspace 路径。 */
307
306
 
308
307
  body {
309
308
  margin: 0;
@@ -433,9 +432,17 @@ yarn install
433
432
 
434
433
  这是 **Vue 3 自带的底层包**,一般不必手写;在 **pnpm / 严格 node_modules** 等环境下可能未被提升到可被 Vite 解析的位置。脚手架已在 \`dependencies\` 中合并 \`@vue/shared\`(与 \`vue\` 同主版本);老项目可手动执行 \`yarn add @vue/shared@^3.5\`。
435
434
 
435
+ ### 报错无法解析 \`vuedraggable\`
436
+
437
+ 发布包 \`dist/index.js\` 会对 \`vuedraggable\` 做 **直连 import**(如 Table 列配置)。脚手架已在 \`dependencies\` 中写入 \`vuedraggable@^4.1.0\`;老项目可 \`yarn add vuedraggable@^4.1\`。
438
+
436
439
  ## 样式
437
440
 
438
- \`src/assets/style/index.scss\` 中取消注释并指向实际 mvframe 样式路径(源码或 dist)。
441
+ \`src/main.js\` 已包含 \`import "mvframe/style"\` 与 \`import "mvframe/style/cpt"\`(分别对应工具类/变量与 **Mvc\*** 组件 scoped 等样式),一般 **无需** 在 \`index.scss\` 再引一遍 mvframe dist CSS,以免重复。项目级覆盖写在 \`src/assets/style/index.scss\` 即可。
442
+
443
+ ## 子路径(按需)
444
+
445
+ 发布包 \`exports\` 还提供 \`mvframe/composition\`、\`mvframe/util\`、\`mvframe/store\` 等,业务侧可 \`import { ... } from "mvframe/composition"\` 等,参见包内 \`package.json\` 的 \`exports\`。
439
446
 
440
447
  ## 目录约定
441
448