我的测试 import VueI18n from 'vue-i18n' import Vuex from "vuex" import iView from 'view-design' import {mount,createLocalVue} from '@vue/test-utils' // @ts-ignore import FormAccountName from '@/views/forms/FormAccountName/FormAccountName' const localVue = createLocalVue() localVue.use(Vuex) localVue.use(iView) localVue.use(VueI18n) describe('a',()=>{ test('b',async ()=>{ const wrapper = mount(FormAccountName,{ localVue,
以下是关于 iview 的编程技术问答
问 题 我在 index.html 引入了 iview 标签: 在 WebPack 中加入了: externals: { iview: 'iview' }, 结果运行后报错: vendors.js:13908 TypeError: _vue2.default is not a constructor at Object._loadingBar2.default.newInstance (iview.js:22714) at getLoadingBarInstance (iview.js:4493) at _update (iview.js:4503) at Object.start (iview.js:4534) at main.js:33787 at iterator (vendo
问 题 今天对之前写的代码拆分了下component,然后就遇到 TypeError: this.$parent.updateGutter is not a function 详细信息如下: [Vue warn]: Error in mounted hook: "TypeError: this.$parent.updateGutter is not a function" found in ---> at /Users/SkyWather/Documents/Program/CodeLab/tw-web/app/static/src/views/components/all_zone.vue at /Users/SkyWather/Documents/Program/CodeLab/tw-web/app/static/src/vie
点击“分值”排序功能导致右侧操作列出现重复的“查看”和“删除”按钮 { title: '操作', key: 'action', align: 'center', render: function (h, params) { return h('div', [ h('Button', { props: { type: 'primary', size: 'small' }, style: { marginRight: '8px' }, on: { click: function () { mCheck.singleShow(params.row); } } }, '查看'), h('Button', {
问 题 版本: "vue": "^2.2.2" "iview": "^2.0.0-rc.15" 大家好,我现在在用iview开发后台系统,遇到Select组件数据项大于500以上时路由跳转很慢的问题。慢的时候要15秒以上才能跳转。后来尝试用了element ui,发现在也需要2秒左右的时间跳转。 请问Select 组件在数据量比较大的时候怎么处理才好降低跳转切换时间? 解决方案 iview和element UI都是一个毛病 每个选项都是一个组件,每个选项还要绑定若干事件。 你这500个以上的选项,也就是说光是这个Select就有500个以上的组件,每个组件下属的DOM元素还被绑定若干事件,渲染起来当然超级慢。 我之前也碰到了这个问题,答案是除非你这个Select不要用iview或者element UI,否则毫无办法。 我是针对选项太多的Select单独写了个组件,当然样式风格是仿照iview的,毕竟风格要保持一致,但是其内部的业务逻辑和i