如何将一个PHP变量的值传递给Laravel刀片文件中的Vue组件?
在我的示例中,我有一个内联模板客户端详细信息,我从这里获得此视图Laravel现在我想id将url附带的内容传递/client/1给我的Vue实例.
我的组件,加载Laravel,看起来像:
<client-details inline-template>
<div id="client-details" class="">
My HTML stuff
</div>
</client-details>
Run Code Online (Sandbox Code Playgroud)
并安装:
Vue.component('client-details', {
data(){
return {
clientId: null
}
},
);
Run Code Online (Sandbox Code Playgroud)
我已经尝试过了
:clientId="{{ $client->id }"
Run Code Online (Sandbox Code Playgroud)
但它不起作用.
我正在使用使用Python和Selenium的InstaPy。我每个Cron都会启动脚本,并且有时会崩溃。所以它确实是不规则的,有时运行得很好。我也已经在GitHub Repo上发布了消息,但是在那里没有得到答案,所以我现在在这里问是否有人知道为什么。
这是一个数字海洋ubuntu服务器,我在无头模式下使用它。驱动程序版本在日志中可见。这是错误消息:
ERROR [2018-12-10 09:53:54] [user] Error occurred while deleting cookies from web browser!
b'Message: invalid session id\n (Driver info: chromedriver=2.44.609551 (5d576e9a44fe4c5b6a07e568f1ebc753f1214634),platform=Linux 4.15.0-42-generic x86_64)\n'
Traceback (most recent call last):
File "/root/InstaPy/instapy/util.py", line 1410, in smart_run
yield
File "./my_config.py", line 43, in <module>
session.follow_user_followers(['xxxx','xxxx','xxxx','xxxx'], amount=100, randomize=True, interact=True)
File "/root/InstaPy/instapy/instapy.py", line 2907, in follow_user_followers
self.logfolder)
File "/root/InstaPy/instapy/unfollow_util.py", line 883, in get_given_user_followers
channel, jumps, logger, logfolder)
File "/root/InstaPy/instapy/unfollow_util.py", line 722, in get_users_through_dialog
person_list = dialog_username_extractor(buttons)
File "/root/InstaPy/instapy/unfollow_util.py", line 747, in dialog_username_extractor
person_list.append(person.find_element_by_xpath("../../../*") …Run Code Online (Sandbox Code Playgroud) python selenium google-chrome selenium-chromedriver selenium-webdriver
我想向我的 editorjs 添加一个固定的顶部工具栏,例如:

我没有找到任何文档如何执行此操作: https: //editorjs.io/
当然,我已经用谷歌搜索过了,但结果并不是很好。
正如您在屏幕截图中看到的那样,制作工具栏不是问题。但我不知道如何处理,当我单击按钮时,焦点块将被格式化。
有谁知道我该怎么做?
如何直接在 page.html.twig 中呈现字段?
当我尝试渲染它时:
{{ node.field_my_field.value }}
Run Code Online (Sandbox Code Playgroud)
我得到:
Exception: Object of type Drupal\entity_reference_revisions\EntityReferenceRevisionsFieldItemList cannot be printed
Run Code Online (Sandbox Code Playgroud)
当我添加一个 .value 时,它仍然没有正确渲染(我使用带有子字段的段落)但出现以下错误:用户错误:“target_id”是无效的渲染数组键
Drupal\Core\Render\Element::children() (line 97 of core/lib/Drupal/Core/Render/Element.php).
User error: "target_revision_id" is an invalid render array key in Drupal\Core\Render\Element::children() (line 97 of core/lib/Drupal/Core/Render/Element.php).
User error: "_loaded" is an invalid render array key in Drupal\Core\Render\Element::children() (line 97 of core/lib/Drupal/Core/Render/Element.php).
User error: "_accessCacheability" is an invalid render array key in Drupal\Core\Render\Element::children() (line 97 of core/lib/Drupal/Core/Render/Element.php).
Run Code Online (Sandbox Code Playgroud)
那么我该如何渲染它呢?