vux icon indicating copy to clipboard operation
vux copied to clipboard

什么时候支持@vue/cli3.0

Open saxon-yc opened this issue 6 years ago • 61 comments

saxon-yc avatar Apr 01 '19 07:04 saxon-yc

同问

qiqingfu avatar Apr 04 '19 06:04 qiqingfu

按照示例 https://github.com/airyland/vux/blob/v2/packages/vue-cli-3-example/vue.config.js 配置,如有问题麻烦反馈。

airyland avatar Apr 08 '19 07:04 airyland

王者归来~~

Jiiiiiin avatar Apr 09 '19 06:04 Jiiiiiin

image 今天看见大佬提供的方案试了下 但是很可惜 不行 希望大佬能解答 image image

bobevans-commits avatar Apr 10 '19 09:04 bobevans-commits

image 即使这样 还是不行

bobevans-commits avatar Apr 10 '19 10:04 bobevans-commits

@Evans-Cai 看报错你似乎没有安装依赖 @vux/loader

airyland avatar Apr 10 '19 11:04 airyland

安装了 vux-loader:1.2.9 这也是我比较困惑的

bobevans-commits avatar Apr 11 '19 03:04 bobevans-commits

@airyland 我已经找到问题了,在cli里面我们需要安装 "@vux/loader": "2.0.0-rc2", 这个最新版本的vux-loader, 之前安装的vux-loader :1.2.9 在cli3里面不适用,但是我找不到 "@vux/loader": "2.0.0-rc2", 谢谢大佬的源码示例

bobevans-commits avatar Apr 11 '19 08:04 bobevans-commits

@Evans-Cai 应该是发布时的 tag 问题,你可以安装 rc3 试试。

airyland avatar Apr 11 '19 08:04 airyland

按照示例 https://github.com/airyland/vux/blob/v2/packages/vue-cli-3-example/vue.config.js 配置,如有问题麻烦反馈。

会警告这个东西You should write display: flex by final spec instead of display: box

bigGoodMan avatar Apr 11 '19 09:04 bigGoodMan

安装了最新的"@vux/loader": "^2.0.0-rc3", 配置了 configureWebpack: config => { require('@vux/loader').merge(config, { plugins: ['vux-ui', { name: 'less-theme', path: './node_modules/vux/src/theme.less' }] }) }, 运行项目,图片损坏,无法显示图片

masterymastery avatar Apr 11 '19 11:04 masterymastery

我也遇到同样的问题 安装了最新的"@vux/loader": "^2.0.0-rc3"之后 组件正常加载,但是图片无法显示

yumw avatar Apr 12 '19 03:04 yumw

应该这样引入:

require('vux-loader').merge(config, {
	options: {},
	plugins: [
		{name: 'vux-ui'}
	]
})

qiqingfu avatar Apr 12 '19 03:04 qiqingfu

按照示例 https://github.com/airyland/vux/blob/v2/packages/vue-cli-3-example/vue.config.js 配置,如有问题麻烦反馈。

会警告这个东西You should write display: flex by final spec instead of display: box

同遇到这个问题

zhangyt93 avatar Apr 12 '19 03:04 zhangyt93

@masterymastery 升级到 2.0.0-rc4

airyland avatar Apr 16 '19 14:04 airyland

check 你的demo下来安装可以正常运行,但稍作修改在有些移动端浏览器报错 报错浏览器: ua Mozilla/5.0 (Linux; U; Android 8.1.0; zh-cn; PACM00 Build/O11019) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.134 Mobile Safari/537.36 OppoBrowser/10.5.0. 报错内容:unexpected token at Object node_modules/vux/src/components/v-chart/mixins.js

报错浏览器:ua:iphone ios9.2.1 报错内容:syntaxError unexpected tokin '>' /app.js:2693:5

image

代码部分我只做了如下的修改,即将原来以src引入的脚本内联到script中

<template>
  <div class="hello">
    <img src="../assets/logo.png" alt=""/>
    <group>
      <cell title="hello world" @click.native="alert"></cell>
    </group>
  </div>
</template>

<script >
  import Group from 'vux/src/components/group/index'
  import { Cell } from 'vux'

  export default {
    components: {
      Group,
      Cell
    },
    props: {
      msg: String
    },
    methods: {
      alert () {
        this.$vux.alert.show('hello')
      }
    }
  }

</script>

<style scoped lang="less">
.hello {
  text-align: center;
}
</style>

snowlotus avatar Apr 17 '19 08:04 snowlotus

按照示例添加相关配置,并安装最新版vux、@vux/loader,组件样式不正确,提示需升级vux-loader: cell组件样式异常

-- vue代码

<template>
    <group>
      <cell title="cell title" is-link/>
    </group>
</template>

-- vue.config.js

module.exports = {
    configureWebpack: config => {
        require('@vux/loader').merge(config, {
            plugins: [
                'vux-ui'
            ]
        })
    }
}

-- 依赖

"dependencies": {
    "@vux/loader": "^2.0.0-rc4",
    "core-js": "^2.6.5",
    "vue": "^2.6.10",
    "vux": "^2.9.4"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^3.6.0",
    "@vue/cli-plugin-eslint": "^3.6.0",
    "@vue/cli-service": "^3.6.0",
    "babel-eslint": "^10.0.1",
    "eslint": "^5.16.0",
    "eslint-plugin-vue": "^5.0.0",
    "less-loader": "^4.1.0",
    "vue-template-compiler": "^2.5.21"
  }

louie-001 avatar Apr 18 '19 05:04 louie-001

使用 https://github.com/airyland/vux/blob/v2/packages/vue-cli-3-example/ demo 打包后,在 ios 9.3 版本不兼容,语法不兼容,没有经过 babel 处理吧

image

ltinyho avatar Apr 19 '19 05:04 ltinyho

@ltinyho 打包后没有在 chunk-vendors 里搜索到 const。

airyland avatar Apr 20 '19 21:04 airyland

@louie-001 需要给出完整代码,最好建个 repo。

airyland avatar Apr 20 '19 21:04 airyland

@snowlotus 麻烦建个 repo 来重现。

airyland avatar Apr 20 '19 21:04 airyland

我也遇到同样的问题 安装了最新的"@vux/loader": "^2.0.0-rc3"之后 组件正常加载,但是图片无法显示

请问执行什么指令来安装这个:"@vux/loader": "^2.0.0-rc3"

maomaoliangliang avatar Apr 22 '19 15:04 maomaoliangliang

@maomaoliangliang 直接 npm install @vux/loader 或者 yarn add @vux/loader

airyland avatar Apr 22 '19 20:04 airyland

@ltinyho 打包后没有在 chunk-vendors 里搜索到 const。

image 这个是我建的repo, https://github.com/ltinyho/vux-vue-cli-3-example ,打包后在 chunk-vendors 里出现了 const ,希望能够得到答复.

ltinyho avatar Apr 22 '19 23:04 ltinyho

@louie-001 需要给出完整代码,最好建个 repo。

@airyland 样式问题是引入了其他样式文件引起的,提示升级vux-loader不知道是什么原因,这是demo的repo:https://github.com/louie-001/vux-cli3-demo

louie-001 avatar Apr 23 '19 02:04 louie-001

image 很多地方都报这个错误

Estelle00 avatar Apr 24 '19 09:04 Estelle00

npm install babel-plugin-import --save-dev 然后在 babel.config.js 下增加plugin: module.exports = { presets: [ '@vue/app', ], plugins: [ ['import', { libraryName: 'vux', libraryDirectory: 'src/components' }], ], };

alex374 avatar Apr 24 '19 09:04 alex374

npm install babel-plugin-import --save-dev 然后在 babel.config.js 下增加plugin: module.exports = { presets: [ '@vue/app', ], plugins: [ ['import', { libraryName: 'vux', libraryDirectory: 'src/components' }], ], };

这样 plugin插件就没法用了 image

Estelle00 avatar Apr 24 '19 09:04 Estelle00

@louie-001 和你一样的情况 WX20190426-141419

tidows avatar Apr 26 '19 06:04 tidows

谁能帮我解答一下啊,我下载了vux 的源码,但是 项目跑不起来 说我 Cannot find module './src/routes.json',无法自动生成 routes.json 文件,谁能帮我解答一下,问题出在那里

shixx106 avatar Apr 28 '19 08:04 shixx106