Fork自 DCloud / uni-app
体验新版 GitCode,发现更多精彩内容 >>
import { ApiProtocol } from '../type' export const LoadSubPackageProtocol: ApiProtocol = {
root: { type: String, required: true,
validator(value) {
const subPackages = __uniConfig.subPackages if (!Array.isArray(subPackages) || subPackages.length === 0) { return 'no subPackages' } if (!subPackages.find(subPackage => subPackage.root === value)) { return 'root `' + value + '` is not found' } } } }