Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
An existing applet is an application that can be issued from a server and executed within a particular container without installation.
However, in general, applets are generally smaller and simpler in function. When a large data processing amount is required, the existing applet data processing speed is low, the time is long, and the user experience is poor.
Therefore, in view of the above problems, the present disclosure provides a program form creation method, which sets a form component in an applet, and further, processes data based on the form component, so as to improve the data processing capability of the applet, for example, process data such as excel, and solve the problems of low data processing speed, long time consumption and poor user experience of the existing applet.
The program form creation method provided in the present disclosure may be applied to a schematic diagram of a program form creation system shown in fig. 1, where, as shown in fig. 1, the system includes a terminal 10, and the terminal 10 may include at least one of a receiving device 101, a processor 102, a display device 103, and a memory 104.
In a specific implementation, the receiving device 101 may be an input/output interface, or may be a communication interface, and may be used for input of an applet or the like, and output of an applet or the like that sets a table.
The processor 102 may render a first preset number of the row container labels in the container labels of the table according to the container labels and the row container labels of the table created in the target applet, may render a second preset number of the cell labels in each row container label according to the cell labels created in the target applet, may insert labels for identifying the cell positions in each cell label, and obtain the target table in the target applet according to each row container label, each cell label, and each label for identifying the cell positions. The target applet may be any one or more applets that need to create a table.
The display device 103 may be used to display the above-described object applet, container label, line container label, and the like.
The display device may also be a touch display screen for receiving user instructions simultaneously with the displayed information to enable interaction with a user.
Memory 104 may store information such as related instructions that may be executed on the processor.
It should be understood that the above-described processor may be implemented by a processor that reads instructions in a memory and executes the instructions, or may be implemented by a chip circuit.
The above system is only one exemplary system, and may be set according to application requirements when implemented.
The following describes the technical solutions of the present disclosure and how the technical solutions of the present disclosure solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
Fig. 2 is a flowchart of a program table creation method provided in an embodiment of the present disclosure, where an execution body of the embodiment of the present disclosure may be a terminal in the foregoing embodiment. As shown in fig. 1, the method may include:
S201: and rendering a first preset number of row container labels in the container labels of the table according to the container labels and the row container labels of the table created in the target applet.
Here, the terminal may first create a container tag of the table in the target applet and create a row container tag.
Illustratively, a < scroll-view > tag is created as a container tag for the table, set to CONTAIN.
A < view > tag is created as a row container tag of the table, set to TB.
In addition, the first preset number may be set by the terminal according to actual situations.
For example, the variable T is set to be a two-dimensional array, and specifically, the variable T is a two-dimensional array of m rows and n columns, where the first preset number may be m.
Optionally, the rendering the first preset number of the row container labels in the container labels of the table may include:
and rendering a first preset number of the row container labels in the container labels of the table by using the cyclic rendering of the target applet. For example, a row is rendered, T is traversed, and m TB's are rendered in CONTAIN using loop rendering of the applet.
S202: and respectively rendering a second preset number of cell labels in each row of container labels according to the cell labels created in the target applet.
Here, the terminal may first create a cell tag, for example, create a < view > tag, set as TC as a cell tag of the table.
The second preset number may be set by the terminal according to actual situations. For example, the setting variable T is a two-dimensional array of m rows and n columns, where the second preset number may be n.
For example, rendering a second preset number of cell labels in each row of container labels respectively may include:
in the mth TB, the mth value of T is taken, and because T is a two-dimensional array, the mth value of T is also an array, and n cells TC are rendered in the mth TB by using the array through cyclic rendering of a small program.
In addition, the width and height of each cell can be set according to practical situations, for example, each cell is equal in width and height.
S203: and respectively inserting labels for identifying the positions of the cells into the cell labels.
For example, the terminal may insert an input tag into each cell tag, and set the value of the data-index attribute of the input tag to'm, n', i.e., set the value of the data-index attribute to one string of m rows and n columns, for identifying the current location.
S204: and obtaining a target table in the target applet according to each row container label, each cell label and each label for identifying the cell position.
The cells of each column of each row are aligned on a vertical line according to the container labels of each row and the cell labels of each column, and the labels for identifying the positions of the cells are contained in each cell, so that a target table is obtained.
As can be seen from the foregoing description, in the embodiments of the present disclosure, the container label and the row container label of the table created in the target applet are used to render the first preset number of the row container labels in the container label of the table, and the second preset number of the cell labels are respectively rendered in each row container label according to the cell labels created in the target applet, and the labels for identifying the cell positions are respectively inserted in each cell label, so that the target form is obtained in the target applet according to each row container label, each cell label and each label for identifying the cell positions, and further, the setting of the form component is implemented in the applet, and the data processing capability of the applet, such as processing excel, is improved, so that the problems of slow data processing speed, long time and poor user experience of the existing applet are solved.
In addition, the embodiment of the disclosure can expand the target table after the target table is acquired. Fig. 3 is a flow chart of another program table creating method according to an embodiment of the present disclosure, and an execution body of the embodiment may be a terminal in the embodiment shown in fig. 1. As shown in fig. 3, the method includes:
s301: and rendering a first preset number of row container labels in the container labels of the table according to the container labels and the row container labels of the table created in the target applet.
S302: and respectively rendering a second preset number of cell labels in each row of container labels according to the cell labels created in the target applet.
S303: and respectively inserting labels for identifying the positions of the cells into the cell labels.
S304: and obtaining a target table in the target applet according to each row container label, each cell label and each label for identifying the cell position.
The implementation manners of steps S301 to S304 are the same as those of steps S201 to S204, and are not repeated here.
S305: the container tag of the form is bound to a scroll function by which to monitor the form scroll event.
Here, the terminal may bind the container tag of the form with the scroll function, and further monitor the form scroll event, e.g., monitor whether there is an event of the user scrolling the form, through the scroll function.
S306: if the table scrolling event is monitored, judging whether the position of the target table after the scrolling is smaller than a first preset distance threshold value from the boundary of the target table in a first transverse preset direction according to the label for identifying the position of the cell.
The first preset distance threshold may be set according to an actual situation. The first preset direction of the lateral direction may be the right side of the table of the lateral direction.
After the table scrolling event is monitored, the terminal may determine the position of the target table after the target table is scrolled according to the tag for identifying the position of the cell, for example, determine that the position of the current column of the target table after the target table is scrolled jumps from the 1 st example to the 10 th column according to the tag for identifying the position of the cell. Further judging whether the position of the target table after scrolling is smaller than a first preset distance threshold value from the boundary of the target table in the first preset transverse direction, for example, the boundary of the target table in the first preset transverse direction is in the 11 th column, the first preset distance threshold value is 0.5 column width, and if the position of the target table after scrolling is in the 10 th column, the boundary of the target table and the target table in the first preset transverse direction is smaller than the first preset distance threshold value.
S307: and if the distance between the rolled position of the target table and the boundary of the target table in the transverse direction in the first preset direction is smaller than the first preset distance threshold value, expanding the target table according to the number of columns of the preset number.
Here, if the position of the target table after scrolling is less than the first preset distance threshold from the boundary of the target table in the first preset direction in the lateral direction, the column of the target table is expanded, otherwise, the column is not expanded.
The number of columns of the preset number may be set according to practical situations, for example, 5 columns.
Illustratively, in event callbacks. Transversely, if the right distance of the table from the right boundary is less than the threshold. Then operation T, increment the table by Q columns, traverse T, set TEMP for each value in T, which is also an array, increment Q null elements after this TEMP. After T is modified, the applet will render again based on T. The phenomenon is that the form adds Q columns and the user can continue scrolling to the right.
S308: if the table scrolling event is monitored, judging whether the position of the target table after the scrolling is smaller than a second preset distance threshold value from the boundary of the target table in a second preset longitudinal direction according to the label for identifying the position of the cell.
In the same way, the second preset distance threshold may be set according to the actual situation. The second predetermined longitudinal direction may be a lower side of the table in the longitudinal direction.
After the table scrolling event is monitored, the terminal can determine the position of the target table after the target table is scrolled according to the label for identifying the position of the cell. And further judging whether the position of the target table after the rolling is smaller than a second preset distance threshold value from the boundary of the target table in a second preset longitudinal direction.
S309: if the distance between the rolled position of the target table and the boundary of the target table in the longitudinal second preset direction is smaller than the second preset distance threshold, expanding the target table according to the preset number of rows.
If the position of the target table after scrolling is smaller than the second preset distance threshold value from the boundary of the target table in the second preset longitudinal direction, extending the row of the target table, otherwise, not extending.
The preset number of rows may be set according to practical situations, for example, 5 rows.
Illustratively, in event callbacks. Longitudinally, if the distance below the table is less than the threshold. Then operation T causes the table to increment by Q rows, specifically, at the end of the T array, Q arrays of n elements are inserted. After T is modified, the applet will render again based on T. The phenomenon is that the form adds Q rows and the user can continue to scroll down.
In addition, after the target applet obtains the target form, the program can also judge whether the position of the target form after rolling is less than a preset threshold from the boundary of the target form by monitoring the form rolling event, if so, the target form is expanded, so that a user can continue to roll the form, and the requirement of expanding the form in application is met.
In addition, the embodiment of the disclosure can also edit the target table after the target table is acquired. Fig. 4 is a flowchart of another program table creating method according to an embodiment of the present disclosure, where the execution body of the embodiment may be the terminal in the embodiment shown in fig. 1. As shown in fig. 4, the method includes:
s401: and rendering a first preset number of row container labels in the container labels of the table according to the container labels and the row container labels of the table created in the target applet.
S402: and respectively rendering a second preset number of cell labels in each row of container labels according to the cell labels created in the target applet.
S403: and respectively inserting labels for identifying the positions of the cells into the cell labels.
S404: and obtaining a target table in the target applet according to each row container label, each cell label and each label for identifying the cell position.
The implementation manners of steps S401 to S404 are the same as those of steps S201 to S204, and are not repeated here.
S405: and each cell label is respectively bound with an input callback function, and a cell input event is monitored through the input callback function.
Here, the terminal may bind each unit cell tag with the input callback function, and further monitor the unit cell input event through the input callback function, for example, monitor whether there is an event input by the user in the table.
S406: and if the cell input event is monitored, acquiring the row and column of the target table where the cell input event is located according to the label for identifying the cell position.
If the cell input event is monitored, the terminal can obtain the row and column of the target table where the cell input event is located according to the label for identifying the cell position.
S407: editing the target table according to the input value of the cell input event and the row and column of the target table where the cell input event is located.
Optionally, before the editing of the target table according to the input value of the cell input event and the row and column of the target table where the cell input event is located, the method further includes:
and obtaining the input value according to the index key of the current target data set of the event object input by the cell.
Illustratively, the cell input event is monitored, and when a user inputs and edits a cell, in the event callback, a value is taken through the index key of the current target data set of the incoming event object. According to the label for identifying the cell position, the row and column of the target table where the cell input event is located, that is, the row and column where input is located, are set as m1 rows and n1 columns. The value is taken by the key of the event object' detail. Then the n1 st value of the m1 st value of T is set to Q. The applet then renders again according to T, and the table of row m1 and column n1 is modified to Q.
In the program table creation method provided by the embodiment of the disclosure, the table component is set in the applet, the data processing is performed through the table component, the data processing capability of the applet is improved, in addition, after the target applet obtains the target table, the row of the target table where the cell input event is located can be determined through the cell input event, and the target table is edited according to the input value of the cell input event and the row of the target table where the cell input event is located, so that the requirement of table editing in application is met.
In addition, the embodiment of the disclosure can also delete the row and column of the target table after the target table is acquired. Fig. 5 is a flowchart of another program table creating method according to an embodiment of the present disclosure, where the execution body of the embodiment may be the terminal in the embodiment shown in fig. 1. As shown in fig. 5, the method includes:
s501: and rendering a first preset number of row container labels in the container labels of the table according to the container labels and the row container labels of the table created in the target applet.
S502: and respectively rendering a second preset number of cell labels in each row of container labels according to the cell labels created in the target applet.
S503: and respectively inserting labels for identifying the positions of the cells into the cell labels.
S504: and obtaining a target table in the target applet according to each row container label, each cell label and each label for identifying the cell position.
The implementation manners of steps S501-S504 are the same as those of steps S201-S204, and are not repeated here.
S505: and each cell label is respectively bound with the long press function, and monitors the long press event of the cell through the long press function.
Here, the terminal may bind each unit cell label with the long press function, and further monitor the long press event of the unit cell through the long press function, for example, monitor whether there is an event that the user presses in the table for a long time.
S506: if the long-press event of the cell is monitored, a row and column of the target table where the long-press event of the cell is located is obtained according to the label for identifying the position of the cell, and a table row and column deleting selection frame is generated.
Illustratively, the cell is monitored for input events, and when a user presses a certain cell for a long time, in the event callback, a value is taken through the index key of the current target data set of the incoming event object. According to the label for identifying the cell position, the row and column of the target table where the cell input event is located, that is, the row and column where the input is located, are set as m1 row and n1 column, and then a table row and column deletion selection box is generated. The table row and column deletion selection box can contain options of 'delete row', 'delete column', 'cancel'.
Specifically, an applet showActionSheet method may be executed, and the parameter itemList is an array, in which 'delete row', 'delete column', 'cancel' are respectively included. The method is characterized in that the applet pops up a selection box, and has the options of 'delete row', 'delete column', 'cancel', and the callback function of the operation table is displayed in a binding mode.
S507: and obtaining a deletion request according to the table row and column deletion selection frame.
Here, the user may select in the table rank deletion selection box according to the actual situation, and generate a corresponding deletion request, and then the terminal acquires the deletion request to perform subsequent processing.
S508: and performing row deletion or column deletion on the target table according to the deletion request and the row and column of the target table where the cell long press event is located.
Optionally, the performing row deletion or column deletion on the target table according to the deletion request and the row and column of the target table where the cell long press event is located includes:
executing the display operation table method of the target applet, and transmitting tab index parameters, wherein the tab index parameters are used for representing the deletion request;
if the tab index parameter is a first value, deleting the row of the target table according to the row and column of the target table where the cell long press event is located;
and if the tab index parameter is a second value, deleting the columns of the target table according to the columns and rows of the target table where the cell long press event is located.
Illustratively, the options in the table row and column deleting selection frame are clicked, a callback function of the display operation table of the applet is executed, a value of which item is clicked by the user is input in the tab index parameter, and in the callback function of the display operation table, which represents which option is clicked by the user is input through the input tab index parameter. If the tab index parameter is a first value, e.g., equal to 0, i.e., the user clicks on the 'delete line', then operation T, the m1 st value in T, is deleted. After T is modified, the applet will render again based on T. The phenomenon is that the table is deleted at row m 1. If the tab index parameter is a second value, e.g., equal to 1, i.e., the user clicks on the 'delete column', then operation T, delete the 1 st value of each value in T. After T is modified, the applet will render again based on T. The phenomenon is that the table is deleted in column n 1.
In the program table creation method provided by the embodiment of the disclosure, the table component is set in the applet, the data processing is performed through the table component, the data processing capability of the applet is improved, in addition, after the target applet obtains the target table, the row and column of the target table where the long-time event is located can be determined through the long-time event of the cell, the table row and column deletion selection frame is generated, further, the deletion request is obtained, and the row deletion or the column deletion is performed on the target table according to the deletion request and the row and column of the target table where the long-time event is located, so that the requirement of table deletion in application is met.
Corresponding to the program table creating method of the above embodiment, fig. 6 is a schematic structural diagram of the program table creating apparatus provided by the embodiment of the present disclosure. For ease of illustration, only portions relevant to embodiments of the present disclosure are shown. Fig. 6 is a schematic structural diagram of a program table creating apparatus according to an embodiment of the present disclosure. As shown in fig. 6, the program table creation device 60 includes: a first rendering module 601, a second rendering module 602, an inserting module 603, and an obtaining module 604.
The first rendering module 601 is configured to render a first preset number of row container labels in container labels of a table according to container labels and row container labels of a table created in a target applet.
And a second rendering module 602, configured to render a second preset number of cell labels in each row of container labels according to the cell labels created in the target applet.
An inserting module 603, configured to insert, in each of the cell labels, a label for identifying a cell position.
An obtaining module 604, configured to obtain a target table in the target applet according to each row container tag, each cell tag, and each tag for identifying a cell location.
The device provided in the embodiments of the present disclosure may be used to implement the technical solutions of the embodiments of the methods, and implementation principles and technical effects are similar, and the embodiments of the present disclosure are not repeated herein.
Fig. 7 is a schematic structural diagram of another program table creating apparatus according to an embodiment of the present disclosure. As shown in fig. 7, the embodiment of the present disclosure further includes, on the basis of the embodiment of fig. 6: an expansion module 605, an editing module 606, and a deletion module 607.
In one possible design, the container label of the table is bound to a rolling function.
An extension module 605 configured to monitor a table scrolling event through the scrolling function after the obtaining module 604 obtains a target table in the target applet;
if the table scrolling event is monitored, judging whether the position of the target table after the scrolling is smaller than a first preset distance threshold value from the boundary of the target table in a first transverse preset direction according to the label for identifying the position of the cell;
and if the distance between the rolled position of the target table and the boundary of the target table in the transverse direction in the first preset direction is smaller than the first preset distance threshold value, expanding the target table according to the number of columns of the preset number.
In one possible design, the expansion module 605 is further configured to determine, according to the tag for identifying a cell location, whether a location of the target form after scrolling is less than a second preset distance threshold from a boundary of the target form in a second preset longitudinal direction after the monitoring of the form scrolling event;
if the distance between the rolled position of the target table and the boundary of the target table in the longitudinal second preset direction is smaller than the second preset distance threshold, expanding the target table according to the preset number of rows.
In one possible design, each of the cell labels is bound to an input callback function.
An editing module 606, configured to monitor, after the obtaining module obtains the target table in the target applet, a cell input event through the input callback function;
if the cell input event is monitored, acquiring a row and column of the target table where the cell input event is located according to the label for identifying the cell position;
editing the target table according to the input value of the cell input event and the row and column of the target table where the cell input event is located.
In one possible design, the editing module 606 is further configured to obtain the input value according to the current target dataset index key of the cell input event object before editing the target table according to the input value of the cell input event and the row and column of the target table where the cell input event is located.
In one possible design, each of the cell labels is bound to a long per-function.
A deleting module 607, configured to monitor, by the long press function, a long press event of a cell after the obtaining module obtains a target table in the target applet;
if the long-press event of the cell is monitored, obtaining a row and column of the target table where the long-press event of the cell is located according to the label for identifying the position of the cell, and generating a table row and column deleting selection frame;
obtaining a deletion request according to the table row and column deletion selection frame;
and performing row deletion or column deletion on the target table according to the deletion request and the row and column of the target table where the cell long press event is located.
In one possible design, the deleting module 607 performs row deletion or column deletion on the target table according to the deletion request and the row and column of the target table where the cell length press event is located, including:
Executing the display operation table method of the target applet, and transmitting tab index parameters, wherein the tab index parameters are used for representing the deletion request;
if the tab index parameter is a first value, deleting the row of the target table according to the row and column of the target table where the cell long press event is located;
and if the tab index parameter is a second value, deleting the columns of the target table according to the columns and rows of the target table where the cell long press event is located.
The device provided in the embodiments of the present disclosure may be used to implement the technical solutions of the embodiments of the methods, and implementation principles and technical effects are similar, and the embodiments of the present disclosure are not repeated herein.
Referring to fig. 8, an electronic apparatus 800 may include a processing device (e.g., a central processor, a graphics processor, etc.) 801 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage device 808 into a random access Memory (Random Access Memory, RAM) 803. In the RAM803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
In general, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 807 including, for example, a liquid crystal display (Liquid Crystal Display, LCD for short), a speaker, a vibrator, and the like; storage 808 including, for example, magnetic tape, hard disk, etc.; communication means 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 8 shows an electronic device 800 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication device 809, or installed from storage device 808, or installed from ROM 802. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 801.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer-readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above-described embodiments.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (Local Area Network, LAN for short) or a wide area network (Wide Area Network, WAN for short), or it may be connected to an external computer (e.g., connected via the internet using an internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to a first aspect, according to one or more embodiments of the present disclosure, there is provided a program table creation method including:
rendering a first preset number of row container labels in the container labels of a table according to the container labels and the row container labels of the table created in a target applet;
respectively rendering a second preset number of cell labels in each row of container labels according to the cell labels created in the target applet;
respectively inserting labels for identifying the positions of the cells into the cell labels;
and obtaining a target table in the target applet according to each row container label, each cell label and each label for identifying the cell position.
In accordance with one or more embodiments of the present disclosure, the container label of the form is bound to a rolling function;
after the target applet obtains the target table, it further comprises:
monitoring a table scrolling event through the scrolling function;
if the table scrolling event is monitored, judging whether the position of the target table after the scrolling is smaller than a first preset distance threshold value from the boundary of the target table in a first transverse preset direction according to the label for identifying the position of the cell;
And if the distance between the rolled position of the target table and the boundary of the target table in the transverse direction in the first preset direction is smaller than the first preset distance threshold value, expanding the target table according to the number of columns of the preset number.
According to one or more embodiments of the present disclosure, after the monitoring of the form scroll event, further comprising:
judging whether the position of the target table after rolling is smaller than a second preset distance threshold value or not from the boundary of the target table in a second longitudinal preset direction according to the label for identifying the position of the cell;
if the distance between the rolled position of the target table and the boundary of the target table in the longitudinal second preset direction is smaller than the second preset distance threshold, expanding the target table according to the preset number of rows.
According to one or more embodiments of the present disclosure, each of the cell labels is bound to an input callback function, respectively;
after the target applet obtains the target table, it further comprises:
monitoring an input event of a cell through the input callback function;
if the cell input event is monitored, acquiring a row and column of the target table where the cell input event is located according to the label for identifying the cell position;
Editing the target table according to the input value of the cell input event and the row and column of the target table where the cell input event is located.
According to one or more embodiments of the present disclosure, before the editing the target table according to the input value of the cell input event and the row and column of the target table where the cell input event is located, the method further includes:
and obtaining the input value according to the index key of the current target data set of the event object input by the cell.
According to one or more embodiments of the present disclosure, each of the cell labels is bound to a long per-function, respectively;
after the target applet obtains the target table, it further comprises:
monitoring a cell long press event through the long press function;
if the long-press event of the cell is monitored, obtaining a row and column of the target table where the long-press event of the cell is located according to the label for identifying the position of the cell, and generating a table row and column deleting selection frame;
obtaining a deletion request according to the table row and column deletion selection frame;
and performing row deletion or column deletion on the target table according to the deletion request and the row and column of the target table where the cell long press event is located.
According to one or more embodiments of the present disclosure, the performing row deletion or column deletion on the target table according to the deletion request and the row and column of the target table where the cell long press event is located includes:
executing the display operation table method of the target applet, and transmitting tab index parameters, wherein the tab index parameters are used for representing the deletion request;
if the tab index parameter is a first value, deleting the row of the target table according to the row and column of the target table where the cell long press event is located;
and if the tab index parameter is a second value, deleting the columns of the target table according to the columns and rows of the target table where the cell long press event is located.
In a second aspect, according to one or more embodiments of the present disclosure, there is provided a program table creation apparatus including:
the first rendering module is used for rendering a first preset number of row container labels in the container labels of the table according to the container labels and the row container labels of the table created in the target applet;
the second rendering module is used for respectively rendering a second preset number of cell labels in each row of container labels according to the cell labels created in the target applet;
The inserting module is used for respectively inserting labels for identifying the positions of the cells into the cell labels;
and the obtaining module is used for obtaining a target table in the target applet according to each row of container labels, each cell label and each label for identifying the cell position.
In accordance with one or more embodiments of the present disclosure, the container label of the form is bound to a rolling function;
the device also comprises an expansion module, a target applet, a scrolling function and a display module, wherein the expansion module is used for monitoring a table scrolling event through the scrolling function after the acquisition module acquires the target table from the target applet;
if the table scrolling event is monitored, judging whether the position of the target table after the scrolling is smaller than a first preset distance threshold value from the boundary of the target table in a first transverse preset direction according to the label for identifying the position of the cell;
and if the distance between the rolled position of the target table and the boundary of the target table in the transverse direction in the first preset direction is smaller than the first preset distance threshold value, expanding the target table according to the number of columns of the preset number.
According to one or more embodiments of the present disclosure, the expansion module is further configured to, after the monitoring of the table scrolling event, determine, according to the tag for identifying a cell position, whether a position of the target table after the scrolling is less than a second preset distance threshold from a boundary of the target table in a second preset longitudinal direction;
If the distance between the rolled position of the target table and the boundary of the target table in the longitudinal second preset direction is smaller than the second preset distance threshold, expanding the target table according to the preset number of rows.
According to one or more embodiments of the present disclosure, each of the cell labels is bound to an input callback function, respectively;
the device also comprises an editing module, a cell input event monitoring module and a cell input event monitoring module, wherein the editing module is used for monitoring cell input events through the input callback function after the obtaining module obtains a target form in the target applet;
if the cell input event is monitored, acquiring a row and column of the target table where the cell input event is located according to the label for identifying the cell position;
editing the target table according to the input value of the cell input event and the row and column of the target table where the cell input event is located.
According to one or more embodiments of the present disclosure, each of the cell labels is bound to a long per-function, respectively;
the device also comprises a deleting module, a long-press function monitoring module and a long-press function monitoring module, wherein the deleting module is used for monitoring a long-press event of a cell through the long-press function after the obtaining module obtains a target form in the target applet;
If the long-press event of the cell is monitored, obtaining a row and column of the target table where the long-press event of the cell is located according to the label for identifying the position of the cell, and generating a table row and column deleting selection frame;
obtaining a deletion request according to the table row and column deletion selection frame;
and performing row deletion or column deletion on the target table according to the deletion request and the row and column of the target table where the cell long press event is located.
In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes the computer-executable instructions stored by the memory, causing the at least one processor to perform the program form creation method as described above in the first aspect and the various possible designs of the first aspect.
In a fourth aspect, according to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium having stored therein computer-executable instructions which, when executed by a processor, implement the program form creation method as described above in the first aspect and the various possible designs of the first aspect.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.