oipage 1.9.0-alpha.0 → 1.9.0

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/CHANGELOG CHANGED
@@ -169,8 +169,15 @@ v1.8.1:
169
169
  changes:
170
170
  - 修复bug
171
171
  1、开发服务器删除多余的打印语句
172
+ v1.8.2:
173
+ date:2026-02-07
174
+ changes:
175
+ - 修复bug
176
+ 1、修复oipage-cli disk --delempty 命令错误
172
177
  v1.9.0:
173
- date:
178
+ date:2026-03-04
174
179
  changes:
175
180
  - 优化改造
176
- 1、针对应用市场优化UI设计
181
+ 1、调整打包若干细节
182
+ 2、针对应用市场优化UI设计
183
+ 3、优化oipage-cli disk --delempty 命令路径不存在时提示
@@ -1,8 +1,18 @@
1
- const { readdirSync, lstatSync, rmdirSync } = require("fs");
1
+ const { readdirSync, lstatSync, rmdirSync, existsSync } = require("fs");
2
2
  const { join } = require("path");
3
3
 
4
4
  module.exports = function (rootPath) {
5
- (function deleteEmptyFolder(folderPath) {
5
+
6
+ // 命令地方已经确保是全路径
7
+ // rootPath = path.resolve(rootPath);
8
+
9
+ // 路径不存在,什么也不用干
10
+ if (!existsSync(rootPath)) {
11
+ console.log("路径不存在:\x1b[31m" + rootPath + "\x1b[0m");
12
+ return;
13
+ }
14
+
15
+ ; (function deleteEmptyFolder(folderPath) {
6
16
  let subItems = readdirSync(folderPath);
7
17
  if (subItems.length > 0) {
8
18
  for (let i = 0; i < subItems.length; i++) {
@@ -20,5 +30,5 @@ module.exports = function (rootPath) {
20
30
  folderPath = join(folderPath, "..");
21
31
  }
22
32
  }
23
- })(params.path);
33
+ })(rootPath);
24
34
  };
@@ -2,7 +2,8 @@
2
2
  <h2 class="title" z-bind="_props.title"></h2>
3
3
  <div class="tips" z-bind="_props.tips"></div>
4
4
  <div class="file">
5
- <input type="file" multiple id="input" z-on:change.stop="doChange" z-bind:accept="accept" />
5
+ <input type="file" :multiple="_props.multiple?'multiple':'none'" id="input" z-on:change.stop="doChange"
6
+ z-bind:accept="accept" />
6
7
  <label for="input" z-bind="'选择'+_props.type+'文件'"></label>
7
8
  </div>
8
9
  </div>
@@ -18,12 +18,17 @@ export default defineElement({
18
18
  type: String,
19
19
  required: true,
20
20
  },
21
+ multiple: {
22
+ type: Boolean,
23
+ default: true
24
+ }
21
25
  },
22
26
  data() {
23
27
  return {
24
28
  accept: {
25
29
  pdf: "application/pdf",
26
- image: "image/*"
30
+ image: "image/*",
31
+ video: "video/*",
27
32
  }[this._props.type]
28
33
  };
29
34
  },
@@ -20,7 +20,7 @@
20
20
  box-shadow: 0 6px 18px rgba(15,23,42,0.06);
21
21
  padding: 14px;
22
22
  width: calc(50% - 16px);
23
- max-width: 260px;
23
+ max-width: 130px;
24
24
  text-align: center;
25
25
  cursor: pointer;
26
26
  transition: transform .18s ease, box-shadow .18s ease;
@@ -1,7 +1,3 @@
1
- /*!
2
- * animation of OIPage v1.9.0-alpha.0
3
- * git+https://github.com/oi-contrib/OIPage.git
4
- */
5
1
 
6
2
  //当前正在运动的动画的tick函数堆栈
7
3
  var $timers = [];
@@ -1,7 +1,3 @@
1
- /*!
2
- * cmdlog of OIPage v1.9.0-alpha.0
3
- * git+https://github.com/oi-contrib/OIPage.git
4
- */
5
1
 
6
2
  // 预定义的常量
7
3
  const MOVE_LEFT = Buffer.from('1b5b3130303044', 'hex').toString();
@@ -1,7 +1,3 @@
1
- /*!
2
- * disk of OIPage v1.9.0-alpha.0
3
- * git+https://github.com/oi-contrib/OIPage.git
4
- */
5
1
 
6
2
  const { join } = require("path");
7
3
  const { existsSync, readdirSync, lstatSync, unlinkSync, rmdirSync, mkdirSync, copyFileSync, symlinkSync } = require("fs");
@@ -1,7 +1,3 @@
1
- /*!
2
- * format of OIPage v1.9.0-alpha.0
3
- * git+https://github.com/oi-contrib/OIPage.git
4
- */
5
1
 
6
2
  function numberFormat(input) {
7
3
  if (!input && input !== 0) {
@@ -1,7 +1,3 @@
1
- /*!
2
- * json of OIPage v1.9.0-alpha.0
3
- * git+https://github.com/oi-contrib/OIPage.git
4
- */
5
1
  const {reader} = require("../reader/index.js");
6
2
  let calcValue = function (word) {
7
3
  if (word.type != 'string' && word.type != 'object') {
@@ -1,7 +1,3 @@
1
- /*!
2
- * logform of OIPage v1.9.0-alpha.0
3
- * git+https://github.com/oi-contrib/OIPage.git
4
- */
5
1
  const {linelog} = require("../cmdlog/index.js");
6
2
  let getTitle = function (title) {
7
3
  return "➤ " + title;
@@ -1,7 +1,3 @@
1
- /*!
2
- * reader of OIPage v1.9.0-alpha.0
3
- * git+https://github.com/oi-contrib/OIPage.git
4
- */
5
1
 
6
2
  function reader(plain) {
7
3
 
@@ -1,7 +1,3 @@
1
- /*!
2
- * throttle of OIPage v1.9.0-alpha.0
3
- * git+https://github.com/oi-contrib/OIPage.git
4
- */
5
1
 
6
2
  function throttle(callback, _option) {
7
3
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oipage",
3
- "version": "1.9.0-alpha.0",
3
+ "version": "1.9.0",
4
4
  "description": "前端网页或应用快速开发助手,包括开发服务器、辅助命令、实用API等",
5
5
  "sideEffects": false,
6
6
  "typings": "./types/index.d.ts",
@@ -1,7 +1,3 @@
1
- /*!
2
- * XMLHttpRequest of OIPage v1.9.0-alpha.0
3
- * git+https://github.com/oi-contrib/OIPage.git
4
- */
5
1
 
6
2
  export function XHRIntercept(callbackFactory) {
7
3
 
@@ -1,7 +1,3 @@
1
- /*!
2
- * animation of OIPage v1.9.0-alpha.0
3
- * git+https://github.com/oi-contrib/OIPage.git
4
- */
5
1
 
6
2
  //当前正在运动的动画的tick函数堆栈
7
3
  var $timers = [];
@@ -1,7 +1,3 @@
1
- /*!
2
- * format of OIPage v1.9.0-alpha.0
3
- * git+https://github.com/oi-contrib/OIPage.git
4
- */
5
1
 
6
2
  export function numberFormat(input) {
7
3
  if (!input && input !== 0) {
package/web/json/index.js CHANGED
@@ -1,7 +1,3 @@
1
- /*!
2
- * json of OIPage v1.9.0-alpha.0
3
- * git+https://github.com/oi-contrib/OIPage.git
4
- */
5
1
  import {reader} from "../reader/index.js";
6
2
  let calcValue = function (word) {
7
3
  if (word.type != 'string' && word.type != 'object') {
@@ -1,7 +1,3 @@
1
- /*!
2
- * onReady of OIPage v1.9.0-alpha.0
3
- * git+https://github.com/oi-contrib/OIPage.git
4
- */
5
1
 
6
2
  export function onReady(callback) {
7
3
  var readyState = document.readyState;
@@ -1,7 +1,3 @@
1
- /*!
2
- * performChunk of OIPage v1.9.0-alpha.0
3
- * git+https://github.com/oi-contrib/OIPage.git
4
- */
5
1
 
6
2
  export function performChunk(chunkFun) {
7
3
  let isRuning = true;
@@ -1,7 +1,3 @@
1
- /*!
2
- * reader of OIPage v1.9.0-alpha.0
3
- * git+https://github.com/oi-contrib/OIPage.git
4
- */
5
1
 
6
2
  export function reader(plain) {
7
3
 
@@ -1,7 +1,3 @@
1
- /*!
2
- * style of OIPage v1.9.0-alpha.0
3
- * git+https://github.com/oi-contrib/OIPage.git
4
- */
5
1
 
6
2
  export function setStyle(el, styles) {
7
3
  for (var key in styles) {
@@ -1,7 +1,3 @@
1
- /*!
2
- * throttle of OIPage v1.9.0-alpha.0
3
- * git+https://github.com/oi-contrib/OIPage.git
4
- */
5
1
 
6
2
  export function throttle(callback, _option) {
7
3