first commit
This commit is contained in:
11
unpackage/dist/build/.nvue/app.css.js
vendored
Normal file
11
unpackage/dist/build/.nvue/app.css.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __commonJS = (cb, mod) => function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
var require_app_css = __commonJS({
|
||||
"app.css.js"(exports) {
|
||||
const _style_0 = {};
|
||||
exports.styles = [_style_0];
|
||||
}
|
||||
});
|
||||
export default require_app_css();
|
||||
2
unpackage/dist/build/.nvue/app.js
vendored
Normal file
2
unpackage/dist/build/.nvue/app.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
Promise.resolve("./app.css.js").then(() => {
|
||||
});
|
||||
206
unpackage/dist/build/.tsc/app-android/uni_modules/lime-choose-file/utssdk/app-android/index.uts.ts
vendored
Normal file
206
unpackage/dist/build/.tsc/app-android/uni_modules/lime-choose-file/utssdk/app-android/index.uts.ts
vendored
Normal file
@@ -0,0 +1,206 @@
|
||||
// @ts-nocheck
|
||||
import Intent from 'android.content.Intent';
|
||||
import ClipData from 'android.content.ClipData';
|
||||
import Uri from 'android.net.Uri';
|
||||
import InputStream from 'java.io.InputStream';
|
||||
import OpenableColumns from 'android.provider.OpenableColumns';
|
||||
import Cursor from 'android.database.Cursor';
|
||||
import File from 'java.io.File';
|
||||
import FileInputStream from 'java.io.FileInputStream';
|
||||
import FileOutputStream from 'java.io.FileOutputStream';
|
||||
import BufferedOutputStream from 'java.io.BufferedOutputStream';
|
||||
import ByteArrayInputStream from 'java.io.ByteArrayInputStream';
|
||||
|
||||
import { ChooseFileOption, ChooseFile, ChooseFileSuccessCallbackResult } from '../interface'
|
||||
import { GeneralCallbackResultImpl } from '../unierror'
|
||||
|
||||
const REQUEST_CODE_CHOOSE_FILE : Int = 42
|
||||
let resultFunction : ((requestCode : Int, resultCode : Int, data ?: Intent) => void) | null = null
|
||||
|
||||
|
||||
class ChooseFileImpl implements ChooseFile {
|
||||
name : string = ''
|
||||
path : string = ''
|
||||
// private _path : string = ''
|
||||
size : number = 0
|
||||
time : number = 0
|
||||
type : string = 'file'
|
||||
// private uri : Uri
|
||||
private options: ChooseFileOption
|
||||
constructor(uri : Uri, options : ChooseFileOption) {
|
||||
// this.uri = uri
|
||||
this.options = options
|
||||
this.time = Date.now()
|
||||
this.type = this.getFileTypeFromUri(uri);
|
||||
// this._path = uri.getPath() ?? ''
|
||||
this.getFileInfoFromUri(uri)
|
||||
if (this.isCache(options)) {
|
||||
this.copyFileToCache(uri)
|
||||
}
|
||||
|
||||
}
|
||||
private isCache(options : ChooseFileOption) : boolean {
|
||||
const extension = this.getFileExtension(this.name)
|
||||
const extensions = options.extension
|
||||
const type = options.type ?? 'all'
|
||||
const hasExtension = extensions != null && extension != '' && extensions.includes(extension)
|
||||
const isVideoOrImage = ['video', 'image'].includes(type)
|
||||
const isFileAndNotVideoOrImage = type == 'file' && !['video', 'image'].includes(this.type);
|
||||
if ((type == 'all' || isVideoOrImage || isFileAndNotVideoOrImage) && !hasExtension) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
private getFileExtension(fileName : string) : string {
|
||||
const lastDotIndex = fileName.lastIndexOf(".");
|
||||
if (lastDotIndex == -1) {
|
||||
return "";
|
||||
}
|
||||
return fileName.substring(lastDotIndex + 1);
|
||||
}
|
||||
private copyFileToCache(uri : Uri) {
|
||||
const cacheDir = UTSAndroid.getAppCachePath();
|
||||
const context = UTSAndroid.getAppContext();
|
||||
if(cacheDir != null) {
|
||||
const path = new File(cacheDir);
|
||||
if (!path.exists()) {
|
||||
path.mkdir();
|
||||
}
|
||||
}
|
||||
let fileName = this.name
|
||||
if(this.options.filename != null) {
|
||||
fileName = this.options.filename!;
|
||||
if(this.options.count != null && this.options.count! > 1) {
|
||||
fileName = `${fileName}_${Date.now()}`;
|
||||
}
|
||||
const extension = this.getFileExtension(this.name)
|
||||
|
||||
fileName = `${fileName}.${extension}`
|
||||
}
|
||||
const destFile = new File(cacheDir, fileName);
|
||||
|
||||
try {
|
||||
const inputStream = context!.getContentResolver().openInputStream(uri)
|
||||
const outputStream = new FileOutputStream(destFile)
|
||||
if (inputStream != null) {
|
||||
let buffer = ByteArray(1024);
|
||||
let c = inputStream.read(buffer)
|
||||
while (c > 0) {
|
||||
outputStream.write(buffer, 0, c);
|
||||
c = inputStream.read(buffer)
|
||||
}
|
||||
}
|
||||
this.path = cacheDir + fileName//this.name
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
private getFileTypeFromUri(uri : Uri) : string {
|
||||
const context = UTSAndroid.getAppContext();
|
||||
let fileType = 'file'
|
||||
let mimeType = context!.getContentResolver().getType(uri);
|
||||
if (mimeType != null) {
|
||||
if (mimeType.startsWith("video")) {
|
||||
fileType = "video";
|
||||
} else if (mimeType.startsWith("image")) {
|
||||
fileType = "image";
|
||||
}
|
||||
}
|
||||
return fileType;
|
||||
}
|
||||
private getFileInfoFromUri(uri : Uri) {
|
||||
const context = UTSAndroid.getAppContext();
|
||||
let cursor = context!.getContentResolver().query(uri, null, null, null, null);
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
this.name = cursor.getString(cursor.getColumnIndexOrThrow(OpenableColumns.DISPLAY_NAME))
|
||||
const fileSize = cursor.getLong(cursor.getColumnIndexOrThrow(OpenableColumns.SIZE));
|
||||
this.size = Number.from(fileSize)
|
||||
cursor.close();
|
||||
} else if ("file".equals(uri.getScheme())) {
|
||||
this.name = uri.getLastPathSegment() ?? '';
|
||||
const file = new File(uri.getPath() ?? '');
|
||||
const fileSize = file.length();
|
||||
this.size = Number.from(fileSize)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export function chooseFile(options : ChooseFileOption) {
|
||||
if (resultFunction != null) {
|
||||
UTSAndroid.offAppActivityResult(resultFunction!)
|
||||
}
|
||||
const type = options.type ?? 'all'
|
||||
const intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
if (type.equals("all") || type.equals("file")) {
|
||||
intent.setType("*/*");
|
||||
} else if (type.equals("video")) {
|
||||
intent.setType("video/*");
|
||||
} else if (type.equals("image")) {
|
||||
intent.setType("image/*");
|
||||
}
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, options.count == 1 ? false : true); // 允许多选
|
||||
|
||||
resultFunction = (requestCode : Int, resultCode : Int, data ?: Intent) => {
|
||||
if (requestCode == REQUEST_CODE_CHOOSE_FILE) {
|
||||
UTSAndroid.offAppActivityResult(resultFunction!);
|
||||
if (resultCode == -1 && data != null) {
|
||||
const clipData = data.getClipData();
|
||||
const tempFiles : ChooseFile[] = []
|
||||
|
||||
if (clipData != null) {
|
||||
// 多选
|
||||
// const itemCount = clipData.getItemCount();
|
||||
// if (options.count != null && options.count! > itemCount) {
|
||||
// const err = new GeneralCallbackResultImpl(9010002, `选中文件数量超过${options.count}`)
|
||||
// options.fail?.(err)
|
||||
// options.complete?.(err)
|
||||
// return
|
||||
// }
|
||||
for (let i = 0; i < clipData.getItemCount(); i++) {
|
||||
const uri = clipData.getItemAt(i.toInt()).getUri();
|
||||
const chooseFile = new ChooseFileImpl(uri, options);
|
||||
if(chooseFile.path !=''){
|
||||
tempFiles.push(chooseFile)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 单选
|
||||
const uri = data.getData();
|
||||
if (uri != null) {
|
||||
const chooseFile = new ChooseFileImpl(uri, options)
|
||||
if(chooseFile.path !='' ){
|
||||
tempFiles.push(chooseFile)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
const count = options.count ?? Integer.MAX_VALUE // Number.MAX_VALUE
|
||||
if(tempFiles.length > 0 && count >= tempFiles.length){
|
||||
options.success?.({
|
||||
tempFiles,
|
||||
errMsg: 'chooseFile:ok'
|
||||
} as ChooseFileSuccessCallbackResult)
|
||||
} else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件或文件超过设置数量`)
|
||||
options.fail?.(err)
|
||||
options.complete?.(err)
|
||||
}
|
||||
} else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件`)
|
||||
options.fail?.(err)
|
||||
options.complete?.(err)
|
||||
}
|
||||
} else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件`)
|
||||
options.fail?.(err)
|
||||
options.complete?.(err)
|
||||
}
|
||||
}
|
||||
|
||||
UTSAndroid.onAppActivityResult(resultFunction!)
|
||||
UTSAndroid.getUniActivity()!.startActivityForResult(Intent.createChooser(intent, "选择文件"), REQUEST_CODE_CHOOSE_FILE)
|
||||
// UTSAndroid.getUniActivity()!.overridePendingTransition((10).toInt(), (0).toInt());
|
||||
}
|
||||
138
unpackage/dist/build/.tsc/app-android/uni_modules/lime-choose-file/utssdk/app-ios/index.uts.ts
vendored
Normal file
138
unpackage/dist/build/.tsc/app-android/uni_modules/lime-choose-file/utssdk/app-ios/index.uts.ts
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
// @ts-nocheck
|
||||
import { ChooseFileOption, ChooseFile, ChooseFileSuccessCallbackResult } from '../interface'
|
||||
import { UIDocumentPickerDelegate, UIDocumentPickerMode } from "UIKit"
|
||||
import { URL, FileManager } from 'Foundation';
|
||||
import { GeneralCallbackResultImpl } from '../unierror'
|
||||
import { DispatchQueue } from 'Dispatch';
|
||||
|
||||
const documentTypes : Map<string, string[]> = new Map([
|
||||
["all", ["public.item"]],
|
||||
["file", [
|
||||
"public.text",
|
||||
"public.zip-archive",
|
||||
"public.data",
|
||||
"com.adobe.pdf",
|
||||
"com.microsoft.word.doc",
|
||||
"com.microsoft.word.docx",
|
||||
"com.microsoft.excel.xls",
|
||||
"com.microsoft.excel.xlsx"
|
||||
]
|
||||
],
|
||||
["video", ["public.movie"]],
|
||||
["image", ["public.image"]],
|
||||
])
|
||||
|
||||
class ChooseFileImpl {
|
||||
name : string = ''
|
||||
path : string = ''
|
||||
size : number = 0
|
||||
time : number = 0
|
||||
type : string = 'file'
|
||||
constructor(uri : URL, options : ChooseFileOption) {
|
||||
try {
|
||||
const originalFileName = uri.lastPathComponent;
|
||||
const attributes = UTSiOS.try(FileManager.default.attributesOfItem(atPath = uri.path))
|
||||
const fileSize = attributes[FileAttributeKey.size] as number
|
||||
const pathExtension = `${uri.pathExtension}`
|
||||
|
||||
const imageFormats = ['jpeg', 'jpg', 'png', 'gif', 'bmp', 'tiff', 'svg']
|
||||
const videoFormats = ['mov', 'm4v', 'mp4', 'avi']
|
||||
|
||||
|
||||
let fileName = originalFileName
|
||||
if(options.filename != null) {
|
||||
fileName = options.filename!
|
||||
if(options.count != null && options.count! > 1) {
|
||||
fileName = `${fileName}_${Date.now()}`;
|
||||
}
|
||||
fileName = `${fileName}.${pathExtension}`
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const dataPath = UTSiOS.getDataPath().replace(/data$/, "doc");
|
||||
|
||||
const file = new URL(fileURLWithPath = dataPath).appendingPathComponent(fileName)//.absoluteString
|
||||
const fileData = FileManager.default.contents(atPath = uri.path);
|
||||
UTSiOS.try(fileData?.write(to = file))
|
||||
|
||||
if (imageFormats.includes(pathExtension)) {
|
||||
this.type = 'image'
|
||||
} else if (videoFormats.includes(pathExtension)) {
|
||||
this.type = 'video'
|
||||
} else {
|
||||
this.type = 'file'
|
||||
}
|
||||
|
||||
this.name = `${originalFileName}`
|
||||
this.size = fileSize
|
||||
this.path = `${file.absoluteString}`
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class FilePickerManager implements UIDocumentPickerDelegate {
|
||||
options : ChooseFileOption = {}
|
||||
constructor() { }
|
||||
chooseFile(options : ChooseFileOption) {
|
||||
DispatchQueue.main.async(execute = () : void => {
|
||||
this.options = options
|
||||
const type = options.type ?? 'all'
|
||||
const count = options.count ?? 1
|
||||
const types = (documentTypes.get(type) ?? documentTypes.get('all')) as string[]
|
||||
let documentPicker = UIDocumentPickerViewController(
|
||||
documentTypes = types,
|
||||
in = UIDocumentPickerMode.import
|
||||
)
|
||||
documentPicker.delegate = this
|
||||
// 多选要大于 ios11
|
||||
if (UTSiOS.available("iOS 11.0, *")) {
|
||||
documentPicker.allowsMultipleSelection = count > 1
|
||||
}
|
||||
UTSiOS.getCurrentViewController().present(documentPicker, animated = true)
|
||||
})
|
||||
}
|
||||
documentPicker(controller : UIDocumentPickerViewController, @argumentLabel("didPickDocumentsAt") urls : URL[]) {
|
||||
DispatchQueue.main.async(execute = () : void => {
|
||||
const tempFiles : ChooseFile[] = []
|
||||
for (let i = 0; i < urls.length; i++) {
|
||||
const url = urls[i]
|
||||
const chooseFile = new ChooseFileImpl(url, this.options);
|
||||
// IOS -> js 无法传class?
|
||||
const file : ChooseFile = {
|
||||
name: chooseFile.name,
|
||||
path: chooseFile.path,
|
||||
size: chooseFile.size,
|
||||
time: chooseFile.time,
|
||||
type: chooseFile.type,
|
||||
}
|
||||
if (chooseFile.path != '') {
|
||||
tempFiles.push(file)
|
||||
}
|
||||
}
|
||||
|
||||
const count = this.options.count ?? Number.from(Double.greatestFiniteMagnitude) //Number.from(Double.MAX_VALUE)
|
||||
if (tempFiles.length > 0 && count >= tempFiles.length) {
|
||||
const res : ChooseFileSuccessCallbackResult = {
|
||||
tempFiles,
|
||||
errMsg: 'chooseFile:ok'
|
||||
}
|
||||
this.options.success?.(res)
|
||||
} else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件或文件超过设置数量`)
|
||||
this.options.fail?.(err)
|
||||
this.options.complete?.(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const fileManager = new FilePickerManager()
|
||||
|
||||
export function chooseFile(options : ChooseFileOption) {
|
||||
fileManager.chooseFile(options)
|
||||
}
|
||||
35
unpackage/dist/build/.tsc/app-android/uni_modules/lime-choose-file/utssdk/index.uts.ts
vendored
Normal file
35
unpackage/dist/build/.tsc/app-android/uni_modules/lime-choose-file/utssdk/index.uts.ts
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
// @ts-nocheck
|
||||
export * from './interface';
|
||||
import { type ChooseFileOption } from './interface';
|
||||
|
||||
export function chooseFile(options: ChooseFileOption){
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
console.error('chooseFile 不支持该平台')
|
||||
|
||||
}
|
||||
108
unpackage/dist/build/.tsc/app-android/uni_modules/lime-choose-file/utssdk/interface.uts.ts
vendored
Normal file
108
unpackage/dist/build/.tsc/app-android/uni_modules/lime-choose-file/utssdk/interface.uts.ts
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
// @ts-nocheck
|
||||
/**
|
||||
* 错误码
|
||||
* 根据uni错误码规范要求,建议错误码以90开头,以下是错误码示例:
|
||||
* - 9010001 错误信息1
|
||||
* - 9010002 错误信息2
|
||||
*/
|
||||
export type ChooseFileErrorCode = 9010001 | 9010002 | 1101001 | 1101002 | 1101003 | 1101004 | 1101005 | 1101006 | 1101007 | 1101008 | 1101009 | 1101010;
|
||||
/**
|
||||
* myApi 的错误回调参数
|
||||
*/
|
||||
export interface GeneralCallbackResult extends IUniError {
|
||||
errCode : ChooseFileErrorCode
|
||||
};
|
||||
|
||||
|
||||
/** 返回选择的文件的本地临时文件对象数组 */
|
||||
|
||||
export interface ChooseFile {
|
||||
/** 选择的文件名称 */
|
||||
name : string
|
||||
/** 本地临时文件路径 (本地路径) */
|
||||
path : string
|
||||
/** 本地临时文件大小,单位 B */
|
||||
size : number
|
||||
/** 选择的文件的会话发送时间,Unix时间戳,工具暂不支持此属性 */
|
||||
time : number
|
||||
/** 选择的文件类型
|
||||
*
|
||||
* 可选值:
|
||||
* - 'video': 选择了视频文件;
|
||||
* - 'image': 选择了图片文件;
|
||||
* - 'file': 选择了除图片和视频的文件; */
|
||||
type : 'video' | 'image' | 'file' | 'all'
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export type ChooseFileSuccessCallbackResult = {
|
||||
/** 返回选择的文件的本地临时文件对象数组 */
|
||||
tempFiles : ChooseFile[],
|
||||
errMsg : string
|
||||
}
|
||||
|
||||
|
||||
/** 接口调用成功的回调函数 */
|
||||
export type ChooseFileSuccessCallback = (
|
||||
result : ChooseFileSuccessCallbackResult
|
||||
) => void
|
||||
|
||||
/** 接口调用失败的回调函数 */
|
||||
export type ChooseFileFailCallback = (res : GeneralCallbackResult) => void
|
||||
|
||||
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
||||
export type ChooseFileCompleteCallback = (
|
||||
res : GeneralCallbackResult
|
||||
) => void
|
||||
|
||||
export type ChooseFileOption = {
|
||||
/**
|
||||
* 指定文件名,如果是多选就在后面增加上时间
|
||||
*/
|
||||
filename?: string
|
||||
/**
|
||||
* 最多可以选择的文件数量。
|
||||
* @defaultValue 100
|
||||
*/
|
||||
count ?: number | null,
|
||||
/**
|
||||
* 所选文件类型
|
||||
* @defaultValue all
|
||||
*/
|
||||
type ?: string | null,
|
||||
/**
|
||||
* 根据文件拓展名过滤,每一项都不能是空字符串。默认不过滤。仅H5支持
|
||||
*/
|
||||
extension ?: (string[]) | null,
|
||||
/**
|
||||
* 成功则返回图片的本地文件路径列表 tempFilePaths
|
||||
*/
|
||||
success ?: ChooseFileSuccessCallback | null,
|
||||
/**
|
||||
* 接口调用失败的回调函数
|
||||
*/
|
||||
fail ?: ChooseFileFailCallback | null,
|
||||
/**
|
||||
* 接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
*/
|
||||
complete ?: ChooseFileCompleteCallback | null
|
||||
}
|
||||
40
unpackage/dist/build/.tsc/app-android/uni_modules/lime-choose-file/utssdk/unierror.uts.ts
vendored
Normal file
40
unpackage/dist/build/.tsc/app-android/uni_modules/lime-choose-file/utssdk/unierror.uts.ts
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
// @ts-nocheck
|
||||
/* 此规范为 uni 规范,可以按照自己的需要选择是否实现 */
|
||||
import { ChooseFileErrorCode, GeneralCallbackResult } from "./interface.uts"
|
||||
/**
|
||||
* 错误主题
|
||||
* 注意:错误主题一般为插件名称,每个组件不同,需要使用时请更改。
|
||||
* [可选实现]
|
||||
*/
|
||||
export const UniErrorSubject = 'chooseFile"';
|
||||
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
* @UniError
|
||||
* [可选实现]
|
||||
*/
|
||||
export const UniErrors : Map<ChooseFileErrorCode, string> = new Map([
|
||||
/**
|
||||
* 错误码及对应的错误信息
|
||||
*/
|
||||
[9010001, 'chooseFile:ok'],
|
||||
[9010002, 'ChooseFile:failed'],
|
||||
]);
|
||||
|
||||
|
||||
/**
|
||||
* 错误对象实现
|
||||
*/
|
||||
export class GeneralCallbackResultImpl extends UniError implements GeneralCallbackResult {
|
||||
|
||||
/**
|
||||
* 错误对象构造函数
|
||||
*/
|
||||
constructor(errCode : ChooseFileErrorCode, errMsg: string|null = null) {
|
||||
super();
|
||||
this.errSubject = UniErrorSubject;
|
||||
this.errCode = errCode;
|
||||
this.errMsg = errMsg ?? UniErrors[errCode] ?? "";
|
||||
}
|
||||
}
|
||||
202
unpackage/dist/build/.uvue/app-android/uni_modules/lime-choose-file/utssdk/app-android/index.uts
vendored
Normal file
202
unpackage/dist/build/.uvue/app-android/uni_modules/lime-choose-file/utssdk/app-android/index.uts
vendored
Normal file
@@ -0,0 +1,202 @@
|
||||
// @ts-nocheck
|
||||
import Intent from 'android.content.Intent';
|
||||
import ClipData from 'android.content.ClipData';
|
||||
import Uri from 'android.net.Uri';
|
||||
import InputStream from 'java.io.InputStream';
|
||||
import OpenableColumns from 'android.provider.OpenableColumns';
|
||||
import Cursor from 'android.database.Cursor';
|
||||
import File from 'java.io.File';
|
||||
import FileInputStream from 'java.io.FileInputStream';
|
||||
import FileOutputStream from 'java.io.FileOutputStream';
|
||||
import BufferedOutputStream from 'java.io.BufferedOutputStream';
|
||||
import ByteArrayInputStream from 'java.io.ByteArrayInputStream';
|
||||
import { ChooseFileOption, ChooseFile, ChooseFileSuccessCallbackResult } from '../interface';
|
||||
import { GeneralCallbackResultImpl } from '../unierror';
|
||||
const REQUEST_CODE_CHOOSE_FILE: Int = 42;
|
||||
let resultFunction: ((requestCode: Int, resultCode: Int, data?: Intent) => void) | null = null;
|
||||
class ChooseFileImpl implements ChooseFile {
|
||||
override name: string = '';
|
||||
override path: string = '';
|
||||
// private _path : string = ''
|
||||
override size: number = 0;
|
||||
override time: number = 0;
|
||||
override type: string = 'file';
|
||||
// private uri : Uri
|
||||
private options: ChooseFileOption;
|
||||
constructor(uri: Uri, options: ChooseFileOption) {
|
||||
// this.uri = uri
|
||||
this.options = options;
|
||||
this.time = Date.now();
|
||||
this.type = this.getFileTypeFromUri(uri);
|
||||
// this._path = uri.getPath() ?? ''
|
||||
this.getFileInfoFromUri(uri);
|
||||
if (this.isCache(options)) {
|
||||
this.copyFileToCache(uri);
|
||||
}
|
||||
}
|
||||
private isCache(options: ChooseFileOption): boolean {
|
||||
const extension = this.getFileExtension(this.name);
|
||||
const extensions = options.extension;
|
||||
const type = options.type ?? 'all';
|
||||
const hasExtension = extensions != null && extension != '' && extensions.includes(extension);
|
||||
const isVideoOrImage = ['video', 'image'].includes(type);
|
||||
const isFileAndNotVideoOrImage = type == 'file' && !['video', 'image'].includes(this.type);
|
||||
if ((type == 'all' || isVideoOrImage || isFileAndNotVideoOrImage) && !hasExtension) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
private getFileExtension(fileName: string): string {
|
||||
const lastDotIndex = fileName.lastIndexOf(".");
|
||||
if (lastDotIndex == -1) {
|
||||
return "";
|
||||
}
|
||||
return fileName.substring(lastDotIndex + 1);
|
||||
}
|
||||
private copyFileToCache(uri: Uri) {
|
||||
const cacheDir = UTSAndroid.getAppCachePath();
|
||||
const context = UTSAndroid.getAppContext();
|
||||
if (cacheDir != null) {
|
||||
const path = new File(cacheDir);
|
||||
if (!path.exists()) {
|
||||
path.mkdir();
|
||||
}
|
||||
}
|
||||
let fileName = this.name;
|
||||
if (this.options.filename != null) {
|
||||
fileName = this.options.filename!;
|
||||
if (this.options.count != null && this.options.count! > 1) {
|
||||
fileName = `${fileName}_${Date.now()}`;
|
||||
}
|
||||
const extension = this.getFileExtension(this.name);
|
||||
fileName = `${fileName}.${extension}`;
|
||||
}
|
||||
const destFile = new File(cacheDir, fileName);
|
||||
try {
|
||||
const inputStream = context!.getContentResolver().openInputStream(uri);
|
||||
const outputStream = new FileOutputStream(destFile);
|
||||
if (inputStream != null) {
|
||||
let buffer = ByteArray(1024);
|
||||
let c = inputStream.read(buffer);
|
||||
while (c > 0) {
|
||||
outputStream.write(buffer, 0, c);
|
||||
c = inputStream.read(buffer);
|
||||
}
|
||||
}
|
||||
this.path = cacheDir + fileName; //this.name
|
||||
}
|
||||
catch (e: any) {
|
||||
}
|
||||
}
|
||||
private getFileTypeFromUri(uri: Uri): string {
|
||||
const context = UTSAndroid.getAppContext();
|
||||
let fileType = 'file';
|
||||
let mimeType = context!.getContentResolver().getType(uri);
|
||||
if (mimeType != null) {
|
||||
if (mimeType.startsWith("video")) {
|
||||
fileType = "video";
|
||||
}
|
||||
else if (mimeType.startsWith("image")) {
|
||||
fileType = "image";
|
||||
}
|
||||
}
|
||||
return fileType;
|
||||
}
|
||||
private getFileInfoFromUri(uri: Uri) {
|
||||
const context = UTSAndroid.getAppContext();
|
||||
let cursor = context!.getContentResolver().query(uri, null, null, null, null);
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
this.name = cursor.getString(cursor.getColumnIndexOrThrow(OpenableColumns.DISPLAY_NAME));
|
||||
const fileSize = cursor.getLong(cursor.getColumnIndexOrThrow(OpenableColumns.SIZE));
|
||||
this.size = Number.from(fileSize);
|
||||
cursor.close();
|
||||
}
|
||||
else if ("file".equals(uri.getScheme())) {
|
||||
this.name = uri.getLastPathSegment() ?? '';
|
||||
const file = new File(uri.getPath() ?? '');
|
||||
const fileSize = file.length();
|
||||
this.size = Number.from(fileSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
export function chooseFile(options: ChooseFileOption) {
|
||||
if (resultFunction != null) {
|
||||
UTSAndroid.offAppActivityResult(resultFunction!);
|
||||
}
|
||||
const type = options.type ?? 'all';
|
||||
const intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
if (type.equals("all") || type.equals("file")) {
|
||||
intent.setType("*/*");
|
||||
}
|
||||
else if (type.equals("video")) {
|
||||
intent.setType("video/*");
|
||||
}
|
||||
else if (type.equals("image")) {
|
||||
intent.setType("image/*");
|
||||
}
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, options.count == 1 ? false : true); // 允许多选
|
||||
resultFunction = (requestCode: Int, resultCode: Int, data?: Intent) => {
|
||||
if (requestCode == REQUEST_CODE_CHOOSE_FILE) {
|
||||
UTSAndroid.offAppActivityResult(resultFunction!);
|
||||
if (resultCode == -1 && data != null) {
|
||||
const clipData = data.getClipData();
|
||||
const tempFiles: ChooseFile[] = [];
|
||||
if (clipData != null) {
|
||||
// 多选
|
||||
// const itemCount = clipData.getItemCount();
|
||||
// if (options.count != null && options.count! > itemCount) {
|
||||
// const err = new GeneralCallbackResultImpl(9010002, `选中文件数量超过${options.count}`)
|
||||
// options.fail?.(err)
|
||||
// options.complete?.(err)
|
||||
// return
|
||||
// }
|
||||
for (let i = 0; i < clipData.getItemCount(); i++) {
|
||||
const uri = clipData.getItemAt(i.toInt()).getUri();
|
||||
const chooseFile = new ChooseFileImpl(uri, options);
|
||||
if (chooseFile.path != '') {
|
||||
tempFiles.push(chooseFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// 单选
|
||||
const uri = data.getData();
|
||||
if (uri != null) {
|
||||
const chooseFile = new ChooseFileImpl(uri, options);
|
||||
if (chooseFile.path != '') {
|
||||
tempFiles.push(chooseFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
const count = options.count ?? Integer.MAX_VALUE; // Number.MAX_VALUE
|
||||
if (tempFiles.length > 0 && count >= tempFiles.length) {
|
||||
options.success?.({
|
||||
tempFiles,
|
||||
errMsg: 'chooseFile:ok'
|
||||
} as ChooseFileSuccessCallbackResult);
|
||||
}
|
||||
else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件或文件超过设置数量`);
|
||||
options.fail?.(err);
|
||||
options.complete?.(err);
|
||||
}
|
||||
}
|
||||
else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件`);
|
||||
options.fail?.(err);
|
||||
options.complete?.(err);
|
||||
}
|
||||
}
|
||||
else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件`);
|
||||
options.fail?.(err);
|
||||
options.complete?.(err);
|
||||
}
|
||||
};
|
||||
UTSAndroid.onAppActivityResult(resultFunction!);
|
||||
UTSAndroid.getUniActivity()!.startActivityForResult(Intent.createChooser(intent, "选择文件"), REQUEST_CODE_CHOOSE_FILE);
|
||||
// UTSAndroid.getUniActivity()!.overridePendingTransition((10).toInt(), (0).toInt());
|
||||
}
|
||||
76
unpackage/dist/build/.uvue/app-android/uni_modules/lime-choose-file/utssdk/interface.uts
vendored
Normal file
76
unpackage/dist/build/.uvue/app-android/uni_modules/lime-choose-file/utssdk/interface.uts
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
// @ts-nocheck
|
||||
/**
|
||||
* 错误码
|
||||
* 根据uni错误码规范要求,建议错误码以90开头,以下是错误码示例:
|
||||
* - 9010001 错误信息1
|
||||
* - 9010002 错误信息2
|
||||
*/
|
||||
export type ChooseFileErrorCode = 9010001 | 9010002 | 1101001 | 1101002 | 1101003 | 1101004 | 1101005 | 1101006 | 1101007 | 1101008 | 1101009 | 1101010;
|
||||
/**
|
||||
* myApi 的错误回调参数
|
||||
*/
|
||||
export interface GeneralCallbackResult extends IUniError {
|
||||
errCode: ChooseFileErrorCode;
|
||||
}
|
||||
;
|
||||
/** 返回选择的文件的本地临时文件对象数组 */
|
||||
export interface ChooseFile {
|
||||
/** 选择的文件名称 */
|
||||
name: string;
|
||||
/** 本地临时文件路径 (本地路径) */
|
||||
path: string;
|
||||
/** 本地临时文件大小,单位 B */
|
||||
size: number;
|
||||
/** 选择的文件的会话发送时间,Unix时间戳,工具暂不支持此属性 */
|
||||
time: number;
|
||||
/** 选择的文件类型
|
||||
*
|
||||
* 可选值:
|
||||
* - 'video': 选择了视频文件;
|
||||
* - 'image': 选择了图片文件;
|
||||
* - 'file': 选择了除图片和视频的文件; */
|
||||
type: 'video' | 'image' | 'file' | 'all';
|
||||
}
|
||||
export type ChooseFileSuccessCallbackResult = {
|
||||
/** 返回选择的文件的本地临时文件对象数组 */
|
||||
tempFiles: ChooseFile[];
|
||||
errMsg: string;
|
||||
};
|
||||
/** 接口调用成功的回调函数 */
|
||||
export type ChooseFileSuccessCallback = (result: ChooseFileSuccessCallbackResult) => void;
|
||||
/** 接口调用失败的回调函数 */
|
||||
export type ChooseFileFailCallback = (res: GeneralCallbackResult) => void;
|
||||
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
||||
export type ChooseFileCompleteCallback = (res: GeneralCallbackResult) => void;
|
||||
export type ChooseFileOption = {
|
||||
/**
|
||||
* 指定文件名,如果是多选就在后面增加上时间
|
||||
*/
|
||||
filename?: string;
|
||||
/**
|
||||
* 最多可以选择的文件数量。
|
||||
* @defaultValue 100
|
||||
*/
|
||||
count?: number | null;
|
||||
/**
|
||||
* 所选文件类型
|
||||
* @defaultValue all
|
||||
*/
|
||||
type?: string | null;
|
||||
/**
|
||||
* 根据文件拓展名过滤,每一项都不能是空字符串。默认不过滤。仅H5支持
|
||||
*/
|
||||
extension?: (string[]) | null;
|
||||
/**
|
||||
* 成功则返回图片的本地文件路径列表 tempFilePaths
|
||||
*/
|
||||
success?: ChooseFileSuccessCallback | null;
|
||||
/**
|
||||
* 接口调用失败的回调函数
|
||||
*/
|
||||
fail?: ChooseFileFailCallback | null;
|
||||
/**
|
||||
* 接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
*/
|
||||
complete?: ChooseFileCompleteCallback | null;
|
||||
};
|
||||
35
unpackage/dist/build/.uvue/app-android/uni_modules/lime-choose-file/utssdk/unierror.uts
vendored
Normal file
35
unpackage/dist/build/.uvue/app-android/uni_modules/lime-choose-file/utssdk/unierror.uts
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
// @ts-nocheck
|
||||
/* 此规范为 uni 规范,可以按照自己的需要选择是否实现 */
|
||||
import { ChooseFileErrorCode, GeneralCallbackResult } from "./interface.uts";
|
||||
/**
|
||||
* 错误主题
|
||||
* 注意:错误主题一般为插件名称,每个组件不同,需要使用时请更改。
|
||||
* [可选实现]
|
||||
*/
|
||||
export const UniErrorSubject = 'chooseFile"';
|
||||
/**
|
||||
* 错误信息
|
||||
* @UniError
|
||||
* [可选实现]
|
||||
*/
|
||||
export const UniErrors: Map<ChooseFileErrorCode, string> = new Map([
|
||||
/**
|
||||
* 错误码及对应的错误信息
|
||||
*/
|
||||
[9010001, 'chooseFile:ok'],
|
||||
[9010002, 'ChooseFile:failed'],
|
||||
]);
|
||||
/**
|
||||
* 错误对象实现
|
||||
*/
|
||||
export class GeneralCallbackResultImpl extends UniError implements GeneralCallbackResult {
|
||||
/**
|
||||
* 错误对象构造函数
|
||||
*/
|
||||
constructor(errCode: ChooseFileErrorCode, errMsg: string | null = null) {
|
||||
super();
|
||||
this.errSubject = UniErrorSubject;
|
||||
this.errCode = errCode;
|
||||
this.errMsg = errMsg ?? UniErrors[errCode] ?? "";
|
||||
}
|
||||
}
|
||||
16
unpackage/dist/build/app-plus/__uniappautomator.js
vendored
Normal file
16
unpackage/dist/build/app-plus/__uniappautomator.js
vendored
Normal file
File diff suppressed because one or more lines are too long
32
unpackage/dist/build/app-plus/__uniappchooselocation.js
vendored
Normal file
32
unpackage/dist/build/app-plus/__uniappchooselocation.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
unpackage/dist/build/app-plus/__uniapperror.png
vendored
Normal file
BIN
unpackage/dist/build/app-plus/__uniapperror.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
32
unpackage/dist/build/app-plus/__uniappopenlocation.js
vendored
Normal file
32
unpackage/dist/build/app-plus/__uniappopenlocation.js
vendored
Normal file
File diff suppressed because one or more lines are too long
33
unpackage/dist/build/app-plus/__uniapppicker.js
vendored
Normal file
33
unpackage/dist/build/app-plus/__uniapppicker.js
vendored
Normal file
File diff suppressed because one or more lines are too long
8
unpackage/dist/build/app-plus/__uniappquill.js
vendored
Normal file
8
unpackage/dist/build/app-plus/__uniappquill.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
unpackage/dist/build/app-plus/__uniappquillimageresize.js
vendored
Normal file
1
unpackage/dist/build/app-plus/__uniappquillimageresize.js
vendored
Normal file
File diff suppressed because one or more lines are too long
32
unpackage/dist/build/app-plus/__uniappscan.js
vendored
Normal file
32
unpackage/dist/build/app-plus/__uniappscan.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
unpackage/dist/build/app-plus/__uniappsuccess.png
vendored
Normal file
BIN
unpackage/dist/build/app-plus/__uniappsuccess.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
24
unpackage/dist/build/app-plus/__uniappview.html
vendored
Normal file
24
unpackage/dist/build/app-plus/__uniappview.html
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>View</title>
|
||||
<link rel="icon" href="data:,">
|
||||
<link rel="stylesheet" href="app.css" />
|
||||
<script>var __uniConfig = {"globalStyle":{},"darkmode":false}</script>
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="uni-app-view.umd.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
11
unpackage/dist/build/app-plus/app-config-service.js
vendored
Normal file
11
unpackage/dist/build/app-plus/app-config-service.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
;(function(){
|
||||
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
|
||||
const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","navigationBar":{"backgroundColor":"#F8F8F8","titleText":"uni-app","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"test1","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"5.07","entryPagePath":"pages/Login/Login","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
|
||||
const __uniRoutes = [{"path":"pages/Login/Login","meta":{"isQuit":true,"isEntry":true,"titleNView":false,"bounce":"none","softinputMode":"adjustResize","navigationBar":{"titleText":"登录页面","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/Chat/Chat","meta":{"titleNView":false,"bounce":"none","softinputMode":"adjustResize","navigationBar":{"titleText":"聊天页面(主页面)","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/WorkSpace/WorkSpace","meta":{"titleNView":false,"bounce":"none","softinputMode":"adjustResize","navigationBar":{"titleText":"工作区文件管理","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/UserProfileModal/UserProfileModal","meta":{"titleNView":false,"bounce":"none","softinputMode":"adjustResize","navigationBar":{"titleText":"","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/ContactPages/ContactPages","meta":{"titleNView":false,"bounce":"none","softinputMode":"adjustResize","navigationBar":{"titleText":"","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/WorkSpace/TemplateSpace/TemplateSpace","meta":{"titleNView":false,"bounce":"none","softinputMode":"adjustResize","navigationBar":{"titleText":"","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/text/text","meta":{"navigationBar":{"titleText":"","type":"default"},"isNVue":false}},{"path":"pages/text/text2","meta":{"navigationBar":{"type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
||||
__uniConfig.styles=[];//styles
|
||||
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:16})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:u,window:u,document:u,frames:u,self:u,location:u,navigator:u,localStorage:u,history:u,Caches:u,screen:u,alert:u,confirm:u,prompt:u,fetch:u,XMLHttpRequest:u,WebSocket:u,webkit:u,print:u}}}});
|
||||
})();
|
||||
|
||||
1
unpackage/dist/build/app-plus/app-config.js
vendored
Normal file
1
unpackage/dist/build/app-plus/app-config.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(function(){})();
|
||||
7
unpackage/dist/build/app-plus/app-service.js
vendored
Normal file
7
unpackage/dist/build/app-plus/app-service.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
unpackage/dist/build/app-plus/app.css
vendored
Normal file
3
unpackage/dist/build/app-plus/app.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
unpackage/dist/build/app-plus/assets/uniicons.32e978a5.ttf
vendored
Normal file
BIN
unpackage/dist/build/app-plus/assets/uniicons.32e978a5.ttf
vendored
Normal file
Binary file not shown.
112
unpackage/dist/build/app-plus/manifest.json
vendored
Normal file
112
unpackage/dist/build/app-plus/manifest.json
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
{
|
||||
"@platforms": [
|
||||
"android",
|
||||
"iPhone",
|
||||
"iPad"
|
||||
],
|
||||
"id": "__UNI__923FD9E",
|
||||
"name": "test1",
|
||||
"version": {
|
||||
"name": "1.0.0",
|
||||
"code": "1"
|
||||
},
|
||||
"description": "",
|
||||
"developer": {
|
||||
"name": "",
|
||||
"email": "",
|
||||
"url": ""
|
||||
},
|
||||
"permissions": {
|
||||
"UniNView": {
|
||||
"description": "UniNView原生渲染"
|
||||
}
|
||||
},
|
||||
"plus": {
|
||||
"useragent": {
|
||||
"value": "uni-app",
|
||||
"concatenate": true
|
||||
},
|
||||
"splashscreen": {
|
||||
"target": "id:1",
|
||||
"autoclose": true,
|
||||
"waiting": true,
|
||||
"delay": 0
|
||||
},
|
||||
"popGesture": "close",
|
||||
"launchwebview": {
|
||||
"render": "always",
|
||||
"id": "1",
|
||||
"kernel": "WKWebview"
|
||||
},
|
||||
"compatible": {
|
||||
"ignoreVersion": true
|
||||
},
|
||||
"usingComponents": true,
|
||||
"nvueStyleCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"distribute": {
|
||||
"google": {
|
||||
"permissions": [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
"apple": {
|
||||
"dSYMs": false
|
||||
},
|
||||
"plugins": {
|
||||
"audio": {
|
||||
"mp3": {
|
||||
"description": "Android平台录音支持MP3格式文件"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"statusbar": {
|
||||
"immersed": "supportedDevice",
|
||||
"style": "dark",
|
||||
"background": "#F8F8F8"
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
},
|
||||
"allowsInlineMediaPlayback": true,
|
||||
"uni-app": {
|
||||
"control": "uni-v3",
|
||||
"vueVersion": "3",
|
||||
"compilerVersion": "5.07",
|
||||
"nvueCompiler": "uni-app",
|
||||
"renderer": "auto",
|
||||
"nvue": {
|
||||
"flex-direction": "column"
|
||||
},
|
||||
"nvueLaunchMode": "normal",
|
||||
"webView": {
|
||||
"minUserAgentVersion": "49.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"app-harmony": {
|
||||
"useragent": {
|
||||
"value": "uni-app",
|
||||
"concatenate": true
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
}
|
||||
},
|
||||
"launch_path": "__uniappview.html"
|
||||
}
|
||||
1
unpackage/dist/build/app-plus/pages/Chat/Chat.css
vendored
Normal file
1
unpackage/dist/build/app-plus/pages/Chat/Chat.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
unpackage/dist/build/app-plus/pages/ContactPages/ContactPages.css
vendored
Normal file
1
unpackage/dist/build/app-plus/pages/ContactPages/ContactPages.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
unpackage/dist/build/app-plus/pages/Login/Login.css
vendored
Normal file
1
unpackage/dist/build/app-plus/pages/Login/Login.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.login-container[data-v-d4b9d5ac]{padding:4.375rem 1.875rem 3.125rem;box-sizing:border-box;display:flex;flex-direction:column}.login-card[data-v-d4b9d5ac]{position:relative;flex:1;width:100%;height:100%;padding:.625rem;box-sizing:border-box;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center}.conner[data-v-d4b9d5ac]{position:absolute;width:1.25rem;height:1.25rem}.conner-tl[data-v-d4b9d5ac]{top:0;left:0;border-top:2px solid #aaaaff;border-left:2px solid #aaaaff}.conner-tr[data-v-d4b9d5ac]{top:0;right:0;border-top:2px solid #aaaaff;border-right:2px solid #aaaaff}.conner-bl[data-v-d4b9d5ac]{bottom:0;left:0;border-bottom:2px solid #aaaaff;border-left:2px solid #aaaaff}.conner-br[data-v-d4b9d5ac]{bottom:0;right:0;border-bottom:2px solid #aaaaff;border-right:2px solid #aaaaff}.login-header[data-v-d4b9d5ac]{display:flex;justify-content:center;align-items:center;flex-direction:column}.login-header-logo[data-v-d4b9d5ac]{display:flex;justify-content:center;align-items:center}.login-header-logo uni-text[data-v-d4b9d5ac]{margin-left:.25rem;font-size:1.875rem;font-weight:700;color:#aaf;text-shadow:0 0 .3125rem rgba(170,170,255,.4),0 0 .625rem rgba(170,170,255,.3)}.icon-wrapper[data-v-d4b9d5ac]{width:2.8125rem;height:2.8125rem;border-radius:50%;background-color:#fff;display:flex;align-items:center;justify-content:center;animation:glow-d4b9d5ac 2s ease-in-out infinite}@keyframes glow-d4b9d5ac{0%,to{box-shadow:0 0 .625rem rgba(170,170,255,.3)}50%{box-shadow:0 0 .625rem rgba(170,170,255,.4),0 0 .9375rem rgba(170,170,255,.3),0 0 1.5625rem rgba(170,170,255,.2)}}.icon-wrapper .danao-style[data-v-d4b9d5ac]{font-size:2.1875rem;color:#aaf}.sub-title[data-v-d4b9d5ac]{margin-top:.625rem;font-size:1.125rem;font-weight:500;color:#666;text-shadow:0 0 .3125rem #999}.form-wrapper[data-v-d4b9d5ac]{margin-top:1.5625rem;width:15.625rem;padding:2.5rem .9375rem;background-color:rgba(170,170,255,.05);border-radius:.625rem;box-shadow:0 0 .3125rem rgba(170,170,255,.5);display:flex;flex-direction:column}.form-item[data-v-d4b9d5ac]{margin-top:.625rem}.form-item .form-input[data-v-d4b9d5ac]{width:100%;height:2.5rem;padding:0 10px;box-sizing:border-box;border-radius:.9375rem;border:.03125rem solid #e5e5e5}.form-item .focused[data-v-d4b9d5ac]{border-color:#aaf;box-shadow:0 0 .3125rem rgba(170,170,255,.5)}.form-item .error[data-v-d4b9d5ac]{border-color:red;box-shadow:0 0 .3125rem rgba(255,0,0,.5)}.error-info[data-v-d4b9d5ac]{font-size:.75rem;color:red}.form-option[data-v-d4b9d5ac]{margin-top:.3125rem;display:flex;justify-content:space-between}.form-option .checkbox-wrapper[data-v-d4b9d5ac]{display:flex;justify-content:start;align-items:center}.form-option .checkbox-wrapper .checkbox[data-v-d4b9d5ac]{width:.9375rem;height:.9375rem;border:.03125rem solid #666;display:flex;justify-content:center;align-items:center}.form-option .checkbox-wrapper .checked[data-v-d4b9d5ac]{background-color:#aaf}.form-option .checkbox-wrapper .checkbox uni-text[data-v-d4b9d5ac]{color:#fff}[data-v-d4b9d5ac] .login-btn{margin-top:.9375rem;width:15.625rem;height:3.125rem;border-radius:2.5rem;background:linear-gradient(to right,#aaf,#2969ed)}
|
||||
1
unpackage/dist/build/app-plus/pages/UserProfileModal/UserProfileModal.css
vendored
Normal file
1
unpackage/dist/build/app-plus/pages/UserProfileModal/UserProfileModal.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
unpackage/dist/build/app-plus/pages/WorkSpace/TemplateSpace/TemplateSpace.css
vendored
Normal file
1
unpackage/dist/build/app-plus/pages/WorkSpace/TemplateSpace/TemplateSpace.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
unpackage/dist/build/app-plus/pages/WorkSpace/WorkSpace.css
vendored
Normal file
1
unpackage/dist/build/app-plus/pages/WorkSpace/WorkSpace.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
unpackage/dist/build/app-plus/pages/text/text2.css
vendored
Normal file
1
unpackage/dist/build/app-plus/pages/text/text2.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.container[data-v-939e1d1d]{padding:.625rem;background-color:#f5f5f5;min-height:100vh}.status-card[data-v-939e1d1d],.config-card[data-v-939e1d1d],.control-card[data-v-939e1d1d],.send-card[data-v-939e1d1d],.log-card[data-v-939e1d1d]{background-color:#fff;border-radius:.5rem;padding:.9375rem;margin-bottom:.625rem;box-shadow:0 .0625rem .25rem rgba(0,0,0,.05)}.status-label[data-v-939e1d1d]{font-size:.875rem;color:#666;margin-bottom:.5rem}.status-value[data-v-939e1d1d]{display:inline-block;padding:.375rem 1rem;border-radius:.25rem;font-size:.875rem;font-weight:500}.status-connected[data-v-939e1d1d]{background-color:#e6f7e6;color:#52c41a}.status-connecting[data-v-939e1d1d]{background-color:#fff7e6;color:#faad14}.status-disconnected[data-v-939e1d1d]{background-color:#f5f5f5;color:#999}.status-error[data-v-939e1d1d]{background-color:#fff1f0;color:#ff4d4f}.status-info[data-v-939e1d1d]{margin-top:.5rem}.reconnect-info[data-v-939e1d1d]{font-size:.75rem;color:#faad14}.section-title[data-v-939e1d1d]{font-size:1rem;font-weight:600;color:#333;margin-bottom:.75rem;display:block}.input-group[data-v-939e1d1d]{margin-bottom:.75rem}.input-label[data-v-939e1d1d]{font-size:.875rem;color:#666;margin-bottom:.375rem;display:block}.input-field[data-v-939e1d1d]{border:.0625rem solid #e8e8e8;border-radius:.25rem;padding:.625rem;font-size:.875rem;background-color:#fafafa}.control-card[data-v-939e1d1d]{display:flex;gap:.625rem}.btn[data-v-939e1d1d]{flex:1;height:2.75rem;line-height:2.75rem;border-radius:.375rem;font-size:1rem;text-align:center;border:none}.btn-primary[data-v-939e1d1d]{background-color:#1890ff;color:#fff}.btn-danger[data-v-939e1d1d]{background-color:#ff4d4f;color:#fff}.btn-secondary[data-v-939e1d1d]{background-color:#f0f0f0;color:#666}.btn-outline[data-v-939e1d1d]{background-color:transparent;color:#1890ff;border:.0625rem solid #1890ff}.btn-small[data-v-939e1d1d]{height:2rem;line-height:2rem;font-size:.8125rem;padding:0 .75rem}.btn[disabled][data-v-939e1d1d]{opacity:.5}.send-input-wrapper[data-v-939e1d1d]{display:flex;flex-direction:column;gap:.625rem}.send-input[data-v-939e1d1d]{border:.0625rem solid #e8e8e8;border-radius:.25rem;padding:.625rem;font-size:.875rem;min-height:5rem;background-color:#fafafa;box-sizing:border-box}.send-buttons[data-v-939e1d1d]{display:flex;gap:.625rem}.quick-messages[data-v-939e1d1d]{margin-top:.75rem;padding-top:.75rem;border-top:.0625rem solid #f0f0f0}.quick-label[data-v-939e1d1d]{font-size:.8125rem;color:#999;margin-bottom:.5rem;display:block}.quick-btns[data-v-939e1d1d]{display:flex;flex-wrap:wrap;gap:.5rem}.quick-btn[data-v-939e1d1d]{padding:.375rem .75rem;background-color:#f0f5ff;color:#1890ff;border-radius:.25rem;font-size:.8125rem;border:none}.quick-btn[disabled][data-v-939e1d1d]{opacity:.5}.log-header[data-v-939e1d1d]{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.log-title-wrapper[data-v-939e1d1d]{display:flex;align-items:center;gap:.375rem}.log-title-wrapper .section-title[data-v-939e1d1d]{margin-bottom:0}.log-count[data-v-939e1d1d]{font-size:.75rem;color:#999}.log-actions[data-v-939e1d1d]{display:flex;gap:.375rem}.log-list[data-v-939e1d1d]{max-height:15.625rem;background-color:#1e1e1e;border-radius:.25rem;padding:.625rem}.log-item[data-v-939e1d1d]{display:flex;margin-bottom:.375rem;font-family:Courier New,monospace;font-size:.75rem;line-height:1.6}.log-time[data-v-939e1d1d]{color:#888;margin-right:.5rem;flex-shrink:0}.log-content[data-v-939e1d1d]{word-break:break-all;flex:1;color:#fff}.log-info .log-content[data-v-939e1d1d]{color:#fff}.log-success .log-content[data-v-939e1d1d]{color:#52c41a}.log-error .log-content[data-v-939e1d1d]{color:#ff4d4f}.log-warn .log-content[data-v-939e1d1d]{color:#faad14}.log-send .log-content[data-v-939e1d1d]{color:#1890ff}.log-receive .log-content[data-v-939e1d1d]{color:#52c41a}
|
||||
539
unpackage/dist/build/app-plus/static/iconfont/demo.css
vendored
Normal file
539
unpackage/dist/build/app-plus/static/iconfont/demo.css
vendored
Normal file
@@ -0,0 +1,539 @@
|
||||
/* Logo 字体 */
|
||||
@font-face {
|
||||
font-family: "iconfont logo";
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-family: "iconfont logo";
|
||||
font-size: 160px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* tabs */
|
||||
.nav-tabs {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nav-tabs .nav-more {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#tabs {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
#tabs li {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
border-bottom: 2px solid transparent;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-bottom: -1px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
|
||||
#tabs .active {
|
||||
border-bottom-color: #f00;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.tab-container .content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 页面布局 */
|
||||
.main {
|
||||
padding: 30px 100px;
|
||||
width: 960px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.main .logo {
|
||||
color: #333;
|
||||
text-align: left;
|
||||
margin-bottom: 30px;
|
||||
line-height: 1;
|
||||
height: 110px;
|
||||
margin-top: -50px;
|
||||
overflow: hidden;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.main .logo a {
|
||||
font-size: 160px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.helps {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.helps pre {
|
||||
padding: 20px;
|
||||
margin: 10px 0;
|
||||
border: solid 1px #e7e1cd;
|
||||
background-color: #fffdef;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.icon_lists {
|
||||
width: 100% !important;
|
||||
overflow: hidden;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.icon_lists li {
|
||||
width: 100px;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 20px;
|
||||
text-align: center;
|
||||
list-style: none !important;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.icon_lists li .code-name {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.icon_lists .icon {
|
||||
display: block;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
font-size: 42px;
|
||||
margin: 10px auto;
|
||||
color: #333;
|
||||
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
|
||||
-moz-transition: font-size 0.25s linear, width 0.25s linear;
|
||||
transition: font-size 0.25s linear, width 0.25s linear;
|
||||
}
|
||||
|
||||
.icon_lists .icon:hover {
|
||||
font-size: 100px;
|
||||
}
|
||||
|
||||
.icon_lists .svg-icon {
|
||||
/* 通过设置 font-size 来改变图标大小 */
|
||||
width: 1em;
|
||||
/* 图标和文字相邻时,垂直对齐 */
|
||||
vertical-align: -0.15em;
|
||||
/* 通过设置 color 来改变 SVG 的颜色/fill */
|
||||
fill: currentColor;
|
||||
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
|
||||
normalize.css 中也包含这行 */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.icon_lists li .name,
|
||||
.icon_lists li .code-name {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* markdown 样式 */
|
||||
.markdown {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.markdown img {
|
||||
vertical-align: middle;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.markdown h1 {
|
||||
color: #404040;
|
||||
font-weight: 500;
|
||||
line-height: 40px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.markdown h2,
|
||||
.markdown h3,
|
||||
.markdown h4,
|
||||
.markdown h5,
|
||||
.markdown h6 {
|
||||
color: #404040;
|
||||
margin: 1.6em 0 0.6em 0;
|
||||
font-weight: 500;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.markdown h1 {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.markdown h2 {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.markdown h3 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.markdown h4 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.markdown h5 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown h6 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown hr {
|
||||
height: 1px;
|
||||
border: 0;
|
||||
background: #e9e9e9;
|
||||
margin: 16px 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.markdown p {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.markdown>p,
|
||||
.markdown>blockquote,
|
||||
.markdown>.highlight,
|
||||
.markdown>ol,
|
||||
.markdown>ul {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.markdown ul>li {
|
||||
list-style: circle;
|
||||
}
|
||||
|
||||
.markdown>ul li,
|
||||
.markdown blockquote ul>li {
|
||||
margin-left: 20px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.markdown>ul li p,
|
||||
.markdown>ol li p {
|
||||
margin: 0.6em 0;
|
||||
}
|
||||
|
||||
.markdown ol>li {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
.markdown>ol li,
|
||||
.markdown blockquote ol>li {
|
||||
margin-left: 20px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.markdown code {
|
||||
margin: 0 3px;
|
||||
padding: 0 5px;
|
||||
background: #eee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.markdown strong,
|
||||
.markdown b {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown>table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0px;
|
||||
empty-cells: show;
|
||||
border: 1px solid #e9e9e9;
|
||||
width: 95%;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.markdown>table th {
|
||||
white-space: nowrap;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown>table th,
|
||||
.markdown>table td {
|
||||
border: 1px solid #e9e9e9;
|
||||
padding: 8px 16px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.markdown>table th {
|
||||
background: #F7F7F7;
|
||||
}
|
||||
|
||||
.markdown blockquote {
|
||||
font-size: 90%;
|
||||
color: #999;
|
||||
border-left: 4px solid #e9e9e9;
|
||||
padding-left: 0.8em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.markdown blockquote p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.markdown .anchor {
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.markdown .waiting {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.markdown h1:hover .anchor,
|
||||
.markdown h2:hover .anchor,
|
||||
.markdown h3:hover .anchor,
|
||||
.markdown h4:hover .anchor,
|
||||
.markdown h5:hover .anchor,
|
||||
.markdown h6:hover .anchor {
|
||||
opacity: 1;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.markdown>br,
|
||||
.markdown>p>br {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
background: white;
|
||||
padding: 0.5em;
|
||||
color: #333333;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-meta {
|
||||
color: #969896;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-strong,
|
||||
.hljs-emphasis,
|
||||
.hljs-quote {
|
||||
color: #df5000;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-type {
|
||||
color: #a71d5d;
|
||||
}
|
||||
|
||||
.hljs-literal,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-attribute {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-name {
|
||||
color: #63a35c;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-attr,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #795da3;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
color: #55a532;
|
||||
background-color: #eaffea;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
color: #bd2c00;
|
||||
background-color: #ffecec;
|
||||
}
|
||||
|
||||
.hljs-link {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* 代码高亮 */
|
||||
/* PrismJS 1.15.0
|
||||
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
|
||||
/**
|
||||
* prism.js default theme for JavaScript, CSS and HTML
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
* @author Lea Verou
|
||||
*/
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: black;
|
||||
background: none;
|
||||
text-shadow: 0 1px white;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre)>code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #f5f2f0;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre)>code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: slategray;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #905;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #690;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #9a6e3a;
|
||||
background: hsla(0, 0%, 100%, .5);
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #07a;
|
||||
}
|
||||
|
||||
.token.function,
|
||||
.token.class-name {
|
||||
color: #DD4A68;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: #e90;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
1035
unpackage/dist/build/app-plus/static/iconfont/demo_index.html
vendored
Normal file
1035
unpackage/dist/build/app-plus/static/iconfont/demo_index.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
161
unpackage/dist/build/app-plus/static/iconfont/iconfont.css
vendored
Normal file
161
unpackage/dist/build/app-plus/static/iconfont/iconfont.css
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id */
|
||||
src: url('iconfont.ttf?t=1776936195904') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-del:before {
|
||||
content: "\e616";
|
||||
}
|
||||
|
||||
.icon-zhaoxiangji:before {
|
||||
content: "\e663";
|
||||
}
|
||||
|
||||
.icon-duoxuan:before {
|
||||
content: "\e630";
|
||||
}
|
||||
|
||||
.icon-jia:before {
|
||||
content: "\e659";
|
||||
}
|
||||
|
||||
.icon-quxiao:before {
|
||||
content: "\e625";
|
||||
}
|
||||
|
||||
.icon-tuichu:before {
|
||||
content: "\e617";
|
||||
}
|
||||
|
||||
.icon-fuzhi:before {
|
||||
content: "\e6e6";
|
||||
}
|
||||
|
||||
.icon-shangchuan:before {
|
||||
content: "\e797";
|
||||
}
|
||||
|
||||
.icon-total_selection:before {
|
||||
content: "\e660";
|
||||
}
|
||||
|
||||
.icon-tingzhi:before {
|
||||
content: "\e611";
|
||||
}
|
||||
|
||||
.icon-wenjianjia:before {
|
||||
content: "\e64b";
|
||||
}
|
||||
|
||||
.icon-caidan:before {
|
||||
content: "\eaf1";
|
||||
}
|
||||
|
||||
.icon-wenjian:before {
|
||||
content: "\e729";
|
||||
}
|
||||
|
||||
.icon-biezhen:before {
|
||||
content: "\e647";
|
||||
}
|
||||
|
||||
.icon-bianji:before {
|
||||
content: "\e605";
|
||||
}
|
||||
|
||||
.icon-fasong:before {
|
||||
content: "\e705";
|
||||
}
|
||||
|
||||
.icon-download:before {
|
||||
content: "\e61a";
|
||||
}
|
||||
|
||||
.icon-edit-fill:before {
|
||||
content: "\e61d";
|
||||
}
|
||||
|
||||
.icon-favorite-fill:before {
|
||||
content: "\e61f";
|
||||
}
|
||||
|
||||
.icon-favorite:before {
|
||||
content: "\e620";
|
||||
}
|
||||
|
||||
.icon-upload:before {
|
||||
content: "\e63e";
|
||||
}
|
||||
|
||||
.icon-yonghuziliao:before {
|
||||
content: "\e6a1";
|
||||
}
|
||||
|
||||
.icon-pen-fill:before {
|
||||
content: "\e667";
|
||||
}
|
||||
|
||||
.icon-qunliao:before {
|
||||
content: "\e606";
|
||||
}
|
||||
|
||||
.icon-shipintonghua:before {
|
||||
content: "\e609";
|
||||
}
|
||||
|
||||
.icon-tianjia:before {
|
||||
content: "\e60d";
|
||||
}
|
||||
|
||||
.icon-tongxunlu:before {
|
||||
content: "\e612";
|
||||
}
|
||||
|
||||
.icon-tianjiahaoyou:before {
|
||||
content: "\e613";
|
||||
}
|
||||
|
||||
.icon-shanchu:before {
|
||||
content: "\e6d3";
|
||||
}
|
||||
|
||||
.icon-choose-fill:before {
|
||||
content: "\e6a2";
|
||||
}
|
||||
|
||||
.icon-a-wenjianjiawenjian:before {
|
||||
content: "\e69e";
|
||||
}
|
||||
|
||||
.icon-sousuo:before {
|
||||
content: "\e6eb";
|
||||
}
|
||||
|
||||
.icon-Robot:before {
|
||||
content: "\e661";
|
||||
}
|
||||
|
||||
.icon-saochu:before {
|
||||
content: "\e6a3";
|
||||
}
|
||||
|
||||
.icon-fanhui:before {
|
||||
content: "\e765";
|
||||
}
|
||||
|
||||
.icon-brain-2-fill:before {
|
||||
content: "\e800";
|
||||
}
|
||||
|
||||
.icon-gengduo:before {
|
||||
content: "\e6c5";
|
||||
}
|
||||
|
||||
1
unpackage/dist/build/app-plus/static/iconfont/iconfont.js
vendored
Normal file
1
unpackage/dist/build/app-plus/static/iconfont/iconfont.js
vendored
Normal file
File diff suppressed because one or more lines are too long
268
unpackage/dist/build/app-plus/static/iconfont/iconfont.json
vendored
Normal file
268
unpackage/dist/build/app-plus/static/iconfont/iconfont.json
vendored
Normal file
@@ -0,0 +1,268 @@
|
||||
{
|
||||
"id": "",
|
||||
"name": "",
|
||||
"font_family": "iconfont",
|
||||
"css_prefix_text": "icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "109713",
|
||||
"name": "垃圾桶",
|
||||
"font_class": "del",
|
||||
"unicode": "e616",
|
||||
"unicode_decimal": 58902
|
||||
},
|
||||
{
|
||||
"icon_id": "630128",
|
||||
"name": "照相机",
|
||||
"font_class": "zhaoxiangji",
|
||||
"unicode": "e663",
|
||||
"unicode_decimal": 58979
|
||||
},
|
||||
{
|
||||
"icon_id": "695132",
|
||||
"name": "多选",
|
||||
"font_class": "duoxuan",
|
||||
"unicode": "e630",
|
||||
"unicode_decimal": 58928
|
||||
},
|
||||
{
|
||||
"icon_id": "947061",
|
||||
"name": "加",
|
||||
"font_class": "jia",
|
||||
"unicode": "e659",
|
||||
"unicode_decimal": 58969
|
||||
},
|
||||
{
|
||||
"icon_id": "954218",
|
||||
"name": "取消",
|
||||
"font_class": "quxiao",
|
||||
"unicode": "e625",
|
||||
"unicode_decimal": 58917
|
||||
},
|
||||
{
|
||||
"icon_id": "1348254",
|
||||
"name": "退出",
|
||||
"font_class": "tuichu",
|
||||
"unicode": "e617",
|
||||
"unicode_decimal": 58903
|
||||
},
|
||||
{
|
||||
"icon_id": "2733945",
|
||||
"name": "复制",
|
||||
"font_class": "fuzhi",
|
||||
"unicode": "e6e6",
|
||||
"unicode_decimal": 59110
|
||||
},
|
||||
{
|
||||
"icon_id": "4294108",
|
||||
"name": "上传",
|
||||
"font_class": "shangchuan",
|
||||
"unicode": "e797",
|
||||
"unicode_decimal": 59287
|
||||
},
|
||||
{
|
||||
"icon_id": "4922119",
|
||||
"name": "全选",
|
||||
"font_class": "total_selection",
|
||||
"unicode": "e660",
|
||||
"unicode_decimal": 58976
|
||||
},
|
||||
{
|
||||
"icon_id": "4955291",
|
||||
"name": "停止",
|
||||
"font_class": "tingzhi",
|
||||
"unicode": "e611",
|
||||
"unicode_decimal": 58897
|
||||
},
|
||||
{
|
||||
"icon_id": "5121520",
|
||||
"name": "文件夹",
|
||||
"font_class": "wenjianjia",
|
||||
"unicode": "e64b",
|
||||
"unicode_decimal": 58955
|
||||
},
|
||||
{
|
||||
"icon_id": "5387521",
|
||||
"name": "菜单",
|
||||
"font_class": "caidan",
|
||||
"unicode": "eaf1",
|
||||
"unicode_decimal": 60145
|
||||
},
|
||||
{
|
||||
"icon_id": "5672455",
|
||||
"name": "文件",
|
||||
"font_class": "wenjian",
|
||||
"unicode": "e729",
|
||||
"unicode_decimal": 59177
|
||||
},
|
||||
{
|
||||
"icon_id": "6246289",
|
||||
"name": "别针",
|
||||
"font_class": "biezhen",
|
||||
"unicode": "e647",
|
||||
"unicode_decimal": 58951
|
||||
},
|
||||
{
|
||||
"icon_id": "7515699",
|
||||
"name": "编辑",
|
||||
"font_class": "bianji",
|
||||
"unicode": "e605",
|
||||
"unicode_decimal": 58885
|
||||
},
|
||||
{
|
||||
"icon_id": "8440993",
|
||||
"name": "发送",
|
||||
"font_class": "fasong",
|
||||
"unicode": "e705",
|
||||
"unicode_decimal": 59141
|
||||
},
|
||||
{
|
||||
"icon_id": "9512543",
|
||||
"name": "下载",
|
||||
"font_class": "download",
|
||||
"unicode": "e61a",
|
||||
"unicode_decimal": 58906
|
||||
},
|
||||
{
|
||||
"icon_id": "9512544",
|
||||
"name": "编辑",
|
||||
"font_class": "edit-fill",
|
||||
"unicode": "e61d",
|
||||
"unicode_decimal": 58909
|
||||
},
|
||||
{
|
||||
"icon_id": "9512556",
|
||||
"name": "收藏",
|
||||
"font_class": "favorite-fill",
|
||||
"unicode": "e61f",
|
||||
"unicode_decimal": 58911
|
||||
},
|
||||
{
|
||||
"icon_id": "9512559",
|
||||
"name": "收藏",
|
||||
"font_class": "favorite",
|
||||
"unicode": "e620",
|
||||
"unicode_decimal": 58912
|
||||
},
|
||||
{
|
||||
"icon_id": "9512675",
|
||||
"name": "上传",
|
||||
"font_class": "upload",
|
||||
"unicode": "e63e",
|
||||
"unicode_decimal": 58942
|
||||
},
|
||||
{
|
||||
"icon_id": "11633996",
|
||||
"name": "用户资料",
|
||||
"font_class": "yonghuziliao",
|
||||
"unicode": "e6a1",
|
||||
"unicode_decimal": 59041
|
||||
},
|
||||
{
|
||||
"icon_id": "17775968",
|
||||
"name": "笔",
|
||||
"font_class": "pen-fill",
|
||||
"unicode": "e667",
|
||||
"unicode_decimal": 58983
|
||||
},
|
||||
{
|
||||
"icon_id": "18537099",
|
||||
"name": "群聊",
|
||||
"font_class": "qunliao",
|
||||
"unicode": "e606",
|
||||
"unicode_decimal": 58886
|
||||
},
|
||||
{
|
||||
"icon_id": "18537375",
|
||||
"name": "视频通话",
|
||||
"font_class": "shipintonghua",
|
||||
"unicode": "e609",
|
||||
"unicode_decimal": 58889
|
||||
},
|
||||
{
|
||||
"icon_id": "18654056",
|
||||
"name": "添加",
|
||||
"font_class": "tianjia",
|
||||
"unicode": "e60d",
|
||||
"unicode_decimal": 58893
|
||||
},
|
||||
{
|
||||
"icon_id": "18655694",
|
||||
"name": "通讯录",
|
||||
"font_class": "tongxunlu",
|
||||
"unicode": "e612",
|
||||
"unicode_decimal": 58898
|
||||
},
|
||||
{
|
||||
"icon_id": "18656610",
|
||||
"name": "添加好友",
|
||||
"font_class": "tianjiahaoyou",
|
||||
"unicode": "e613",
|
||||
"unicode_decimal": 58899
|
||||
},
|
||||
{
|
||||
"icon_id": "24660909",
|
||||
"name": "删除",
|
||||
"font_class": "shanchu",
|
||||
"unicode": "e6d3",
|
||||
"unicode_decimal": 59091
|
||||
},
|
||||
{
|
||||
"icon_id": "25015243",
|
||||
"name": "选择箭头-fill",
|
||||
"font_class": "choose-fill",
|
||||
"unicode": "e6a2",
|
||||
"unicode_decimal": 59042
|
||||
},
|
||||
{
|
||||
"icon_id": "27229314",
|
||||
"name": "文件夹,文件",
|
||||
"font_class": "a-wenjianjiawenjian",
|
||||
"unicode": "e69e",
|
||||
"unicode_decimal": 59038
|
||||
},
|
||||
{
|
||||
"icon_id": "27995029",
|
||||
"name": "搜索",
|
||||
"font_class": "sousuo",
|
||||
"unicode": "e6eb",
|
||||
"unicode_decimal": 59115
|
||||
},
|
||||
{
|
||||
"icon_id": "28661052",
|
||||
"name": "Robot",
|
||||
"font_class": "Robot",
|
||||
"unicode": "e661",
|
||||
"unicode_decimal": 58977
|
||||
},
|
||||
{
|
||||
"icon_id": "32429618",
|
||||
"name": "扫除",
|
||||
"font_class": "saochu",
|
||||
"unicode": "e6a3",
|
||||
"unicode_decimal": 59043
|
||||
},
|
||||
{
|
||||
"icon_id": "38950621",
|
||||
"name": "返回",
|
||||
"font_class": "fanhui",
|
||||
"unicode": "e765",
|
||||
"unicode_decimal": 59237
|
||||
},
|
||||
{
|
||||
"icon_id": "42230703",
|
||||
"name": "brain-2-fill",
|
||||
"font_class": "brain-2-fill",
|
||||
"unicode": "e800",
|
||||
"unicode_decimal": 59392
|
||||
},
|
||||
{
|
||||
"icon_id": "43005043",
|
||||
"name": "更多",
|
||||
"font_class": "gengduo",
|
||||
"unicode": "e6c5",
|
||||
"unicode_decimal": 59077
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
unpackage/dist/build/app-plus/static/iconfont/iconfont.ttf
vendored
Normal file
BIN
unpackage/dist/build/app-plus/static/iconfont/iconfont.ttf
vendored
Normal file
Binary file not shown.
BIN
unpackage/dist/build/app-plus/static/images/logo.png
vendored
Normal file
BIN
unpackage/dist/build/app-plus/static/images/logo.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
7
unpackage/dist/build/app-plus/uni-app-view.umd.js
vendored
Normal file
7
unpackage/dist/build/app-plus/uni-app-view.umd.js
vendored
Normal file
File diff suppressed because one or more lines are too long
26
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/changelog.md
vendored
Normal file
26
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/changelog.md
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
## 0.1.3(2025-09-16)
|
||||
- chore: 更新文档
|
||||
## 0.1.2(2025-06-07)
|
||||
- chore: 更新文档
|
||||
## 0.1.1(2025-06-02)
|
||||
- feat: 兼容鸿蒙next
|
||||
## 0.1.0(2025-04-04)
|
||||
- chore: 更新文档
|
||||
## 0.0.9(2025-03-11)
|
||||
- fix: 修复安卓报错的问题
|
||||
## 0.0.8(2025-03-11)
|
||||
- fix: 修复报错的问题
|
||||
## 0.0.7(2025-03-10)
|
||||
- feat: 增加重命名选项
|
||||
## 0.0.6(2025-02-28)
|
||||
- feat: 修复uniapp ios路径问题
|
||||
## 0.0.5(2024-10-31)
|
||||
- feat: 修复uniapp ios无法使用
|
||||
## 0.0.4(2024-10-26)
|
||||
- feat: 规范类型
|
||||
## 0.0.3(2024-07-10)
|
||||
- fext: 兼容ios
|
||||
## 0.0.2(2024-05-21)
|
||||
- fix: 修复uniapp找不到文件的错误
|
||||
## 0.0.1(2024-04-15)
|
||||
- init
|
||||
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<view @click="onClick">
|
||||
<slot></slot>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { chooseFile } from '@/uni_modules/lime-choose-file'
|
||||
export default {
|
||||
props: {
|
||||
disabled: Boolean
|
||||
},
|
||||
emits: ['success', 'fail'],
|
||||
data() {
|
||||
return {
|
||||
images: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
if(this.disabled) return
|
||||
chooseFile({
|
||||
success:(res)=>{
|
||||
this.$emit('success', res)
|
||||
},
|
||||
fail(err){
|
||||
this.$emit('fail', err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<view class="demo-block">
|
||||
<text class="demo-block__title-text ultra">ChooseFile 文件选择</text>
|
||||
<text class="demo-block__desc-text">打开系统文件管理器选择文件。</text>
|
||||
<view class="demo-block__body">
|
||||
<view class="demo-block card">
|
||||
<text class="demo-block__title-text large">基础使用</text>
|
||||
<view class="demo-block__body row">
|
||||
<button @click="onClick">选择图片</button>
|
||||
<image v-for="(item, index) in images" :key="index" :src="item"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { chooseFile, ChooseFileOption } from '@/uni_modules/lime-choose-file'
|
||||
|
||||
const images = ref<string[]>([])
|
||||
const onClick = () => {
|
||||
chooseFile({
|
||||
// filename: 'xxx',
|
||||
type: 'image',
|
||||
success(res) {
|
||||
images.value = res.tempFiles.map((item) : string => item.path)
|
||||
console.log('res', res.tempFiles)
|
||||
console.log('reserrMsg', res)
|
||||
},
|
||||
fail(err) {
|
||||
console.log('err', err)
|
||||
}
|
||||
} as ChooseFileOption)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.row {
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-bottom: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.demo-block {
|
||||
margin: 32px 10px 0;
|
||||
|
||||
// overflow: visible;
|
||||
&.card {
|
||||
background-color: white;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx !important;
|
||||
}
|
||||
|
||||
&__title {
|
||||
margin: 0;
|
||||
margin-top: 8px;
|
||||
|
||||
&-text {
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
display: flex;
|
||||
|
||||
&.large {
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
&.ultra {
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
line-height: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__desc-text {
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
margin: 8px 16px 0 0;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
&__body {
|
||||
margin: 16px 0;
|
||||
overflow: visible;
|
||||
|
||||
.demo-block {
|
||||
// margin-top: 0px;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<view>
|
||||
<button @click="onClick">选图</button>
|
||||
<image v-for="(item, index) in images" :key="index" :src="item"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { chooseFile } from '@/uni_modules/lime-choose-file'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
images: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
chooseFile({
|
||||
type: 'image',
|
||||
success:(res)=>{
|
||||
this.images = res.tempFiles.map((item) => item.path)
|
||||
console.log('res', res.tempFiles)
|
||||
},
|
||||
fail(err){
|
||||
console.log('err', err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
2
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/encrypt
vendored
Normal file
2
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/encrypt
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<EFBFBD>,<2C>P<EFBFBD><50>=<3D>[&<26>۸<>6<EFBFBD>
|
||||
<1B>I<EFBFBD>T<EFBFBD> ]<5D><>r<EFBFBD><72><EFBFBD><EFBFBD>*<2A>I<EFBFBD>F<EFBFBD>܃<EFBFBD>C咺+<16><>E<>|<7C>q<EFBFBD>`(<28><><EFBFBD><EFBFBD>I_<49>+D<><16>Zs<5A>f<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD>q<EFBFBD><71>gqݰ<71><DDB0><EFBFBD>IC*<2A>N<EFBFBD><4E>R<EFBFBD>W<EFBFBD>O<EFBFBD><17><>5<EFBFBD>@\7<>ta<74><61> `e<>7<EFBFBD><37><EFBFBD>H<EFBFBD><48>F:D<><44><EFBFBD>r<EFBFBD><72>|<7C><>#
|
||||
105
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/package.json
vendored
Normal file
105
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/package.json
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"id": "lime-choose-file",
|
||||
"displayName": "lime-choose-file 文件选择",
|
||||
"version": "0.1.3",
|
||||
"description": "lime-choose-file 文件选择参考uni.chooseFile API实现的UTS API,用法保持一致,从本地选择文件。兼容uniapp/uniappX",
|
||||
"keywords": [
|
||||
"chooseFile",
|
||||
"文件选择",
|
||||
"uts"
|
||||
],
|
||||
"repository": "",
|
||||
"engines": {
|
||||
"HBuilderX": "^4.11",
|
||||
"uni-app": "^4.61",
|
||||
"uni-app-x": "^4.61"
|
||||
},
|
||||
"dcloudext": {
|
||||
"type": "uts",
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "29.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "268.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": ""
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "无",
|
||||
"data": "无",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": "",
|
||||
"darkmode": "x",
|
||||
"i18n": "x",
|
||||
"widescreen": "x"
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": [],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "√",
|
||||
"aliyun": "√",
|
||||
"alipay": "√"
|
||||
},
|
||||
"client": {
|
||||
"uni-app": {
|
||||
"vue": {
|
||||
"vue2": "√",
|
||||
"vue3": "√"
|
||||
},
|
||||
"web": {
|
||||
"safari": "√",
|
||||
"chrome": "√"
|
||||
},
|
||||
"app": {
|
||||
"vue": "√",
|
||||
"nvue": "√",
|
||||
"android": {
|
||||
"extVersion": "",
|
||||
"minVersion": "21"
|
||||
},
|
||||
"ios": "√",
|
||||
"harmony": "√"
|
||||
},
|
||||
"mp": {
|
||||
"weixin": "√",
|
||||
"alipay": "-",
|
||||
"toutiao": "-",
|
||||
"baidu": "-",
|
||||
"kuaishou": "-",
|
||||
"jd": "-",
|
||||
"harmony": "-",
|
||||
"qq": "-",
|
||||
"lark": "-"
|
||||
},
|
||||
"quickapp": {
|
||||
"huawei": "-",
|
||||
"union": "-"
|
||||
}
|
||||
},
|
||||
"uni-app-x": {
|
||||
"web": {
|
||||
"safari": "√",
|
||||
"chrome": "√"
|
||||
},
|
||||
"app": {
|
||||
"android": {
|
||||
"extVersion": "",
|
||||
"minVersion": "21"
|
||||
},
|
||||
"ios": "√",
|
||||
"harmony": "√"
|
||||
},
|
||||
"mp": {
|
||||
"weixin": "√"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
61
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/readme copy.md
vendored
Normal file
61
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/readme copy.md
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
# lime-choosefile 文件选择
|
||||
文件选择UTS API系参考小程序chooseFile API实现的,用法保持一致,目前仅支持uniappX(web,ios,安卓,鸿蒙)
|
||||
|
||||
|
||||
## 文档
|
||||
🚀 [choose-file【站点1】](https://limex.qcoon.cn/native/choose-file.html)
|
||||
🌍 [choose-file【站点2】](https://limeui.netlify.app/native/choose-file.html)
|
||||
🔥 [choose-file【站点3】](https://limeui.familyzone.top/native/choose-file.html)
|
||||
|
||||
|
||||
|
||||
## 安装
|
||||
插件市场导入,APP需要在页面上引入,然后自定义基座,完成自定义基座后,选择自定义基座运行
|
||||
|
||||
## 使用
|
||||
### UNIAPPX
|
||||
```js
|
||||
import { chooseFile, type ChooseFileOption } from '@/uni_modules/lime-choose-file'
|
||||
|
||||
const images = ref<string[]>([])
|
||||
const onClick = () => {
|
||||
chooseFile({
|
||||
filename: 'xxxx', // 可选 用于给文件重命名(安卓、IOS)
|
||||
type: 'image',
|
||||
success(res){
|
||||
images.value = res.tempFiles.map((item):string => item.path)
|
||||
console.log('res', res.tempFiles)
|
||||
},
|
||||
fail(err){
|
||||
console.log('err', err)
|
||||
}
|
||||
} as ChooseFileOption)
|
||||
}
|
||||
```
|
||||
|
||||
### UNIAPP
|
||||
```js
|
||||
import { chooseFile } from '@/uni_modules/lime-choose-file'
|
||||
|
||||
const images = ref<string[]>([])
|
||||
const onClick = () => {
|
||||
chooseFile({
|
||||
filename: 'xxxx', // 可选 用于给文件重命名(安卓、IOS)
|
||||
type: 'image',
|
||||
success(res){
|
||||
images.value = res.tempFiles.map((item):string => item.path)
|
||||
console.log('res', res.tempFiles)
|
||||
},
|
||||
fail(err){
|
||||
console.log('err', err)
|
||||
}
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
## 常见问题
|
||||
- 1、IOS路径是中文时无法上传到服务器,这时候需要设置`filename`给文件重命名
|
||||
|
||||
|
||||
## API
|
||||
因为直接参照小程序`chooseFile`API,所以可以直接按[chooseFile](https://uniapp.dcloud.net.cn/api/media/file.html#choosefile)文档来
|
||||
126
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/readme.md
vendored
Normal file
126
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/readme.md
vendored
Normal file
@@ -0,0 +1,126 @@
|
||||
# lime-choose-file 文件选择组件
|
||||
一个基于UTS实现的文件选择插件,参考小程序chooseFile API实现,用法保持一致。支持安卓、iOS、鸿蒙和H5平台。提供了选择图片、视频和其他文件类型的功能。组件提供了简单易用的API,使开发者能够方便地在应用中集成文件选择功能。
|
||||
|
||||
## 文档链接
|
||||
📚 组件详细文档请访问以下站点:
|
||||
- [文件选择组件文档 - 站点1](https://limex.qcoon.cn/native/choose-file.html)
|
||||
- [文件选择组件文档 - 站点2](https://limeui.netlify.app/native/choose-file.html)
|
||||
- [文件选择组件文档 - 站点3](https://limeui.familyzone.top/native/choose-file.html)
|
||||
|
||||
## 安装方法
|
||||
1. 在uni-app插件市场中搜索并导入`lime-choose-file`
|
||||
2. 导入后在页面引入相关方法
|
||||
3. 需要自定义基座才能使用
|
||||
4. 试用符合需求后才购买,插件无法退款
|
||||
|
||||
## 代码演示
|
||||
|
||||
### UNIAPPX 使用方式
|
||||
```ts
|
||||
import { chooseFile, type ChooseFileOption } from '@/uni_modules/lime-choose-file'
|
||||
|
||||
const images = ref<string[]>([])
|
||||
const onClick = () => {
|
||||
chooseFile({
|
||||
filename: 'xxxx', // 可选 用于给文件重命名(安卓、iOS)
|
||||
type: 'image',
|
||||
success(res){
|
||||
images.value = res.tempFiles.map((item):string => item.path)
|
||||
console.log('选择结果:', res.tempFiles)
|
||||
},
|
||||
fail(err){
|
||||
console.log('选择失败:', err)
|
||||
}
|
||||
} as ChooseFileOption)
|
||||
}
|
||||
```
|
||||
|
||||
### UNIAPP 使用方式
|
||||
```ts
|
||||
import { chooseFile } from '@/uni_modules/lime-choose-file'
|
||||
|
||||
const images = ref<string[]>([])
|
||||
const onClick = () => {
|
||||
chooseFile({
|
||||
filename: 'xxxx', // 可选 用于给文件重命名(安卓、iOS)
|
||||
type: 'image',
|
||||
success(res){
|
||||
images.value = res.tempFiles.map((item):string => item.path)
|
||||
console.log('选择结果:', res.tempFiles)
|
||||
},
|
||||
fail(err){
|
||||
console.log('选择失败:', err)
|
||||
}
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
## API文档
|
||||
|
||||
### chooseFile 方法
|
||||
|
||||
| 参数 | 说明 | 类型 | 必填 |
|
||||
| --- | --- | --- | --- |
|
||||
| options | 文件选择选项 | _ChooseFileOption_ | 是 |
|
||||
|
||||
### ChooseFileOption 选项
|
||||
|
||||
| 参数 | 类型 | 必填 | 说明 |
|
||||
| --- | --- | --- | --- |
|
||||
| filename | _string_ | 否 | 指定文件名,用于给文件重命名(安卓、iOS) |
|
||||
| count | _number_ | 否 | 最多可以选择的文件数量,默认为100 |
|
||||
| type | _string_ | 否 | 所选文件类型,默认为'all' |
|
||||
| extension | _string[]_ | 否 | 根据文件拓展名过滤,每一项都不能是空字符串。默认不过滤。仅H5支持 |
|
||||
| success | _(result: ChooseFileSuccessCallbackResult) => void_ | 否 | 接口调用成功的回调函数 |
|
||||
| fail | _(res: GeneralCallbackResult) => void_ | 否 | 接口调用失败的回调函数 |
|
||||
| complete | _(res: GeneralCallbackResult) => void_ | 否 | 接口调用结束的回调函数 |
|
||||
|
||||
### ChooseFileSuccessCallbackResult 返回参数
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| tempFiles | _ChooseFile[]_ | 返回选择的文件的本地临时文件对象数组 |
|
||||
| errMsg | _string_ | 错误信息 |
|
||||
|
||||
### ChooseFile 对象结构
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| name | _string_ | 选择的文件名称 |
|
||||
| path | _string_ | 本地临时文件路径 (本地路径) |
|
||||
| size | _number_ | 本地临时文件大小,单位 B |
|
||||
| time | _number_ | 选择的文件的会话发送时间,Unix时间戳 |
|
||||
| type | _'video' \| 'image' \| 'file' \| 'all'_ | 选择的文件类型 |
|
||||
|
||||
### 文件类型说明
|
||||
|
||||
| 类型值 | 说明 |
|
||||
| --- | --- |
|
||||
| video | 视频文件 |
|
||||
| image | 图片文件 |
|
||||
| file | 除图片和视频外的其他文件 |
|
||||
| all | 所有类型文件 |
|
||||
|
||||
## 功能特点
|
||||
|
||||
- 支持多种文件类型的选择,包括图片、视频和其他文件
|
||||
- 支持文件重命名功能
|
||||
- 兼容安卓、iOS、鸿蒙和H5平台
|
||||
- 提供简单易用的API接口
|
||||
- 支持指定最大选择数量
|
||||
- 支持文件扩展名过滤(H5平台)
|
||||
|
||||
## 常见问题
|
||||
|
||||
- iOS路径是中文时无法上传到服务器,这时候需要设置`filename`给文件重命名
|
||||
- APP端需要自定义基座才能使用
|
||||
- 文件选择后会返回临时文件路径,需要及时使用或保存
|
||||
- H5端可以通过extension参数过滤文件类型
|
||||
|
||||
## 支持与赞赏
|
||||
|
||||
如果你觉得本插件解决了你的问题,可以考虑支持作者:
|
||||
|
||||
| 支付宝赞助 | 微信赞助 |
|
||||
|------------|------------|
|
||||
|  |  |
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="cn.limeui.chooseFile">
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
</manifest>
|
||||
3
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/utssdk/app-android/config.json
vendored
Normal file
3
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/utssdk/app-android/config.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"minSdkVersion": "21"
|
||||
}
|
||||
206
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/utssdk/app-android/index.uts
vendored
Normal file
206
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/utssdk/app-android/index.uts
vendored
Normal file
@@ -0,0 +1,206 @@
|
||||
// @ts-nocheck
|
||||
import Intent from 'android.content.Intent';
|
||||
import ClipData from 'android.content.ClipData';
|
||||
import Uri from 'android.net.Uri';
|
||||
import InputStream from 'java.io.InputStream';
|
||||
import OpenableColumns from 'android.provider.OpenableColumns';
|
||||
import Cursor from 'android.database.Cursor';
|
||||
import File from 'java.io.File';
|
||||
import FileInputStream from 'java.io.FileInputStream';
|
||||
import FileOutputStream from 'java.io.FileOutputStream';
|
||||
import BufferedOutputStream from 'java.io.BufferedOutputStream';
|
||||
import ByteArrayInputStream from 'java.io.ByteArrayInputStream';
|
||||
|
||||
import { ChooseFileOption, ChooseFile, ChooseFileSuccessCallbackResult } from '../interface'
|
||||
import { GeneralCallbackResultImpl } from '../unierror'
|
||||
|
||||
const REQUEST_CODE_CHOOSE_FILE : Int = 42
|
||||
let resultFunction : ((requestCode : Int, resultCode : Int, data ?: Intent) => void) | null = null
|
||||
|
||||
|
||||
class ChooseFileImpl implements ChooseFile {
|
||||
name : string = ''
|
||||
path : string = ''
|
||||
// private _path : string = ''
|
||||
size : number = 0
|
||||
time : number = 0
|
||||
type : string = 'file'
|
||||
// private uri : Uri
|
||||
private options: ChooseFileOption
|
||||
constructor(uri : Uri, options : ChooseFileOption) {
|
||||
// this.uri = uri
|
||||
this.options = options
|
||||
this.time = Date.now()
|
||||
this.type = this.getFileTypeFromUri(uri);
|
||||
// this._path = uri.getPath() ?? ''
|
||||
this.getFileInfoFromUri(uri)
|
||||
if (this.isCache(options)) {
|
||||
this.copyFileToCache(uri)
|
||||
}
|
||||
|
||||
}
|
||||
private isCache(options : ChooseFileOption) : boolean {
|
||||
const extension = this.getFileExtension(this.name)
|
||||
const extensions = options.extension
|
||||
const type = options.type ?? 'all'
|
||||
const hasExtension = extensions != null && extension != '' && extensions.includes(extension)
|
||||
const isVideoOrImage = ['video', 'image'].includes(type)
|
||||
const isFileAndNotVideoOrImage = type == 'file' && !['video', 'image'].includes(this.type);
|
||||
if ((type == 'all' || isVideoOrImage || isFileAndNotVideoOrImage) && !hasExtension) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
private getFileExtension(fileName : string) : string {
|
||||
const lastDotIndex = fileName.lastIndexOf(".");
|
||||
if (lastDotIndex == -1) {
|
||||
return "";
|
||||
}
|
||||
return fileName.substring(lastDotIndex + 1);
|
||||
}
|
||||
private copyFileToCache(uri : Uri) {
|
||||
const cacheDir = UTSAndroid.getAppCachePath();
|
||||
const context = UTSAndroid.getAppContext();
|
||||
if(cacheDir != null) {
|
||||
const path = new File(cacheDir);
|
||||
if (!path.exists()) {
|
||||
path.mkdir();
|
||||
}
|
||||
}
|
||||
let fileName = this.name
|
||||
if(this.options.filename != null) {
|
||||
fileName = this.options.filename!;
|
||||
if(this.options.count != null && this.options.count! > 1) {
|
||||
fileName = `${fileName}_${Date.now()}`;
|
||||
}
|
||||
const extension = this.getFileExtension(this.name)
|
||||
|
||||
fileName = `${fileName}.${extension}`
|
||||
}
|
||||
const destFile = new File(cacheDir, fileName);
|
||||
|
||||
try {
|
||||
const inputStream = context!.getContentResolver().openInputStream(uri)
|
||||
const outputStream = new FileOutputStream(destFile)
|
||||
if (inputStream != null) {
|
||||
let buffer = ByteArray(1024);
|
||||
let c = inputStream.read(buffer)
|
||||
while (c > 0) {
|
||||
outputStream.write(buffer, 0, c);
|
||||
c = inputStream.read(buffer)
|
||||
}
|
||||
}
|
||||
this.path = cacheDir + fileName//this.name
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
private getFileTypeFromUri(uri : Uri) : string {
|
||||
const context = UTSAndroid.getAppContext();
|
||||
let fileType = 'file'
|
||||
let mimeType = context!.getContentResolver().getType(uri);
|
||||
if (mimeType != null) {
|
||||
if (mimeType.startsWith("video")) {
|
||||
fileType = "video";
|
||||
} else if (mimeType.startsWith("image")) {
|
||||
fileType = "image";
|
||||
}
|
||||
}
|
||||
return fileType;
|
||||
}
|
||||
private getFileInfoFromUri(uri : Uri) {
|
||||
const context = UTSAndroid.getAppContext();
|
||||
let cursor = context!.getContentResolver().query(uri, null, null, null, null);
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
this.name = cursor.getString(cursor.getColumnIndexOrThrow(OpenableColumns.DISPLAY_NAME))
|
||||
const fileSize = cursor.getLong(cursor.getColumnIndexOrThrow(OpenableColumns.SIZE));
|
||||
this.size = Number.from(fileSize)
|
||||
cursor.close();
|
||||
} else if ("file".equals(uri.getScheme())) {
|
||||
this.name = uri.getLastPathSegment() ?? '';
|
||||
const file = new File(uri.getPath() ?? '');
|
||||
const fileSize = file.length();
|
||||
this.size = Number.from(fileSize)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export function chooseFile(options : ChooseFileOption) {
|
||||
if (resultFunction != null) {
|
||||
UTSAndroid.offAppActivityResult(resultFunction!)
|
||||
}
|
||||
const type = options.type ?? 'all'
|
||||
const intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
if (type.equals("all") || type.equals("file")) {
|
||||
intent.setType("*/*");
|
||||
} else if (type.equals("video")) {
|
||||
intent.setType("video/*");
|
||||
} else if (type.equals("image")) {
|
||||
intent.setType("image/*");
|
||||
}
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, options.count == 1 ? false : true); // 允许多选
|
||||
|
||||
resultFunction = (requestCode : Int, resultCode : Int, data ?: Intent) => {
|
||||
if (requestCode == REQUEST_CODE_CHOOSE_FILE) {
|
||||
UTSAndroid.offAppActivityResult(resultFunction!);
|
||||
if (resultCode == -1 && data != null) {
|
||||
const clipData = data.getClipData();
|
||||
const tempFiles : ChooseFile[] = []
|
||||
|
||||
if (clipData != null) {
|
||||
// 多选
|
||||
// const itemCount = clipData.getItemCount();
|
||||
// if (options.count != null && options.count! > itemCount) {
|
||||
// const err = new GeneralCallbackResultImpl(9010002, `选中文件数量超过${options.count}`)
|
||||
// options.fail?.(err)
|
||||
// options.complete?.(err)
|
||||
// return
|
||||
// }
|
||||
for (let i = 0; i < clipData.getItemCount(); i++) {
|
||||
const uri = clipData.getItemAt(i.toInt()).getUri();
|
||||
const chooseFile = new ChooseFileImpl(uri, options);
|
||||
if(chooseFile.path !=''){
|
||||
tempFiles.push(chooseFile)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 单选
|
||||
const uri = data.getData();
|
||||
if (uri != null) {
|
||||
const chooseFile = new ChooseFileImpl(uri, options)
|
||||
if(chooseFile.path !='' ){
|
||||
tempFiles.push(chooseFile)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
const count = options.count ?? Integer.MAX_VALUE // Number.MAX_VALUE
|
||||
if(tempFiles.length > 0 && count >= tempFiles.length){
|
||||
options.success?.({
|
||||
tempFiles,
|
||||
errMsg: 'chooseFile:ok'
|
||||
} as ChooseFileSuccessCallbackResult)
|
||||
} else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件或文件超过设置数量`)
|
||||
options.fail?.(err)
|
||||
options.complete?.(err)
|
||||
}
|
||||
} else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件`)
|
||||
options.fail?.(err)
|
||||
options.complete?.(err)
|
||||
}
|
||||
} else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件`)
|
||||
options.fail?.(err)
|
||||
options.complete?.(err)
|
||||
}
|
||||
}
|
||||
|
||||
UTSAndroid.onAppActivityResult(resultFunction!)
|
||||
UTSAndroid.getUniActivity()!.startActivityForResult(Intent.createChooser(intent, "选择文件"), REQUEST_CODE_CHOOSE_FILE)
|
||||
// UTSAndroid.getUniActivity()!.overridePendingTransition((10).toInt(), (0).toInt());
|
||||
}
|
||||
3
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/utssdk/app-ios/config.json
vendored
Normal file
3
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/utssdk/app-ios/config.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"deploymentTarget": "9"
|
||||
}
|
||||
138
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/utssdk/app-ios/index.uts
vendored
Normal file
138
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/utssdk/app-ios/index.uts
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
// @ts-nocheck
|
||||
import { ChooseFileOption, ChooseFile, ChooseFileSuccessCallbackResult } from '../interface'
|
||||
import { UIDocumentPickerDelegate, UIDocumentPickerMode } from "UIKit"
|
||||
import { URL, FileManager } from 'Foundation';
|
||||
import { GeneralCallbackResultImpl } from '../unierror'
|
||||
import { DispatchQueue } from 'Dispatch';
|
||||
|
||||
const documentTypes : Map<string, string[]> = new Map([
|
||||
["all", ["public.item"]],
|
||||
["file", [
|
||||
"public.text",
|
||||
"public.zip-archive",
|
||||
"public.data",
|
||||
"com.adobe.pdf",
|
||||
"com.microsoft.word.doc",
|
||||
"com.microsoft.word.docx",
|
||||
"com.microsoft.excel.xls",
|
||||
"com.microsoft.excel.xlsx"
|
||||
]
|
||||
],
|
||||
["video", ["public.movie"]],
|
||||
["image", ["public.image"]],
|
||||
])
|
||||
|
||||
class ChooseFileImpl {
|
||||
name : string = ''
|
||||
path : string = ''
|
||||
size : number = 0
|
||||
time : number = 0
|
||||
type : string = 'file'
|
||||
constructor(uri : URL, options : ChooseFileOption) {
|
||||
try {
|
||||
const originalFileName = uri.lastPathComponent;
|
||||
const attributes = UTSiOS.try(FileManager.default.attributesOfItem(atPath = uri.path))
|
||||
const fileSize = attributes[FileAttributeKey.size] as number
|
||||
const pathExtension = `${uri.pathExtension}`
|
||||
|
||||
const imageFormats = ['jpeg', 'jpg', 'png', 'gif', 'bmp', 'tiff', 'svg']
|
||||
const videoFormats = ['mov', 'm4v', 'mp4', 'avi']
|
||||
|
||||
|
||||
let fileName = originalFileName
|
||||
if(options.filename != null) {
|
||||
fileName = options.filename!
|
||||
if(options.count != null && options.count! > 1) {
|
||||
fileName = `${fileName}_${Date.now()}`;
|
||||
}
|
||||
fileName = `${fileName}.${pathExtension}`
|
||||
}
|
||||
|
||||
// #ifdef UNI-APP-X
|
||||
const dataPath = UTSiOS.getDataPath()
|
||||
// #endif
|
||||
// #ifndef UNI-APP-X
|
||||
const dataPath = UTSiOS.getDataPath().replace(/data$/, "doc");
|
||||
// #endif
|
||||
const file = new URL(fileURLWithPath = dataPath).appendingPathComponent(fileName)//.absoluteString
|
||||
const fileData = FileManager.default.contents(atPath = uri.path);
|
||||
UTSiOS.try(fileData?.write(to = file))
|
||||
|
||||
if (imageFormats.includes(pathExtension)) {
|
||||
this.type = 'image'
|
||||
} else if (videoFormats.includes(pathExtension)) {
|
||||
this.type = 'video'
|
||||
} else {
|
||||
this.type = 'file'
|
||||
}
|
||||
|
||||
this.name = `${originalFileName}`
|
||||
this.size = fileSize
|
||||
this.path = `${file.absoluteString}`
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class FilePickerManager implements UIDocumentPickerDelegate {
|
||||
options : ChooseFileOption = {}
|
||||
constructor() { }
|
||||
chooseFile(options : ChooseFileOption) {
|
||||
DispatchQueue.main.async(execute = () : void => {
|
||||
this.options = options
|
||||
const type = options.type ?? 'all'
|
||||
const count = options.count ?? 1
|
||||
const types = (documentTypes.get(type) ?? documentTypes.get('all')) as string[]
|
||||
let documentPicker = UIDocumentPickerViewController(
|
||||
documentTypes = types,
|
||||
in = UIDocumentPickerMode.import
|
||||
)
|
||||
documentPicker.delegate = this
|
||||
// 多选要大于 ios11
|
||||
if (UTSiOS.available("iOS 11.0, *")) {
|
||||
documentPicker.allowsMultipleSelection = count > 1
|
||||
}
|
||||
UTSiOS.getCurrentViewController().present(documentPicker, animated = true)
|
||||
})
|
||||
}
|
||||
documentPicker(controller : UIDocumentPickerViewController, @argumentLabel("didPickDocumentsAt") urls : URL[]) {
|
||||
DispatchQueue.main.async(execute = () : void => {
|
||||
const tempFiles : ChooseFile[] = []
|
||||
for (let i = 0; i < urls.length; i++) {
|
||||
const url = urls[i]
|
||||
const chooseFile = new ChooseFileImpl(url, this.options);
|
||||
// IOS -> js 无法传class?
|
||||
const file : ChooseFile = {
|
||||
name: chooseFile.name,
|
||||
path: chooseFile.path,
|
||||
size: chooseFile.size,
|
||||
time: chooseFile.time,
|
||||
type: chooseFile.type,
|
||||
}
|
||||
if (chooseFile.path != '') {
|
||||
tempFiles.push(file)
|
||||
}
|
||||
}
|
||||
|
||||
const count = this.options.count ?? Number.from(Double.greatestFiniteMagnitude) //Number.from(Double.MAX_VALUE)
|
||||
if (tempFiles.length > 0 && count >= tempFiles.length) {
|
||||
const res : ChooseFileSuccessCallbackResult = {
|
||||
tempFiles,
|
||||
errMsg: 'chooseFile:ok'
|
||||
}
|
||||
this.options.success?.(res)
|
||||
} else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件或文件超过设置数量`)
|
||||
this.options.fail?.(err)
|
||||
this.options.complete?.(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const fileManager = new FilePickerManager()
|
||||
|
||||
export function chooseFile(options : ChooseFileOption) {
|
||||
fileManager.chooseFile(options)
|
||||
}
|
||||
35
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/utssdk/index.uts
vendored
Normal file
35
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/utssdk/index.uts
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
// @ts-nocheck
|
||||
export * from './interface';
|
||||
import { type ChooseFileOption } from './interface';
|
||||
|
||||
export function chooseFile(options: ChooseFileOption){
|
||||
// #ifdef WEB || APP-HARMONY
|
||||
uni.chooseFile({
|
||||
count: options.count ?? 100,
|
||||
type: options.type,
|
||||
extension: options.extension,
|
||||
success(res) {
|
||||
options.success?.({
|
||||
// tempFilePaths
|
||||
errMsg : 'ok',
|
||||
tempFiles: res.tempFiles
|
||||
})
|
||||
},
|
||||
fail(err) {
|
||||
options.fail?.({
|
||||
errCode: err.errCode,
|
||||
errSubject: 'lime-choose-file'
|
||||
})
|
||||
},
|
||||
complete(res) {
|
||||
// options.complete?.(res)
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.chooseMessageFile(options)
|
||||
// #endif
|
||||
// #ifndef WEB || MP-WEIXIN || APP-HARMONY
|
||||
console.error('chooseFile 不支持该平台')
|
||||
// #endif
|
||||
}
|
||||
108
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/utssdk/interface.uts
vendored
Normal file
108
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/utssdk/interface.uts
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
// @ts-nocheck
|
||||
/**
|
||||
* 错误码
|
||||
* 根据uni错误码规范要求,建议错误码以90开头,以下是错误码示例:
|
||||
* - 9010001 错误信息1
|
||||
* - 9010002 错误信息2
|
||||
*/
|
||||
export type ChooseFileErrorCode = 9010001 | 9010002 | 1101001 | 1101002 | 1101003 | 1101004 | 1101005 | 1101006 | 1101007 | 1101008 | 1101009 | 1101010;
|
||||
/**
|
||||
* myApi 的错误回调参数
|
||||
*/
|
||||
export interface GeneralCallbackResult extends IUniError {
|
||||
errCode : ChooseFileErrorCode
|
||||
};
|
||||
|
||||
|
||||
/** 返回选择的文件的本地临时文件对象数组 */
|
||||
// #ifdef APP-ANDROID
|
||||
export interface ChooseFile {
|
||||
/** 选择的文件名称 */
|
||||
name : string
|
||||
/** 本地临时文件路径 (本地路径) */
|
||||
path : string
|
||||
/** 本地临时文件大小,单位 B */
|
||||
size : number
|
||||
/** 选择的文件的会话发送时间,Unix时间戳,工具暂不支持此属性 */
|
||||
time : number
|
||||
/** 选择的文件类型
|
||||
*
|
||||
* 可选值:
|
||||
* - 'video': 选择了视频文件;
|
||||
* - 'image': 选择了图片文件;
|
||||
* - 'file': 选择了除图片和视频的文件; */
|
||||
type : 'video' | 'image' | 'file' | 'all'
|
||||
}
|
||||
// #endif
|
||||
// #ifndef APP-ANDROID
|
||||
export type ChooseFile = {
|
||||
/** 选择的文件名称 */
|
||||
name : string
|
||||
/** 本地临时文件路径 (本地路径) */
|
||||
path : string
|
||||
/** 本地临时文件大小,单位 B */
|
||||
size : number
|
||||
/** 选择的文件的会话发送时间,Unix时间戳,工具暂不支持此属性 */
|
||||
time : number
|
||||
/** 选择的文件类型
|
||||
*
|
||||
* 可选值:
|
||||
* - 'video': 选择了视频文件;
|
||||
* - 'image': 选择了图片文件;
|
||||
* - 'file': 选择了除图片和视频的文件; */
|
||||
type : 'video' | 'image' | 'file' | 'all'
|
||||
}
|
||||
// #endif
|
||||
|
||||
export type ChooseFileSuccessCallbackResult = {
|
||||
/** 返回选择的文件的本地临时文件对象数组 */
|
||||
tempFiles : ChooseFile[],
|
||||
errMsg : string
|
||||
}
|
||||
|
||||
|
||||
/** 接口调用成功的回调函数 */
|
||||
export type ChooseFileSuccessCallback = (
|
||||
result : ChooseFileSuccessCallbackResult
|
||||
) => void
|
||||
|
||||
/** 接口调用失败的回调函数 */
|
||||
export type ChooseFileFailCallback = (res : GeneralCallbackResult) => void
|
||||
|
||||
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
||||
export type ChooseFileCompleteCallback = (
|
||||
res : GeneralCallbackResult
|
||||
) => void
|
||||
|
||||
export type ChooseFileOption = {
|
||||
/**
|
||||
* 指定文件名,如果是多选就在后面增加上时间
|
||||
*/
|
||||
filename?: string
|
||||
/**
|
||||
* 最多可以选择的文件数量。
|
||||
* @defaultValue 100
|
||||
*/
|
||||
count ?: number | null,
|
||||
/**
|
||||
* 所选文件类型
|
||||
* @defaultValue all
|
||||
*/
|
||||
type ?: string | null,
|
||||
/**
|
||||
* 根据文件拓展名过滤,每一项都不能是空字符串。默认不过滤。仅H5支持
|
||||
*/
|
||||
extension ?: (string[]) | null,
|
||||
/**
|
||||
* 成功则返回图片的本地文件路径列表 tempFilePaths
|
||||
*/
|
||||
success ?: ChooseFileSuccessCallback | null,
|
||||
/**
|
||||
* 接口调用失败的回调函数
|
||||
*/
|
||||
fail ?: ChooseFileFailCallback | null,
|
||||
/**
|
||||
* 接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
*/
|
||||
complete ?: ChooseFileCompleteCallback | null
|
||||
}
|
||||
40
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/utssdk/unierror.uts
vendored
Normal file
40
unpackage/dist/build/app-plus/uni_modules/lime-choose-file/utssdk/unierror.uts
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
// @ts-nocheck
|
||||
/* 此规范为 uni 规范,可以按照自己的需要选择是否实现 */
|
||||
import { ChooseFileErrorCode, GeneralCallbackResult } from "./interface.uts"
|
||||
/**
|
||||
* 错误主题
|
||||
* 注意:错误主题一般为插件名称,每个组件不同,需要使用时请更改。
|
||||
* [可选实现]
|
||||
*/
|
||||
export const UniErrorSubject = 'chooseFile"';
|
||||
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
* @UniError
|
||||
* [可选实现]
|
||||
*/
|
||||
export const UniErrors : Map<ChooseFileErrorCode, string> = new Map([
|
||||
/**
|
||||
* 错误码及对应的错误信息
|
||||
*/
|
||||
[9010001, 'chooseFile:ok'],
|
||||
[9010002, 'ChooseFile:failed'],
|
||||
]);
|
||||
|
||||
|
||||
/**
|
||||
* 错误对象实现
|
||||
*/
|
||||
export class GeneralCallbackResultImpl extends UniError implements GeneralCallbackResult {
|
||||
|
||||
/**
|
||||
* 错误对象构造函数
|
||||
*/
|
||||
constructor(errCode : ChooseFileErrorCode, errMsg: string|null = null) {
|
||||
super();
|
||||
this.errSubject = UniErrorSubject;
|
||||
this.errCode = errCode;
|
||||
this.errMsg = errMsg ?? UniErrors[errCode] ?? "";
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/app-plus/uni_modules/mp-html/static/app-plus/mp-html/js/handler.js
vendored
Normal file
1
unpackage/dist/build/app-plus/uni_modules/mp-html/static/app-plus/mp-html/js/handler.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";function t(t){for(var e=Object.create(null),n=t.attributes.length;n--;)e[t.attributes[n].name]=t.attributes[n].value;return e}function e(){a[1]&&(this.src=a[1],this.onerror=null),this.onclick=null,this.ontouchstart=null,uni.postMessage({data:{action:"onError",source:"img",attrs:t(this)}})}function n(){window.unloadimgs-=1,0===window.unloadimgs&&uni.postMessage({data:{action:"onReady"}})}function o(r,s,c){for(var d=0;d<r.length;d++)!function(){var u,l=r[d];if(l.type&&"node"!==l.type)u=document.createTextNode(l.text.replace(/&/g,"&"));else{var g=l.name;"svg"===g&&(c="http://www.w3.org/2000/svg"),"html"!==g&&"body"!==g||(g="div"),u=c?document.createElementNS(c,g):document.createElement(g);for(var p in l.attrs)u.setAttribute(p,l.attrs[p]);if(l.children&&o(l.children,u,c),"img"===g){if(window.unloadimgs+=1,u.onload=n,u.onerror=n,!u.src&&u.getAttribute("data-src")&&(u.src=u.getAttribute("data-src")),l.attrs.ignore||(u.onclick=function(e){e.stopPropagation(),uni.postMessage({data:{action:"onImgTap",attrs:t(this)}})}),a[2]){var h=new Image;h.src=u.src,u.src=a[2],h.onload=function(){u.src=this.src},h.onerror=function(){u.onerror()}}u.onerror=e}else if("a"===g)u.addEventListener("click",function(e){e.stopPropagation(),e.preventDefault();var n,o=this.getAttribute("href");o&&"#"===o[0]&&(n=(document.getElementById(o.substr(1))||{}).offsetTop),uni.postMessage({data:{action:"onLinkTap",attrs:t(this),offset:n}})},!0);else if("video"===g||"audio"===g)i.push(u),l.attrs.autoplay||l.attrs.controls||u.setAttribute("controls","true"),u.onplay=function(){if(uni.postMessage({data:{action:"onPlay"}}),a[3])for(var t=0;t<i.length;t++)i[t]!==this&&i[t].pause()},u.onerror=function(){uni.postMessage({data:{action:"onError",source:g,attrs:t(this)}})};else if("table"===g&&a[4]&&!u.style.cssText.includes("inline")){var f=document.createElement("div");f.style.overflow="auto",f.appendChild(u),u=f}else"svg"===g&&(c=void 0)}s.appendChild(u)}()}document.addEventListener("UniAppJSBridgeReady",function(){document.body.onclick=function(){return uni.postMessage({data:{action:"onClick"}})},uni.postMessage({data:{action:"onJSBridgeReady"}})});var a,i=[];window.setContent=function(t,e,n){var r=document.getElementById("content");e[0]&&(document.body.style.cssText=e[0]),e[5]||(r.style.userSelect="none"),n||(r.innerHTML="",i=[]),a=e,window.unloadimgs=0;var s=document.createDocumentFragment();o(t,s),r.appendChild(s);var c=r.scrollHeight;uni.postMessage({data:{action:"onLoad",height:c}}),window.unloadimgs||uni.postMessage({data:{action:"onReady",height:c}}),clearInterval(window.timer),window.timer=setInterval(function(){r.scrollHeight!==c&&(c=r.scrollHeight,uni.postMessage({data:{action:"onHeightChange",height:c}}))},350)},window.onunload=function(){clearInterval(window.timer)};
|
||||
@@ -0,0 +1 @@
|
||||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).uni=n()}(this,(function(){"use strict";try{var e={};Object.defineProperty(e,"passive",{get:function(){!0}}),window.addEventListener("test-passive",null,e)}catch(e){}var n=Object.prototype.hasOwnProperty;function t(e,t){return n.call(e,t)}var i=[],a=function(e,n){var t={options:{timestamp:+new Date},name:e,arg:n};if(window.__dcloud_weex_postMessage||window.__dcloud_weex_){if("postMessage"===e){var a={data:[n]};return window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessage(a):window.__dcloud_weex_.postMessage(JSON.stringify(a))}var o={type:"WEB_INVOKE_APPSERVICE",args:{data:t,webviewIds:i}};window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessageToService(o):window.__dcloud_weex_.postMessageToService(JSON.stringify(o))}if(!window.plus)return window.parent.postMessage({type:"WEB_INVOKE_APPSERVICE",data:t,pageId:""},"*");if(0===i.length){var r=plus.webview.currentWebview();if(!r)throw new Error("plus.webview.currentWebview() is undefined");var d=r.parent(),s="";s=d?d.id:r.id,i.push(s)}if(plus.webview.getWebviewById("__uniapp__service"))plus.webview.postMessageToUniNView({type:"WEB_INVOKE_APPSERVICE",args:{data:t,webviewIds:i}},"__uniapp__service");else{var w=JSON.stringify(t);plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat("WEB_INVOKE_APPSERVICE",'",').concat(w,",").concat(JSON.stringify(i),");"))}},o={navigateTo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;a("navigateTo",{url:encodeURI(n)})},navigateBack:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.delta;a("navigateBack",{delta:parseInt(n)||1})},switchTab:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;a("switchTab",{url:encodeURI(n)})},reLaunch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;a("reLaunch",{url:encodeURI(n)})},redirectTo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;a("redirectTo",{url:encodeURI(n)})},getEnv:function(e){window.plus?e({plus:!0}):e({h5:!0})},postMessage:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a("postMessage",e.data||{})}},r=/uni-app/i.test(navigator.userAgent),d=/Html5Plus/i.test(navigator.userAgent),s=/complete|loaded|interactive/;var w=window.my&&navigator.userAgent.indexOf("AlipayClient")>-1;var u=window.swan&&window.swan.webView&&/swan/i.test(navigator.userAgent);var c=window.qq&&window.qq.miniProgram&&/QQ/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var g=window.tt&&window.tt.miniProgram&&/toutiaomicroapp/i.test(navigator.userAgent);var v=window.wx&&window.wx.miniProgram&&/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var p=window.qa&&/quickapp/i.test(navigator.userAgent);for(var l,_=function(){window.UniAppJSBridge=!0,document.dispatchEvent(new CustomEvent("UniAppJSBridgeReady",{bubbles:!0,cancelable:!0}))},f=[function(e){if(r||d)return window.__dcloud_weex_postMessage||window.__dcloud_weex_?document.addEventListener("DOMContentLoaded",e):window.plus&&s.test(document.readyState)?setTimeout(e,0):document.addEventListener("plusready",e),o},function(e){if(v)return window.WeixinJSBridge&&window.WeixinJSBridge.invoke?setTimeout(e,0):document.addEventListener("WeixinJSBridgeReady",e),window.wx.miniProgram},function(e){if(c)return window.QQJSBridge&&window.QQJSBridge.invoke?setTimeout(e,0):document.addEventListener("QQJSBridgeReady",e),window.qq.miniProgram},function(e){if(w){document.addEventListener("DOMContentLoaded",e);var n=window.my;return{navigateTo:n.navigateTo,navigateBack:n.navigateBack,switchTab:n.switchTab,reLaunch:n.reLaunch,redirectTo:n.redirectTo,postMessage:n.postMessage,getEnv:n.getEnv}}},function(e){if(u)return document.addEventListener("DOMContentLoaded",e),window.swan.webView},function(e){if(g)return document.addEventListener("DOMContentLoaded",e),window.tt.miniProgram},function(e){if(p){window.QaJSBridge&&window.QaJSBridge.invoke?setTimeout(e,0):document.addEventListener("QaJSBridgeReady",e);var n=window.qa;return{navigateTo:n.navigateTo,navigateBack:n.navigateBack,switchTab:n.switchTab,reLaunch:n.reLaunch,redirectTo:n.redirectTo,postMessage:n.postMessage,getEnv:n.getEnv}}},function(e){return document.addEventListener("DOMContentLoaded",e),o}],m=0;m<f.length&&!(l=f[m](_));m++);l||(l={});var E="undefined"!=typeof uni?uni:{};if(!E.navigateTo)for(var b in l)t(l,b)&&(E[b]=l[b]);return E.webView=l,E}));
|
||||
1
unpackage/dist/build/app-plus/uni_modules/mp-html/static/app-plus/mp-html/local.html
vendored
Normal file
1
unpackage/dist/build/app-plus/uni_modules/mp-html/static/app-plus/mp-html/local.html
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><style>body,html{width:100%;height:100%;overflow-x:scroll;overflow-y:hidden}body{margin:0}video{width:300px;height:225px}img{max-width:100%;-webkit-touch-callout:none}</style></head><body><div id="content" style="overflow:hidden"></div><script type="text/javascript" src="./js/uni.webview.min.js"></script><script type="text/javascript" src="./js/handler.js"></script></body>
|
||||
25
unpackage/dist/cache/.vite/deps/_metadata.json
vendored
Normal file
25
unpackage/dist/cache/.vite/deps/_metadata.json
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"hash": "e0bb2a2f",
|
||||
"configHash": "72122489",
|
||||
"lockfileHash": "4872f2b8",
|
||||
"browserHash": "5bee3c96",
|
||||
"optimized": {
|
||||
"snarkdown": {
|
||||
"src": "../../../../../node_modules/snarkdown/dist/snarkdown.es.js",
|
||||
"file": "snarkdown.js",
|
||||
"fileHash": "3bb14d01",
|
||||
"needsInterop": false
|
||||
},
|
||||
"marked": {
|
||||
"src": "../../../../../node_modules/marked/lib/marked.esm.js",
|
||||
"file": "marked.js",
|
||||
"fileHash": "3cae6674",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
"chunks": {
|
||||
"chunk-F3FYYIAV": {
|
||||
"file": "chunk-F3FYYIAV.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
11
unpackage/dist/cache/.vite/deps/chunk-F3FYYIAV.js
vendored
Normal file
11
unpackage/dist/cache/.vite/deps/chunk-F3FYYIAV.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __publicField = (obj, key, value) => {
|
||||
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||
return value;
|
||||
};
|
||||
|
||||
export {
|
||||
__publicField
|
||||
};
|
||||
//# sourceMappingURL=chunk-F3FYYIAV.js.map
|
||||
7
unpackage/dist/cache/.vite/deps/chunk-F3FYYIAV.js.map
vendored
Normal file
7
unpackage/dist/cache/.vite/deps/chunk-F3FYYIAV.js.map
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
1366
unpackage/dist/cache/.vite/deps/marked.js
vendored
Normal file
1366
unpackage/dist/cache/.vite/deps/marked.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
unpackage/dist/cache/.vite/deps/marked.js.map
vendored
Normal file
7
unpackage/dist/cache/.vite/deps/marked.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
3
unpackage/dist/cache/.vite/deps/package.json
vendored
Normal file
3
unpackage/dist/cache/.vite/deps/package.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
31
unpackage/dist/cache/.vite/deps/snarkdown.js
vendored
Normal file
31
unpackage/dist/cache/.vite/deps/snarkdown.js
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
import "./chunk-F3FYYIAV.js";
|
||||
|
||||
// ../../../../Projects/uniapp/app-test/test1/node_modules/snarkdown/dist/snarkdown.es.js
|
||||
var e = { "": ["<em>", "</em>"], _: ["<strong>", "</strong>"], "*": ["<strong>", "</strong>"], "~": ["<s>", "</s>"], "\n": ["<br />"], " ": ["<br />"], "-": ["<hr />"] };
|
||||
function n(e2) {
|
||||
return e2.replace(RegExp("^" + (e2.match(/^(\t| )+/) || "")[0], "gm"), "");
|
||||
}
|
||||
function r(e2) {
|
||||
return (e2 + "").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
||||
}
|
||||
function t(a, c) {
|
||||
var o, l, g, s, p, u = /((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm, m = [], h = "", i = c || {}, d = 0;
|
||||
function f(n2) {
|
||||
var r2 = e[n2[1] || ""], t2 = m[m.length - 1] == n2;
|
||||
return r2 ? r2[1] ? (t2 ? m.pop() : m.push(n2), r2[0 | t2]) : r2[0] : n2;
|
||||
}
|
||||
function $() {
|
||||
for (var e2 = ""; m.length; )
|
||||
e2 += f(m[m.length - 1]);
|
||||
return e2;
|
||||
}
|
||||
for (a = a.replace(/^\[(.+?)\]:\s*(.+)$/gm, function(e2, n2, r2) {
|
||||
return i[n2.toLowerCase()] = r2, "";
|
||||
}).replace(/^\n+|\n+$/g, ""); g = u.exec(a); )
|
||||
l = a.substring(d, g.index), d = u.lastIndex, o = g[0], l.match(/[^\\](\\\\)*\\$/) || ((p = g[3] || g[4]) ? o = '<pre class="code ' + (g[4] ? "poetry" : g[2].toLowerCase()) + '"><code' + (g[2] ? ' class="language-' + g[2].toLowerCase() + '"' : "") + ">" + n(r(p).replace(/^\n+|\n+$/g, "")) + "</code></pre>" : (p = g[6]) ? (p.match(/\./) && (g[5] = g[5].replace(/^\d+/gm, "")), s = t(n(g[5].replace(/^\s*[>*+.-]/gm, ""))), ">" == p ? p = "blockquote" : (p = p.match(/\./) ? "ol" : "ul", s = s.replace(/^(.*)(\n|$)/gm, "<li>$1</li>")), o = "<" + p + ">" + s + "</" + p + ">") : g[8] ? o = '<img src="' + r(g[8]) + '" alt="' + r(g[7]) + '">' : g[10] ? (h = h.replace("<a>", '<a href="' + r(g[11] || i[l.toLowerCase()]) + '">'), o = $() + "</a>") : g[9] ? o = "<a>" : g[12] || g[14] ? o = "<" + (p = "h" + (g[14] ? g[14].length : g[13] > "=" ? 1 : 2)) + ">" + t(g[12] || g[15], i) + "</" + p + ">" : g[16] ? o = "<code>" + r(g[16]) + "</code>" : (g[17] || g[1]) && (o = f(g[17] || "--"))), h += l, h += o;
|
||||
return (h + a.substring(d) + $()).replace(/^\n+|\n+$/g, "");
|
||||
}
|
||||
export {
|
||||
t as default
|
||||
};
|
||||
//# sourceMappingURL=snarkdown.js.map
|
||||
7
unpackage/dist/cache/.vite/deps/snarkdown.js.map
vendored
Normal file
7
unpackage/dist/cache/.vite/deps/snarkdown.js.map
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../../../node_modules/snarkdown/src/index.js"],
|
||||
"sourcesContent": ["const TAGS = {\n\t'': ['<em>','</em>'],\n\t_: ['<strong>','</strong>'],\n\t'*': ['<strong>','</strong>'],\n\t'~': ['<s>','</s>'],\n\t'\\n': ['<br />'],\n\t' ': ['<br />'],\n\t'-': ['<hr />']\n};\n\n/** Outdent a string based on the first indented line's leading whitespace\n *\t@private\n */\nfunction outdent(str) {\n\treturn str.replace(RegExp('^'+(str.match(/^(\\t| )+/) || '')[0], 'gm'), '');\n}\n\n/** Encode special attribute characters to HTML entities in a String.\n *\t@private\n */\nfunction encodeAttr(str) {\n\treturn (str+'').replace(/\"/g, '"').replace(/</g, '<').replace(/>/g, '>');\n}\n\n/** Parse Markdown into an HTML String. */\nexport default function parse(md, prevLinks) {\n\tlet tokenizer = /((?:^|\\n+)(?:\\n---+|\\* \\*(?: \\*)+)\\n)|(?:^``` *(\\w*)\\n([\\s\\S]*?)\\n```$)|((?:(?:^|\\n+)(?:\\t| {2,}).+)+\\n*)|((?:(?:^|\\n)([>*+-]|\\d+\\.)\\s+.*)+)|(?:!\\[([^\\]]*?)\\]\\(([^)]+?)\\))|(\\[)|(\\](?:\\(([^)]+?)\\))?)|(?:(?:^|\\n+)([^\\s].*)\\n(-{3,}|={3,})(?:\\n+|$))|(?:(?:^|\\n+)(#{1,6})\\s*(.+)(?:\\n+|$))|(?:`([^`].*?)`)|( \\n\\n*|\\n{2,}|__|\\*\\*|[_*]|~~)/gm,\n\t\tcontext = [],\n\t\tout = '',\n\t\tlinks = prevLinks || {},\n\t\tlast = 0,\n\t\tchunk, prev, token, inner, t;\n\n\tfunction tag(token) {\n\t\tlet desc = TAGS[token[1] || ''];\n\t\tlet end = context[context.length-1] == token;\n\t\tif (!desc) return token;\n\t\tif (!desc[1]) return desc[0];\n\t\tif (end) context.pop();\n\t\telse context.push(token);\n\t\treturn desc[end|0];\n\t}\n\n\tfunction flush() {\n\t\tlet str = '';\n\t\twhile (context.length) str += tag(context[context.length-1]);\n\t\treturn str;\n\t}\n\n\tmd = md.replace(/^\\[(.+?)\\]:\\s*(.+)$/gm, (s, name, url) => {\n\t\tlinks[name.toLowerCase()] = url;\n\t\treturn '';\n\t}).replace(/^\\n+|\\n+$/g, '');\n\n\twhile ( (token=tokenizer.exec(md)) ) {\n\t\tprev = md.substring(last, token.index);\n\t\tlast = tokenizer.lastIndex;\n\t\tchunk = token[0];\n\t\tif (prev.match(/[^\\\\](\\\\\\\\)*\\\\$/)) {\n\t\t\t// escaped\n\t\t}\n\t\t// Code/Indent blocks:\n\t\telse if (t = (token[3] || token[4])) {\n\t\t\tchunk = '<pre class=\"code '+(token[4]?'poetry':token[2].toLowerCase())+'\"><code'+(token[2] ? ` class=\"language-${token[2].toLowerCase()}\"` : '')+'>'+outdent(encodeAttr(t).replace(/^\\n+|\\n+$/g, ''))+'</code></pre>';\n\t\t}\n\t\t// > Quotes, -* lists:\n\t\telse if (t = token[6]) {\n\t\t\tif (t.match(/\\./)) {\n\t\t\t\ttoken[5] = token[5].replace(/^\\d+/gm, '');\n\t\t\t}\n\t\t\tinner = parse(outdent(token[5].replace(/^\\s*[>*+.-]/gm, '')));\n\t\t\tif (t=='>') t = 'blockquote';\n\t\t\telse {\n\t\t\t\tt = t.match(/\\./) ? 'ol' : 'ul';\n\t\t\t\tinner = inner.replace(/^(.*)(\\n|$)/gm, '<li>$1</li>');\n\t\t\t}\n\t\t\tchunk = '<'+t+'>' + inner + '</'+t+'>';\n\t\t}\n\t\t// Images:\n\t\telse if (token[8]) {\n\t\t\tchunk = `<img src=\"${encodeAttr(token[8])}\" alt=\"${encodeAttr(token[7])}\">`;\n\t\t}\n\t\t// Links:\n\t\telse if (token[10]) {\n\t\t\tout = out.replace('<a>', `<a href=\"${encodeAttr(token[11] || links[prev.toLowerCase()])}\">`);\n\t\t\tchunk = flush() + '</a>';\n\t\t}\n\t\telse if (token[9]) {\n\t\t\tchunk = '<a>';\n\t\t}\n\t\t// Headings:\n\t\telse if (token[12] || token[14]) {\n\t\t\tt = 'h' + (token[14] ? token[14].length : (token[13]>'=' ? 1 : 2));\n\t\t\tchunk = '<'+t+'>' + parse(token[12] || token[15], links) + '</'+t+'>';\n\t\t}\n\t\t// `code`:\n\t\telse if (token[16]) {\n\t\t\tchunk = '<code>'+encodeAttr(token[16])+'</code>';\n\t\t}\n\t\t// Inline formatting: *em*, **strong** & friends\n\t\telse if (token[17] || token[1]) {\n\t\t\tchunk = tag(token[17] || '--');\n\t\t}\n\t\tout += prev;\n\t\tout += chunk;\n\t}\n\n\treturn (out + md.substring(last) + flush()).replace(/^\\n+|\\n+$/g, '');\n}\n"],
|
||||
"mappings": ";;;AAAA,IAAMA,IAAO,EACZ,IAAI,CAAC,QAAO,OAAA,GACZC,GAAG,CAAC,YAAW,WAAA,GACfC,KAAK,CAAC,YAAW,WAAA,GACjBC,KAAK,CAAC,OAAM,MAAA,GACZC,MAAM,CAAC,QAAA,GACPC,KAAK,CAAC,QAAA,GACNC,KAAK,CAAC,QAAA,EAAA;AAMP,SAASC,EAAQC,IAAAA;AAChB,SAAOA,GAAIC,QAAQC,OAAO,OAAKF,GAAIG,MAAM,UAAA,KAAe,IAAI,CAAA,GAAI,IAAA,GAAO,EAAA;AAAA;AAMxE,SAASC,EAAWJ,IAAAA;AACnB,UAAQA,KAAI,IAAIC,QAAQ,MAAM,QAAA,EAAUA,QAAQ,MAAM,MAAA,EAAQA,QAAQ,MAAM,MAAA;AAAA;AAAA,SAAA,EAI/CI,GAAIC,GAAAA;AACjC,MAKCC,GAAOC,GAAMC,GAAOC,GAAOC,GALxBC,IAAY,mVACfC,IAAU,CAAA,GACVC,IAAM,IACNC,IAAQT,KAAa,CAAA,GACrBU,IAAO;AAGR,WAASC,EAAIR,IAAAA;AACZ,QAAIS,KAAO1B,EAAKiB,GAAM,CAAA,KAAM,EAAA,GACxBU,KAAMN,EAAQA,EAAQO,SAAO,CAAA,KAAMX;AACvC,WAAKS,KACAA,GAAK,CAAA,KACNC,KAAKN,EAAQQ,IAAAA,IACZR,EAAQS,KAAKb,EAAAA,GACXS,GAAS,IAAJC,EAAAA,KAHSD,GAAK,CAAA,IADRT;EAAAA;AAOnB,WAASc,IAAAA;AAER,aADIvB,KAAM,IACHa,EAAQO;AAAQpB,MAAAA,MAAOiB,EAAIJ,EAAQA,EAAQO,SAAO,CAAA,CAAA;AACzD,WAAOpB;EAAAA;AAQR,OALAK,IAAKA,EAAGJ,QAAQ,yBAAyB,SAACuB,IAAGC,IAAMC,IAAAA;AAElD,WADAX,EAAMU,GAAKE,YAAAA,CAAAA,IAAiBD,IACrB;EAAA,CAAA,EACLzB,QAAQ,cAAc,EAAA,GAEhBQ,IAAMG,EAAUgB,KAAKvB,CAAAA;AAC7BG,QAAOH,EAAGwB,UAAUb,GAAMP,EAAMqB,KAAAA,GAChCd,IAAOJ,EAAUmB,WACjBxB,IAAQE,EAAM,CAAA,GACVD,EAAKL,MAAM,iBAAA,OAINQ,IAAKF,EAAM,CAAA,KAAMA,EAAM,CAAA,KAC/BF,IAAQ,uBAAqBE,EAAM,CAAA,IAAG,WAASA,EAAM,CAAA,EAAGkB,YAAAA,KAAe,aAAWlB,EAAM,CAAA,IAAA,sBAAyBA,EAAM,CAAA,EAAGkB,YAAAA,IAAAA,MAAmB,MAAI,MAAI5B,EAAQK,EAAWO,CAAAA,EAAGV,QAAQ,cAAc,EAAA,CAAA,IAAK,mBAG9LU,IAAIF,EAAM,CAAA,MACdE,EAAER,MAAM,IAAA,MACXM,EAAM,CAAA,IAAKA,EAAM,CAAA,EAAGR,QAAQ,UAAU,EAAA,IAEvCS,IAAQsB,EAAMjC,EAAQU,EAAM,CAAA,EAAGR,QAAQ,iBAAiB,EAAA,CAAA,CAAA,GACjD,OAAHU,IAAQA,IAAI,gBAEfA,IAAIA,EAAER,MAAM,IAAA,IAAQ,OAAO,MAC3BO,IAAQA,EAAMT,QAAQ,iBAAiB,aAAA,IAExCM,IAAQ,MAAII,IAAE,MAAMD,IAAQ,OAAKC,IAAE,OAG3BF,EAAM,CAAA,IACdF,IAAAA,eAAqBH,EAAWK,EAAM,CAAA,CAAA,IAAA,YAAaL,EAAWK,EAAM,CAAA,CAAA,IAAA,OAG5DA,EAAM,EAAA,KACdK,IAAMA,EAAIb,QAAQ,OAAA,cAAmBG,EAAWK,EAAM,EAAA,KAAOM,EAAMP,EAAKmB,YAAAA,CAAAA,CAAAA,IAAAA,IAAAA,GACxEpB,IAAQgB,EAAAA,IAAU,UAEVd,EAAM,CAAA,IACdF,IAAQ,QAGAE,EAAM,EAAA,KAAOA,EAAM,EAAA,IAE3BF,IAAQ,OADRI,IAAI,OAAOF,EAAM,EAAA,IAAMA,EAAM,EAAA,EAAIW,SAAUX,EAAM,EAAA,IAAI,MAAM,IAAI,MACjD,MAAMuB,EAAMvB,EAAM,EAAA,KAAOA,EAAM,EAAA,GAAKM,CAAAA,IAAS,OAAKJ,IAAE,MAG1DF,EAAM,EAAA,IACdF,IAAQ,WAASH,EAAWK,EAAM,EAAA,CAAA,IAAK,aAG/BA,EAAM,EAAA,KAAOA,EAAM,CAAA,OAC3BF,IAAQU,EAAIR,EAAM,EAAA,KAAO,IAAA,KAE1BK,KAAON,GACPM,KAAOP;AAGR,UAAQO,IAAMT,EAAGwB,UAAUb,CAAAA,IAAQO,EAAAA,GAAStB,QAAQ,cAAc,EAAA;AAAA;",
|
||||
"names": ["TAGS", "_", "*", "~", "\n", " ", "-", "outdent", "str", "replace", "RegExp", "match", "encodeAttr", "md", "prevLinks", "chunk", "prev", "token", "inner", "t", "tokenizer", "context", "out", "links", "last", "tag", "desc", "end", "length", "pop", "push", "flush", "s", "name", "url", "toLowerCase", "exec", "substring", "index", "lastIndex", "parse"]
|
||||
}
|
||||
11
unpackage/dist/dev/.nvue/app.css.js
vendored
Normal file
11
unpackage/dist/dev/.nvue/app.css.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __commonJS = (cb, mod) => function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
var require_app_css = __commonJS({
|
||||
"app.css.js"(exports) {
|
||||
const _style_0 = {};
|
||||
exports.styles = [_style_0];
|
||||
}
|
||||
});
|
||||
export default require_app_css();
|
||||
2
unpackage/dist/dev/.nvue/app.js
vendored
Normal file
2
unpackage/dist/dev/.nvue/app.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
Promise.resolve("./app.css.js").then(() => {
|
||||
});
|
||||
206
unpackage/dist/dev/.tsc/app-android/uni_modules/lime-choose-file/utssdk/app-android/index.uts.ts
vendored
Normal file
206
unpackage/dist/dev/.tsc/app-android/uni_modules/lime-choose-file/utssdk/app-android/index.uts.ts
vendored
Normal file
@@ -0,0 +1,206 @@
|
||||
// @ts-nocheck
|
||||
import Intent from 'android.content.Intent';
|
||||
import ClipData from 'android.content.ClipData';
|
||||
import Uri from 'android.net.Uri';
|
||||
import InputStream from 'java.io.InputStream';
|
||||
import OpenableColumns from 'android.provider.OpenableColumns';
|
||||
import Cursor from 'android.database.Cursor';
|
||||
import File from 'java.io.File';
|
||||
import FileInputStream from 'java.io.FileInputStream';
|
||||
import FileOutputStream from 'java.io.FileOutputStream';
|
||||
import BufferedOutputStream from 'java.io.BufferedOutputStream';
|
||||
import ByteArrayInputStream from 'java.io.ByteArrayInputStream';
|
||||
|
||||
import { ChooseFileOption, ChooseFile, ChooseFileSuccessCallbackResult } from '../interface'
|
||||
import { GeneralCallbackResultImpl } from '../unierror'
|
||||
|
||||
const REQUEST_CODE_CHOOSE_FILE : Int = 42
|
||||
let resultFunction : ((requestCode : Int, resultCode : Int, data ?: Intent) => void) | null = null
|
||||
|
||||
|
||||
class ChooseFileImpl implements ChooseFile {
|
||||
name : string = ''
|
||||
path : string = ''
|
||||
// private _path : string = ''
|
||||
size : number = 0
|
||||
time : number = 0
|
||||
type : string = 'file'
|
||||
// private uri : Uri
|
||||
private options: ChooseFileOption
|
||||
constructor(uri : Uri, options : ChooseFileOption) {
|
||||
// this.uri = uri
|
||||
this.options = options
|
||||
this.time = Date.now()
|
||||
this.type = this.getFileTypeFromUri(uri);
|
||||
// this._path = uri.getPath() ?? ''
|
||||
this.getFileInfoFromUri(uri)
|
||||
if (this.isCache(options)) {
|
||||
this.copyFileToCache(uri)
|
||||
}
|
||||
|
||||
}
|
||||
private isCache(options : ChooseFileOption) : boolean {
|
||||
const extension = this.getFileExtension(this.name)
|
||||
const extensions = options.extension
|
||||
const type = options.type ?? 'all'
|
||||
const hasExtension = extensions != null && extension != '' && extensions.includes(extension)
|
||||
const isVideoOrImage = ['video', 'image'].includes(type)
|
||||
const isFileAndNotVideoOrImage = type == 'file' && !['video', 'image'].includes(this.type);
|
||||
if ((type == 'all' || isVideoOrImage || isFileAndNotVideoOrImage) && !hasExtension) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
private getFileExtension(fileName : string) : string {
|
||||
const lastDotIndex = fileName.lastIndexOf(".");
|
||||
if (lastDotIndex == -1) {
|
||||
return "";
|
||||
}
|
||||
return fileName.substring(lastDotIndex + 1);
|
||||
}
|
||||
private copyFileToCache(uri : Uri) {
|
||||
const cacheDir = UTSAndroid.getAppCachePath();
|
||||
const context = UTSAndroid.getAppContext();
|
||||
if(cacheDir != null) {
|
||||
const path = new File(cacheDir);
|
||||
if (!path.exists()) {
|
||||
path.mkdir();
|
||||
}
|
||||
}
|
||||
let fileName = this.name
|
||||
if(this.options.filename != null) {
|
||||
fileName = this.options.filename!;
|
||||
if(this.options.count != null && this.options.count! > 1) {
|
||||
fileName = `${fileName}_${Date.now()}`;
|
||||
}
|
||||
const extension = this.getFileExtension(this.name)
|
||||
|
||||
fileName = `${fileName}.${extension}`
|
||||
}
|
||||
const destFile = new File(cacheDir, fileName);
|
||||
|
||||
try {
|
||||
const inputStream = context!.getContentResolver().openInputStream(uri)
|
||||
const outputStream = new FileOutputStream(destFile)
|
||||
if (inputStream != null) {
|
||||
let buffer = ByteArray(1024);
|
||||
let c = inputStream.read(buffer)
|
||||
while (c > 0) {
|
||||
outputStream.write(buffer, 0, c);
|
||||
c = inputStream.read(buffer)
|
||||
}
|
||||
}
|
||||
this.path = cacheDir + fileName//this.name
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
private getFileTypeFromUri(uri : Uri) : string {
|
||||
const context = UTSAndroid.getAppContext();
|
||||
let fileType = 'file'
|
||||
let mimeType = context!.getContentResolver().getType(uri);
|
||||
if (mimeType != null) {
|
||||
if (mimeType.startsWith("video")) {
|
||||
fileType = "video";
|
||||
} else if (mimeType.startsWith("image")) {
|
||||
fileType = "image";
|
||||
}
|
||||
}
|
||||
return fileType;
|
||||
}
|
||||
private getFileInfoFromUri(uri : Uri) {
|
||||
const context = UTSAndroid.getAppContext();
|
||||
let cursor = context!.getContentResolver().query(uri, null, null, null, null);
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
this.name = cursor.getString(cursor.getColumnIndexOrThrow(OpenableColumns.DISPLAY_NAME))
|
||||
const fileSize = cursor.getLong(cursor.getColumnIndexOrThrow(OpenableColumns.SIZE));
|
||||
this.size = Number.from(fileSize)
|
||||
cursor.close();
|
||||
} else if ("file".equals(uri.getScheme())) {
|
||||
this.name = uri.getLastPathSegment() ?? '';
|
||||
const file = new File(uri.getPath() ?? '');
|
||||
const fileSize = file.length();
|
||||
this.size = Number.from(fileSize)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export function chooseFile(options : ChooseFileOption) {
|
||||
if (resultFunction != null) {
|
||||
UTSAndroid.offAppActivityResult(resultFunction!)
|
||||
}
|
||||
const type = options.type ?? 'all'
|
||||
const intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
if (type.equals("all") || type.equals("file")) {
|
||||
intent.setType("*/*");
|
||||
} else if (type.equals("video")) {
|
||||
intent.setType("video/*");
|
||||
} else if (type.equals("image")) {
|
||||
intent.setType("image/*");
|
||||
}
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, options.count == 1 ? false : true); // 允许多选
|
||||
|
||||
resultFunction = (requestCode : Int, resultCode : Int, data ?: Intent) => {
|
||||
if (requestCode == REQUEST_CODE_CHOOSE_FILE) {
|
||||
UTSAndroid.offAppActivityResult(resultFunction!);
|
||||
if (resultCode == -1 && data != null) {
|
||||
const clipData = data.getClipData();
|
||||
const tempFiles : ChooseFile[] = []
|
||||
|
||||
if (clipData != null) {
|
||||
// 多选
|
||||
// const itemCount = clipData.getItemCount();
|
||||
// if (options.count != null && options.count! > itemCount) {
|
||||
// const err = new GeneralCallbackResultImpl(9010002, `选中文件数量超过${options.count}`)
|
||||
// options.fail?.(err)
|
||||
// options.complete?.(err)
|
||||
// return
|
||||
// }
|
||||
for (let i = 0; i < clipData.getItemCount(); i++) {
|
||||
const uri = clipData.getItemAt(i.toInt()).getUri();
|
||||
const chooseFile = new ChooseFileImpl(uri, options);
|
||||
if(chooseFile.path !=''){
|
||||
tempFiles.push(chooseFile)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 单选
|
||||
const uri = data.getData();
|
||||
if (uri != null) {
|
||||
const chooseFile = new ChooseFileImpl(uri, options)
|
||||
if(chooseFile.path !='' ){
|
||||
tempFiles.push(chooseFile)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
const count = options.count ?? Integer.MAX_VALUE // Number.MAX_VALUE
|
||||
if(tempFiles.length > 0 && count >= tempFiles.length){
|
||||
options.success?.({
|
||||
tempFiles,
|
||||
errMsg: 'chooseFile:ok'
|
||||
} as ChooseFileSuccessCallbackResult)
|
||||
} else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件或文件超过设置数量`)
|
||||
options.fail?.(err)
|
||||
options.complete?.(err)
|
||||
}
|
||||
} else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件`)
|
||||
options.fail?.(err)
|
||||
options.complete?.(err)
|
||||
}
|
||||
} else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件`)
|
||||
options.fail?.(err)
|
||||
options.complete?.(err)
|
||||
}
|
||||
}
|
||||
|
||||
UTSAndroid.onAppActivityResult(resultFunction!)
|
||||
UTSAndroid.getUniActivity()!.startActivityForResult(Intent.createChooser(intent, "选择文件"), REQUEST_CODE_CHOOSE_FILE)
|
||||
// UTSAndroid.getUniActivity()!.overridePendingTransition((10).toInt(), (0).toInt());
|
||||
}
|
||||
138
unpackage/dist/dev/.tsc/app-android/uni_modules/lime-choose-file/utssdk/app-ios/index.uts.ts
vendored
Normal file
138
unpackage/dist/dev/.tsc/app-android/uni_modules/lime-choose-file/utssdk/app-ios/index.uts.ts
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
// @ts-nocheck
|
||||
import { ChooseFileOption, ChooseFile, ChooseFileSuccessCallbackResult } from '../interface'
|
||||
import { UIDocumentPickerDelegate, UIDocumentPickerMode } from "UIKit"
|
||||
import { URL, FileManager } from 'Foundation';
|
||||
import { GeneralCallbackResultImpl } from '../unierror'
|
||||
import { DispatchQueue } from 'Dispatch';
|
||||
|
||||
const documentTypes : Map<string, string[]> = new Map([
|
||||
["all", ["public.item"]],
|
||||
["file", [
|
||||
"public.text",
|
||||
"public.zip-archive",
|
||||
"public.data",
|
||||
"com.adobe.pdf",
|
||||
"com.microsoft.word.doc",
|
||||
"com.microsoft.word.docx",
|
||||
"com.microsoft.excel.xls",
|
||||
"com.microsoft.excel.xlsx"
|
||||
]
|
||||
],
|
||||
["video", ["public.movie"]],
|
||||
["image", ["public.image"]],
|
||||
])
|
||||
|
||||
class ChooseFileImpl {
|
||||
name : string = ''
|
||||
path : string = ''
|
||||
size : number = 0
|
||||
time : number = 0
|
||||
type : string = 'file'
|
||||
constructor(uri : URL, options : ChooseFileOption) {
|
||||
try {
|
||||
const originalFileName = uri.lastPathComponent;
|
||||
const attributes = UTSiOS.try(FileManager.default.attributesOfItem(atPath = uri.path))
|
||||
const fileSize = attributes[FileAttributeKey.size] as number
|
||||
const pathExtension = `${uri.pathExtension}`
|
||||
|
||||
const imageFormats = ['jpeg', 'jpg', 'png', 'gif', 'bmp', 'tiff', 'svg']
|
||||
const videoFormats = ['mov', 'm4v', 'mp4', 'avi']
|
||||
|
||||
|
||||
let fileName = originalFileName
|
||||
if(options.filename != null) {
|
||||
fileName = options.filename!
|
||||
if(options.count != null && options.count! > 1) {
|
||||
fileName = `${fileName}_${Date.now()}`;
|
||||
}
|
||||
fileName = `${fileName}.${pathExtension}`
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const dataPath = UTSiOS.getDataPath().replace(/data$/, "doc");
|
||||
|
||||
const file = new URL(fileURLWithPath = dataPath).appendingPathComponent(fileName)//.absoluteString
|
||||
const fileData = FileManager.default.contents(atPath = uri.path);
|
||||
UTSiOS.try(fileData?.write(to = file))
|
||||
|
||||
if (imageFormats.includes(pathExtension)) {
|
||||
this.type = 'image'
|
||||
} else if (videoFormats.includes(pathExtension)) {
|
||||
this.type = 'video'
|
||||
} else {
|
||||
this.type = 'file'
|
||||
}
|
||||
|
||||
this.name = `${originalFileName}`
|
||||
this.size = fileSize
|
||||
this.path = `${file.absoluteString}`
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class FilePickerManager implements UIDocumentPickerDelegate {
|
||||
options : ChooseFileOption = {}
|
||||
constructor() { }
|
||||
chooseFile(options : ChooseFileOption) {
|
||||
DispatchQueue.main.async(execute = () : void => {
|
||||
this.options = options
|
||||
const type = options.type ?? 'all'
|
||||
const count = options.count ?? 1
|
||||
const types = (documentTypes.get(type) ?? documentTypes.get('all')) as string[]
|
||||
let documentPicker = UIDocumentPickerViewController(
|
||||
documentTypes = types,
|
||||
in = UIDocumentPickerMode.import
|
||||
)
|
||||
documentPicker.delegate = this
|
||||
// 多选要大于 ios11
|
||||
if (UTSiOS.available("iOS 11.0, *")) {
|
||||
documentPicker.allowsMultipleSelection = count > 1
|
||||
}
|
||||
UTSiOS.getCurrentViewController().present(documentPicker, animated = true)
|
||||
})
|
||||
}
|
||||
documentPicker(controller : UIDocumentPickerViewController, @argumentLabel("didPickDocumentsAt") urls : URL[]) {
|
||||
DispatchQueue.main.async(execute = () : void => {
|
||||
const tempFiles : ChooseFile[] = []
|
||||
for (let i = 0; i < urls.length; i++) {
|
||||
const url = urls[i]
|
||||
const chooseFile = new ChooseFileImpl(url, this.options);
|
||||
// IOS -> js 无法传class?
|
||||
const file : ChooseFile = {
|
||||
name: chooseFile.name,
|
||||
path: chooseFile.path,
|
||||
size: chooseFile.size,
|
||||
time: chooseFile.time,
|
||||
type: chooseFile.type,
|
||||
}
|
||||
if (chooseFile.path != '') {
|
||||
tempFiles.push(file)
|
||||
}
|
||||
}
|
||||
|
||||
const count = this.options.count ?? Number.from(Double.greatestFiniteMagnitude) //Number.from(Double.MAX_VALUE)
|
||||
if (tempFiles.length > 0 && count >= tempFiles.length) {
|
||||
const res : ChooseFileSuccessCallbackResult = {
|
||||
tempFiles,
|
||||
errMsg: 'chooseFile:ok'
|
||||
}
|
||||
this.options.success?.(res)
|
||||
} else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件或文件超过设置数量`)
|
||||
this.options.fail?.(err)
|
||||
this.options.complete?.(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const fileManager = new FilePickerManager()
|
||||
|
||||
export function chooseFile(options : ChooseFileOption) {
|
||||
fileManager.chooseFile(options)
|
||||
}
|
||||
35
unpackage/dist/dev/.tsc/app-android/uni_modules/lime-choose-file/utssdk/index.uts.ts
vendored
Normal file
35
unpackage/dist/dev/.tsc/app-android/uni_modules/lime-choose-file/utssdk/index.uts.ts
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
// @ts-nocheck
|
||||
export * from './interface';
|
||||
import { type ChooseFileOption } from './interface';
|
||||
|
||||
export function chooseFile(options: ChooseFileOption){
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
__f__('error','at uni_modules/lime-choose-file/utssdk/index.uts:33','chooseFile 不支持该平台')
|
||||
|
||||
}
|
||||
108
unpackage/dist/dev/.tsc/app-android/uni_modules/lime-choose-file/utssdk/interface.uts.ts
vendored
Normal file
108
unpackage/dist/dev/.tsc/app-android/uni_modules/lime-choose-file/utssdk/interface.uts.ts
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
// @ts-nocheck
|
||||
/**
|
||||
* 错误码
|
||||
* 根据uni错误码规范要求,建议错误码以90开头,以下是错误码示例:
|
||||
* - 9010001 错误信息1
|
||||
* - 9010002 错误信息2
|
||||
*/
|
||||
export type ChooseFileErrorCode = 9010001 | 9010002 | 1101001 | 1101002 | 1101003 | 1101004 | 1101005 | 1101006 | 1101007 | 1101008 | 1101009 | 1101010;
|
||||
/**
|
||||
* myApi 的错误回调参数
|
||||
*/
|
||||
export interface GeneralCallbackResult extends IUniError {
|
||||
errCode : ChooseFileErrorCode
|
||||
};
|
||||
|
||||
|
||||
/** 返回选择的文件的本地临时文件对象数组 */
|
||||
|
||||
export interface ChooseFile {
|
||||
/** 选择的文件名称 */
|
||||
name : string
|
||||
/** 本地临时文件路径 (本地路径) */
|
||||
path : string
|
||||
/** 本地临时文件大小,单位 B */
|
||||
size : number
|
||||
/** 选择的文件的会话发送时间,Unix时间戳,工具暂不支持此属性 */
|
||||
time : number
|
||||
/** 选择的文件类型
|
||||
*
|
||||
* 可选值:
|
||||
* - 'video': 选择了视频文件;
|
||||
* - 'image': 选择了图片文件;
|
||||
* - 'file': 选择了除图片和视频的文件; */
|
||||
type : 'video' | 'image' | 'file' | 'all'
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export type ChooseFileSuccessCallbackResult = {
|
||||
/** 返回选择的文件的本地临时文件对象数组 */
|
||||
tempFiles : ChooseFile[],
|
||||
errMsg : string
|
||||
}
|
||||
|
||||
|
||||
/** 接口调用成功的回调函数 */
|
||||
export type ChooseFileSuccessCallback = (
|
||||
result : ChooseFileSuccessCallbackResult
|
||||
) => void
|
||||
|
||||
/** 接口调用失败的回调函数 */
|
||||
export type ChooseFileFailCallback = (res : GeneralCallbackResult) => void
|
||||
|
||||
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
||||
export type ChooseFileCompleteCallback = (
|
||||
res : GeneralCallbackResult
|
||||
) => void
|
||||
|
||||
export type ChooseFileOption = {
|
||||
/**
|
||||
* 指定文件名,如果是多选就在后面增加上时间
|
||||
*/
|
||||
filename?: string
|
||||
/**
|
||||
* 最多可以选择的文件数量。
|
||||
* @defaultValue 100
|
||||
*/
|
||||
count ?: number | null,
|
||||
/**
|
||||
* 所选文件类型
|
||||
* @defaultValue all
|
||||
*/
|
||||
type ?: string | null,
|
||||
/**
|
||||
* 根据文件拓展名过滤,每一项都不能是空字符串。默认不过滤。仅H5支持
|
||||
*/
|
||||
extension ?: (string[]) | null,
|
||||
/**
|
||||
* 成功则返回图片的本地文件路径列表 tempFilePaths
|
||||
*/
|
||||
success ?: ChooseFileSuccessCallback | null,
|
||||
/**
|
||||
* 接口调用失败的回调函数
|
||||
*/
|
||||
fail ?: ChooseFileFailCallback | null,
|
||||
/**
|
||||
* 接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
*/
|
||||
complete ?: ChooseFileCompleteCallback | null
|
||||
}
|
||||
40
unpackage/dist/dev/.tsc/app-android/uni_modules/lime-choose-file/utssdk/unierror.uts.ts
vendored
Normal file
40
unpackage/dist/dev/.tsc/app-android/uni_modules/lime-choose-file/utssdk/unierror.uts.ts
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
// @ts-nocheck
|
||||
/* 此规范为 uni 规范,可以按照自己的需要选择是否实现 */
|
||||
import { ChooseFileErrorCode, GeneralCallbackResult } from "./interface.uts"
|
||||
/**
|
||||
* 错误主题
|
||||
* 注意:错误主题一般为插件名称,每个组件不同,需要使用时请更改。
|
||||
* [可选实现]
|
||||
*/
|
||||
export const UniErrorSubject = 'chooseFile"';
|
||||
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
* @UniError
|
||||
* [可选实现]
|
||||
*/
|
||||
export const UniErrors : Map<ChooseFileErrorCode, string> = new Map([
|
||||
/**
|
||||
* 错误码及对应的错误信息
|
||||
*/
|
||||
[9010001, 'chooseFile:ok'],
|
||||
[9010002, 'ChooseFile:failed'],
|
||||
]);
|
||||
|
||||
|
||||
/**
|
||||
* 错误对象实现
|
||||
*/
|
||||
export class GeneralCallbackResultImpl extends UniError implements GeneralCallbackResult {
|
||||
|
||||
/**
|
||||
* 错误对象构造函数
|
||||
*/
|
||||
constructor(errCode : ChooseFileErrorCode, errMsg: string|null = null) {
|
||||
super();
|
||||
this.errSubject = UniErrorSubject;
|
||||
this.errCode = errCode;
|
||||
this.errMsg = errMsg ?? UniErrors[errCode] ?? "";
|
||||
}
|
||||
}
|
||||
203
unpackage/dist/dev/.uvue/app-android/uni_modules/lime-choose-file/utssdk/app-android/index.uts
vendored
Normal file
203
unpackage/dist/dev/.uvue/app-android/uni_modules/lime-choose-file/utssdk/app-android/index.uts
vendored
Normal file
@@ -0,0 +1,203 @@
|
||||
// @ts-nocheck
|
||||
import Intent from 'android.content.Intent';
|
||||
import ClipData from 'android.content.ClipData';
|
||||
import Uri from 'android.net.Uri';
|
||||
import InputStream from 'java.io.InputStream';
|
||||
import OpenableColumns from 'android.provider.OpenableColumns';
|
||||
import Cursor from 'android.database.Cursor';
|
||||
import File from 'java.io.File';
|
||||
import FileInputStream from 'java.io.FileInputStream';
|
||||
import FileOutputStream from 'java.io.FileOutputStream';
|
||||
import BufferedOutputStream from 'java.io.BufferedOutputStream';
|
||||
import ByteArrayInputStream from 'java.io.ByteArrayInputStream';
|
||||
import { ChooseFileOption, ChooseFile, ChooseFileSuccessCallbackResult } from '../interface';
|
||||
import { GeneralCallbackResultImpl } from '../unierror';
|
||||
const REQUEST_CODE_CHOOSE_FILE: Int = 42;
|
||||
let resultFunction: ((requestCode: Int, resultCode: Int, data?: Intent) => void) | null = null;
|
||||
class ChooseFileImpl implements ChooseFile {
|
||||
override name: string = '';
|
||||
override path: string = '';
|
||||
// private _path : string = ''
|
||||
override size: number = 0;
|
||||
override time: number = 0;
|
||||
override type: string = 'file';
|
||||
// private uri : Uri
|
||||
private options: ChooseFileOption;
|
||||
constructor(uri: Uri, options: ChooseFileOption) {
|
||||
// this.uri = uri
|
||||
this.options = options;
|
||||
this.time = Date.now();
|
||||
this.type = this.getFileTypeFromUri(uri);
|
||||
// this._path = uri.getPath() ?? ''
|
||||
this.getFileInfoFromUri(uri);
|
||||
if (this.isCache(options)) {
|
||||
this.copyFileToCache(uri);
|
||||
}
|
||||
}
|
||||
private isCache(options: ChooseFileOption): boolean {
|
||||
const extension = this.getFileExtension(this.name);
|
||||
const extensions = options.extension;
|
||||
const type = options.type ?? 'all';
|
||||
const hasExtension = extensions != null && extension != '' && extensions.includes(extension);
|
||||
const isVideoOrImage = ['video', 'image'].includes(type);
|
||||
const isFileAndNotVideoOrImage = type == 'file' && !['video', 'image'].includes(this.type);
|
||||
if ((type == 'all' || isVideoOrImage || isFileAndNotVideoOrImage) && !hasExtension) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
private getFileExtension(fileName: string): string {
|
||||
const lastDotIndex = fileName.lastIndexOf(".");
|
||||
if (lastDotIndex == -1) {
|
||||
return "";
|
||||
}
|
||||
return fileName.substring(lastDotIndex + 1);
|
||||
}
|
||||
private copyFileToCache(uri: Uri) {
|
||||
const cacheDir = UTSAndroid.getAppCachePath();
|
||||
const context = UTSAndroid.getAppContext();
|
||||
if (cacheDir != null) {
|
||||
const path = new File(cacheDir);
|
||||
if (!path.exists()) {
|
||||
path.mkdir();
|
||||
}
|
||||
}
|
||||
let fileName = this.name;
|
||||
if (this.options.filename != null) {
|
||||
fileName = this.options.filename!;
|
||||
if (this.options.count != null && this.options.count! > 1) {
|
||||
fileName = `${fileName}_${Date.now()}`;
|
||||
}
|
||||
const extension = this.getFileExtension(this.name);
|
||||
fileName = `${fileName}.${extension}`;
|
||||
}
|
||||
const destFile = new File(cacheDir, fileName);
|
||||
try {
|
||||
const inputStream = context!.getContentResolver().openInputStream(uri);
|
||||
const outputStream = new FileOutputStream(destFile);
|
||||
if (inputStream != null) {
|
||||
let buffer = ByteArray(1024);
|
||||
let c = inputStream.read(buffer);
|
||||
while (c > 0) {
|
||||
outputStream.write(buffer, 0, c);
|
||||
c = inputStream.read(buffer);
|
||||
}
|
||||
}
|
||||
this.path = cacheDir + fileName; //this.name
|
||||
}
|
||||
catch (e: any) {
|
||||
}
|
||||
}
|
||||
private getFileTypeFromUri(uri: Uri): string {
|
||||
const context = UTSAndroid.getAppContext();
|
||||
let fileType = 'file';
|
||||
let mimeType = context!.getContentResolver().getType(uri);
|
||||
if (mimeType != null) {
|
||||
if (mimeType.startsWith("video")) {
|
||||
fileType = "video";
|
||||
}
|
||||
else if (mimeType.startsWith("image")) {
|
||||
fileType = "image";
|
||||
}
|
||||
}
|
||||
return fileType;
|
||||
}
|
||||
private getFileInfoFromUri(uri: Uri) {
|
||||
const context = UTSAndroid.getAppContext();
|
||||
let cursor = context!.getContentResolver().query(uri, null, null, null, null);
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
this.name = cursor.getString(cursor.getColumnIndexOrThrow(OpenableColumns.DISPLAY_NAME));
|
||||
const fileSize = cursor.getLong(cursor.getColumnIndexOrThrow(OpenableColumns.SIZE));
|
||||
this.size = Number.from(fileSize);
|
||||
cursor.close();
|
||||
}
|
||||
else if ("file".equals(uri.getScheme())) {
|
||||
this.name = uri.getLastPathSegment() ?? '';
|
||||
const file = new File(uri.getPath() ?? '');
|
||||
const fileSize = file.length();
|
||||
this.size = Number.from(fileSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
export function chooseFile(options: ChooseFileOption) {
|
||||
if (resultFunction != null) {
|
||||
UTSAndroid.offAppActivityResult(resultFunction!);
|
||||
}
|
||||
const type = options.type ?? 'all';
|
||||
const intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
if (type.equals("all") || type.equals("file")) {
|
||||
intent.setType("*/*");
|
||||
}
|
||||
else if (type.equals("video")) {
|
||||
intent.setType("video/*");
|
||||
}
|
||||
else if (type.equals("image")) {
|
||||
intent.setType("image/*");
|
||||
}
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, options.count == 1 ? false : true); // 允许多选
|
||||
resultFunction = (requestCode: Int, resultCode: Int, data?: Intent) => {
|
||||
if (requestCode == REQUEST_CODE_CHOOSE_FILE) {
|
||||
UTSAndroid.offAppActivityResult(resultFunction!);
|
||||
if (resultCode == -1 && data != null) {
|
||||
const clipData = data.getClipData();
|
||||
const tempFiles: ChooseFile[] = [];
|
||||
if (clipData != null) {
|
||||
// 多选
|
||||
// const itemCount = clipData.getItemCount();
|
||||
// if (options.count != null && options.count! > itemCount) {
|
||||
// const err = new GeneralCallbackResultImpl(9010002, `选中文件数量超过${options.count}`)
|
||||
// options.fail?.(err)
|
||||
// options.complete?.(err)
|
||||
// return
|
||||
// }
|
||||
for (let i = 0; i < clipData.getItemCount(); i++) {
|
||||
const uri = clipData.getItemAt(i.toInt()).getUri();
|
||||
const chooseFile = new ChooseFileImpl(uri, options);
|
||||
if (chooseFile.path != '') {
|
||||
tempFiles.push(chooseFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// 单选
|
||||
const uri = data.getData();
|
||||
if (uri != null) {
|
||||
const chooseFile = new ChooseFileImpl(uri, options);
|
||||
if (chooseFile.path != '') {
|
||||
tempFiles.push(chooseFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
const count = options.count ?? Integer.MAX_VALUE; // Number.MAX_VALUE
|
||||
if (tempFiles.length > 0 && count >= tempFiles.length) {
|
||||
options.success?.({
|
||||
tempFiles,
|
||||
errMsg: 'chooseFile:ok'
|
||||
} as ChooseFileSuccessCallbackResult);
|
||||
}
|
||||
else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件或文件超过设置数量`);
|
||||
options.fail?.(err);
|
||||
options.complete?.(err);
|
||||
}
|
||||
}
|
||||
else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件`);
|
||||
options.fail?.(err);
|
||||
options.complete?.(err);
|
||||
}
|
||||
}
|
||||
else {
|
||||
const err = new GeneralCallbackResultImpl(9010002, `没有可用的文件`);
|
||||
options.fail?.(err);
|
||||
options.complete?.(err);
|
||||
}
|
||||
};
|
||||
UTSAndroid.onAppActivityResult(resultFunction!);
|
||||
UTSAndroid.getUniActivity()!.startActivityForResult(Intent.createChooser(intent, "选择文件"), REQUEST_CODE_CHOOSE_FILE);
|
||||
// UTSAndroid.getUniActivity()!.overridePendingTransition((10).toInt(), (0).toInt());
|
||||
}
|
||||
//# sourceMappingURL=index.uts.map
|
||||
File diff suppressed because one or more lines are too long
77
unpackage/dist/dev/.uvue/app-android/uni_modules/lime-choose-file/utssdk/interface.uts
vendored
Normal file
77
unpackage/dist/dev/.uvue/app-android/uni_modules/lime-choose-file/utssdk/interface.uts
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
// @ts-nocheck
|
||||
/**
|
||||
* 错误码
|
||||
* 根据uni错误码规范要求,建议错误码以90开头,以下是错误码示例:
|
||||
* - 9010001 错误信息1
|
||||
* - 9010002 错误信息2
|
||||
*/
|
||||
export type ChooseFileErrorCode = 9010001 | 9010002 | 1101001 | 1101002 | 1101003 | 1101004 | 1101005 | 1101006 | 1101007 | 1101008 | 1101009 | 1101010;
|
||||
/**
|
||||
* myApi 的错误回调参数
|
||||
*/
|
||||
export interface GeneralCallbackResult extends IUniError {
|
||||
errCode: ChooseFileErrorCode;
|
||||
}
|
||||
;
|
||||
/** 返回选择的文件的本地临时文件对象数组 */
|
||||
export interface ChooseFile {
|
||||
/** 选择的文件名称 */
|
||||
name: string;
|
||||
/** 本地临时文件路径 (本地路径) */
|
||||
path: string;
|
||||
/** 本地临时文件大小,单位 B */
|
||||
size: number;
|
||||
/** 选择的文件的会话发送时间,Unix时间戳,工具暂不支持此属性 */
|
||||
time: number;
|
||||
/** 选择的文件类型
|
||||
*
|
||||
* 可选值:
|
||||
* - 'video': 选择了视频文件;
|
||||
* - 'image': 选择了图片文件;
|
||||
* - 'file': 选择了除图片和视频的文件; */
|
||||
type: 'video' | 'image' | 'file' | 'all';
|
||||
}
|
||||
export type ChooseFileSuccessCallbackResult = {
|
||||
/** 返回选择的文件的本地临时文件对象数组 */
|
||||
tempFiles: ChooseFile[];
|
||||
errMsg: string;
|
||||
};
|
||||
/** 接口调用成功的回调函数 */
|
||||
export type ChooseFileSuccessCallback = (result: ChooseFileSuccessCallbackResult) => void;
|
||||
/** 接口调用失败的回调函数 */
|
||||
export type ChooseFileFailCallback = (res: GeneralCallbackResult) => void;
|
||||
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
||||
export type ChooseFileCompleteCallback = (res: GeneralCallbackResult) => void;
|
||||
export type ChooseFileOption = {
|
||||
/**
|
||||
* 指定文件名,如果是多选就在后面增加上时间
|
||||
*/
|
||||
filename?: string;
|
||||
/**
|
||||
* 最多可以选择的文件数量。
|
||||
* @defaultValue 100
|
||||
*/
|
||||
count?: number | null;
|
||||
/**
|
||||
* 所选文件类型
|
||||
* @defaultValue all
|
||||
*/
|
||||
type?: string | null;
|
||||
/**
|
||||
* 根据文件拓展名过滤,每一项都不能是空字符串。默认不过滤。仅H5支持
|
||||
*/
|
||||
extension?: (string[]) | null;
|
||||
/**
|
||||
* 成功则返回图片的本地文件路径列表 tempFilePaths
|
||||
*/
|
||||
success?: ChooseFileSuccessCallback | null;
|
||||
/**
|
||||
* 接口调用失败的回调函数
|
||||
*/
|
||||
fail?: ChooseFileFailCallback | null;
|
||||
/**
|
||||
* 接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
*/
|
||||
complete?: ChooseFileCompleteCallback | null;
|
||||
};
|
||||
//# sourceMappingURL=interface.uts.map
|
||||
1
unpackage/dist/dev/.uvue/app-android/uni_modules/lime-choose-file/utssdk/interface.uts.map
vendored
Normal file
1
unpackage/dist/dev/.uvue/app-android/uni_modules/lime-choose-file/utssdk/interface.uts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interface.uts","sourceRoot":"","sources":["uni_modules/lime-choose-file/utssdk/interface.uts"],"names":[],"mappings":"AAAA,cAAc;AACd;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AACxJ;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACvD,OAAO,EAAG,mBAAmB,CAAA;CAC7B;AAAA,CAAC;AAGF,yBAAyB;AAEzB,MAAM,WAAW,UAAU;IAC1B,cAAc;IACd,IAAI,EAAG,MAAM,CAAA;IACb,sBAAsB;IACtB,IAAI,EAAG,MAAM,CAAA;IACb,oBAAoB;IACpB,IAAI,EAAG,MAAM,CAAA;IACb,qCAAqC;IACrC,IAAI,EAAG,MAAM,CAAA;IACb;;;;;iCAK6B;IAC7B,IAAI,EAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAA;CACzC;AAsBD,MAAM,MAAM,+BAA+B,GAAG;IAC7C,yBAAyB;IACzB,SAAS,EAAG,UAAU,EAAE,CAAC;IACzB,MAAM,EAAG,MAAM,CAAA;CACf,CAAA;AAGD,kBAAkB;AAClB,MAAM,MAAM,yBAAyB,GAAG,CACvC,MAAM,EAAG,+BAA+B,KACpC,IAAI,CAAA;AAET,kBAAkB;AAClB,MAAM,MAAM,sBAAsB,GAAG,CAAC,GAAG,EAAG,qBAAqB,KAAK,IAAI,CAAA;AAE1E,+BAA+B;AAC/B,MAAM,MAAM,0BAA0B,GAAG,CACxC,GAAG,EAAG,qBAAqB,KACvB,IAAI,CAAA;AAET,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,KAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;;OAGG;IACH,IAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,SAAU,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC;IAC/B;;OAEG;IACH,OAAQ,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAC;IAC5C;;OAEG;IACH,IAAK,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACtC;;OAEG;IACH,QAAS,CAAC,EAAE,0BAA0B,GAAG,IAAI,CAAA;CAC7C,CAAA","sourcesContent":["// @ts-nocheck\r\n/**\r\n * 错误码\r\n * 根据uni错误码规范要求,建议错误码以90开头,以下是错误码示例:\r\n * - 9010001 错误信息1\r\n * - 9010002 错误信息2\r\n */\r\nexport type ChooseFileErrorCode = 9010001 | 9010002 | 1101001 | 1101002 | 1101003 | 1101004 | 1101005 | 1101006 | 1101007 | 1101008 | 1101009 | 1101010;\r\n/**\r\n * myApi 的错误回调参数\r\n */\r\nexport interface GeneralCallbackResult extends IUniError {\r\n\terrCode : ChooseFileErrorCode\r\n};\r\n\r\n\r\n/** 返回选择的文件的本地临时文件对象数组 */\r\n\r\nexport interface ChooseFile {\r\n\t/** 选择的文件名称 */\r\n\tname : string\r\n\t/** 本地临时文件路径 (本地路径) */\r\n\tpath : string\r\n\t/** 本地临时文件大小,单位 B */\r\n\tsize : number\r\n\t/** 选择的文件的会话发送时间,Unix时间戳,工具暂不支持此属性 */\r\n\ttime : number\r\n\t/** 选择的文件类型\r\n\t *\r\n\t * 可选值:\r\n\t * - 'video': 选择了视频文件;\r\n\t * - 'image': 选择了图片文件;\r\n\t * - 'file': 选择了除图片和视频的文件; */\r\n\ttype : 'video' | 'image' | 'file' | 'all'\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nexport type ChooseFileSuccessCallbackResult = {\r\n\t/** 返回选择的文件的本地临时文件对象数组 */\r\n\ttempFiles : ChooseFile[],\r\n\terrMsg : string\r\n}\r\n\r\n\r\n/** 接口调用成功的回调函数 */\r\nexport type ChooseFileSuccessCallback = (\r\n\tresult : ChooseFileSuccessCallbackResult\r\n) => void\r\n\r\n/** 接口调用失败的回调函数 */\r\nexport type ChooseFileFailCallback = (res : GeneralCallbackResult) => void\r\n\r\n/** 接口调用结束的回调函数(调用成功、失败都会执行) */\r\nexport type ChooseFileCompleteCallback = (\r\n\tres : GeneralCallbackResult\r\n) => void\r\n\r\nexport type ChooseFileOption = {\r\n\t/**\r\n\t * 指定文件名,如果是多选就在后面增加上时间\r\n\t */\r\n\tfilename?: string\r\n\t/**\r\n\t * 最多可以选择的文件数量。\r\n\t * @defaultValue 100\r\n\t */\r\n\tcount ?: number | null,\r\n\t/**\r\n\t * 所选文件类型\r\n\t * @defaultValue all\r\n\t */\r\n\ttype ?: string | null,\r\n\t/**\r\n\t * 根据文件拓展名过滤,每一项都不能是空字符串。默认不过滤。仅H5支持\r\n\t */\r\n\textension ?: (string[]) | null,\r\n\t/**\r\n\t * 成功则返回图片的本地文件路径列表 tempFilePaths\r\n\t */\r\n\tsuccess ?: ChooseFileSuccessCallback | null,\r\n\t/**\r\n\t * 接口调用失败的回调函数\r\n\t */\r\n\tfail ?: ChooseFileFailCallback | null,\r\n\t/**\r\n\t * 接口调用结束的回调函数(调用成功、失败都会执行)\r\n\t */\r\n\tcomplete ?: ChooseFileCompleteCallback | null\r\n}"]}
|
||||
36
unpackage/dist/dev/.uvue/app-android/uni_modules/lime-choose-file/utssdk/unierror.uts
vendored
Normal file
36
unpackage/dist/dev/.uvue/app-android/uni_modules/lime-choose-file/utssdk/unierror.uts
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
// @ts-nocheck
|
||||
/* 此规范为 uni 规范,可以按照自己的需要选择是否实现 */
|
||||
import { ChooseFileErrorCode, GeneralCallbackResult } from "./interface.uts";
|
||||
/**
|
||||
* 错误主题
|
||||
* 注意:错误主题一般为插件名称,每个组件不同,需要使用时请更改。
|
||||
* [可选实现]
|
||||
*/
|
||||
export const UniErrorSubject = 'chooseFile"';
|
||||
/**
|
||||
* 错误信息
|
||||
* @UniError
|
||||
* [可选实现]
|
||||
*/
|
||||
export const UniErrors: Map<ChooseFileErrorCode, string> = new Map([
|
||||
/**
|
||||
* 错误码及对应的错误信息
|
||||
*/
|
||||
[9010001, 'chooseFile:ok'],
|
||||
[9010002, 'ChooseFile:failed'],
|
||||
]);
|
||||
/**
|
||||
* 错误对象实现
|
||||
*/
|
||||
export class GeneralCallbackResultImpl extends UniError implements GeneralCallbackResult {
|
||||
/**
|
||||
* 错误对象构造函数
|
||||
*/
|
||||
constructor(errCode: ChooseFileErrorCode, errMsg: string | null = null) {
|
||||
super();
|
||||
this.errSubject = UniErrorSubject;
|
||||
this.errCode = errCode;
|
||||
this.errMsg = errMsg ?? UniErrors[errCode] ?? "";
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=unierror.uts.map
|
||||
1
unpackage/dist/dev/.uvue/app-android/uni_modules/lime-choose-file/utssdk/unierror.uts.map
vendored
Normal file
1
unpackage/dist/dev/.uvue/app-android/uni_modules/lime-choose-file/utssdk/unierror.uts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"unierror.uts","sourceRoot":"","sources":["uni_modules/lime-choose-file/utssdk/unierror.uts"],"names":[],"mappings":"AAAA,cAAc;AACd,iCAAiC;AACjC,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAC5E;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC;AAG7C;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,EAAG,GAAG,CAAC,mBAAmB,EAAE,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC;IAClE;;OAEG;IACH,CAAC,OAAO,EAAE,eAAe,CAAC;IAC1B,CAAC,OAAO,EAAE,mBAAmB,CAAC;CAC/B,CAAC,CAAC;AAGH;;GAEG;AACH,MAAM,OAAO,yBAA0B,SAAQ,QAAS,YAAW,qBAAqB;IAEtF;;OAEG;IACH,YAAY,OAAO,EAAG,mBAAmB,EAAE,MAAM,EAAE,MAAM,GAAC,IAAI,GAAG,IAAI;QACnE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,UAAU,GAAG,eAAe,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACnD,CAAC;CACF","sourcesContent":["// @ts-nocheck\r\n/* 此规范为 uni 规范,可以按照自己的需要选择是否实现 */\r\nimport { ChooseFileErrorCode, GeneralCallbackResult } from \"./interface.uts\"\r\n/**\r\n * 错误主题\r\n * 注意:错误主题一般为插件名称,每个组件不同,需要使用时请更改。\r\n * [可选实现]\r\n */\r\nexport const UniErrorSubject = 'chooseFile\"';\r\n\r\n\r\n/**\r\n * 错误信息\r\n * @UniError\r\n * [可选实现]\r\n */\r\nexport const UniErrors : Map<ChooseFileErrorCode, string> = new Map([\r\n /**\r\n * 错误码及对应的错误信息\r\n */\r\n [9010001, 'chooseFile:ok'],\r\n [9010002, 'ChooseFile:failed'],\r\n]);\r\n\r\n\r\n/**\r\n * 错误对象实现\r\n */\r\nexport class GeneralCallbackResultImpl extends UniError implements GeneralCallbackResult {\r\n\r\n /**\r\n * 错误对象构造函数\r\n */\r\n constructor(errCode : ChooseFileErrorCode, errMsg: string|null = null) {\r\n super();\r\n this.errSubject = UniErrorSubject;\r\n this.errCode = errCode;\r\n this.errMsg = errMsg ?? UniErrors[errCode] ?? \"\";\r\n }\r\n}"]}
|
||||
16
unpackage/dist/dev/app-plus/__uniappautomator.js
vendored
Normal file
16
unpackage/dist/dev/app-plus/__uniappautomator.js
vendored
Normal file
File diff suppressed because one or more lines are too long
32
unpackage/dist/dev/app-plus/__uniappchooselocation.js
vendored
Normal file
32
unpackage/dist/dev/app-plus/__uniappchooselocation.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
unpackage/dist/dev/app-plus/__uniapperror.png
vendored
Normal file
BIN
unpackage/dist/dev/app-plus/__uniapperror.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
32
unpackage/dist/dev/app-plus/__uniappopenlocation.js
vendored
Normal file
32
unpackage/dist/dev/app-plus/__uniappopenlocation.js
vendored
Normal file
File diff suppressed because one or more lines are too long
33
unpackage/dist/dev/app-plus/__uniapppicker.js
vendored
Normal file
33
unpackage/dist/dev/app-plus/__uniapppicker.js
vendored
Normal file
File diff suppressed because one or more lines are too long
8
unpackage/dist/dev/app-plus/__uniappquill.js
vendored
Normal file
8
unpackage/dist/dev/app-plus/__uniappquill.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/app-plus/__uniappquillimageresize.js
vendored
Normal file
1
unpackage/dist/dev/app-plus/__uniappquillimageresize.js
vendored
Normal file
File diff suppressed because one or more lines are too long
32
unpackage/dist/dev/app-plus/__uniappscan.js
vendored
Normal file
32
unpackage/dist/dev/app-plus/__uniappscan.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
unpackage/dist/dev/app-plus/__uniappsuccess.png
vendored
Normal file
BIN
unpackage/dist/dev/app-plus/__uniappsuccess.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
24
unpackage/dist/dev/app-plus/__uniappview.html
vendored
Normal file
24
unpackage/dist/dev/app-plus/__uniappview.html
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>View</title>
|
||||
<link rel="icon" href="data:,">
|
||||
<link rel="stylesheet" href="app.css" />
|
||||
<script>var __uniConfig = {"globalStyle":{},"darkmode":false}</script>
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="uni-app-view.umd.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
11
unpackage/dist/dev/app-plus/app-config-service.js
vendored
Normal file
11
unpackage/dist/dev/app-plus/app-config-service.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
;(function(){
|
||||
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
|
||||
const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","navigationBar":{"backgroundColor":"#F8F8F8","titleText":"uni-app","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"test1","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"5.07","entryPagePath":"pages/Login/Login","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
|
||||
const __uniRoutes = [{"path":"pages/Login/Login","meta":{"isQuit":true,"isEntry":true,"titleNView":false,"bounce":"none","softinputMode":"adjustResize","navigationBar":{"titleText":"登录页面","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/Chat/Chat","meta":{"titleNView":false,"bounce":"none","softinputMode":"adjustResize","navigationBar":{"titleText":"聊天页面(主页面)","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/WorkSpace/WorkSpace","meta":{"titleNView":false,"bounce":"none","softinputMode":"adjustResize","navigationBar":{"titleText":"工作区文件管理","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/UserProfileModal/UserProfileModal","meta":{"titleNView":false,"bounce":"none","softinputMode":"adjustResize","navigationBar":{"titleText":"","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/ContactPages/ContactPages","meta":{"titleNView":false,"bounce":"none","softinputMode":"adjustResize","navigationBar":{"titleText":"","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/WorkSpace/TemplateSpace/TemplateSpace","meta":{"titleNView":false,"bounce":"none","softinputMode":"adjustResize","navigationBar":{"titleText":"","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/text/text","meta":{"navigationBar":{"titleText":"","type":"default"},"isNVue":false}},{"path":"pages/text/text2","meta":{"navigationBar":{"type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
||||
__uniConfig.styles=[];//styles
|
||||
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:16})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:u,window:u,document:u,frames:u,self:u,location:u,navigator:u,localStorage:u,history:u,Caches:u,screen:u,alert:u,confirm:u,prompt:u,fetch:u,XMLHttpRequest:u,WebSocket:u,webkit:u,print:u}}}});
|
||||
})();
|
||||
|
||||
1
unpackage/dist/dev/app-plus/app-config.js
vendored
Normal file
1
unpackage/dist/dev/app-plus/app-config.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(function(){})();
|
||||
8331
unpackage/dist/dev/app-plus/app-service.js
vendored
Normal file
8331
unpackage/dist/dev/app-plus/app-service.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
235
unpackage/dist/dev/app-plus/app.css
vendored
Normal file
235
unpackage/dist/dev/app-plus/app.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
unpackage/dist/dev/app-plus/assets/uniicons.32e978a5.ttf
vendored
Normal file
BIN
unpackage/dist/dev/app-plus/assets/uniicons.32e978a5.ttf
vendored
Normal file
Binary file not shown.
114
unpackage/dist/dev/app-plus/manifest.json
vendored
Normal file
114
unpackage/dist/dev/app-plus/manifest.json
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
{
|
||||
"@platforms": [
|
||||
"android",
|
||||
"iPhone",
|
||||
"iPad"
|
||||
],
|
||||
"id": "__UNI__923FD9E",
|
||||
"name": "test1",
|
||||
"version": {
|
||||
"name": "1.0.0",
|
||||
"code": "1"
|
||||
},
|
||||
"description": "",
|
||||
"developer": {
|
||||
"name": "",
|
||||
"email": "",
|
||||
"url": ""
|
||||
},
|
||||
"permissions": {
|
||||
"Camera": {},
|
||||
"UniNView": {
|
||||
"description": "UniNView原生渲染"
|
||||
}
|
||||
},
|
||||
"plus": {
|
||||
"useragent": {
|
||||
"value": "uni-app",
|
||||
"concatenate": true
|
||||
},
|
||||
"splashscreen": {
|
||||
"target": "id:1",
|
||||
"autoclose": true,
|
||||
"waiting": true,
|
||||
"delay": 0
|
||||
},
|
||||
"popGesture": "close",
|
||||
"launchwebview": {
|
||||
"render": "always",
|
||||
"id": "1",
|
||||
"kernel": "WKWebview"
|
||||
},
|
||||
"compatible": {
|
||||
"ignoreVersion": true
|
||||
},
|
||||
"usingComponents": true,
|
||||
"nvueStyleCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"distribute": {
|
||||
"google": {
|
||||
"permissions": [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
"apple": {
|
||||
"dSYMs": false
|
||||
},
|
||||
"plugins": {
|
||||
"audio": {
|
||||
"mp3": {
|
||||
"description": "Android平台录音支持MP3格式文件"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"statusbar": {
|
||||
"immersed": "supportedDevice",
|
||||
"style": "dark",
|
||||
"background": "#F8F8F8"
|
||||
},
|
||||
"arguments": "{\"name\":\"\",\"path\":\"\",\"query\":\"\"}",
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
},
|
||||
"allowsInlineMediaPlayback": true,
|
||||
"uni-app": {
|
||||
"control": "uni-v3",
|
||||
"vueVersion": "3",
|
||||
"compilerVersion": "5.07",
|
||||
"nvueCompiler": "uni-app",
|
||||
"renderer": "auto",
|
||||
"nvue": {
|
||||
"flex-direction": "column"
|
||||
},
|
||||
"nvueLaunchMode": "normal",
|
||||
"webView": {
|
||||
"minUserAgentVersion": "49.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"app-harmony": {
|
||||
"useragent": {
|
||||
"value": "uni-app",
|
||||
"concatenate": true
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
}
|
||||
},
|
||||
"launch_path": "__uniappview.html"
|
||||
}
|
||||
1306
unpackage/dist/dev/app-plus/pages/Chat/Chat.css
vendored
Normal file
1306
unpackage/dist/dev/app-plus/pages/Chat/Chat.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
881
unpackage/dist/dev/app-plus/pages/ContactPages/ContactPages.css
vendored
Normal file
881
unpackage/dist/dev/app-plus/pages/ContactPages/ContactPages.css
vendored
Normal file
@@ -0,0 +1,881 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.uniui-cart-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6d0";
|
||||
}
|
||||
.uniui-gift-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6c4";
|
||||
}
|
||||
.uniui-color[data-v-d31e1c47]:before {
|
||||
content: "\e6cf";
|
||||
}
|
||||
.uniui-wallet[data-v-d31e1c47]:before {
|
||||
content: "\e6b1";
|
||||
}
|
||||
.uniui-settings-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6ce";
|
||||
}
|
||||
.uniui-auth-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6cc";
|
||||
}
|
||||
.uniui-shop-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6cd";
|
||||
}
|
||||
.uniui-staff-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6cb";
|
||||
}
|
||||
.uniui-vip-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6c6";
|
||||
}
|
||||
.uniui-plus-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6c7";
|
||||
}
|
||||
.uniui-folder-add-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6c8";
|
||||
}
|
||||
.uniui-color-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6c9";
|
||||
}
|
||||
.uniui-tune-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6ca";
|
||||
}
|
||||
.uniui-calendar-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6c0";
|
||||
}
|
||||
.uniui-notification-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6c1";
|
||||
}
|
||||
.uniui-wallet-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6c2";
|
||||
}
|
||||
.uniui-medal-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6c3";
|
||||
}
|
||||
.uniui-fire-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6c5";
|
||||
}
|
||||
.uniui-refreshempty[data-v-d31e1c47]:before {
|
||||
content: "\e6bf";
|
||||
}
|
||||
.uniui-location-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6af";
|
||||
}
|
||||
.uniui-person-filled[data-v-d31e1c47]:before {
|
||||
content: "\e69d";
|
||||
}
|
||||
.uniui-personadd-filled[data-v-d31e1c47]:before {
|
||||
content: "\e698";
|
||||
}
|
||||
.uniui-arrowthinleft[data-v-d31e1c47]:before {
|
||||
content: "\e6d2";
|
||||
}
|
||||
.uniui-arrowthinup[data-v-d31e1c47]:before {
|
||||
content: "\e6d3";
|
||||
}
|
||||
.uniui-arrowthindown[data-v-d31e1c47]:before {
|
||||
content: "\e6d4";
|
||||
}
|
||||
.uniui-back[data-v-d31e1c47]:before {
|
||||
content: "\e6b9";
|
||||
}
|
||||
.uniui-forward[data-v-d31e1c47]:before {
|
||||
content: "\e6ba";
|
||||
}
|
||||
.uniui-arrow-right[data-v-d31e1c47]:before {
|
||||
content: "\e6bb";
|
||||
}
|
||||
.uniui-arrow-left[data-v-d31e1c47]:before {
|
||||
content: "\e6bc";
|
||||
}
|
||||
.uniui-arrow-up[data-v-d31e1c47]:before {
|
||||
content: "\e6bd";
|
||||
}
|
||||
.uniui-arrow-down[data-v-d31e1c47]:before {
|
||||
content: "\e6be";
|
||||
}
|
||||
.uniui-arrowthinright[data-v-d31e1c47]:before {
|
||||
content: "\e6d1";
|
||||
}
|
||||
.uniui-down[data-v-d31e1c47]:before {
|
||||
content: "\e6b8";
|
||||
}
|
||||
.uniui-bottom[data-v-d31e1c47]:before {
|
||||
content: "\e6b8";
|
||||
}
|
||||
.uniui-arrowright[data-v-d31e1c47]:before {
|
||||
content: "\e6d5";
|
||||
}
|
||||
.uniui-right[data-v-d31e1c47]:before {
|
||||
content: "\e6b5";
|
||||
}
|
||||
.uniui-up[data-v-d31e1c47]:before {
|
||||
content: "\e6b6";
|
||||
}
|
||||
.uniui-top[data-v-d31e1c47]:before {
|
||||
content: "\e6b6";
|
||||
}
|
||||
.uniui-left[data-v-d31e1c47]:before {
|
||||
content: "\e6b7";
|
||||
}
|
||||
.uniui-arrowup[data-v-d31e1c47]:before {
|
||||
content: "\e6d6";
|
||||
}
|
||||
.uniui-eye[data-v-d31e1c47]:before {
|
||||
content: "\e651";
|
||||
}
|
||||
.uniui-eye-filled[data-v-d31e1c47]:before {
|
||||
content: "\e66a";
|
||||
}
|
||||
.uniui-eye-slash[data-v-d31e1c47]:before {
|
||||
content: "\e6b3";
|
||||
}
|
||||
.uniui-eye-slash-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6b4";
|
||||
}
|
||||
.uniui-info-filled[data-v-d31e1c47]:before {
|
||||
content: "\e649";
|
||||
}
|
||||
.uniui-reload[data-v-d31e1c47]:before {
|
||||
content: "\e6b2";
|
||||
}
|
||||
.uniui-micoff-filled[data-v-d31e1c47]:before {
|
||||
content: "\e6b0";
|
||||
}
|
||||
.uniui-map-pin-ellipse[data-v-d31e1c47]:before {
|
||||
content: "\e6ac";
|
||||
}
|
||||
.uniui-map-pin[data-v-d31e1c47]:before {
|
||||
content: "\e6ad";
|
||||
}
|
||||
.uniui-location[data-v-d31e1c47]:before {
|
||||
content: "\e6ae";
|
||||
}
|
||||
.uniui-starhalf[data-v-d31e1c47]:before {
|
||||
content: "\e683";
|
||||
}
|
||||
.uniui-star[data-v-d31e1c47]:before {
|
||||
content: "\e688";
|
||||
}
|
||||
.uniui-star-filled[data-v-d31e1c47]:before {
|
||||
content: "\e68f";
|
||||
}
|
||||
.uniui-calendar[data-v-d31e1c47]:before {
|
||||
content: "\e6a0";
|
||||
}
|
||||
.uniui-fire[data-v-d31e1c47]:before {
|
||||
content: "\e6a1";
|
||||
}
|
||||
.uniui-medal[data-v-d31e1c47]:before {
|
||||
content: "\e6a2";
|
||||
}
|
||||
.uniui-font[data-v-d31e1c47]:before {
|
||||
content: "\e6a3";
|
||||
}
|
||||
.uniui-gift[data-v-d31e1c47]:before {
|
||||
content: "\e6a4";
|
||||
}
|
||||
.uniui-link[data-v-d31e1c47]:before {
|
||||
content: "\e6a5";
|
||||
}
|
||||
.uniui-notification[data-v-d31e1c47]:before {
|
||||
content: "\e6a6";
|
||||
}
|
||||
.uniui-staff[data-v-d31e1c47]:before {
|
||||
content: "\e6a7";
|
||||
}
|
||||
.uniui-vip[data-v-d31e1c47]:before {
|
||||
content: "\e6a8";
|
||||
}
|
||||
.uniui-folder-add[data-v-d31e1c47]:before {
|
||||
content: "\e6a9";
|
||||
}
|
||||
.uniui-tune[data-v-d31e1c47]:before {
|
||||
content: "\e6aa";
|
||||
}
|
||||
.uniui-auth[data-v-d31e1c47]:before {
|
||||
content: "\e6ab";
|
||||
}
|
||||
.uniui-person[data-v-d31e1c47]:before {
|
||||
content: "\e699";
|
||||
}
|
||||
.uniui-email-filled[data-v-d31e1c47]:before {
|
||||
content: "\e69a";
|
||||
}
|
||||
.uniui-phone-filled[data-v-d31e1c47]:before {
|
||||
content: "\e69b";
|
||||
}
|
||||
.uniui-phone[data-v-d31e1c47]:before {
|
||||
content: "\e69c";
|
||||
}
|
||||
.uniui-email[data-v-d31e1c47]:before {
|
||||
content: "\e69e";
|
||||
}
|
||||
.uniui-personadd[data-v-d31e1c47]:before {
|
||||
content: "\e69f";
|
||||
}
|
||||
.uniui-chatboxes-filled[data-v-d31e1c47]:before {
|
||||
content: "\e692";
|
||||
}
|
||||
.uniui-contact[data-v-d31e1c47]:before {
|
||||
content: "\e693";
|
||||
}
|
||||
.uniui-chatbubble-filled[data-v-d31e1c47]:before {
|
||||
content: "\e694";
|
||||
}
|
||||
.uniui-contact-filled[data-v-d31e1c47]:before {
|
||||
content: "\e695";
|
||||
}
|
||||
.uniui-chatboxes[data-v-d31e1c47]:before {
|
||||
content: "\e696";
|
||||
}
|
||||
.uniui-chatbubble[data-v-d31e1c47]:before {
|
||||
content: "\e697";
|
||||
}
|
||||
.uniui-upload-filled[data-v-d31e1c47]:before {
|
||||
content: "\e68e";
|
||||
}
|
||||
.uniui-upload[data-v-d31e1c47]:before {
|
||||
content: "\e690";
|
||||
}
|
||||
.uniui-weixin[data-v-d31e1c47]:before {
|
||||
content: "\e691";
|
||||
}
|
||||
.uniui-compose[data-v-d31e1c47]:before {
|
||||
content: "\e67f";
|
||||
}
|
||||
.uniui-qq[data-v-d31e1c47]:before {
|
||||
content: "\e680";
|
||||
}
|
||||
.uniui-download-filled[data-v-d31e1c47]:before {
|
||||
content: "\e681";
|
||||
}
|
||||
.uniui-pyq[data-v-d31e1c47]:before {
|
||||
content: "\e682";
|
||||
}
|
||||
.uniui-sound[data-v-d31e1c47]:before {
|
||||
content: "\e684";
|
||||
}
|
||||
.uniui-trash-filled[data-v-d31e1c47]:before {
|
||||
content: "\e685";
|
||||
}
|
||||
.uniui-sound-filled[data-v-d31e1c47]:before {
|
||||
content: "\e686";
|
||||
}
|
||||
.uniui-trash[data-v-d31e1c47]:before {
|
||||
content: "\e687";
|
||||
}
|
||||
.uniui-videocam-filled[data-v-d31e1c47]:before {
|
||||
content: "\e689";
|
||||
}
|
||||
.uniui-spinner-cycle[data-v-d31e1c47]:before {
|
||||
content: "\e68a";
|
||||
}
|
||||
.uniui-weibo[data-v-d31e1c47]:before {
|
||||
content: "\e68b";
|
||||
}
|
||||
.uniui-videocam[data-v-d31e1c47]:before {
|
||||
content: "\e68c";
|
||||
}
|
||||
.uniui-download[data-v-d31e1c47]:before {
|
||||
content: "\e68d";
|
||||
}
|
||||
.uniui-help[data-v-d31e1c47]:before {
|
||||
content: "\e679";
|
||||
}
|
||||
.uniui-navigate-filled[data-v-d31e1c47]:before {
|
||||
content: "\e67a";
|
||||
}
|
||||
.uniui-plusempty[data-v-d31e1c47]:before {
|
||||
content: "\e67b";
|
||||
}
|
||||
.uniui-smallcircle[data-v-d31e1c47]:before {
|
||||
content: "\e67c";
|
||||
}
|
||||
.uniui-minus-filled[data-v-d31e1c47]:before {
|
||||
content: "\e67d";
|
||||
}
|
||||
.uniui-micoff[data-v-d31e1c47]:before {
|
||||
content: "\e67e";
|
||||
}
|
||||
.uniui-closeempty[data-v-d31e1c47]:before {
|
||||
content: "\e66c";
|
||||
}
|
||||
.uniui-clear[data-v-d31e1c47]:before {
|
||||
content: "\e66d";
|
||||
}
|
||||
.uniui-navigate[data-v-d31e1c47]:before {
|
||||
content: "\e66e";
|
||||
}
|
||||
.uniui-minus[data-v-d31e1c47]:before {
|
||||
content: "\e66f";
|
||||
}
|
||||
.uniui-image[data-v-d31e1c47]:before {
|
||||
content: "\e670";
|
||||
}
|
||||
.uniui-mic[data-v-d31e1c47]:before {
|
||||
content: "\e671";
|
||||
}
|
||||
.uniui-paperplane[data-v-d31e1c47]:before {
|
||||
content: "\e672";
|
||||
}
|
||||
.uniui-close[data-v-d31e1c47]:before {
|
||||
content: "\e673";
|
||||
}
|
||||
.uniui-help-filled[data-v-d31e1c47]:before {
|
||||
content: "\e674";
|
||||
}
|
||||
.uniui-paperplane-filled[data-v-d31e1c47]:before {
|
||||
content: "\e675";
|
||||
}
|
||||
.uniui-plus[data-v-d31e1c47]:before {
|
||||
content: "\e676";
|
||||
}
|
||||
.uniui-mic-filled[data-v-d31e1c47]:before {
|
||||
content: "\e677";
|
||||
}
|
||||
.uniui-image-filled[data-v-d31e1c47]:before {
|
||||
content: "\e678";
|
||||
}
|
||||
.uniui-locked-filled[data-v-d31e1c47]:before {
|
||||
content: "\e668";
|
||||
}
|
||||
.uniui-info[data-v-d31e1c47]:before {
|
||||
content: "\e669";
|
||||
}
|
||||
.uniui-locked[data-v-d31e1c47]:before {
|
||||
content: "\e66b";
|
||||
}
|
||||
.uniui-camera-filled[data-v-d31e1c47]:before {
|
||||
content: "\e658";
|
||||
}
|
||||
.uniui-chat-filled[data-v-d31e1c47]:before {
|
||||
content: "\e659";
|
||||
}
|
||||
.uniui-camera[data-v-d31e1c47]:before {
|
||||
content: "\e65a";
|
||||
}
|
||||
.uniui-circle[data-v-d31e1c47]:before {
|
||||
content: "\e65b";
|
||||
}
|
||||
.uniui-checkmarkempty[data-v-d31e1c47]:before {
|
||||
content: "\e65c";
|
||||
}
|
||||
.uniui-chat[data-v-d31e1c47]:before {
|
||||
content: "\e65d";
|
||||
}
|
||||
.uniui-circle-filled[data-v-d31e1c47]:before {
|
||||
content: "\e65e";
|
||||
}
|
||||
.uniui-flag[data-v-d31e1c47]:before {
|
||||
content: "\e65f";
|
||||
}
|
||||
.uniui-flag-filled[data-v-d31e1c47]:before {
|
||||
content: "\e660";
|
||||
}
|
||||
.uniui-gear-filled[data-v-d31e1c47]:before {
|
||||
content: "\e661";
|
||||
}
|
||||
.uniui-home[data-v-d31e1c47]:before {
|
||||
content: "\e662";
|
||||
}
|
||||
.uniui-home-filled[data-v-d31e1c47]:before {
|
||||
content: "\e663";
|
||||
}
|
||||
.uniui-gear[data-v-d31e1c47]:before {
|
||||
content: "\e664";
|
||||
}
|
||||
.uniui-smallcircle-filled[data-v-d31e1c47]:before {
|
||||
content: "\e665";
|
||||
}
|
||||
.uniui-map-filled[data-v-d31e1c47]:before {
|
||||
content: "\e666";
|
||||
}
|
||||
.uniui-map[data-v-d31e1c47]:before {
|
||||
content: "\e667";
|
||||
}
|
||||
.uniui-refresh-filled[data-v-d31e1c47]:before {
|
||||
content: "\e656";
|
||||
}
|
||||
.uniui-refresh[data-v-d31e1c47]:before {
|
||||
content: "\e657";
|
||||
}
|
||||
.uniui-cloud-upload[data-v-d31e1c47]:before {
|
||||
content: "\e645";
|
||||
}
|
||||
.uniui-cloud-download-filled[data-v-d31e1c47]:before {
|
||||
content: "\e646";
|
||||
}
|
||||
.uniui-cloud-download[data-v-d31e1c47]:before {
|
||||
content: "\e647";
|
||||
}
|
||||
.uniui-cloud-upload-filled[data-v-d31e1c47]:before {
|
||||
content: "\e648";
|
||||
}
|
||||
.uniui-redo[data-v-d31e1c47]:before {
|
||||
content: "\e64a";
|
||||
}
|
||||
.uniui-images-filled[data-v-d31e1c47]:before {
|
||||
content: "\e64b";
|
||||
}
|
||||
.uniui-undo-filled[data-v-d31e1c47]:before {
|
||||
content: "\e64c";
|
||||
}
|
||||
.uniui-more[data-v-d31e1c47]:before {
|
||||
content: "\e64d";
|
||||
}
|
||||
.uniui-more-filled[data-v-d31e1c47]:before {
|
||||
content: "\e64e";
|
||||
}
|
||||
.uniui-undo[data-v-d31e1c47]:before {
|
||||
content: "\e64f";
|
||||
}
|
||||
.uniui-images[data-v-d31e1c47]:before {
|
||||
content: "\e650";
|
||||
}
|
||||
.uniui-paperclip[data-v-d31e1c47]:before {
|
||||
content: "\e652";
|
||||
}
|
||||
.uniui-settings[data-v-d31e1c47]:before {
|
||||
content: "\e653";
|
||||
}
|
||||
.uniui-search[data-v-d31e1c47]:before {
|
||||
content: "\e654";
|
||||
}
|
||||
.uniui-redo-filled[data-v-d31e1c47]:before {
|
||||
content: "\e655";
|
||||
}
|
||||
.uniui-list[data-v-d31e1c47]:before {
|
||||
content: "\e644";
|
||||
}
|
||||
.uniui-mail-open-filled[data-v-d31e1c47]:before {
|
||||
content: "\e63a";
|
||||
}
|
||||
.uniui-hand-down-filled[data-v-d31e1c47]:before {
|
||||
content: "\e63c";
|
||||
}
|
||||
.uniui-hand-down[data-v-d31e1c47]:before {
|
||||
content: "\e63d";
|
||||
}
|
||||
.uniui-hand-up-filled[data-v-d31e1c47]:before {
|
||||
content: "\e63e";
|
||||
}
|
||||
.uniui-hand-up[data-v-d31e1c47]:before {
|
||||
content: "\e63f";
|
||||
}
|
||||
.uniui-heart-filled[data-v-d31e1c47]:before {
|
||||
content: "\e641";
|
||||
}
|
||||
.uniui-mail-open[data-v-d31e1c47]:before {
|
||||
content: "\e643";
|
||||
}
|
||||
.uniui-heart[data-v-d31e1c47]:before {
|
||||
content: "\e639";
|
||||
}
|
||||
.uniui-loop[data-v-d31e1c47]:before {
|
||||
content: "\e633";
|
||||
}
|
||||
.uniui-pulldown[data-v-d31e1c47]:before {
|
||||
content: "\e632";
|
||||
}
|
||||
.uniui-scan[data-v-d31e1c47]:before {
|
||||
content: "\e62a";
|
||||
}
|
||||
.uniui-bars[data-v-d31e1c47]:before {
|
||||
content: "\e627";
|
||||
}
|
||||
.uniui-checkbox[data-v-d31e1c47]:before {
|
||||
content: "\e62b";
|
||||
}
|
||||
.uniui-checkbox-filled[data-v-d31e1c47]:before {
|
||||
content: "\e62c";
|
||||
}
|
||||
.uniui-shop[data-v-d31e1c47]:before {
|
||||
content: "\e62f";
|
||||
}
|
||||
.uniui-headphones[data-v-d31e1c47]:before {
|
||||
content: "\e630";
|
||||
}
|
||||
.uniui-cart[data-v-d31e1c47]:before {
|
||||
content: "\e631";
|
||||
}
|
||||
@font-face {
|
||||
font-family: uniicons;
|
||||
src: url("../../assets/uniicons.32e978a5.ttf");
|
||||
}
|
||||
.uni-icons[data-v-d31e1c47] {
|
||||
font-family: uniicons;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
}
|
||||
.tabbar-page[data-v-976117c3] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.content-swiper[data-v-976117c3] {
|
||||
width: 100%;
|
||||
height: calc(100% - 3.125rem);
|
||||
}
|
||||
.tabpage-content[data-v-976117c3] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.tabpage-containner[data-v-976117c3] {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
.tabpage-header[data-v-976117c3] {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.tabpage-header .iconfont[data-v-976117c3] {
|
||||
font-size: 1.5625rem;
|
||||
margin-right: 0.3125rem;
|
||||
}
|
||||
.tabpage-title[data-v-976117c3] {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
.tabpage-body[data-v-976117c3] {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
padding: 0.625rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 新建群聊 */
|
||||
.group-info[data-v-976117c3] {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.group-name[data-v-976117c3] {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.group-name .input[data-v-976117c3] {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding: 0.625rem;
|
||||
box-sizing: border-box;
|
||||
border: 0.03125rem solid #007aff;
|
||||
border-radius: 0.9375rem;
|
||||
}
|
||||
.group-member-wrapper[data-v-976117c3] {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 0.625rem;
|
||||
box-sizing: border-box;
|
||||
background-color: rgba(16, 185, 129, .05);
|
||||
border: 0.03125rem solid rgba(16, 185, 129, .2);
|
||||
border-radius: 0.9375rem;
|
||||
margin: 0.3125rem 0;
|
||||
}
|
||||
.group-member-wrapper .member-title[data-v-976117c3] {
|
||||
color: #059669;
|
||||
font-weight: bold;
|
||||
}
|
||||
.group-ismember-list[data-v-976117c3] {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 0.3125rem;
|
||||
box-sizing: border-box;
|
||||
max-height: 6.25rem;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.group-ismember-info[data-v-976117c3] {
|
||||
padding: 0.3125rem 0.5rem;
|
||||
box-sizing: border-box;
|
||||
border: 0.03125rem solid rgba(16, 185, 129, 0.8);
|
||||
background-color: #fff;
|
||||
border-radius: 0.9375rem;
|
||||
margin: 0.15625rem 0.3125rem;
|
||||
}
|
||||
.group-ismember-name[data-v-976117c3] {
|
||||
font-size: 0.6875rem;
|
||||
color: #059669;
|
||||
}
|
||||
.create-group-btn[data-v-976117c3] {
|
||||
width: 100%;
|
||||
background: #007aff;
|
||||
border-radius: 0.9375rem;
|
||||
padding: 0.625rem;
|
||||
box-sizing: border-box;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-bottom: 0.3125rem;
|
||||
}
|
||||
.group-member[data-v-976117c3] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
padding: 0.3125rem;
|
||||
margin-top: 0.3125rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.friend-list[data-v-976117c3] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.friend-card[data-v-976117c3] {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
padding: 0.625rem;
|
||||
margin: 0.3125rem 0;
|
||||
box-sizing: border-box;
|
||||
border: 0.03125rem solid #aaaaff;
|
||||
border-radius: 0.9375rem;
|
||||
}
|
||||
.friend-card-left[data-v-976117c3] {
|
||||
flex-shrink: 0;
|
||||
margin-right: 0.3125rem;
|
||||
}
|
||||
.friend-avatar[data-v-976117c3] {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
width: 3.125rem;
|
||||
height: 3.125rem;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.friend-card-middle[data-v-976117c3] {
|
||||
flex: 1;
|
||||
height: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.friend-name[data-v-976117c3] {
|
||||
font-weight: 500;
|
||||
font-size: 1rem;
|
||||
}
|
||||
.friend-card-right[data-v-976117c3] {
|
||||
width: auto;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.friend-checkbox[data-v-976117c3] {
|
||||
width: 0.9375rem;
|
||||
height: 0.9375rem;
|
||||
border-radius: 0.3125rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 0.03125rem solid #3b86ff;
|
||||
}
|
||||
|
||||
/* 添加好友 */
|
||||
.search-warpper[data-v-976117c3] {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.search-warpper .search-file-input[data-v-976117c3] {
|
||||
flex: 1;
|
||||
background-color: #f9fafb;
|
||||
border: 0.0625rem solid rgba(139, 195, 232, .2);
|
||||
padding: 0.625rem;
|
||||
margin-right: 0.625rem;
|
||||
height: auto;
|
||||
box-sizing: border-box;
|
||||
border-radius: 0.9375rem;
|
||||
}
|
||||
.search-file-input.active[data-v-976117c3] {
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0 0 0.46875rem #aaaaff;
|
||||
border-color: #007aff;
|
||||
}
|
||||
.search-warpper .iconfont[data-v-976117c3] {
|
||||
flex-shrink: 0;
|
||||
font-size: 1.1875rem;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
background-color: #007aff;
|
||||
padding: 0.5625rem;
|
||||
box-sizing: border-box;
|
||||
border-radius: 0.625rem;
|
||||
}
|
||||
.search-result[data-v-976117c3] {
|
||||
width: 100%;
|
||||
}
|
||||
.add-btn[data-v-976117c3] {
|
||||
background: #3b86ff;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* 添加好友卡片 */
|
||||
.nickname-wrapper[data-v-976117c3] {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 0.625rem 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.input-nickname[data-v-976117c3] {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding: 0.625rem;
|
||||
box-sizing: border-box;
|
||||
border: 0.03125rem solid #007aff;
|
||||
border-radius: 0.9375rem;
|
||||
margin: 0.625rem 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.confirm-btn[data-v-976117c3] {
|
||||
background: #3b86ff;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
/* 视频会议 */
|
||||
.create-meeting-wrapper[data-v-976117c3],
|
||||
.join-meeting-wrapper[data-v-976117c3] {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 0.625rem 0.9375rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.input-meeting[data-v-976117c3] {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding: 0.625rem;
|
||||
box-sizing: border-box;
|
||||
border: 0.03125rem solid #007aff;
|
||||
border-radius: 0.9375rem;
|
||||
margin: 0.3125rem 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.meeting-btn[data-v-976117c3] {
|
||||
width: 100%;
|
||||
background: #007aff;
|
||||
margin: 0.3125rem 0;
|
||||
color: #fff;
|
||||
}
|
||||
.meeting-field[data-v-976117c3] {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.meeting-toggles[data-v-976117c3] {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.meeting-toggles-item[data-v-976117c3] {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
/* 好友申请 */
|
||||
.friend-option[data-v-976117c3] {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.agree-btn[data-v-976117c3],
|
||||
.refuse-btn[data-v-976117c3] {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
border: 1px solid #666;
|
||||
margin-left: 0.3125rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 通讯录 */
|
||||
.contact-list[data-v-976117c3] {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
padding: 0.3125rem;
|
||||
margin-top: 0.3125rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 底部导航 */
|
||||
.bottom-tabbar[data-v-976117c3] {
|
||||
width: 100%;
|
||||
height: 4.375rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0.625rem;
|
||||
box-sizing: border-box;
|
||||
background: rgba(200, 200, 200, 0.1);
|
||||
}
|
||||
.tab-item[data-v-976117c3] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tab-label[data-v-976117c3] {
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
167
unpackage/dist/dev/app-plus/pages/Login/Login.css
vendored
Normal file
167
unpackage/dist/dev/app-plus/pages/Login/Login.css
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
|
||||
.login-container[data-v-461d1d79] {
|
||||
padding: 4.375rem 1.875rem 3.125rem 1.875rem;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.login-card[data-v-461d1d79] {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0.625rem;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.conner[data-v-461d1d79] {
|
||||
position: absolute;
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
}
|
||||
.conner-tl[data-v-461d1d79] {
|
||||
top: 0;
|
||||
left: 0;
|
||||
border-top: 2px solid #aaaaff;
|
||||
border-left: 2px solid #aaaaff;
|
||||
}
|
||||
.conner-tr[data-v-461d1d79] {
|
||||
top: 0;
|
||||
right: 0;
|
||||
border-top: 2px solid #aaaaff;
|
||||
border-right: 2px solid #aaaaff;
|
||||
}
|
||||
.conner-bl[data-v-461d1d79] {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
border-bottom: 2px solid #aaaaff;
|
||||
border-left: 2px solid #aaaaff;
|
||||
}
|
||||
.conner-br[data-v-461d1d79] {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
border-bottom: 2px solid #aaaaff;
|
||||
border-right: 2px solid #aaaaff;
|
||||
}
|
||||
.login-header[data-v-461d1d79] {
|
||||
/* position: absolute;
|
||||
top: 80rpx; */
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
.login-header-logo[data-v-461d1d79] {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.login-header-logo uni-text[data-v-461d1d79] {
|
||||
margin-left: 0.25rem;
|
||||
font-size: 1.875rem;
|
||||
font-weight: bold;
|
||||
color: #aaaaff;
|
||||
text-shadow: 0 0 0.3125rem rgba(170, 170, 255, 0.4),
|
||||
0 0 0.625rem rgba(170, 170, 255, 0.3);
|
||||
}
|
||||
.icon-wrapper[data-v-461d1d79] {
|
||||
width: 2.8125rem;
|
||||
height: 2.8125rem;
|
||||
border-radius: 50%;
|
||||
background-color: rgb(255, 255, 255);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
animation: glow-461d1d79 2s ease-in-out infinite;
|
||||
}
|
||||
@keyframes glow-461d1d79 {
|
||||
0%,
|
||||
100% {
|
||||
box-shadow: 0 0 0.625rem rgba(170, 170, 255, 0.3);
|
||||
}
|
||||
50% {
|
||||
box-shadow: 0 0 0.625rem rgba(170, 170, 255, 0.4),
|
||||
0 0 0.9375rem rgba(170, 170, 255, 0.3),
|
||||
0 0 1.5625rem rgba(170, 170, 255, 0.2);
|
||||
}
|
||||
}
|
||||
.icon-wrapper .danao-style[data-v-461d1d79] {
|
||||
font-size: 2.1875rem;
|
||||
color: #aaaaff;
|
||||
}
|
||||
.sub-title[data-v-461d1d79] {
|
||||
margin-top: 0.625rem;
|
||||
font-size: 1.125rem;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
text-shadow: 0 0 0.3125rem #999;
|
||||
}
|
||||
.form-wrapper[data-v-461d1d79] {
|
||||
margin-top: 1.5625rem;
|
||||
width: 15.625rem;
|
||||
padding: 2.5rem 0.9375rem;
|
||||
background-color: rgba(170, 170, 255, 0.05);
|
||||
border-radius: 0.625rem;
|
||||
/* border: 1rpx solid #aaaaff; */
|
||||
box-shadow: 0 0 0.3125rem rgba(170, 170, 255, 0.5);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.form-item[data-v-461d1d79] {
|
||||
margin-top: 0.625rem;
|
||||
}
|
||||
.form-item .form-input[data-v-461d1d79] {
|
||||
width: 100%;
|
||||
height: 2.5rem;
|
||||
padding: 0 10px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 0.9375rem;
|
||||
border: 0.03125rem solid #e5e5e5;
|
||||
}
|
||||
.form-item .focused[data-v-461d1d79] {
|
||||
border-color: #aaaaff;
|
||||
box-shadow: 0 0 0.3125rem rgba(170, 170, 255, 0.5);
|
||||
}
|
||||
.form-item .error[data-v-461d1d79] {
|
||||
border-color: #ff0000;
|
||||
box-shadow: 0 0 0.3125rem rgba(255, 0, 0, 0.5);
|
||||
}
|
||||
.error-info[data-v-461d1d79] {
|
||||
font-size: 0.75rem;
|
||||
color: #ff0000;
|
||||
}
|
||||
.form-option[data-v-461d1d79] {
|
||||
margin-top: 0.3125rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.form-option .checkbox-wrapper[data-v-461d1d79] {
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
align-items: center;
|
||||
}
|
||||
.form-option .checkbox-wrapper .checkbox[data-v-461d1d79] {
|
||||
width: 0.9375rem;
|
||||
height: 0.9375rem;
|
||||
border: 0.03125rem solid #666;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.form-option .checkbox-wrapper .checked[data-v-461d1d79] {
|
||||
background-color: #aaaaff;
|
||||
}
|
||||
.form-option .checkbox-wrapper .checkbox uni-text[data-v-461d1d79] {
|
||||
color: #ffffff;
|
||||
}
|
||||
[data-v-461d1d79] .login-btn {
|
||||
margin-top: 0.9375rem;
|
||||
width: 15.625rem;
|
||||
height: 3.125rem;
|
||||
border-radius: 2.5rem;
|
||||
background: linear-gradient(to right, #aaaaff, #2969ed);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user