See karol-f/vue-element instead.
vuejs / vue-element Goto Github PK
View Code? Open in Web Editor NEWregister a custom element with Vue.js.
License: MIT License
register a custom element with Vue.js.
License: MIT License
See karol-f/vue-element instead.
Is there a timeline or a list of what needs to be done for vue-element to be supported in vue 2.0
PS: Actually, now I tested without vue-elements and the problem is in vue.js and not in vue-elements, so I already open a issue in Vue.js
I'm using the latest version of vuejs, vue-element and webcomponents.js and when I try to load a simple component in firefox he throws a error com console.
example.html
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script src="bower_components/webcomponentsjs/webcomponents.js"></script>
<script src="bower_components/vue/dist/vue.js"></script>
<script src="bower_components/vue-element/vue-element.js"></script>
</head>
<body>
<my-component></my-component>
</body>
<script>
Vue.element('my-component', {
template: '<span> Hello From My {{ name } }Component </span>',
data: function(){
return {
name: ' test '
}
},
shadow: true
});
var vue = new Vue({
el: 'body',
});
</script>
</html>
bower.json dependencies
"dependencies": {
"vue": "~0.12",
"vue-element": "~1.0.1",
"webcomponentsjs": "~0.7.5"
}
console log
TypeError: text.replace is not a function - vue.js:2790:0
什么时候用component什么时候用element呢?
vue-element do not support edit-datatable ?
thank you for your work!
Hi,
With the vue 0.11 version vue-element is working fine, but when I use the bue 1.0.26 version, the shadow dom is not working, the app fires attached event and also dettached event, also overrides the app's div content
see the fiddle below:
on-success 只针对文件上传成功或者失败的方法,如果需要用到后台返回的数据没有这样的回调方法吗?
Vue components have option to use inline templates (http://vuejs.org/guide/components.html#Inline_Template). It would be nice to emulate this feature using vue-element.
We can do this changing createdCallback like this:
const isInlineTemplate = !!Array.from(this.attributes).find((element) => {
return element.name === 'inline-template';
});
if (isInlineTemplate) {
options.template = this.innerHTML;
}
// Define the Vue constructor to manage the element
let VM = Vue.extend(options)
Regards.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.