所以我不是专业人士,这就是为什么如果你需要更多的额外信息,只要写在后面,我会尝试提供它.这就是我监听这个插件的方式
import VueFormulate from '@braid/vue-formulate';
Vue.use(VueFormulate);在我的模板中,我想使用这个插件
<FormulateInput
type="email"
name="email"
label="Enter your email address"
help="We’ll send you an email when your ice cream is ready"
validation="required|email"
/>但是在浏览器页面上没有任何东西,我在呈现的页面树中看到的是什么。
<formulateinput
type="email"
name="email"
label="Enter your email address"
help="We’ll send you an email when your ice cream is ready"
validation="required|email">
</formulateinput>所以据我所见,它没有呈现。
一个小插曲。当组件在我要使用插件的地方挂载,然后在控制台插件对象中输出,并且它是退出的
mounted() {
console.log(VueFormulate);
}来自控制台的屏幕

你能帮我找出我错过的吗?
发布于 2020-07-06 14:56:01
主要问题是模板标签。
VueFormulate组件在我的模板中必须是小写的,连字符必须分开,并带有一个结束标记。
<formulate-input
type="email"
name="email"
label="Enter your email address"
help="We’ll send you an email when your ice cream is ready"
validation="required|email"
></formulate-input>而不是
<FormulateInput
type="email"
name="email"
label="Enter your email address"
help="We’ll send you an email when your ice cream is ready"
validation="required|email"
/>有关语法样式的更多信息:
https://v2.vuejs.org/v2/style-guide/#Component-name-casing-in-templates-strongly-recommended

发布于 2020-07-02 11:53:02
试试下面的工作代码:
App.js
<template>
<div id="app">
<FormulateInput
type="email"
name="email"
label="Enter your email address"
help="We’ll send you an email when your ice cream is ready"
validation="required|email"
/></div>
</template>
<script>
import Vue from "vue";
import VueFormulate from '@braid/vue-formulate';
Vue.use(VueFormulate);
export default {
name: "App",
};
</script>
<style>
#app {
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>Main.js必须是这样的:
import Vue from "vue";
import App from "./App.vue";
new Vue({
render: h => h(App)
}).$mount("#app");它实际上呈现组件,但没有样式!如果要使用组件样式,请编写:
@import '../node_modules/@braid/vue-formulate/themes/snow/snow.scss';在您的scss样式文件或导入https://github.com/wearebraid/vue-formulate/blob/master/dist/snow.min.css在您的项目!
https://stackoverflow.com/questions/62695382
复制相似问题