Git Product home page Git Product logo

vue-form's People

Contributors

lefreet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-form's Issues

field-tree

Hi,起因是发现一个兼容性bug,field-tree在edge里面,弹出来的tree很窄,然后看了一下代码。。
field-tree的mounted里面的代码有问题呀!~

// 保持弹框宽度和输入框一致 let $input = this.$refs['input'].$el let observer = new MutationObserver((mutations, observer) => { this.popWidth = $input.getBoundingClientRect().width - 24 observer.disconnect() }) observer.observe($input, { attributes: true, subtree: false, characterData: false, childList: false }) this.setShowValue() this.getData()

这段代码按注释来看,应该是想监听input的width,然后动态改变tree的width,因为没有这种监听事件,所以用了MutationObserver来监听attribute改变,而且还只是一次性的(很奇怪),但这个是有问题的。。
因为input的width是设置为100%的,按理来说是不会触发observer的,我实际跟踪下来,发现在chrome里面会触发(虽然触发,但是没有任何新旧修改数据),edge里面不会触发。
总之,很奇怪,反正是达不到监听input的宽度动态改变tree宽度的,感觉如果要监听,只能监听window的resize事件了
但这个没有必要,至少目前对于我来说是的,所以我直接设置popWidth了:
let $input = this.$refs['input'].$el this.popWidth = $input.getBoundingClientRect().width - 24 this.setShowValue() this.getData()

下拉框不正常

demo里的完整示例中的下拉框没有显示出来,本地安装后也没有显示,
在浏览器中测试了下移动界面,发现排版有点凌乱

报错了!!!是配置有问题么?

ERROR in ./node_modules/@lefreet/vue-form/src/components/field-tree.vue 1:0
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type.

|
|


@ ./node_modules/@lefreet/vue-form/index.js 11:0-49 15:0-25:1
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:9000 webpack/hot/dev-server ./src/main.js

ERROR in ./node_modules/@lefreet/vue-form/src/components/field-checkbox.vue 1:0
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type.

|
|


@ ./node_modules/@lefreet/vue-form/index.js 5:0-57 15:0-25:1
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:9000 webpack/hot/dev-server ./src/main.js

ERROR in ./node_modules/@lefreet/vue-form/src/components/field-date.vue 1:0
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type.

|
|


@ ./node_modules/@lefreet/vue-form/index.js 10:0-49 15:0-25:1
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:9000 webpack/hot/dev-server ./src/main.js

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.