首先,希望这个问题不要太宽泛。来自前端背景,我正在考虑开始学习与 JavaScript 相关的移动开发框架之一。这是第一个问题,我应该使用 Apache Cordova 还是 Capacitor?第一个是我用于 Phaser (HTML5) 游戏开发的业余爱好项目,老实说,这不是最好的体验。根据 Stack Overflow 年度报告,我能感觉到为什么 Apache Cordova 是最令人讨厌的技术之一。
然后是第二个问题,我应该使用 Ionic、NativeScript 还是 React Native?React 是“三大”中唯一一个我目前感到不舒服的前端框架。我在 Angular 和 Vue.js 方面的经验相当积极,我也想在我的移动应用程序项目中使用其中的任何一个,因此我有点偏向于 Ionic 或 NativeScript。另一方面,React Native 拥有最多的 GitHub star。我认为这可能是有原因的。
那么最后一个,我可以将以下任何一个组合:Apache Cordova/Capacitor 与以下任何一个:Ionic/NativeScript/React Native 或者有一些更容易工作的东西,例如 Capacitor 和 Ionic 的组合?同一家公司这样做,因此我认为它应该是相对无缝的组合。
编辑:
最后一个 - 为了从我的移动应用程序的相同代码库制作 PWA,我被迫只使用 Ionic?
在最近更新到 macOS Catalina 之后,所有程序都在询问我是否为它们提供了正确的权限。不幸的是,GIMP是不是这样,每当我试图使用GIMP我打开任何文件中有以下错误Could not read the contents of Desktop. Error opening directory /Users/myuser/Desktop: Operation not permitted,或像不同的地点Downloads,Documents等打开文件的唯一1路目前右击鼠标并Open with GIMP,它工作正常。但是这个选项是有限的,例如当想要打开很多文件时。
问题是如何在 macOS Catalina 中赋予正确的权限?
TypeScript 的文档随附Compiler Options,其中--strictFunctionTypes定义了其描述。不幸的是,无法获得什么是bivariant parameter。我也试图了解https://github.com/Microsoft/TypeScript/wiki/FAQ#why-are-function-parameters-bivariant。
有人知道是否存在/计划在华为移动服务 (HMS) 上启用 JavaScript/混合应用程序的部署?同样,我们可以使用带有 Ionic/NativeScript/React Native 的 Cordova/Capacitor 并在 Android/iOS 上上传。
到目前为止,我一直在检查https://developer.huawei.com/consumer/en/community/codelabs,它看起来目前只支持 Java,没有任何关于混合移动应用程序的额外信息。有没有人有使用 HMS 的经验?
cordova xamarin hybrid-mobile-app flutter huawei-mobile-services
Vue.js 的 Vuetify 提供了一种向扩展面板添加图标的方法 ( https://vuetifyjs.com/en/components/expansion-panels#custom-icon )。但是,我希望将它们放在标题的左侧,如下面的屏幕截图所示。
该CodePen只显示方式如何添加图标,但在右侧。我已经尝试了下面的 2 个片段,但没有任何成功。
<template v-slot:actions>
  <v-icon left>mdi-check</v-icon>
</template>
和
<v-icon left>mdi-check</v-icon>
两者都没有预期的结果。
skip-ci目前,我正在复制每项工作的信息,如下所示
job1:
  except:
    variables:
      - $CI_COMMIT_MESSAGE =~ /skip-ci/
    ...
job2:
  except:
    variables:
      - $CI_COMMIT_MESSAGE =~ /skip-ci/
    ...
job3:
  except:
    variables:
      - $CI_COMMIT_MESSAGE =~ /skip-ci/
    ...
有没有办法只写一次就可以适用于所有工作?
continuous-integration yaml gitlab gitlab-ci gitlab-pipelines
尝试在 Jest 环境中模拟 Renderer2,但无法使其工作。Jest 23 和 Angular 7。尝试了以下所有内容:
组件.ts
const icosahedron = document.getElementById('renderIcosahedron');
this.renderer2.appendChild(icosahedron, this.renderer.domElement);
始终出现错误(仅在测试中):
TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
编辑:更详细的解释已添加到 Angular 的存储库中,但它被视为错误而被拒绝。链接:https ://github.com/angular/angular/issues/30865#issue-452458779
如何对(Jest此处)自定义验证器进行单元测试,其中有FormGroup?我见过这个问题,但它是关于FormControl.
要测试的功能。
import { FormGroup } from '@angular/forms';
/**
 * @description Validate if passwords are different.
 * @function validatePasswords
 * @param {string} passwordControlName - reference to formControlPassword of the contactForm.
 * @param {string} confirmPasswordControlName - reference to formControlConfirmPassword of the contactForm.
 * @returns {(formGroup: FormGroup) => void}
 */
export function validatePasswords(
  passwordControlName: string,
  confirmPasswordControlName: string
): (formGroup: FormGroup) => void {
  return (formGroup: FormGroup) => {
    // Get values of desired controls …unit-testing jestjs angular angular-reactive-forms angular-custom-validators
npm run dev在运行我开发的 using时,我遇到了一个非常奇怪的错误Nuxt.js,它有Vue.js组件。也就是说,在运行应用程序时,我看到与TypeScript诸如相关的错误TS2749: 'About' refers to a value, but is being used as a type here. Did you mean 'typeof About'?,即使npm run test没有显示任何内容。
我的spec.ts文件带有抱怨行
import { shallowMount, Wrapper } from "@vue/test-utils";    
import About from "@/pages/about.vue";
describe("About", () => {
  const wrapper: Wrapper<About> = shallowMount(About); // <-- Complaining line
  ...
}
在设置打字之前突出显示时,类型应该没问题,它显示了下面的类型。
建议的解决方案会const wrapper: Wrapper<typeof About> = shallowMount(About);生成另一个TypeScript错误,导致测试无法编译。即,TS2344: Type 'ExtendedVue<Vue, unknown, unknown, …
angular ×2
cordova ×2
jestjs ×2
typescript ×2
unit-testing ×2
vue.js ×2
bdd ×1
capacitor ×1
css ×1
flutter ×1
gimp ×1
gitlab ×1
gitlab-ci ×1
javascript ×1
macos ×1
nativescript ×1
nuxt.js ×1
permissions ×1
react-native ×1
tdd ×1
updates ×1
vuejs2 ×1
vuetify.js ×1
xamarin ×1
yaml ×1