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/dist/Config.js +201 -0
- package/dist/composition.js +267 -133
- package/dist/css/cpt.css +1 -1
- package/dist/css/style.css +1 -1
- package/dist/index.js +9 -2054
- package/dist/util.js +24 -19
- package/dist/vendor.js +2492 -0
- package/package.json +4 -1
- package/scripts/scaffold-app.js +16 -9
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.
|
|
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",
|
package/scripts/scaffold-app.js
CHANGED
|
@@ -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
|
-
`/*
|
|
300
|
-
|
|
301
|
-
/*
|
|
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
|
-
|
|
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
|
|