EasyUI Forum
May 01, 2024, 08:57:26 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 [2] 3 4 ... 6
16  General Category / EasyUI for Vue / Re: ComboGrid not support filter on: November 25, 2018, 06:07:07 PM
I looked at the source code of the 'combogrid' component and found that the doFilter method is empty. This can only wait for an administrator update
17  General Category / EasyUI for Vue / need a 'datetimebox' component on: November 03, 2018, 09:06:07 AM
Hello administrator, I personally feel the need to get a 'DateTimeBox' component, I think the 'DateTimeBox' component is relatively better for the user experience.
18  General Category / EasyUI for Vue / Re: Expanding custom component issues based on easyui on: November 01, 2018, 05:43:29 AM
Please modify the 'src\easyui\src\components\base\index.js' file to export the InputBase file.
Code:
import VirtualScroll from './VirtualScroll';
import InputBase from './InputBase';
import Addon from './Addon';
import Label from './Label';

export {
    VirtualScroll,
    InputBase,
    Addon,
    Label
}
19  General Category / EasyUI for Vue / Expanding custom component issues based on easyui on: October 30, 2018, 11:00:56 PM
The project uses NPM to load easyui. I want to extend a component based on 'InputBase' but cannot export the 'INPUTBASE_INNER_TEMPLATE' constant
项目中是使用NPM加载easyui的。我想扩展一个组件是基于'InputBase' 但是无法导出'INPUTBASE_INNER_TEMPLATE'常量

INPUTBASE_INNER_TEMPLATE is undefined

Code:
<script>
import { InputBase, INPUTBASE_INNER_TEMPLATE } from 'vx-easyui'

export const UI_USER_QUERY_TEMPLATE = `
<span class="f-field">
   ` + INPUTBASE_INNER_TEMPLATE + `

</span>
`

export default {
    name: 'ui-user-query',
    extends: InputBase,
    template: UI_USER_QUERY_TEMPLATE,
}
</script>
20  General Category / EasyUI for Vue / textbox keyup.enter don't work on: October 28, 2018, 08:28:11 PM
textbox keyup.enter can't trigger 'query' methods

Code:
<TextBox v-model="fname" @keyup.enter="query"></TextBox>
21  General Category / EasyUI for Vue / Re: vue version How to expand the specified node of the treegrid component on: October 26, 2018, 06:34:40 AM
trigger the 'rowExpand' event after, how to set icon 'loading'?
手动触发rowExpad事件,有点小问题。就是图标不是'loading'状态,怎么设置?


我参考了TreeGridRow.js里面,怎么在外部设置loading = true?
Code:
        toggle(event) {
            event.stopPropagation();
            if (this.isExpanded){
                this.$set(this.row, 'state', 'closed');
                this.grid.$emit('rowCollapse', this.row);
            } else {
                this.loading = true;
                this.$set(this.row, 'state', 'open');
                this.grid.$emit('rowExpand', this.row);
            }
        },
22  General Category / EasyUI for Vue / Re: vue version How to expand the specified node of the treegrid component on: October 25, 2018, 08:18:28 PM
Set the row's 'state' property with 'open' can't trigger 'rowExpand' event

Code:
            if (this.selectRow.state == 'closed') {
                this.$set(this.selectRow, 'state', 'open')
            }
23  General Category / EasyUI for Vue / vue version How to expand the specified node of the treegrid component on: October 25, 2018, 01:47:58 AM
i want expand and append treegrid node.(我想要调用treegrid的事件,展开节点。或者往节点里面插入数据)
jquery version code:
Code:
        if (node.state == 'closed') {
            tree.treegrid('expand', node.id)
        } else {
            tree.treegrid('append', {
                parent: node.id,
                data  : data
            })
        }
24  General Category / EasyUI for Vue / how to trigger tooltip showEvent on textbox focus on: October 24, 2018, 07:51:44 PM
run this example

Code:

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>EasyUI for Vue</title>
  <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/icon.css">
  <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/color.css">
  <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/vue.css">
    <script src="https://www.jeasyui.com/node_modules/vx-easyui/vue.min.js"></script>
    <script src="https://www.jeasyui.com/node_modules/vx-easyui/babel-polyfill.js"></script>
    <script src="https://www.jeasyui.com/node_modules/vx-easyui/vx-easyui-min.js"></script>
    <script src="https://www.jeasyui.com/node_modules/vx-easyui/babel.min.js"></script>
    <style type="text/css">
        body{
            padding: 20px;
        }
        h2{
            margin: 0 0 20px 0;
        }
        .mycontainer{
            min-width: 700px;
        }
    </style>
</head>
<body>
      <div id="app"></div>
    <script type="text/babel">
      var demovalidate2={
        template: `
  <div>
    <button @click="dialogClosed=false">打开</button>
    <Dialog ref="d1" bodyCls="f-column" :dialogStyle="{width:'700px',height:'550px'}" title="标题" :closed="dialogClosed" @open="onDialogOpen">
  <Form ref="form" :model="user" :rules="rules" @validate="errors=$event">
<div style="margin-bottom:20px">
  <Label for="name" align="top">Name:</Label>
  <TextBox ref="name" inputId="name" name="name" v-model="user.name" v-Tooltip="getTipOpts('name')"></TextBox>
</div>
  </Form>
  <p>{{user}}</p>
  </Dialog>
  </div>
`,
       
  data() {
    return {
      dialogClosed: true,
      user: {
        name: null
      },
      rules: {
        name: ["required", "length[5,10]"]
      },
      errors: {}
    };
  },
  methods: {
    onDialogOpen() {
            this.$nextTick(() => {
this.$refs.name.focus()
                this.$refs.form.validate()
            })
    },
    getError(name) {
      return this.errors[name] && this.errors[name].length
        ? this.errors[name][0]
        : null;
    },
    hasError(name) {
      return this.getError(name) != null;
    },
    getTipOpts(name) {
      return {
        content: this.getError(name),
        closed: !this.hasError(name),
        position: "right"
      };
    },
  }
      }
      var app = new Vue({
        el: '#app',
        template: `<demovalidate2 class="mycontainer"></demovalidate2>`,
        components: {
          demovalidate2:demovalidate2       }
      })
    </script>
<style>
.error {
  color: red;
  font-size: 12px;
  margin: 4px 0;
}
</style>
</body>
</html>
25  General Category / EasyUI for Vue / treegrid component how to use lazy load data on rowExpand on: October 23, 2018, 05:18:07 PM
数据层级太多,数据量大。我想异步加载数据。但是不知道要怎么处理。
There are too many data levels and a large amount of data. I want to load data asynchronously. But I don't know what to do.
26  General Category / EasyUI for Vue / datagrid component row group and pagination bug on: October 22, 2018, 12:22:15 AM
The pageSize property is 10, only 9 records can be displayed after adding the 'groupField' attribute.

Code:
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>EasyUI for Vue</title>
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/color.css">
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/vue.css">
    <script src="http://www.jeasyui.com/node_modules/vx-easyui/vue.min.js"></script>
    <script src="http://www.jeasyui.com/node_modules/vx-easyui/babel-polyfill.js"></script>
    <script src="http://www.jeasyui.com/node_modules/vx-easyui/vx-easyui-min.js"></script>
    <script src="http://www.jeasyui.com/node_modules/vx-easyui/babel.min.js"></script>
    <style type="text/css">
        body{
            padding: 20px;
        }
        h2{
            margin: 0 0 20px 0;
        }
        .mycontainer{
            min-width: 700px;
        }
    </style>
</head>
<body>
    <div id="app"></div>
    <script type="text/babel">
    var demopagination2={
    template: `
<div>
<h2>Pagination - Lazy Load</h2>
<div style="margin-bottom:10px">
<Label for="c1">Pager on: </Label>
<ComboBox inputId="c1" style="width:120px"
:data="pageOptions"
v-model="pagePosition"
:editable="false"
:panelStyle="{height:'auto'}">
</ComboBox>
</div>
<DataGrid style="height:450px"
:pagination="true"
        :lazy="true"
:data="data"
:total="total"
        :loading="loading"
        :pageNumber="pageNumber"
        :pageSize="pageSize"
        groupField="group"
        :pagePosition="pagePosition"
        :pageLayout="['list','sep','first','prev','num','tpl','next','last','refresh','info']"
        @pageChange="onPageChange($event)">
<GridColumn field="inv" title="Inv No"></GridColumn>
<GridColumn field="name" title="Name"></GridColumn>
<GridColumn field="amount" title="Amount" align="right"></GridColumn>
<GridColumn field="price" title="Price" align="right"></GridColumn>
<GridColumn field="cost" title="Cost" align="right"></GridColumn>
      <GridColumn field="note" title="Note"></GridColumn>
     
      <template slot="group" slot-scope="scope" >
                    <span style="font-weight:bold">
                        {{scope.value}}
                    </span>
                </template>
</DataGrid>
</div>
`,
   
  data() {
    return {
      total: 0,
      pageNumber: 1,
      pageSize: 10,
      data: [],
      loading: false,
      pagePosition: "bottom",
      pageOptions: [
        { value: "bottom", text: "Bottom" },
        { value: "top", text: "Top" },
        { value: "both", text: "Both" }
      ]
    };
  },
  created() {
    this.loadPage(this.pageNumber, this.pageSize);
  },
  methods: {
    onPageChange(event) {
      this.loadPage(event.pageNumber, event.pageSize);
    },
    loadPage(pageNumber, pageSize) {
      this.loading = true;
      setTimeout(() => {
        let result = this.getData(pageNumber, pageSize);
        this.total = result.total;
        this.pageNumber = result.pageNumber;
        this.data = result.rows;
        this.loading = false;
      }, 1000);
    },
    getData(pageNumber, pageSize) {
      let total = 100000;
      let data = [];
      let start = (pageNumber - 1) * pageSize;
      for (let i = start + 1; i <= start + pageSize; i++) {
        let amount = Math.floor(Math.random() * 1000);
        let price = Math.floor(Math.random() * 1000);
        data.push({
          group:'group',
          inv: "Inv No " + i,
          name: "Name " + i,
          amount: amount,
          price: price,
          cost: amount * price,
          note: "Note " + i
        });
      }
      return {
        total: total,
        pageNumber: pageNumber,
        pageSize: pageSize,
        rows: data
      };
    }
  }
    }
    var app = new Vue({
    el: '#app',
    template: `<demopagination2 class="mycontainer"></demopagination2>`,
    components: {
    demopagination2:demopagination2    }
    })
    </script>
   
</body>
</html>
27  General Category / EasyUI for Vue / Suggested form component to add 'reset' method on: October 16, 2018, 07:11:05 AM
Code:
this.$refs.form.reset(); // reset all field
28  General Category / EasyUI for Vue / menu component props menuWidth don't work on: October 14, 2018, 09:31:34 PM
Code:
    <Menu ref="m1" :menuWidth="134">
        <Menu-Item text="New"></Menu-Item>
        <Menu-Item text="Save" iconCls="icon-save"></Menu-Item>
        <Menu-Item text="Print" iconCls="icon-print" :disabled="true"></Menu-Item>
        <Menu-Item text="Exit"></Menu-Item>
    </Menu>
跟vue.css里面min-width起冲突
Code:
.menu-container{
position: absolute;
left: 0;
top: 0;
min-width: 200px;
}
29  General Category / EasyUI for Vue / treegrid please add 'getCheckedNodes' methods on: October 13, 2018, 01:30:39 AM
目前要获取所有选择节点非常麻烦。需要监听'rowCheck'、'rowUncheck'两个方法。还需要判断是否子节点。因此建议treegrid组件内置getCheckedNodes方法。
---------------------------------------
It is very troublesome to get all the selection nodes at the moment. Need to listen to the 'rowCheck', 'rowUncheck' two methods. You also need to determine if the child node. It is therefore recommended that the treegrid component have a built-in getCheckedNodes method.
30  General Category / EasyUI for Vue / Re: treegrid add column row-number fail on: October 11, 2018, 10:05:49 PM
在用,
Pages: 1 [2] 3 4 ... 6
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!