树节点vuejs2中的Click事件处理程序

时间:2019-05-10 10:00:55

标签: vuejs2

我在here中复制的vuejs中具有以下树实现,如何在我的树叶节点上添加click事件。我尝试在树项目中添加点击处理程序,并从组件中发出事件,但事件处理程序中仅显示“我的树”。

from datetime import datetime, timedelta

# Open the file as read
f = open("/home/pi/GPS.TXT/gpsdata.2019-05-09_21:54.txt", "r+")

# Create an array to hold write data
new_file = []

# Loop the file line by line
for line in f:
    # Split A,B on , and use first position [0], aka A, then add to the new array
    only_a = line.split(",")

    # parse the data for first column, it's a specific case
    current_dt = datetime.strptime(only_a[1],'%H%M%S.%f')
    future_dt = current_dt + timedelta(hours=7)

    # Add to write list
    new_file.append("{0} {1} {2} {3} {4}".format(future_dt.strftime('%H%M%S.%f'), only_a[3], only_a[4], only_a[5], only_a[6]))

# Formating loo done, now open output file and write there.
# Open the file as Write, loop the new array and write with a newline
with open("/home/pi/text1.txt", "w+") as f:
    for i in new_file:
        f.write(i+"\n")

0 个答案:

没有答案