how to use elementui? under the specification of 1.seajs (vue); has been configured
my code will report errors now, now paste my code
< H2 > config: of seajs < / H2 >seajs.config ({
)base: "../../static",
paths: {
"general": "lib/general",
"widget": "widget",
"css":"css"
},
alias: {
"vue": "lib/vue/V2.5.16/vue.min",
"vue-router":"lib/vue/plugins/vue-router",
//elementUI
"element-ui":"lib/vue/plugins/element/index",
"main":"lib/vue/main",
// seajs plugins
"seajs-css": "lib/seajs/css/seajs-css",
"seajs-text": "lib/seajs/text/seajs-text",
"seajs-log": "lib/seajs/log/seajs-log",
"seajs-debug": "lib/seajs/debug/seajs-debug",
// md5.min.js
"md5": "general/md5.min",
// base
"jquery": "general/common/jquery/2.1.3/jquery",
"swiper": "general/swiper/3.0.6/swiper",
"nprogress": "general/nprogress/0.2.0/nprogress",
"qs": "general/url/qs/2.3.3/queryString",
"twbsPagination": "general/paging/twbsPagination/1.2.5/jquery.twbsPagination",
"daterangepicker":"lib/daterangepicker/1.3.17/daterangepicker",
"moment":"lib/moment/2.9.0/moment",
"lodash-full": "general/lodash/4.17.4/lodash.full.min",
// mock
"mock": "general/mock/mockjs/0.1.8/mock",
"mockjs": "general/mock/mockjs/1.0.0/mock",
},
vars: {},
/** start:java replace **/
//
map: [
//[".css", ".css?v=" + new Date().getTime()],
//[".js", ".js?v=" + new Date().getTime()]
//[".hbs", ".hbs?v=" + new Date().getTime()]
],
/** end:java replace **/
preload: [
"md5",
"seajs-css",
"seajs-text"
//"seajs-log"
],
debug: false,
charset: "utf-8"
});
< H2 > under a template .hbs (the one used by the company, not html): < / H2 >< div class= "accreditedInstitution" >
<!--HTML-->
<!--elementui-->
<el-button @click="visible = true">Button</el-button>
<el-dialog :visible.sync="visible" title="Hello world">
Try Element
</el-dialog>
< / div >
< H2 > then comes the js file for this template, which looks like this: < / H2 >define (function (require, exports, module) {
require("lib/vue/plugins/element/index.css-sharp");//elementuicss
var Vue = require("vue");
var elementUI = require("element-ui");//elementuijs
Vue.use(elementUI);//use
var nprogress = require("nprogress");
require("css/member/accredited_institution.css-sharp");
require("widget/choose-address/choose-address");
require("widget/bal_select/bal_select");
//
var accredited_institution = Vue.extend({
template: require("widget/member/accredited_institution.hbs"),
data: function () {
return {
}
},
filters: {
},
beforeCreate:function(){
},
computed: {
},
mounted: function () {
},
methods:{
},
});
exports.accredited_institution = Vue.component("accreditedInstitution", accredited_institution);
});
< H2 > error message < / H2 >