我希望在我的SBT项目中使用Quasar.由于尚未支持Scala,唯一可行的选择是让SBT编译一些使用Quasar的java类.
我尝试过
javaOptions += "-javaagent:PATH_TO_JAR/quasar-core-0.5.0.jar"
Run Code Online (Sandbox Code Playgroud)
和
fork := true
Run Code Online (Sandbox Code Playgroud)
当我读到使用例如JRebel时,必须将这两个语句插入到build.sbt中
但它似乎无法使用Quasarish类(QuasarExample)产生:
[error] IllegalArgumentException: : Fiber class HelloWorldSpec$$anonfun$1$$anonfun$apply$3$$anon$1 has not been instrumented. (Fiber.java:151)
[error] co.paralleluniverse.fibers.Fiber.<init>(Fiber.java:151)
[error] co.paralleluniverse.fibers.Fiber.<init>(Fiber.java:171)
[error] co.paralleluniverse.fibers.Fiber.<init>(Fiber.java:448)
Run Code Online (Sandbox Code Playgroud)
成功检测后预计会运行且没有错误的一段代码:
new Fiber<Integer>() {
@Override
protected Integer run() throws SuspendExecution, InterruptedException {
return 0;
}
}.start();
Run Code Online (Sandbox Code Playgroud)
另请参阅此存储库以获取启动器.
如果 q-input 的值为 != '' 那么只有我想应用规则,例如所需的最大 8 个数字。在下面的代码中,它给了我所需的输入错误,即使它是空的。
<q-input
filled
name="landline"
label="Landline Phone Number"
v-model="user.landline"
placeholder="Landline Phone Number"
ref="landlinePhoneNumber"
type="number"
:maxlength="8"
:rules="[val => val!='' && val.length > 7 || 'Landline Required 8 digit']"
/>
Run Code Online (Sandbox Code Playgroud) 我\xc2\xb4m 尝试在 Vuejs (Quasar) 应用程序上使用带有电话号码的 firebase 身份验证。\n按照文档,第一步是获取验证码。我相信这是我不能正确做的地方:
\n使用单个文件测试 i\xc2\xb4m:\nHTML 模板上的 Div:
\n <div if="recaptcha-container" \n data-sitekey="6LcsaxsdAAAAAEBn0sPDCEncnU9564MisyRuDzD_"\n data-callback="sendForm"\n data-size="invisible">\n </div>\n
Run Code Online (Sandbox Code Playgroud)\n下面是脚本中的身份验证代码。为了安全起见,我改变了敏感键。它们是正确的,I\xc2\xb4m 使用相同的密钥通过 GoogleAuth 成功进行了身份验证
\nimport { initializeApp } from "firebase/app"\nimport { getAuth, RecaptchaVerifier,GoogleAuthProvider,signInWithPopup } from "firebase/auth"\n\nconst firebaseConfig = {\n apiKey: "xxxxxxxxxxxxxxxx",\n authDomain: "xxxxxx.firebaseapp.com",\n projectId: "dev-meetups-aa72b",\n storageBucket: "xxxxxxxx.appspot.com",\n messagingSenderId: "xxxxxx",\n appId: "xxxxxxxxxxxxxxxxx",\n measurementId: "G-xxxxxx"\n};\n\n// Initialize Firebase\nconst app = initializeApp(firebaseConfig)\nconst provider = new GoogleAuthProvider();\nconst auth = getAuth(app)\n
Run Code Online (Sandbox Code Playgroud)\n按照文档和一些教程,我在 Created 上初始化验证码方法:
\n created() {\n this.initilizeCaptcha()\n },\n
Run Code Online (Sandbox Code Playgroud)\n方法:
\ninitilizeCaptcha …
Run Code Online (Sandbox Code Playgroud) 我得到了这个令人困惑的错误,似乎是在Kotlin编译器中,我不介意更改我的代码,但我想弄清楚我是否确实做错了什么.我认为它遇到问题的代码是这样的:
inline fun <T> fiberListener(bufferSize: Int = 50,
policy: Channels.OverflowPolicy = Channels.OverflowPolicy.BACKOFF,
singleProducer: Boolean = true,
singleConsumer: Boolean = true,
crossinline action: (T) -> Unit): SendPort<T> {
val channel = Channels.newChannel<T>(bufferSize, policy, singleProducer, singleConsumer)
fiber { channel.forEach(action) }
return channel
}
Run Code Online (Sandbox Code Playgroud)
不知道还有什么要说的,我可以说这不是内联的,但我认为这段代码应该可行.我正在使用Kotlin 1.0.4和Gradle.另一方面,我并不认为这实际上提供了性能提升,我对交叉线仍然有点不清楚.但无论哪种方式似乎它应该工作,我得到没有IDE或编译器错误,除了这个内部的.
Error:(37, 45) Kotlin: [Internal Error] org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't inline method call 'fiberListener' into
local final fun <anonymous>(module: org.tenkiv.nexus.thermal.module.ProducerModule): kotlin.Unit defined in org.tenkiv.nexus.thermal.control_point.StateMaintainer.<init>[AnonymousFunctionDescriptor@392d1483]
{ module ->
module.levelSensor?.addListener(fiberListener { onLevelEvent() })
}
Cause: fiberListener$default (ILco/paralleluniverse/strands/channels/Channels$OverflowPolicy;ZZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lco/paralleluniverse/strands/channels/SendPort;:
L0 …
Run Code Online (Sandbox Code Playgroud) 环境变量中定义config/
的目录prod.env.js
和dev.env.js
,如何让这些变量的.vue
文件吗?
我尝试使用process.env.MY_VAR
假设它是nodejs内置库,它给出了一个错误:
[======= ] 34% (building modules){ SyntaxError: Unexpected token (1:5)
Run Code Online (Sandbox Code Playgroud)
.vue
文件中的最小代码:
<template>
<q-layout>
<div class="layout-view">
<button class="primary" @click="foo">
<i class="on-left">lock</i> Login
</button>
</div>
</q-layout>
</template>
<script>
export default {
data() {
return { url: '' }
}
methods: {
foo: function() {
this.url = process.env.MY_VAR // no error if commented
}
}
}
</script>
Run Code Online (Sandbox Code Playgroud)
获取这些环境变量的正确方法是什么?
我被要求进行 API 调用以发送数据。
在 vue 中点击,我触发了这个事件
async facebookDataToSend () {
let campaignID = await this.$store.getters['CurrentInstance/id']
this.$axios.post(process.env.API_BASE_URL + 'faceeBookCampaign', { campaignID: campaignID }, { withCredentials: true })
},
Run Code Online (Sandbox Code Playgroud)
但是后来,我被告知使用一些 xyz.js 文件中已经存在的 API 函数。
我的 xyz.js 文件看起来像这样..
const rest = {
something: axios.create({
baseURL: process.env.API_BASE_URL,
withCredentials: true
}),
setClient: function (client) {
this.something = axios.create({
baseURL: process.env.API_BASE_URL,
withCredentials: true,
params: {
__somethingClient: client
}
})
this.client = client
}
}
Run Code Online (Sandbox Code Playgroud)
在这里,我无法理解如何使用此实例进行 api 调用所以我查看了他们已经进行了 api 调用的代码并看到了这样的内容
const API = {
url: '/whateverHtml/',
method: …
Run Code Online (Sandbox Code Playgroud) 如何在 quasar cli 生成的项目中安装 vuetify?
在使用 vue cli 的普通项目中只需要命令
vue add vuetify
Run Code Online (Sandbox Code Playgroud)
但在 quasar cli 中我运行命令
npm install vuetify
Run Code Online (Sandbox Code Playgroud)
并生成新的启动文件,但我在 sass 或 sass-loader 中出现错误
使用该bun create [..]
命令,我可以创建一个react
项目next
。按照bun git存储库上的说明进行操作非常简单(更新:大多数说明可以在bun.sh中找到)。
但我无法让它与quasar
/ 一起工作vue
。
我可以quasar
用bun成功安装:
bun install -g @quasar/cli\n
Run Code Online (Sandbox Code Playgroud)\n但是当我尝试创建一个类星体项目时:
\nquasar create [..]\n
Run Code Online (Sandbox Code Playgroud)\n我收到一条消息,例如:
\n/usr/bin/env: \xe2\x80\x98node\xe2\x80\x99: Permission denied
/usr/bin/env: \xe2\x80\x98node\xe2\x80\x99: No such file or directory
看起来quasar
正在尝试使用node
可执行文件而不是bun
.
有什么想法可以让它与quasar
/一起使用vue
吗?
应用说明:
根据以上各节,这是我的光纤http客户端的调谐(当然,我正在使用的单个实例):
PoolingNHttpClientConnectionManager connectionManager =
new PoolingNHttpClientConnectionManager(
new DefaultConnectingIOReactor(
IOReactorConfig.
custom().
setIoThreadCount(16).
setSoKeepAlive(false).
setSoLinger(0).
setSoReuseAddress(false).
setSelectInterval(10).
build()
)
);
connectionManager.setDefaultMaxPerRoute(32768);
connectionManager.setMaxTotal(131072);
FiberHttpClientBuilder fiberClientBuilder = FiberHttpClientBuilder.
create().
setDefaultRequestConfig(
RequestConfig.
custom().
setSocketTimeout(1500).
setConnectTimeout(1000).
build()
).
setConnectionReuseStrategy(NoConnectionReuseStrategy.INSTANCE).
setConnectionManager(connectionManager).
build();
Run Code Online (Sandbox Code Playgroud)将打开文件的ulimit设置为超高(软值和硬值都为131072)
kernel.printk = 8 4 1 7 kernel.printk_ratelimit_burst = 10 kernel.printk_ratelimit = 5 net.ipv4.ip_local_port_range = 8192 65535 net.core.rmem_max = 16777216 net.core.wmem_max = 16777216 net.core.rmem_default = 16777216 net.core .wmem_default = 16777216 net.core.optmem_max = 40960 net.ipv4.tcp_rmem …
我一直在尝试使用 Tailwind 来自定义 Quasar 组件,但是 Quasar CSS 已经覆盖了 Tailwind CSS 的大部分内容。
我向我的 Tailwind 类添加了一个前缀,tailwind.config.js
其前缀为 tw- ,如下例所示。
module.exports = {
prefix: 'tw-',
}
Run Code Online (Sandbox Code Playgroud) quasar ×10
vue.js ×5
javascript ×3
axios ×1
bun ×1
firebase ×1
java ×1
kotlin ×1
nio ×1
sbt ×1
scala ×1
tailwind-css ×1
vuejs2 ×1
vuetify.js ×1