Table editing method, electronic equipment and storage medium
By listening to editing events in the table view layer and using the coordinated work of the view model layer and the data model layer, the advanced table editing function is realized, solving the problem of insufficient user interaction in the existing technology, and improving development efficiency and user experience.
Patent Information
- Application Number
- CN202510399576.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-22
AI Technical Summary
The existing front-end table framework components have shortcomings in design and user interaction, which cannot meet complex data visualization needs, resulting in poor user experience and inefficient development.
It provides a table editing method. By monitoring the events of editing controls in the table view layer, and using the coordinated work of the view model layer and the data model layer to realize real-time response and processing of user operations, including advanced functions such as object filtering, dragging, density adjustment and layout switching, no additional secondary development is required for developers.
It improves development efficiency, reduces R&D costs, ensures instant feedback of user operations and efficient data processing, and enhances user experience.
Smart Images

Figure CN120354831A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of front - end application interactions, for example, it relates to a table editing method, an electronic device, and a storage medium. Background Art
[0002] Front - end table framework components, such as Element Plus, Element UI, AntDesign, and Vuetify, etc., mainly focused on the design and implementation of the overall framework at the beginning of their design, but relatively lacked detailed processing in the design and encapsulation of specific UI components. Especially in the design of the table component (Table), its solutions are often too simple, only providing basic functions such as fixed table headers, filtering, single - selection, multi - selection, etc., and cannot meet complex user interaction requirements and data visualization requirements. For example, although Element UI is widely used in various projects, its table component lacks advanced functions, resulting in poor user experience and low development efficiency. In related technologies, developers usually need to perform secondary encapsulation and optimization on the basis of the basic functions of front - end table framework components, which significantly increases the development cost and time consumption. Summary of the Invention
[0003] To have a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary is not a general review, nor is it intended to identify key / important constituent elements or delineate the protection scope of these embodiments, but rather serves as a preface to the subsequent detailed description.
[0004] Embodiments of the present disclosure provide a table editing method, an electronic device, and a storage medium, which can greatly improve the development efficiency and reduce the R & D cost.
[0005] According to a first aspect of the present disclosure, a table editing method is provided, including:
[0006] Listening for table editing events triggered by an editing control in the table view layer, and sending the listened table editing events to the view model layer, where the editing control is a secondary - encapsulated interface element for capturing the user's table editing operations in the table view and triggering corresponding editing events;
[0007] Determining the editing requirement data corresponding to the table editing events in the view model layer, and sending the editing requirement data to the data model layer;
[0008] Performing component data processing operations based on the editing requirement data in the data model layer, and returning the data processing result to the view model layer;
[0009] Triggering the rendering of the table view layer in the view model layer according to the data processing result, and generating a view after component editing in the table view layer.
[0010] In some embodiments, determining the editing requirement data corresponding to the table editing event in the view model layer and sending the editing requirement data to the data model layer includes:
[0011] Obtaining the business logic function corresponding to the table editing event in the view model layer;
[0012] Performing business processing on the table editing event based on the business logic function to obtain the editing requirement data corresponding to the table editing event;
[0013] Sending the editing requirement data to the data model layer.
[0014] In some embodiments, triggering the rendering of the table view layer in the view model layer according to the data processing result and generating the view after component editing in the table view layer includes:
[0015] Updating the internal state in the view model layer according to the data processing result;
[0016] When updating the internal state, triggering the rendering of the table view layer through the two-way data binding mechanism and generating the view after component editing in the table view layer.
[0017] In some embodiments, the table editing event includes object filtering, and the editing requirement data includes object filtering conditions;
[0018] Performing component data processing operations based on the editing requirement data in the data model layer and returning the data processing result to the view model layer includes: filtering and sorting the current table data based on the object filtering conditions in the data model layer to obtain the re-sorted table data, and returning the re-sorted table data to the view model layer;
[0019] Triggering the rendering of the table view layer in the view model layer according to the data processing result and generating the view after component editing in the table view layer includes: triggering the rendering of the table view layer according to the re-sorted table data in the view model layer and generating the view for displaying the re-sorted table data in the table view layer.
[0020] In some embodiments, the table editing event includes object dragging, and the editing requirement data includes the data to be dragged and the dragging position;
[0021] Performing component data processing operations based on the editing requirement data in the data model layer and returning the data processing result to the view model layer includes: determining the data difference information before and after dragging based on the data to be dragged and the dragging position in the data model layer, and returning the data difference information to the view model layer;
[0022] In the view model layer, render the view of the table view layer according to the data processing result, and generate the view after component editing in the table view layer, including: in the view model layer, trigger the rendering of the table view layer based on the component data difference information, and generate the view for displaying the table data after dragging the data in the table view layer.
[0023] In some embodiments, the table editing event includes adjusting the table density, and the editing requirement data includes the target density specification;
[0024] In the data model layer, perform component data processing operations based on the editing requirement data, and return the data processing result to the view model layer, including: save the target density specification in the data model layer, and return the save result of the target density specification to the view model layer;
[0025] In the view model layer, render the view of the table view layer according to the data processing result, and generate the view after component editing in the table view layer, including: in the view model layer, trigger the rendering of the table view layer based on the save result of the target density specification of the component, and generate the view for displaying the table data after adjusting the table density in the table view layer.
[0026] In some embodiments, the table editing event includes switching the layout mode, and the editing requirement data includes the target layout mode;
[0027] In the data model layer, perform component data processing operations based on the editing requirement data, and return the data processing result to the view model layer, including: save the target layout mode in the data model layer, and return the save result of the target layout mode to the view model layer;
[0028] In the view model layer, render the view of the table view layer according to the data processing result, and generate the view after component editing in the table view layer, including: in the view model layer, trigger the rendering of the table view layer based on the save result of the target layout mode of the component, and generate the view for displaying the table data after switching the layout mode in the table view layer.
[0029] According to the second aspect of the present disclosure, an electronic device is provided, including a processor and a memory storing program instructions, and the processor executes the table editing method provided in the first aspect of the present disclosure.
[0030] According to the second aspect of the present disclosure, a storage medium is provided, in which computer program instructions are stored, and when the computer program instructions are run by a processor, the table editing method provided in the first aspect of the present disclosure is executed.
[0031] The table editing method, electronic device and storage medium provided by the embodiments of the present disclosure can achieve the following technical effects:
[0032] The table editing method provided by the embodiments of the present disclosure pre-introduces a secondarily encapsulated editing control. The table editing events triggered by the editing control are listened to at the table view layer and sent to the view model layer, achieving real-time response and processing of user operations. The view model layer can accurately parse and obtain the editing requirement data corresponding to the table editing events and pass it to the data model layer to ensure the accuracy of data processing. The data model layer performs component data processing operations based on the editing requirement data and quickly returns the processing results to the view model layer, ensuring the efficiency and consistency of data processing. The view model layer triggers the table view layer to be re-rendered according to the data processing results to generate an edited view, ensuring that users can immediately see the operation results and enhancing the user experience. The editing control integrates rich functions, eliminating the need for developers to perform additional secondary development or complex configurations, greatly improving the development efficiency and reducing the R & D costs.
[0033] The above general description and the following description are only exemplary and explanatory, and are not used to limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] One or more embodiments are exemplarily illustrated by corresponding drawings. These exemplary illustrations and the drawings do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements. The drawings do not constitute a scale limitation, and:
[0035] Figure 1 is a schematic diagram of a software architecture for executing the table editing method provided by the embodiments of the present disclosure;
[0036] Figure 2 is a schematic flowchart of a table editing method provided by the embodiments of the present disclosure;
[0037] Figure 3 is a schematic flowchart of another table editing method provided by the embodiments of the present disclosure;
[0038] Figure 4 is a schematic flowchart of another table editing method provided by the embodiments of the present disclosure;
[0039] Figure 5 is a schematic diagram of an object screening process provided by the embodiments of the present disclosure;
[0040] Figure 6 is a schematic diagram of an object dragging process provided by the embodiments of the present disclosure;
[0041] Figure 7 is a schematic diagram of another object dragging process provided by the embodiments of the present disclosure;
[0042] Figure 8It is a schematic diagram of a process for adjusting table density provided by an embodiment of the present disclosure;
[0043] Figure 9 It is a schematic diagram of a process for switching layouts provided by an embodiment of the present disclosure;
[0044] Figure 10 It is a schematic diagram of another process for switching layouts provided by an embodiment of the present disclosure;
[0045] Figure 11 It is a schematic diagram of an electronic device provided by an embodiment of the present disclosure. Detailed implementation manners
[0046] In order to be able to understand the features and technical content of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the sake of explanation, numerous details are provided to give a thorough understanding of the disclosed embodiments. However, one or more embodiments may still be implemented without these details. In other instances, well-known structures and devices may be shown in a simplified manner to simplify the drawings.
[0047] In the description of the embodiments of the present disclosure, the terms "first", "second", etc. in the specification, claims and the above-mentioned drawings are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way may be interchanged under appropriate circumstances so as to implement the embodiments of the present disclosure described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion.
[0048] Unless otherwise specified, the term "plurality" means two or more.
[0049] In the embodiments of the present disclosure, the character " / " indicates that the front and rear objects are in an "or" relationship. For example, A / B means: A or B.
[0050] The term "and / or" is a description of the associated relationship of an object and indicates that three relationships may exist. For example, A and / or B means: A or B, or, A and B these three relationships.
[0051] The term "correspond to" may refer to an associated relationship or a binding relationship. That A corresponds to B means that there is an associated relationship or a binding relationship between A and B.
[0052] The embodiments of the present disclosure provide an electronic device that can visually display a front-end table and support rich user interaction functions. The electronic device includes, but is not limited to, personal computers, tablet computers, smart phones, smart TVs, and embedded systems, etc.
[0053] The electronic device is designed to provide a visual interface for users, enabling them to not only view data tables but also directly perform various editing operations on the view interface. By integrating the latest front-end technologies and data visualization methods, this electronic device ensures the dynamic display and real-time update of tabular data. Users can perform various advanced operations in the table view, such as object filtering, object dragging, density adjustment, and layout switching.
[0054] Combined with Figure 1 As shown, a software architecture for executing the table editing method is deployed in the electronic device. This architecture is based on the idea of data-driven views and two-way data binding, and includes a table view layer (View), a view model layer (ViewModel), and a data model layer (Model). The table view layer is used to display the table content on the interface. The data model layer is the data source required by the table component. The view model layer acts as a mediator between the table view layer and the data model layer, responsible for coordinating the communication between the two. Specifically, when the result output by the data model layer affects the interface table view layer through the view model layer, and when the table view layer changes, it also affects the data model layer through the view model layer, ensuring that any data change can be immediately reflected on the interface, and the user's operations can be quickly reflected in the data model layer.
[0055] Combined with the electronic device provided in the embodiments of the present disclosure (hereinafter referred to as the device), the embodiments of the present disclosure provide a table editing method. Combined with Figure 2 As shown, the table editing method includes the following steps:
[0056] S201, the device listens for table editing events triggered by editing controls in the table view layer and sends the listened table editing events to the view model layer.
[0057] In the embodiments of the present disclosure, the editing control is a secondary encapsulated interface element used to capture the user's table editing operations in the table view and trigger corresponding editing events. The table editing operations include object filtering operations, object dragging operations, table density adjustment operations, and layout mode switching operations, etc.
[0058] S202, the device determines the editing requirement data corresponding to the table editing event in the view model layer and sends the editing requirement data to the data model layer.
[0059] S203, the device performs component data processing operations based on the editing requirement data in the data model layer and returns the data processing result to the view model layer.
[0060] S204, the device triggers the rendering of the table view layer in the view model layer according to the data processing result, and generates a view after component editing in the table view layer.
[0061] The table editing method provided by the embodiments of the present disclosure pre-introduces a re-encapsulated editing control. The table editing events triggered by the editing control are listened to at the table view layer and sent to the view model layer, realizing real-time response and processing of user operations. The view model layer can accurately parse and obtain the editing requirement data corresponding to the table editing events and pass it to the data model layer to ensure the accuracy of data processing. The data model layer executes component data processing operations based on the editing requirement data and quickly returns the processing results to the view model layer, ensuring the efficiency and consistency of data processing. The view model layer triggers the table view layer to re-render according to the data processing results to generate an edited view, ensuring that users can immediately see the operation results and enhancing the user experience. The editing control integrates rich functions, eliminating the need for developers to perform additional secondary development or complex configuration, greatly improving development efficiency and reducing R & D costs.
[0062] In some embodiments, determining the editing requirement data corresponding to the table editing event in the view model layer and sending the editing requirement data to the data model layer includes: obtaining the business logic function corresponding to the table editing event in the view model layer; performing business processing on the table editing event based on the business logic function to obtain the editing requirement data corresponding to the table editing event; and sending the editing requirement data to the data model layer.
[0063] In the embodiments of the present disclosure, through the business logic function, the view model layer can accurately parse each operation of the user, ensuring that each step of the operation can be accurately understood and processed. Performing business processing based on the business logic function makes data processing more efficient. The view model layer can not only quickly respond to user operations but also quickly pass the processing results to the data model layer, reducing unnecessary intermediate links and delays and improving the overall performance of the system. The design of the business logic function allows developers to customize and expand according to actual needs. By simply adding corresponding logic to the business logic function, new functions can be added without modifying the underlying data model layer, greatly enhancing the flexibility and maintainability of the system. Since the view model layer can parse and process user operations in real time and quickly feedback to the view layer, users can immediately see the results of the operations, enhancing the interaction experience. In summary, by obtaining the business logic functions corresponding to the table editing events in the view model layer, performing business processing based on these functions, and finally sending the editing requirement data to the data model layer, accurate parsing of user operations, efficient processing, high flexibility and scalability of the system are achieved, improving the user experience and development efficiency.
[0064] The embodiments of the present disclosure provide another table editing method, combined with Figure 3 As shown, the table editing method includes the following steps:
[0065] S301, the device listens for table editing events triggered by editing controls at the table view layer and sends the listened table editing events to the view model layer.
[0066] S302, the device obtains the business logic function corresponding to the table editing event at the view model layer.
[0067] S303, the device performs business processing on the table editing event based on the business logic function to obtain the editing requirement data corresponding to the table editing event.
[0068] S304, the device sends the editing requirement data to the data model layer.
[0069] S305, the device performs component data processing operations based on the editing requirement data at the data model layer and returns the data processing result to the view model layer.
[0070] S306, the device triggers the view rendering at the table view layer according to the data processing result at the view model layer, and generates the view after component editing at the table view layer.
[0071] In some embodiments, triggering the view rendering at the table view layer according to the data processing result at the view model layer and generating the view after component editing at the table view layer includes: updating the internal state according to the data processing result at the view model layer; when updating the internal state, triggering the view rendering at the table view layer through the two-way data binding mechanism and generating the view after component editing at the table view layer.
[0072] The embodiments of the present disclosure adopt a two-way data binding mechanism. The view model layer can immediately notify the view layer to re-render when updating the internal state, so as to generate the view after component editing at the table view layer in a timely manner. The two-way data binding mechanism ensures the consistency between data and views. Whether it is user operations or background data updates, the view model layer can synchronize these changes in a timely manner, avoiding the situation of data inconsistency. The view model layer only triggers the re-rendering of the view layer when necessary, reducing unnecessary calculations and resource consumption. Since the view model layer can quickly respond to data changes and trigger view updates, the user's interaction experience has been significantly improved. In addition, developers do not need to manually write code to synchronize the changes between data and views. The two-way data binding mechanism automatically processes these synchronization tasks, reducing the development complexity and the probability of errors. In summary, by updating the internal state according to the data processing result at the view model layer and triggering the re-rendering of the table view layer through the two-way data binding mechanism, the high consistency and real-time update of data and views are achieved, significantly improving the performance of the system and the user experience, while simplifying the development process and enhancing the flexibility and scalability of the system.
[0073] The embodiments of the present disclosure provide another table editing method, combined with Figure 4As shown, the table editing method includes the following steps:
[0074] S401, the device listens for table editing events triggered by an editing control in the table view layer and sends the listened table editing events to the view model layer.
[0075] S402, the device determines the editing requirement data corresponding to the table editing event in the view model layer and sends the editing requirement data to the data model layer.
[0076] S403, the device performs component data processing operations based on the editing requirement data in the data model layer and returns the data processing result to the view model layer.
[0077] S404, the device updates the internal state according to the data processing result in the view model layer.
[0078] S405, when updating the internal state, the device triggers the rendering of the table view layer through a two-way data binding mechanism to generate a view after component editing in the table view layer.
[0079] In some embodiments, the table editing event includes object filtering, and the editing requirement data includes object filtering conditions. Here, the editing control is a filtering control, and the filtering control can be located in the header part of the table column, allowing the user to select specific filtering conditions through a drop-down menu or other interaction methods. Combining Figure 5 As shown, taking the patient table in the hospital industry as an example, the editing controls include a gender filtering control, an age filtering control, a diagnosis type filtering control, etc. For the gender filtering requirement, after the user clicks the gender filtering control, a gender option list can be displayed for the user to select a specific gender.
[0080] In the embodiments of the present disclosure, performing component data processing operations based on the editing requirement data in the data model layer and returning the data processing result to the view model layer includes: filtering and sorting the current table data based on the object filtering conditions in the data model layer to obtain the re-sorted table data, and returning the re-sorted table data to the view model layer.
[0081] Filtering and sorting the table data in real time based on the object filtering conditions to quickly respond to the user's filtering requirements. The data processing is completed in the data model layer, avoiding frequent view redrawing, improving the overall performance and response speed of the system. The system immediately re-sorts and displays the data according to the user's filtering conditions, providing instant feedback and improving the interaction experience.
[0082] In the embodiments of the present disclosure, the view model layer triggers the rendering of the table view layer based on the data processing result, and the table view layer generates the view after component editing, including: the view model layer triggers the rendering of the table view layer based on the re-sorted table data, and the table view layer generates the view for displaying the re-sorted table data.
[0083] Specifically, the user selects a specific filtering condition (such as gender) through the filtering control provided on the table view layer. Obtain the filtering field selected by the user, and find the matching data items in the existing dataset. Sort the data according to the filtering field to generate a new data set. When the data changes, the view layer is automatically triggered to re-render, and the latest filtering results are displayed to the user in real time.
[0084] In some embodiments, the table editing event includes object dragging, and the editing requirement data includes the data to be dragged and the dragging position. Combining Figure 6 and Figure 7 As shown, object dragging includes row dragging and column dragging, and the editing controls include row dragging controls and column dragging controls. Taking the row dragging control as an example, as Figure 6 shown, add a small icon (such as a dot matrix or an arrow) on the left or right side of each row, and the user can move the entire row of data by clicking and dragging this icon.
[0085] In the embodiments of the present disclosure, the data model layer performs component data processing operations based on the editing requirement data and returns the data processing result to the view model layer, including: the data model layer determines the data difference information before and after dragging based on the data to be dragged and the dragging position, and returns the data difference information to the view model layer.
[0086] In the embodiments of the present disclosure, when the user starts dragging a certain row or column, the current data state is first backed up. During the dragging process, the position changes of the data before and after dragging are calculated in real time according to the user's operations to determine the data difference information. This real-time calculation ensures that the system can quickly respond to the user's dragging operation, reducing unnecessary delays and performance overhead. The data processing is completed at the data model layer, avoiding frequent view redrawing. Only when the dragging ends and the new position is confirmed, the view layer is updated, thereby improving the overall performance and response speed of the system. No matter how the user drags the row or column, the data model layer always ensures that the data displayed in the view is consistent with the background data. This can prevent errors or confusion caused by inconsistent data. Through strict data processing logic and verification mechanisms, it is ensured that the result of each data operation is accurate and reliable, improving the stability and credibility of the system.
[0087] In the embodiments of the present disclosure, in the view model layer, the rendering of the table view layer is triggered according to the data processing result, and the view after component editing is generated in the table view layer, including: in the view model layer, the rendering of the table view layer is triggered based on the component data difference information, and the view for displaying the table data after dragging the data is generated in the table view layer.
[0088] Specifically, the mouse press, movement, and release events of the user can be listened to determine whether a drag operation is triggered based on the drag control. Before the user starts dragging, the current data is backed up for comparison and update after the dragging ends. During the dragging process, the placeholders or shadow effects in the view are dynamically updated to provide visual feedback to the user. When the user releases the mouse button, the changes in the data before and after the drag are calculated and applied to the background data model layer. The re-rendering of the table view layer is triggered to display the latest data arrangement order.
[0089] In some embodiments, the table editing event includes adjusting the table density, and the editing requirement data includes the target density specification. Here, the editing control includes a density adjustment control. Figure 8 For example, the density adjustment control can be an icon (up and down arrows) set in the upper right corner of the table. After the user clicks the density adjustment control, a density option list can be displayed. The user can select the corresponding density specification in the density option list to perform the corresponding zoom-in and zoom-out layout processing on the table density.
[0090] In the embodiments of the present disclosure, in the data model layer, the component data processing operation is performed based on the editing requirement data, and the data processing result is returned to the view model layer, including: saving the target density specification in the data model layer, and returning the saving result of the target density specification to the view model layer.
[0091] The user can select different table density specifications (such as compact, standard, loose, etc.) through the interface. The data model layer saves the target density specification according to the user's selection and calculates the corresponding style parameters (such as row spacing, column spacing, etc.). This real-time calculation ensures that the system can quickly respond to the user's density adjustment requirements, reducing unnecessary latency and performance overhead.
[0092] In the embodiments of the present disclosure, in the view model layer, the rendering of the table view layer is triggered according to the data processing result, and the view after component editing is generated in the table view layer, including: in the view model layer, the rendering of the table view layer is triggered based on the saving result of the target density specification of the component, and the view for displaying the table data after adjusting the table density is generated in the table view layer.
[0093] In some embodiments, the table editing event includes switching the layout mode, the editing requirement data includes the target layout mode, and the target layout mode is the layout mode that the user expects to switch to. Here, switching the layout mode includes the list layout mode and the card layout mode. Combining Figure 9 and Figure 10 as shown, a layout switching control is provided above the table view layer, and the user switches the layout mode by clicking the layout switching control. When the table is in the list layout mode ( Figure 9 the mode shown), after the user clicks the layout switching control, the table switches to the card layout mode ( Figure 10 the mode shown); similarly, when the table is in the card layout mode ( Figure 10 the mode shown), after the user clicks the layout switching control, the table switches to the list layout mode ( Figure 9 the mode shown).
[0094] In the embodiments of the present disclosure, a component data processing operation is performed on the data model layer based on the editing requirement data, and the data processing result is returned to the view model layer, including: saving the target layout mode in the data model layer, and returning the target layout mode saving result to the view model layer.
[0095] In the embodiments of the present disclosure, the table view layer is triggered to render the view according to the data processing result, and a view after component editing is generated in the table view layer, including: the component in the view model layer triggers the table view layer to render the view based on the target layout mode saving result, and a view for displaying the table data after switching the layout mode is generated in the table view layer.
[0096] In some embodiments, the table editing event triggered by the editing control is listened to in the table view layer, and the listened table editing event is sent to the view model layer, including: listening to the table editing event triggered by the editing control in the table view layer, and when the table editing event is listened to, displaying the candidate table editing operations corresponding to the editing control; in response to the user's candidate confirmation operation, determining the actually used table editing operation from the candidate table editing operations; generating a table editing event corresponding to the actually used table editing operation, and sending the listened table editing event to the view model layer.
[0097] The embodiments of the present disclosure can actively recommend the most likely used table editing operations under the editing control. The user can select the actually used table editing operation according to needs, without having to manually perform specific operation actions, which reduces the operation time of the user and improves work efficiency.
[0098] In the embodiments of the present disclosure, each editing control corresponds to a table editing operation of the same operation type. The table editing operations of the same operation type can be divided into more specific table editing operations. Taking the table editing operation of column dragging as an example, the column operation can be further divided into dragging the column to the front, dragging the column to the end, dragging the column to the previous position, dragging the column to the next position, etc. For each editing control, the specific table editing operations performed by the user using each editing control under the same operation type can be recorded.
[0099] Here, for each editing control, the usage frequency of each table editing operation under the editing control and the most recently used table editing operation under the editing control can be pre - counted. Listen for table editing events triggered by the editing control at the table view layer. When a table editing event is detected, display the candidate table editing operations corresponding to the editing control, including: Listen for table editing events triggered by the editing control at the table view layer. When a table editing event is detected, the table editing operations restricted from use under the editing control can be excluded according to the current state of the table. Among the table editing operations retained under the editing control, determine the priority of each table editing operation according to the usage frequency of each table editing operation under the editing control and the most recently used table editing operation under the editing control; use the N table editing operations with the highest priority as the candidate table editing operations corresponding to the editing control and display them. Among them, N can be set according to actual design requirements. For example, N can be one - half of the number of table editing operations under the editing control.
[0100] The embodiments of the present disclosure reduce the occurrence of operation failures or operation errors by excluding table editing operations that are not suitable for the current table state. Recommend the most frequently used and recently used table editing operations according to the actual usage of the user, making the recommended table editing operations more in line with the user's expectations and needs. The user does not need to screen one by one from a large number of table editing operations, but can directly select from the candidate table editing operations with high priority, significantly reducing the operation time. Moreover, as the user's usage habits change, the priority of the table editing operations can be dynamically adjusted to ensure that the recommended table editing operations are always the most relevant and frequently used, improving the user's operation experience.
[0101] In an embodiment of the present disclosure, in the table editing operations reserved under the editing control, the priority of each table editing operation is determined according to the usage frequency of each table editing operation under the editing control and the most recently used table editing operation under the editing control, including: in the table editing operations reserved under the editing control, an importance score is configured for each table editing operation according to the usage frequency of each table editing operation under the editing control, where the importance score is proportional to the usage frequency; an additional score greater than 0 is configured for the most recently used table editing operation under the editing control, and the additional scores of the remaining table editing operations are defaulted to 0; the sum of the importance score and the additional score of each table editing operation is used as the priority score; the priority of each table editing operation is determined according to the priority score of each table editing operation, where the magnitude of the priority score is proportional to the level of the priority.
[0102] Combined with Figure 11 As shown, an embodiment of the present disclosure provides an electronic device 1100, which includes a processor 1101 and a memory 1102. Optionally, the device 1100 may further include a communication interface 1103 and a bus 1104. Among them, the processor 1101, the communication interface 1103, and the memory 1102 can complete mutual communication through the bus 1104. The communication interface 1103 can be used for information transmission. The processor 1101 can call the logical instructions in the memory 1102 to execute the table editing method of the above embodiment.
[0103] In addition, when the logical instructions in the above-mentioned memory 1102 are implemented in the form of a software functional unit and sold or used as an independent product, they can be stored in a computer-readable storage medium.
[0104] The memory 1102, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as the program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor 1101 executes functional applications and data processing by running the program instructions / modules stored in the memory 1102, that is, implements the table editing method in the above embodiment.
[0105] The memory 1102 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the terminal device. In addition, the memory 1102 may include a high-speed random access memory and may also include a non-volatile memory.
[0106] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions configured to execute the above-described table editing method.
[0107] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present disclosure. The foregoing storage medium may be a non-transitory storage medium, such as: a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc, and other media that can store program codes.
[0108] The above description and the drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process, and other changes. Embodiments represent possible variations. Unless explicitly required, separate components and functions are optional, and the order of operations may vary. Parts and features of some embodiments may be included in or substituted for parts and features of other embodiments. Moreover, the terms used in this application are only for describing the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to also include the plural forms. Similarly, as used in this application, the term "and / or" refers to any and all possible combinations including one or more of the associated listed items. Additionally, when used in this application, the term "comprise" and its variants "comprises" and / or "comprising" etc. mean the presence of the stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or groups thereof. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, or device including the element. In this document, what each embodiment focuses on may be the differences from other embodiments, and the same or similar parts among the various embodiments may be referred to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, the relevant parts may refer to the description of the method part.
[0109] Those skilled in the art will realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software can depend on the specific application and design constraints of the technical solution. The skilled person can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the embodiments of the present disclosure. The skilled person can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0110] In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units can be merely a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Additionally, the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be electrical, mechanical, or other forms. The units described as separate components can be or can not be physically separated, and the components displayed as units can be or can not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to implement this embodiment. Additionally, in the embodiments of the present disclosure, the functional units can be integrated in one processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0111] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of code, or a portion thereof, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. In the description corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A table editing method, characterized in that, including: Listen for table editing events triggered by the editing control at the table view layer, and send the listened table editing events to the view model layer. Here, the editing control is a secondary encapsulated interface element used to capture the user's table editing operations in the table view and trigger corresponding editing events; Determine the editing requirement data corresponding to the table editing event at the view model layer, and send the editing requirement data to the data model layer; Execute component data processing operations based on the editing requirement data at the data model layer, and return the data processing result to the view model layer; Trigger the rendering of the table view layer at the view model layer according to the data processing result, and generate a view after component editing at the table view layer.
2. The table editing method according to claim 1, characterized in that Determine the editing requirement data corresponding to the table editing event at the view model layer, and send the editing requirement data to the data model layer, including: Obtain the business logic function corresponding to the table editing event at the view model layer; Perform business processing on the table editing event based on the business logic function to obtain the editing requirement data corresponding to the table editing event; Send the editing requirement data to the data model layer.
3. The table editing method according to claim 1, characterized in that Trigger the rendering of the table view layer at the view model layer according to the data processing result, and generate a view after component editing at the table view layer, including: Update the internal state at the view model layer according to the data processing result; When updating the internal state, trigger the rendering of the table view layer through the two-way data binding mechanism, and generate a view after component editing at the table view layer.
4. The table editing method according to claim 1, characterized in that The table editing event includes object filtering, and the editing requirement data includes object filtering conditions; Execute component data processing operations based on the editing requirement data at the data model layer, and return the data processing result to the view model layer, including: Filter and sort the current table data based on the object filtering conditions at the data model layer to obtain the re-sorted table data, and return the re-sorted table data to the view model layer; Trigger the rendering of the table view layer at the view model layer according to the data processing result, and generate a view after component editing at the table view layer, including: Trigger the rendering of the table view layer at the view model layer according to the re-sorted table data, and generate a view for displaying the re-sorted table data at the table view layer.
5. The table editing method according to claim 1, characterized in that The table editing event includes object dragging, and the editing requirement data includes the data to be dragged and the dragging position; Execute component data processing operations based on the editing requirement data at the data model layer, and return the data processing result to the view model layer, including: Determine the data difference information before and after dragging based on the data to be dragged and the dragging position at the data model layer, and return the data difference information to the view model layer; Trigger the rendering of the table view layer at the view model layer according to the data processing result, and generate a view after component editing at the table view layer, including: Trigger the rendering of the table view layer at the view model layer based on the component data difference information, and generate a view for displaying the table data after dragging the data at the table view layer.
6. The table editing method according to claim 1, characterized in that The table editing event includes adjusting the table density, and the editing requirement data includes the target density specification; Execute component data processing operations based on the editing requirement data in the data model layer, and return the data processing result to the view model layer, including: save the target density specification in the data model layer, and return the save result of the target density specification to the view model layer; In the view model layer, trigger the rendering of the table view layer according to the data processing result, and generate the view after component editing in the table view layer, including: in the view model layer, the component triggers the rendering of the table view layer based on the save result of the target density specification, and generate a view for displaying the table data after adjusting the table density in the table view layer.
7. The table editing method according to claim 1, characterized in that The table editing event includes switching the layout mode, and the editing requirement data includes the target layout mode; Execute component data processing operations based on the editing requirement data in the data model layer, and return the data processing result to the view model layer, including: save the target layout mode in the data model layer, and return the save result of the target layout mode to the view model layer; In the view model layer, trigger the rendering of the table view layer according to the data processing result, and generate the view after component editing in the table view layer, including: in the view model layer, the component triggers the rendering of the table view layer based on the save result of the target layout mode, and generate a view for displaying the table data after switching the layout mode in the table view layer.
8. The table editing method according to claim 1, wherein In the table view layer, listen for the table editing event triggered by the editing control, and send the monitored table editing event to the view model layer, including: In the table view layer, listen for the table editing event triggered by the editing control, and when the table editing event is monitored, display the candidate table editing operations corresponding to the editing control; In response to the user's candidate confirmation operation, determine the actually used table editing operation from the candidate table editing operations; Generate a table editing event corresponding to the actually used table editing operation, and send the monitored table editing event to the view model layer.
9. An electronic device, comprising a processor and a memory storing program instructions, characterized in that, The processor executes the table editing method according to any one of claims 1 to 8.
10. A storage medium, characterized in that, Computer program instructions are stored in the storage medium, and when the computer program instructions are run by the processor, the table editing method according to any one of claims 1 to 8 is executed.