elementui / vue-cli-plugin-element Goto Github PK
View Code? Open in Web Editor NEWElement plugin for vue-cli
License: MIT License
Element plugin for vue-cli
License: MIT License
按需引入,像最新的抽屉功能都没法用
时间选择器切换年月以后我需要请求接口判断当月哪些天是能点击的.
element-ui 安装后,router-view 标签所占据的组件内部标签无法渲染成普通标签。
比如 解析后还是
显示按钮你完全可以插在里面啊,为什么要完全覆盖呢!!
别人反馈了那么久理都不理
请问插件引入的element-ui无法使用scrollbar如何解决
Property '$alert' does not exist on type 'HelloWorld'
I created a new vue3 CLI project
vue create new-project
vue add vuex
vue add router
vue add element
I select to import a different locale.
When I open the index page, I get this '_vue2.default is undefined' error. It seems to be inside Element, which uses a _interopRequireDefault function to discriminate between transpiled and native modules. However, the Vue 3 export apparently does not export a default (anymore).
安装了vue-cli-plugin-element之后,路由失效了?不能切换路由了,什么情况
TypeError: Cannot read property 'indexOf' of undefined
at progress.wrap (/usr/local/lib/node_modules/@vue/cli/node_modules/@vue/cli-ui/apollo-server/connectors/projects.js:292:35)
能否官方出个,可编辑table,用在form中
为什么官网都2.7.0了,使用插件加载(vue add element)的版本还是2.4.5
vue add element
but..
npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
vue-cli 3.5.3
node v10.15.3
npm v2.15.11
引入的相关代码:
import './plugins/element.js' import { Message,Loading } from 'element-ui' Vue.use(Message) Vue.use(Loading) Vue.prototype.$loading = Loading.service; Vue.prototype.$message = Message;
但是样式没有用!不知道为什么呜呜呜 ┭┮﹏┭┮
Hi there
I just used the plugin follow the instructions and everything goes right (Good Job fellows).
But when I try to change colors, I edit the "var.scs" located in:
"C:\myproject\node_modules\element-ui\packages\theme-chalk\src\common\var.scs"
And nothing happen : (
I try to restart server, and delete cache but no get change in colors.
Please, could you help me? Any Idea? What I am doing wrong?
Thanks a lot in advance
使用el-table的时候,我自己写了一个渲染函数来显示表格内的内容,目的是为了显示一些图片或者富文本:
<template slot-scope="cd">
<div v-html="render(cd.row, col.index)" style="display:inline"></div>
</template>
但问题出来了,在对列进行筛选操作的时候,每次展开和关闭筛选选择框,都要调用 render函数,为什么要这样做,这样既没有任何作用,而且还十分低效,有没有什么办法能避免,我看有个filtered-value的列属性好像可以用,但是没看明白是怎么用的
./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
Module not found: Error: Can't resolve './components/HelloWorld.vue' in 'D:\vues\myjz1\src'
国内环境安装 node-sass 容易失败, 可以切换成 dart-sass 么
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module '/root/gitee/myapp/node_modules/yorkie/bin/install.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:279:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:752:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node bin/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-09-30T02_46_04_333Z-debug.log
ERROR command failed: npm install --loglevel error --registry=https://registry.npm.taobao.org --disturl=https://npm.taobao.org/dist
node version: v10.11.0
npm version: 6.4.1
first <npm install -g @vue/cli>
then <vue create myapp>
and error I got up there
`
<el-form-item label="详情">
<!-- <el-input type="textarea" v-model="form.info"></el-input> -->
</el-form-item>
<el-form-item >
<el-button type="primary" @click="onSubmit">立即投稿</el-button>
</el-form-item>
</el-form>`
`
<el-form-item label="详情">
<el-input type="textarea" v-model="form.info"></el-input>
</el-form-item>
<el-form-item >
<el-button type="primary" @click="onSubmit">立即投稿</el-button>
</el-form-item>
</el-form>`
这是没注释的,直接没页面了
在开发热更新模式下,直接导入index.scss(为了自定义主题色),会导致大量的样式重复,查看源码发现是框架样式反复@import导致的,这个问题在build模式会消失,但是会影响开发热更新的性能。
https://element.eleme.cn/2.11/#/zh-CN/component/drawer
Element supported drawer in v2.11.0, but the vue 3.x plugin doesn't support it.
Can someone solve this problem?
I generated a new project using vue cli and import Element-UI using "vue add element", and error occurred as below:
Running completion hooks...error:
Unexpected use of file extension "js" for "./plugins/element.js" (import/extensions) at src\main.ts:5:8:
At the same time, all my router settings failed to be used and App.vue will always be reached no matter what url is input.
yarn run v1.21.1
$ vue-cli-service serve
INFO Starting development server...
98% after emitting CopyPlugin
WARNING Compiled with 1 warnings 9:54:36 PM
warning in ./src/plugins/element.js
"export 'default' (imported as 'Vue') was not found in 'vue'
vue add element
vue create
vue add element
This is result.
Installing additional dependencies...
> [email protected] install C:\Users\ryosen\Downloads\testuserdart\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.14.1/win32-x64-93_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.14.1/win32-x64-93_binding.node":
HTTP error 404 Not Found
In the node-sass releases page, win32-x64-93 is not found.
https://github.com/sass/node-sass/releases/#:~:text=2.76%20MB-,win32%2Dx64%2D83_binding.pdb,-24%20MB
vue-cli version @vue/cli 4.5.15
project vue-2
node-version v16.13.1
OS win10
vue.config.js中配置 'css.modules': true 时,fonts/element-icons.ttf 和 fonts/element-icons.woff 丢失,该如何解决
Hey!
I just put a link to this repo in the plugin's readme that I did (https://github.com/Seb-L/vue-cli-plugin-element-ui), feel free to get anything you want from it (or not).
Now that you're officially having a plugin I will deprecate the one that I made.
Cheers
There are 5 PR never merged and the plugin is not updated since two years.
Please remove it from vue cli plugin if you are not willing to maintain it because it does more harm than good.
cli3 安装后把我的app.vue给改了,就为了显示能使用一个button,这点要注意一下,最后复制一下app.vue里面的内容,再覆盖。
vue-cli3直接更换App.vue文件里的代码?不解释一下?
UPDATE element-ui version.
安装了babel-plugin-transform-vue-jsx
并且按照文档在vue-cli3脚手架新建的项目的babel.config.js
中修改成如下配置:
module.exports = {
presets: [
'@vue/app',
'env'
],
plugins: ["transform-vue-jsx"]
}
然后再用vue add element
安装 elementUI
, babel.config.js
被改成了这样:
module.exports = {
"presets": [
"@vue/app",
"env"
],
"plugins": [
"transform-vue-jsx",
[
"component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk"
}
]
]
}
最后,起服务`npm run serve`, 点击查看
![image](https://user-images.githubusercontent.com/23474513/50156800-a851cc00-030a-11e9-9634-e42ed962aaa7.png)
Uncaught TypeError: _vue2.default is undefined
Hi,
I did a dependencies update yesterday.
I run npm run dev after update finished, the project throw an error:**
element.js?7378:75 Uncaught ReferenceError: _Loading is not defined at eval (element.js?7378:75) at Object../src/plugins/element.js (app.js:16918) at __webpack_require__ (app.js:724) at fn (app.js:101) at eval (main.js?56d7:10) at Object../src/main.js (app.js:16846) at __webpack_require__ (app.js:724) at fn (app.js:101) at Object.0 (app.js:19667) at __webpack_require__ (app.js:724)
Old version in package.json are:
"element-ui": "^2.4.5",
"vue": "^2.5.17",
"@vue/cli-service": "^3.0.5",
"babel-plugin-component": "^1.1.1",
The new version are:
"element-ui": "^2.7.2",
"vue": "^2.6.10",
"@vue/cli-service": "^3.5.3",
"babel-plugin-component": "^1.1.1",
My element configuration is:
I found if I remove the code "Vue.use(Loading.directive)" in /plugins/element.js, project can work.
But the console always show error: vue.runtime.esm.js?2b0e:619 [Vue warn]: Failed to resolve directive: loading
Would you please kindly help with it, thanks!
Hi,
I'm using this plugin for production-ready Vue application. I'm attempting to deploy the app through a simple docker container. For some reason, the element-ui components are not loading properly anymore. For the normal, 'serve' script, it works as intended.
Screenshots below show whats messed up, it should look as follows:
But the page is displayed like this:
Any ideas on what causes this?
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.