Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vue.js 如何使vuematerial MdComponent在我自己的组件中工作,我有一个依赖性问题_Vue.js_Vuejs2_Vue Material - Fatal编程技术网

Vue.js 如何使vuematerial MdComponent在我自己的组件中工作,我有一个依赖性问题

Vue.js 如何使vuematerial MdComponent在我自己的组件中工作,我有一个依赖性问题,vue.js,vuejs2,vue-material,Vue.js,Vuejs2,Vue Material,我正在尝试从vuematerial创建自定义组件。 我基本上是从现有组件MdTextArea复制到我的自定义组件,但是。。。我有个错误,我不明白。我不确定它是来自网页还是我对导入关键字的理解 这是我的密码: import MdComponent from "vue-material/src/core/MdComponent"; import MdUuid from "vue-material/src/core/utils/MdUuid"; import M

我正在尝试从vuematerial创建自定义组件。 我基本上是从现有组件
MdTextArea
复制到我的自定义组件,但是。。。我有个错误,我不明白。我不确定它是来自网页还是我对导入关键字的理解

这是我的密码:

import MdComponent from "vue-material/src/core/MdComponent";
import MdUuid from "vue-material/src/core/utils/MdUuid";
import MdFieldMixin from "vue-material/src/components/MdField/MdFieldMixin";

function calculateContentHeight (el, lineHeight) {
    const origHeight = el.style.height
    const height = el.offsetHeight
    const scrollHeight = el.scrollHeight

    el.style.overflow = 'hidden'

    if (height >= scrollHeight) {
        el.style.height = (height + lineHeight) + 'px'

        if (scrollHeight < el.scrollHeight) {
            el.style.height = origHeight

            return height
        }
    }

    return scrollHeight
}
export default new MdComponent({ <----
    name: 'MdTextareaHelper',
    mixins: [MdFieldMixin],
...
我没有得到的是这个MdComponent文件的内容。我们可以看到:

import MdTheme from 'core/MdTheme'   <----
import deepmerge from 'deepmerge'

export default function (newComponent) {
从“核心/MdTheme”导入MdTheme
import MdTheme from 'core/MdTheme'   <----
import deepmerge from 'deepmerge'

export default function (newComponent) {