Want to use this.$message ('message') in vue main.js;

want to use elementUI"s this.$message ("message") in vue main.js; change
to Vue.$message ("send"); don"t execute it, how to write

Mar.02,2021

import Vue from 'vue';
import { Message } from 'element-ui';

 Vue.prototype.$message = Message;

it's okay for me to use it this way. Did you report it wrong?

import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

Vue.use(Element)


this.$message.error('')

there is no way to use this method of this.$message in main.js. At this time, this points to window, and you have not registered this method for window

.

it can be introduced separately at this time

Can I use other features of
  

elementUI? Is there anything wrong with your use like this?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaea18-69960.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaea18-69960.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?