xydata-tools-uniapp 1.0.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/README.md +60 -0
- package/dist/assets/defaultAddPicBg.png +0 -0
- package/dist/assets/file-icon/document.png +0 -0
- package/dist/assets/file-icon/image.png +0 -0
- package/dist/assets/file-icon/ms-excel.png +0 -0
- package/dist/assets/file-icon/ms-powerpoint.png +0 -0
- package/dist/assets/file-icon/ms-word.png +0 -0
- package/dist/assets/file-icon/pdf.png +0 -0
- package/dist/assets/file-icon/video.png +0 -0
- package/dist/assets/file-icon/zip.png +0 -0
- package/dist/assets/loading.png +0 -0
- package/dist/assets/uploadVideoBg.png +0 -0
- package/dist/assets/videoPlay.png +0 -0
- package/dist/components/uni-app/file-picker/file-picker.vue +633 -0
- package/dist/components/uni-app/file-picker/styles.scss +196 -0
- package/dist/components/uni-app/media-picker/media-picker.vue +1645 -0
- package/dist/components/uni-app/media-picker/shmily-drag-media.vue +924 -0
- package/dist/components/uni-app/media-picker/styles.scss +531 -0
- package/dist/components/uni-app/watermark/index.js +633 -0
- package/dist/index.d.ts +452 -0
- package/dist/index.js +9 -0
- package/dist/shims-vue.d.ts +8 -0
- package/dist/types/components/uni-app/watermark/index.d.ts +2 -0
- package/dist/types/utils/watermark-shared.d.ts +42 -0
- package/dist/utils/watermark-shared.js +346 -0
- package/package.json +42 -0
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
/**
|
|
8
|
+
* watermark-shared.js
|
|
9
|
+
* 水印功能「平台无关」的共享模块。
|
|
10
|
+
* 包含默认常量、参数规范化、以及不依赖浏览器/小程序 API 的坐标、字号、间距、图片尺寸等布局计算纯函数。
|
|
11
|
+
* PC 端(src/utils/watermark.js)与 uni-app 端(src/components/uni-app/watermark/index.js)同源引用,
|
|
12
|
+
* 保证两端使用同一套 watermark 参数结构、同一套计算规则。
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
export var DEFAULT_WATERMARK = {
|
|
16
|
+
enabled: true,
|
|
17
|
+
margin: 24,
|
|
18
|
+
items: []
|
|
19
|
+
};
|
|
20
|
+
export var DEFAULT_WATERMARK_ITEM = {
|
|
21
|
+
type: 'text',
|
|
22
|
+
position: 'bottom-right',
|
|
23
|
+
mode: undefined,
|
|
24
|
+
fontSize: 24,
|
|
25
|
+
fontScale: undefined,
|
|
26
|
+
minFontSize: undefined,
|
|
27
|
+
maxFontSize: undefined,
|
|
28
|
+
spacing: undefined,
|
|
29
|
+
width: undefined,
|
|
30
|
+
height: undefined,
|
|
31
|
+
aspectRatio: undefined,
|
|
32
|
+
lockAspectRatio: true,
|
|
33
|
+
color: 'rgba(255,255,255,0.8)',
|
|
34
|
+
strokeColor: 'rgba(0,0,0,0.7)',
|
|
35
|
+
strokeWidth: 1,
|
|
36
|
+
fontFamily: 'sans-serif',
|
|
37
|
+
opacity: 1,
|
|
38
|
+
rotate: 0
|
|
39
|
+
};
|
|
40
|
+
export var IMAGE_EXTENSIONS = ['jpg', 'jpeg', 'png', 'webp', 'bmp', 'gif'];
|
|
41
|
+
export var getFileExtension = function getFileExtension(file) {
|
|
42
|
+
var name = (file === null || file === void 0 ? void 0 : file.name) || '';
|
|
43
|
+
var ext = name.split('.').pop();
|
|
44
|
+
return ext ? ext.toLowerCase() : '';
|
|
45
|
+
};
|
|
46
|
+
export var isImageFile = function isImageFile(file) {
|
|
47
|
+
var type = (file === null || file === void 0 ? void 0 : file.type) || '';
|
|
48
|
+
var ext = getFileExtension(file);
|
|
49
|
+
return type.startsWith('image/') || IMAGE_EXTENSIONS.includes(ext);
|
|
50
|
+
};
|
|
51
|
+
export var normalizeWatermarkConfig = function normalizeWatermarkConfig(watermark) {
|
|
52
|
+
if (!watermark || watermark.enabled === false) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
var items = Array.isArray(watermark.items) ? watermark.items : [];
|
|
56
|
+
var normalizedItems = items.filter(function (item) {
|
|
57
|
+
if (!item) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
if (item.type === 'image') {
|
|
61
|
+
return !!(item.src || item.url || item.imageUrl);
|
|
62
|
+
}
|
|
63
|
+
return typeof item.text !== 'undefined' && "".concat(item.text).trim();
|
|
64
|
+
}).map(function (item) {
|
|
65
|
+
return _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_WATERMARK_ITEM), item), {}, {
|
|
66
|
+
text: typeof item.text === 'undefined' ? '' : "".concat(item.text)
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
if (!normalizedItems.length) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
return _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_WATERMARK), watermark), {}, {
|
|
73
|
+
items: normalizedItems
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
export var parseInsetCoordinate = function parseInsetCoordinate(value, base) {
|
|
77
|
+
var scale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
78
|
+
var isAdaptive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
79
|
+
if (value === undefined || value === null) {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
if (typeof value === 'number') {
|
|
83
|
+
if (value > 0 && value < 1) {
|
|
84
|
+
return base * value;
|
|
85
|
+
}
|
|
86
|
+
if (isAdaptive) {
|
|
87
|
+
return value * scale;
|
|
88
|
+
}
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
if (typeof value === 'string') {
|
|
92
|
+
var cleanVal = value.trim();
|
|
93
|
+
if (!cleanVal) {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
if (cleanVal.endsWith('!')) {
|
|
97
|
+
var numStr = cleanVal.slice(0, -1).trim();
|
|
98
|
+
if (numStr.endsWith('px')) {
|
|
99
|
+
numStr = numStr.slice(0, -2).trim();
|
|
100
|
+
}
|
|
101
|
+
var _num = parseFloat(numStr);
|
|
102
|
+
return Number.isFinite(_num) ? _num : undefined;
|
|
103
|
+
}
|
|
104
|
+
if (cleanVal.endsWith('%')) {
|
|
105
|
+
var _num2 = parseFloat(cleanVal.slice(0, -1));
|
|
106
|
+
return Number.isFinite(_num2) ? base * (_num2 / 100) : undefined;
|
|
107
|
+
}
|
|
108
|
+
if (cleanVal.endsWith('px')) {
|
|
109
|
+
var _num3 = parseFloat(cleanVal.slice(0, -2));
|
|
110
|
+
if (Number.isFinite(_num3)) {
|
|
111
|
+
return isAdaptive ? _num3 * scale : _num3;
|
|
112
|
+
}
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
var num = parseFloat(cleanVal);
|
|
116
|
+
if (Number.isFinite(num)) {
|
|
117
|
+
if (num > 0 && num < 1) {
|
|
118
|
+
return base * num;
|
|
119
|
+
}
|
|
120
|
+
return isAdaptive ? num * scale : num;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return undefined;
|
|
124
|
+
};
|
|
125
|
+
export var isFullscreenWatermarkItem = function isFullscreenWatermarkItem(item) {
|
|
126
|
+
return (item === null || item === void 0 ? void 0 : item.mode) === 'fullscreen' || (item === null || item === void 0 ? void 0 : item.fullscreen) === true;
|
|
127
|
+
};
|
|
128
|
+
export var isImageWatermarkItem = function isImageWatermarkItem(item) {
|
|
129
|
+
return (item === null || item === void 0 ? void 0 : item.type) === 'image';
|
|
130
|
+
};
|
|
131
|
+
export var resolveSpacing = function resolveSpacing(canvas, item) {
|
|
132
|
+
var _ref, _item$spacing;
|
|
133
|
+
var shortSide = Math.min(canvas.width, canvas.height);
|
|
134
|
+
var scale = shortSide / 1000;
|
|
135
|
+
var rawSpacing = (_ref = (_item$spacing = item.spacing) !== null && _item$spacing !== void 0 ? _item$spacing : item.gap) !== null && _ref !== void 0 ? _ref : 160;
|
|
136
|
+
var spacing = parseInsetCoordinate(rawSpacing, shortSide, scale, item.adaptive === true);
|
|
137
|
+
return typeof spacing === 'number' && spacing >= 0 ? spacing : 160;
|
|
138
|
+
};
|
|
139
|
+
export var resolveTextPosition = function resolveTextPosition(canvas, item, margin) {
|
|
140
|
+
var position = item.position || 'bottom-right';
|
|
141
|
+
var isAdaptive = item.adaptive === true;
|
|
142
|
+
var shortSide = Math.min(canvas.width, canvas.height);
|
|
143
|
+
var scale = shortSide / 1000;
|
|
144
|
+
if (_typeof(position) === 'object' && position !== null) {
|
|
145
|
+
var hasInsetPosition = ['left', 'right', 'top', 'bottom'].some(function (key) {
|
|
146
|
+
return position[key] !== undefined && position[key] !== null && "".concat(position[key]).trim() !== '';
|
|
147
|
+
});
|
|
148
|
+
if (hasInsetPosition) {
|
|
149
|
+
var right = parseInsetCoordinate(position.right, canvas.width, scale, isAdaptive);
|
|
150
|
+
var left = parseInsetCoordinate(position.left, canvas.width, scale, isAdaptive);
|
|
151
|
+
var bottom = parseInsetCoordinate(position.bottom, canvas.height, scale, isAdaptive);
|
|
152
|
+
var top = parseInsetCoordinate(position.top, canvas.height, scale, isAdaptive);
|
|
153
|
+
var _resolvedMargin = isAdaptive ? margin * scale : margin;
|
|
154
|
+
var x = typeof right === 'number' ? canvas.width - right : typeof left === 'number' ? left : _resolvedMargin;
|
|
155
|
+
var y = typeof bottom === 'number' ? canvas.height - bottom : typeof top === 'number' ? top : _resolvedMargin;
|
|
156
|
+
return {
|
|
157
|
+
x: x,
|
|
158
|
+
y: y,
|
|
159
|
+
textAlign: item.textAlign || (position.right !== undefined && position.right !== null && "".concat(position.right).trim() !== '' ? 'right' : 'left'),
|
|
160
|
+
textBaseline: item.textBaseline || (position.bottom !== undefined && position.bottom !== null && "".concat(position.bottom).trim() !== '' ? 'bottom' : 'top')
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
return {
|
|
164
|
+
x: parseInsetCoordinate(position.x, canvas.width, scale, isAdaptive) || 0,
|
|
165
|
+
y: parseInsetCoordinate(position.y, canvas.height, scale, isAdaptive) || 0,
|
|
166
|
+
textAlign: item.textAlign || 'left',
|
|
167
|
+
textBaseline: item.textBaseline || 'top'
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
var resolvedMargin = isAdaptive ? margin * scale : margin;
|
|
171
|
+
var positions = {
|
|
172
|
+
'top-left': {
|
|
173
|
+
x: resolvedMargin,
|
|
174
|
+
y: resolvedMargin,
|
|
175
|
+
textAlign: 'left',
|
|
176
|
+
textBaseline: 'top'
|
|
177
|
+
},
|
|
178
|
+
'top-right': {
|
|
179
|
+
x: canvas.width - resolvedMargin,
|
|
180
|
+
y: resolvedMargin,
|
|
181
|
+
textAlign: 'right',
|
|
182
|
+
textBaseline: 'top'
|
|
183
|
+
},
|
|
184
|
+
'bottom-left': {
|
|
185
|
+
x: resolvedMargin,
|
|
186
|
+
y: canvas.height - resolvedMargin,
|
|
187
|
+
textAlign: 'left',
|
|
188
|
+
textBaseline: 'bottom'
|
|
189
|
+
},
|
|
190
|
+
'bottom-right': {
|
|
191
|
+
x: canvas.width - resolvedMargin,
|
|
192
|
+
y: canvas.height - resolvedMargin,
|
|
193
|
+
textAlign: 'right',
|
|
194
|
+
textBaseline: 'bottom'
|
|
195
|
+
},
|
|
196
|
+
center: {
|
|
197
|
+
x: canvas.width / 2,
|
|
198
|
+
y: canvas.height / 2,
|
|
199
|
+
textAlign: 'center',
|
|
200
|
+
textBaseline: 'middle'
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
return positions[position] || positions['bottom-right'];
|
|
204
|
+
};
|
|
205
|
+
export var resolveImageSize = function resolveImageSize(canvas, item, image) {
|
|
206
|
+
var shortSide = Math.min(canvas.width, canvas.height);
|
|
207
|
+
var scale = shortSide / 1000;
|
|
208
|
+
var naturalWidth = image.naturalWidth || image.width || 1;
|
|
209
|
+
var naturalHeight = image.naturalHeight || image.height || 1;
|
|
210
|
+
var configuredAspectRatio = Number(item.aspectRatio);
|
|
211
|
+
var aspectRatio = Number.isFinite(configuredAspectRatio) && configuredAspectRatio > 0 ? configuredAspectRatio : naturalWidth / naturalHeight;
|
|
212
|
+
var heightRatio = 1 / aspectRatio;
|
|
213
|
+
var width = parseInsetCoordinate(item.width, canvas.width, scale, item.adaptive === true);
|
|
214
|
+
var height = parseInsetCoordinate(item.height, canvas.height, scale, item.adaptive === true);
|
|
215
|
+
if (item.lockAspectRatio !== false) {
|
|
216
|
+
if (typeof width === 'number' && width > 0) {
|
|
217
|
+
return {
|
|
218
|
+
width: width,
|
|
219
|
+
height: width * heightRatio
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
if (typeof height === 'number' && height > 0) {
|
|
223
|
+
return {
|
|
224
|
+
width: height / heightRatio,
|
|
225
|
+
height: height
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
if (typeof width === 'number' && width > 0 && typeof height === 'number' && height > 0) {
|
|
230
|
+
return {
|
|
231
|
+
width: width,
|
|
232
|
+
height: height
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
if (typeof width === 'number' && width > 0) {
|
|
236
|
+
return {
|
|
237
|
+
width: width,
|
|
238
|
+
height: width * heightRatio
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
if (typeof height === 'number' && height > 0) {
|
|
242
|
+
return {
|
|
243
|
+
width: height / heightRatio,
|
|
244
|
+
height: height
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
var fallbackWidth = item.adaptive === true ? 160 * scale : 160;
|
|
248
|
+
return {
|
|
249
|
+
width: fallbackWidth,
|
|
250
|
+
height: fallbackWidth * heightRatio
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
export var resolveBoxPosition = function resolveBoxPosition(canvas, item, margin, boxWidth, boxHeight) {
|
|
254
|
+
var position = item.position || 'bottom-right';
|
|
255
|
+
var isAdaptive = item.adaptive === true;
|
|
256
|
+
var shortSide = Math.min(canvas.width, canvas.height);
|
|
257
|
+
var scale = shortSide / 1000;
|
|
258
|
+
var resolvedMargin = isAdaptive ? margin * scale : margin;
|
|
259
|
+
if (_typeof(position) === 'object' && position !== null) {
|
|
260
|
+
var right = parseInsetCoordinate(position.right, canvas.width, scale, isAdaptive);
|
|
261
|
+
var left = parseInsetCoordinate(position.left, canvas.width, scale, isAdaptive);
|
|
262
|
+
var bottom = parseInsetCoordinate(position.bottom, canvas.height, scale, isAdaptive);
|
|
263
|
+
var top = parseInsetCoordinate(position.top, canvas.height, scale, isAdaptive);
|
|
264
|
+
var x = typeof right === 'number' ? canvas.width - right - boxWidth : typeof left === 'number' ? left : resolvedMargin;
|
|
265
|
+
var y = typeof bottom === 'number' ? canvas.height - bottom - boxHeight : typeof top === 'number' ? top : resolvedMargin;
|
|
266
|
+
return {
|
|
267
|
+
x: x,
|
|
268
|
+
y: y
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
var positions = {
|
|
272
|
+
'top-left': {
|
|
273
|
+
x: resolvedMargin,
|
|
274
|
+
y: resolvedMargin
|
|
275
|
+
},
|
|
276
|
+
'top-right': {
|
|
277
|
+
x: canvas.width - resolvedMargin - boxWidth,
|
|
278
|
+
y: resolvedMargin
|
|
279
|
+
},
|
|
280
|
+
'bottom-left': {
|
|
281
|
+
x: resolvedMargin,
|
|
282
|
+
y: canvas.height - resolvedMargin - boxHeight
|
|
283
|
+
},
|
|
284
|
+
'bottom-right': {
|
|
285
|
+
x: canvas.width - resolvedMargin - boxWidth,
|
|
286
|
+
y: canvas.height - resolvedMargin - boxHeight
|
|
287
|
+
},
|
|
288
|
+
center: {
|
|
289
|
+
x: (canvas.width - boxWidth) / 2,
|
|
290
|
+
y: (canvas.height - boxHeight) / 2
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
return positions[position] || positions['bottom-right'];
|
|
294
|
+
};
|
|
295
|
+
export var clampNumber = function clampNumber(value, min, max) {
|
|
296
|
+
var result = value;
|
|
297
|
+
if (typeof min === 'number') {
|
|
298
|
+
result = Math.max(min, result);
|
|
299
|
+
}
|
|
300
|
+
if (typeof max === 'number') {
|
|
301
|
+
result = Math.min(max, result);
|
|
302
|
+
}
|
|
303
|
+
return result;
|
|
304
|
+
};
|
|
305
|
+
export var resolveFontSize = function resolveFontSize(canvas, item) {
|
|
306
|
+
if (typeof item.fontScale === 'number' && item.fontScale > 0) {
|
|
307
|
+
var shortSide = Math.min(canvas.width, canvas.height);
|
|
308
|
+
var scaledSize = shortSide * item.fontScale;
|
|
309
|
+
var fallbackMin = typeof item.fontSize === 'number' ? item.fontSize : undefined;
|
|
310
|
+
return clampNumber(scaledSize, typeof item.minFontSize === 'number' ? item.minFontSize : fallbackMin, typeof item.maxFontSize === 'number' ? item.maxFontSize : undefined);
|
|
311
|
+
}
|
|
312
|
+
var baseFontSize = 24;
|
|
313
|
+
var isFixed = false;
|
|
314
|
+
if (typeof item.fontSize === 'number') {
|
|
315
|
+
baseFontSize = item.fontSize;
|
|
316
|
+
} else if (typeof item.fontSize === 'string') {
|
|
317
|
+
var cleanVal = item.fontSize.trim();
|
|
318
|
+
if (cleanVal.endsWith('!')) {
|
|
319
|
+
isFixed = true;
|
|
320
|
+
cleanVal = cleanVal.slice(0, -1).trim();
|
|
321
|
+
}
|
|
322
|
+
if (cleanVal.endsWith('px')) {
|
|
323
|
+
cleanVal = cleanVal.slice(0, -2).trim();
|
|
324
|
+
}
|
|
325
|
+
var parsed = parseFloat(cleanVal);
|
|
326
|
+
if (Number.isFinite(parsed)) {
|
|
327
|
+
baseFontSize = parsed;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
if (item.adaptive === true && !isFixed) {
|
|
331
|
+
var _shortSide = Math.min(canvas.width, canvas.height);
|
|
332
|
+
var resolvedSize = baseFontSize * (_shortSide / 1000);
|
|
333
|
+
return resolvedSize > 0 ? resolvedSize : baseFontSize;
|
|
334
|
+
}
|
|
335
|
+
return baseFontSize;
|
|
336
|
+
};
|
|
337
|
+
export var resolveStrokeWidth = function resolveStrokeWidth(item, fontSize) {
|
|
338
|
+
var rawStrokeWidth = item.strokeWidth === undefined ? 1 : Number(item.strokeWidth);
|
|
339
|
+
if (!Number.isFinite(rawStrokeWidth) || rawStrokeWidth <= 0) {
|
|
340
|
+
return 0;
|
|
341
|
+
}
|
|
342
|
+
if (item.adaptive === true) {
|
|
343
|
+
return rawStrokeWidth * (fontSize / 24);
|
|
344
|
+
}
|
|
345
|
+
return rawStrokeWidth;
|
|
346
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "xydata-tools-uniapp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "xydata-tools uni-app 组件库",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"types": "dist/types/index.d.ts",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://172.16.1.252/wuxiaohu/xydata-tools-uniapp.git"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"dev": "father dev",
|
|
14
|
+
"build": "father build",
|
|
15
|
+
"generate-types": "tsc --emitDeclarationOnly --project tsconfig.json",
|
|
16
|
+
"prepublishOnly": "npm run build && npm run generate-types"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"sideEffects": [
|
|
20
|
+
"*.css",
|
|
21
|
+
"*.scss"
|
|
22
|
+
],
|
|
23
|
+
"files": [
|
|
24
|
+
"/dist"
|
|
25
|
+
],
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"vue": "^2.7.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@babel/core": "7.24.9",
|
|
34
|
+
"@babel/preset-env": "7.24.8",
|
|
35
|
+
"@vitejs/plugin-vue2": "2.3.1",
|
|
36
|
+
"father": "4.1.5",
|
|
37
|
+
"typescript": "^5.0.0",
|
|
38
|
+
"vue": "2.7.16",
|
|
39
|
+
"vue-loader": "15.11.1",
|
|
40
|
+
"vue-template-compiler": "2.7.16"
|
|
41
|
+
}
|
|
42
|
+
}
|